Skip to content

fix(node): fail a recovery top-up at once while a topUp settle holds the slot #2494

Closed

Description

@thiras

Problem

A recovery top-up that joins a settling topUp waits for the whole settle. It does not fail at once.

top_up_pool_by (crates/node/src/buyer_pool.rs) funds a cache-miss pull's recovery step through join_or_spawn_topup. When the slot holds a topUp that settle_unconfirmed_top_up is settling (#2492), the recovery joins it. The settle can last as long as the chain takes to resolve that topUp. Each such pull spends its whole miss-pull budget and then drops on its deadline. Every candidate node in the pull costs the same wait.

The open path does not have this problem. OpenHold marks the open slot as held during settle_unconfirmed_open. unless_held makes a caller fail at once with held_open_error, a LocalPullFault.

Fix direction

  • Mark the top-up slot as held while settle_unconfirmed_top_up runs, like OpenHold.
  • When the slot is held, a recovery caller fails at once as a local fault. It does not join.
  • A refill that finds the slot held still does nothing, as it does now.
  • Share the hold state with the decdn_buyer_topup_unresolved gauge if that issue lands first.

Checks

  • A paused-clock test: when a topUp is settling, top_up_pool_by returns a LocalPullFault error with no time advance, and sends no topUp.
  • A recovery that joins before the settle starts still gets the settled outcome.

Follow-up from the #2492 review.

Activity

  1. self-assigned this
    on Oct 17, 2026
  2. assigned and unassigned on Oct 17, 2026
  3. moved this from Backlog to In progress in deCDNon Oct 17, 2026
  4. moved this from In progress to Done in deCDNon Oct 17, 2026
  5. added a commit that references this issue on Oct 17, 2026
    f521155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions