Repository navigation
Closed
Labels
kind:bugSomething does not behave as documented
Description
Summary
A transient getAuthorization RPC fault at admission refuses a paying client. The node counts the refusal as signer_cap_exhausted, and the client receives NotFound. The signer's cap is not exhausted. The node could not read it for ~2 s.
ResolvingPoolView::signer_cap_headroom_micro (crates/node/src/payment_settlement.rs:918) returns None on any RPC error. The admit gate (crates/node/src/handlers/client/dispatch.rs:545) maps None to ServeRejectReason::SignerCapExhausted, and wire_error (crates/node/src/handlers/client/mod.rs:726) collapses that reason to StreamError::NotFound.
Three defects compound:
- No stale fallback.
auth_cacheholds the last observed headroom, but an entry older thanSIGNER_AUTH_TTL(1 min) is ignored, even when the fresh read fails. For a signer that streams continuously, every admission after the TTL depends on one liveeth_call. - Wrong reason. An RPC fault is not an exhausted cap. The
decdn_serve_stream_rejected_signer_cap_exhausted_totalcounter and the Temporeasonattribute point operators at the wrong cause. Thepool_unconfirmedpath already exists for "could not confirm". - The requester treats it as "does not hold".
NotFoundis the same signal a cache miss sends. A node-to-node leg records it asdecdn_node_pull_refused_unattributable_total.
Evidence (testnet, 2026-09-28, fleet on 8886c85c, client on ece78970)
Both refusals below happened during the first minute of one mistral bundle pull. Each serve_stream lasts ~2 s: that is the RPC timeout.
| Time (UTC) | Node | Requester | Trace | Error |
|---|---|---|---|---|
| 12:06:02 | ash1 | CLI client (pool 0xcb5986…) |
70d82cdbdb3aca60f461fbd24be4f570 |
error code 30: Request timeout on the free plan |
| 12:07:04 | lon1 | fra1 upstream leg (pool 0x355dd1…) |
dcb27d6303593b0274491be876178d8f |
same |
- Loki:
admit getAuthorization failed; refusing this signerWARN on both nodes, with the dRPC code-30 error. decdn_serve_stream_rejected_signer_cap_exhausted_total: ash1 +1, lon1 +1. On-chain, both signers are far below their caps.- fra1:
decdn_node_pull_refused_unattributable_total+1 at the same time as the lon1 refusal.
Proposed fix
- On a read error, fall back to the last cached headroom, whatever its age. Refuse only when no cached entry exists. The mid-stream check (
signer_spent_cached) already tolerates a stale projection, so admission can too. - When no cached value exists, refuse as
PoolUnconfirmed(or a newSignerUnconfirmed), notSignerCapExhausted. That keeps the cap-exhausted counter meaningful.
Acceptance
- A unit test: an expired cache entry plus a failing
getAuthorizationreturns the cached headroom. - A unit test: no cache entry plus a failing read does not increment
signer_cap_exhausted.
Activity
fix(node): give the pull-loop guard its own reason; align signer-auth…