Skip to content

pool reclaim --pool: check the dispute deadline before sending, and name the cause and deadline in the error #2237

Closed

Description

@yigitdot

Observed

Testnet, 2026-09-29. decdn pool close --pool 0xa0cf5948… succeeded and printed run decdn pool reclaim --pool … after Unix 1790875000 (2026-10-01 17:16 UTC). A decdn pool reclaim --pool 0xa0cf5948… run inside that window failed with:

Error: reclaim reverted on-chain for pool 0xa0cf5948… (not closed, or its dispute window has not elapsed yet)

The pool was known to be Closing, so only the second cause applied, but the error names two causes without saying which one it is, and it does not show the deadline. The user has to go back to the close output (or the chain) to find out when to retry.

Cause

  • --pool goes straight to reclaim_and_forget (crates/cli/src/commands/pool.rs:569), which sends reclaim(pool_id) and maps any revert to one fixed two-cause message (pool.rs:582, pool.rs:599).
  • --all reads each pool first and runs plan_reclaim(status, disputeDeadline, now) (pool.rs:474), which already distinguishes Open, Closing in-window (carrying the deadline), Closing past the deadline, and already Closed. The --pool path (reclaim, pool.rs:712) never calls it.

Suggested fix

In the --pool path, read the pool (getPool) and run it through plan_reclaim before sending, like --all does:

  • Closing, in window: fail with e.g. pool 0xa0cf… is still in its dispute window; reclaimable after 2026-10-01 17:16 UTC (Unix 1790875000), without sending a transaction.
  • Open: say so and point at decdn pool close.
  • Closed: say it was already reclaimed.
  • Only a pool past its deadline sends reclaim. Keep the existing revert mapping as a fallback for a race.

Because getPool is a read-only call, this check can also run before the keystore is unlocked, so an in-window retry does not ask for the password at all.

🤖 Generated with Claude Code

Activity

  1. added
    kind:bug
    rust
    area:cli
    on Sep 29, 2026
  2. added
    prio:low
    on Sep 29, 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:clikind:bugprio:lowrust

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions