Skip to content

decdn pool list cannot show a pool the local store has lost #2077

Closed

Description

@thiras

decdn pool list reads only the local buyer store, so it cannot show a pool whose store row is gone — which is precisely the situation an operator runs it in.

Current behavior

PoolCommand::List is documented as "read-only; reads the buyer store, no chain or network access" (crates/common/src/cli/pool.rs:33-34), and list (crates/cli/src/commands/pool.rs:939) does exactly that. PoolListArgs carries only --data-dir and --json — no --all, no chain path.

close and reclaim both already accept --all, which enumerates every pool the keystore owns from chain via enumerate_owned_pools. list is the odd one out.

Why it matters

This is the diagnostic for the failure in #2072: a reset identity.data_dir loses the node's only record that it owns a funded PaymentPool deposit. The operator's first instinct is decdn pool list — and it prints nothing, because the store is the thing that was lost. The chain says otherwise, and there is no command that shows it.

#2075 makes the daemon self-heal (it reconciles against getPools at bootstrap and adopts), and it adds decdn_buyer_pool_adoption_failures_total plus log lines naming stranded pools. But an operator still has no way to ask "what do I actually own on chain?" without reaching for cast. The runbook section added in #2075 had to be written around the gap.

Proposal

Add --all to PoolListArgs, matching close --all / reclaim --all: page getPools(owner) and show every pool in every lifecycle state with its on-chain deposit, totalRedeemed, status and dispute deadline, marking which ones the local store tracks.

enumerate_owned_pools is already shared — #2075 moved it from crates/cli/src/commands/pool.rs to decdn_incentive::payment_pool so the node could use it too, so the CLI side is a call away.

The store-only listing stays the default; --all is the chain-authoritative view. Worth stating in the command doc which one an operator wants when the two disagree, since a disagreement is itself the signal.

Follow-up

docs/runbook.md § "Node-to-node pulls never succeed (buyer wallet or pool)" currently routes around this. Update it to use pool list --all once it exists.

Activity

  1. added
    kind:feature
    area:cli
    on Sep 20, 2026
  2. thiras commented on Sep 20, 2026

    @thiras
    ContributorAuthor

    Cross-referencing #2078, which changes the premise here.

    This issue reasons that pool list "reads only the local buyer store, so it cannot show a pool whose store row is gone." On a node host it does not read that store at all — it opens the standalone client's buyer-pools.redb, while the daemon's buyer state is in buyer.redb. So pools=0 is what a node prints unconditionally, including when the row is present and intact (verified against a node that had just logged a successful #2075 adoption).

    That does not invalidate the --all proposal — a chain-authoritative view is still the right diagnostic, and arguably more clearly so now. But two details shift:

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

Metadata

Metadata

Assignees

Labels

area:clikind:feature

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions