You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: a fetch with a drained capability retries until its timeout instead of failing #2338
When a voucher signer's registered cap - spent no longer covers the serve floor, the node refuses the stream at admission with ServeRejectReason::SignerCapExhausted (crates/node/src/handlers/client/dispatch.rs, signer_refusal). That refusal is signed on the wire as NotFound, the same as a cache miss. The client cannot tell it apart, so decdn fetch treats it as a miss, fails over and rediscovers, and keeps going until its own timeout. The user waits out the timeout and gets no clear error.
Mid-stream the node already says what happened: a drain during a stream ends with an in-band VoucherRejected { SignerCapExhausted }, and the client fails fast.
#2333 makes the admission refusal the normal path. The node now holds a registered signer's read for good and adds the spent the event projection folds, so the first request after the cap is spent is refused at admission. Before #2333 a stale 60 s cache often let that request in and the mid-stream reject ended it. Seen in the cli_fetch_delegated clamp journey: after the cap was spent, each retry hung for the 60 s test timeout.
Options
Client-side pre-check, no wire change. Before it opens a stream with a capability, the client reads getAuthorization(pool, signer) (or keeps the last read) and fails at once with a clear error when the registered cap - spent is below one interval at the provider's rate. It can do the same when it sees NotFound from every holder of a blob that discovery says they hold.
Distinct admission reason on the wire. Sign SignerCapExhausted at admission as its own reason instead of NotFound. This touches the deliberate NotFound conflation (see the StreamError notes in metrics.rs and dispatch.rs), so it needs a protocol decision and an ADR check first.
Option 1 keeps the wire unchanged and fixes the user-facing hang.
The client does not pre-check or confirm refusals on-chain (option 1): that adds an RPC dependency to every client.
The wire does not grow per-reason variants (option 2). Open-time refusals collapse to three classes instead: NotFound ("no", try others), Declined ("no, stop asking" for this hash this fetch) and Unfunded ("no at the current funding", spoken only to a proven lane or signer).
A node's refusal is never fatal to a fetch; it removes only that node. When the candidates are exhausted and at least one said Unfunded, the client runs one funding recovery step (owner: topUp, or a new pool if the old one is closing or closed; delegate: a new capability from the funder), then retries those nodes once. If every node said Declined, the fetch ends at once with "no node will serve this", which removes the hang described here.
The ADR change is being written on branch adr/refusal-classes; the implementation lands on the same branch.
Activity
fix(client,cli): stop a fetch on a spent capability signer instead of…
alpergundogdu commentedon Oct 7, 2026
Direction decided: neither option above.
NotFound("no", try others),Declined("no, stop asking" for this hash this fetch) andUnfunded("no at the current funding", spoken only to a proven lane or signer).Unfunded, the client runs one funding recovery step (owner:topUp, or a new pool if the old one is closing or closed; delegate: a new capability from the funder), then retries those nodes once. If every node saidDeclined, the fetch ends at once with "no node will serve this", which removes the hang described here.The ADR change is being written on branch
adr/refusal-classes; the implementation lands on the same branch.