Skip to content

node: a transient getAuthorization RPC fault refuses a paying client as signer_cap_exhausted #2220

Closed

Description

@thiras

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:

  1. No stale fallback. auth_cache holds the last observed headroom, but an entry older than SIGNER_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 live eth_call.
  2. Wrong reason. An RPC fault is not an exhausted cap. The decdn_serve_stream_rejected_signer_cap_exhausted_total counter and the Tempo reason attribute point operators at the wrong cause. The pool_unconfirmed path already exists for "could not confirm".
  3. The requester treats it as "does not hold". NotFound is the same signal a cache miss sends. A node-to-node leg records it as decdn_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 signer WARN 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 new SignerUnconfirmed), not SignerCapExhausted. That keeps the cap-exhausted counter meaningful.

Acceptance

  • A unit test: an expired cache entry plus a failing getAuthorization returns the cached headroom.
  • A unit test: no cache entry plus a failing read does not increment signer_cap_exhausted.

Activity

  1. added
    kind:bug
    on Sep 28, 2026
  2. self-assigned this
    on Sep 28, 2026
  3. assigned and unassigned on Sep 28, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:bug

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions