Skip to content

node: a getPool fault negative-caches a live pool for the full 60 s verdict TTL #2318

Closed

Description

@yigitdot

Problem

ResolvingPoolView::status (crates/node/src/payment_settlement.rs) puts a pool into one negative cache in two cases:

Both cases use the same entry (negative: Mutex<HashMap<B256, Instant>>) and the same TTL (RESOLVE_NEGATIVE_TTL = 1 min). A fault says nothing about the pool. But one slow or failed read on a live, solvent pool refuses every request on that pool for the next 60 s.

The refusal is also hard to see:

  • The client gets the same refusal as for a pool that does not exist.
  • decdn_serve_stream_rejected_pool_unconfirmed_total counts it with real verdicts.
  • The cache-hit path (negative_cache_hit) returns None and logs nothing. The operator sees one WARN, then 60 s of silent refusals.

Proposal

  • Store why each entry exists: Verdict or Fault.
  • Keep RESOLVE_NEGATIVE_TTL for a verdict.
  • Give a fault a shorter TTL, for example a few seconds. Do not make it zero. During an RPC outage the cache still has to stop each request from waiting 10 s for its own getPool. A short TTL still limits that to one read per pool per window.
  • Add a debug! on the cache-hit path that names the reason.
  • Optional: count fault refusals separately from verdict refusals, so an operator can tell an RPC problem from a missing pool. The doc on the pool_unconfirmed rejection in handlers/client/mod.rs sets that goal.

remember_negative and negative_cache_hit are pure helpers, so the TTL split is unit-testable without a provider. A paused-clock test with chain_events::test_support::hanging_provider can show that a timed-out pool is admitted again after the fault TTL.

Activity

  1. added
    kind:bug
    rust
    area:node
    area:payments
    on Oct 5, 2026
  2. self-assigned this
    on Oct 5, 2026
  3. added a commit that references this issue on Oct 5, 2026
    38490d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodearea:paymentskind:bugprio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions