Skip to content

client: a stored buyer pool the chain has no record of dead-ends the fetch on NotFound #2678

In review

Description

@thiras

Follow-up from #2665 (#2668).

Today. #2668 makes the funding recovery step replace a stored pool the chain has no record of (getPool reads a zero owner), unless a run of the same command opened it, topped it up, or read it as its own. But that step runs only after some node refuses the pool with Unfunded.

A node answers a pool it has no on-chain record of with NotFound (ServeRejectReason::PoolUnconfirmed, crates/node/src/handlers/client/mod.rs). ADR 003 § Funding recovery says it plainly: "Such a fetch never reaches a recovery step." So when the stored row names a pool this deployment never opened, the sequence is:

  1. The first lane build's still_open (crates/client/src/funding.rs) reads a zero owner and keeps the row, on purpose (PoolStanding::Unknown), because a lagging RPC can miss a pool opened moments ago.
  2. Every node refuses the lanes with NotFound.
  3. The fetch ends as if no node held the blob. No recovery step runs and no replacement is opened.

The user sees a plain miss with a funded wallet, and every later fetch repeats it until the row is removed by hand. #2668 covers only the narrower case where a node still answers Unfunded (for example from a cached admission).

Ask. Decide where an unknown stored pool is retired, without giving up the lagging-RPC guard:

  • Option A. When a fetch ends with every candidate refusing NotFound on a pool that the first lane build read as Unknown and no run saw live, re-read getPool once. If it is still unknown, drop the row (as the node buyer does on Closed) and say so in the error. The next fetch then opens or adopts a pool.
  • Option B. In still_open, treat Unknown as gone when the row is older than a bound no RPC lags by. This needs a row timestamp, which BuyerPoolState does not carry today.

Option A changes nothing on the lagging-RPC path inside one fetch and needs no store-format change.

Check. A test where the stored row's pool reads a zero owner and every holder answers NotFound. Expect the fetch to end with an error that names the stale pool, and the next run not to reuse that row.

🤖 Generated with Claude Code

Activity

  1. added
    kind:bug
    prio:low
    area:client
    on Oct 28, 2026
  2. self-assigned this
    on Nov 26, 2026
  3. moved this from Backlog to In progress in deCDNon Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clientkind:bugprio:low

Type

No type

Fields

Priority

None yet

Projects

  • Status
    In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions