Skip to content

Prune closed channels from store on definitive ChannelNotOpen #2551

Closed as not planned

Description

@alpergundogdu

The expiry-reclaim sweep (crates/server/src/reclaim.rs, DecdnTreasury::reclaim_expired in crates/server/src/treasury.rs) calls reclaimExpired via a simulated .call() first and treats any revert as Ok(false) (leave the row). A channel closed via a non-reclaim path (cooperative/dispute close) returns ChannelNotOpen forever, so its store row is never pruned — unbounded but harmless (a cheap retried eth_call each tick).

Fix: distinguish a definitive ChannelNotOpen/closed state from "not yet expired" and drop the row when the channel is provably gone (e.g. a settlement-event watcher, or a getChannel status check).

v1-acceptable per final review; follow-up hardening.

Activity

  1. transferred this issue fromdecdn/sponsordon Oct 19, 2026
  2. added
    area:sponsord
    on Oct 19, 2026
  3. thiras commented on Oct 21, 2026

    @thiras
    Contributor

    Closing as no longer applicable.

    The expiry-reclaim sweep and the per-channel store this issue describes (crates/server/src/reclaim.rs, DecdnTreasury::reclaim_expired) left the code in decdn/sponsord's c0b9d277 when sponsord moved from pairwise channels to the shared PaymentPool (ADR 003); crates/server itself was removed in 8f48d7cd (the split into daemon, core library and onramp). Today sponsord and sponsord-onramp are stateless (docs/sponsord/operator.md: "It keeps no state"), so there is no channel row to prune and no reclaimExpired call to distinguish.

  4. moved this from Backlog to Done in deCDNon Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sponsord

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions