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
sponsord: the keeper never re-sends a hashless topUp at a vacant nonce, so an underpriced answer can hold refills until an operator acts #2572
The sponsord keeper (crates/sponsord-core/src/keeper.rs) holds further top-ups while a topUp whose submit returned no tx hash (TopUpUnconfirmed { tx: None, nonce: N }) is unresolved. With no hash, settle (keeper.rs:243-338) has one exit: the treasury's confirmed nonce passes N. It never re-sends at N.
The node's settle (crates/node/src/buyer_pool.rsTopUpSettling::resend, ~line 999) does: when the pending and confirmed nonces both equal N (Vacant), it sends a fresh topUp at N. Two transactions at one nonce cannot both mine, so the re-send cannot double-escrow, and the hold self-heals.
The gap matters most for the replacement transaction underpriced answer (#2565, PR #2571): the answering backend holds a different same-key transaction at N. If that transaction is later dropped from the mempool, nothing fills N, and the keeper holds until an operator sends 0-value self-transfers. The error log at keeper.rs:329-336 says so, and sponsord_pool_topup_unconfirmed_since_unix stays non-zero, but the pool can drain meanwhile. A transport-failed submit has the same shape when the send never reached a node.
Fix
Give the keeper the node's vacant-nonce rule: on a hashless hold, read the pending nonce too; when pending == confirmed == N, re-send topUp at N through decdn_client::buyer_pool::send_top_up_at and record the hash. A PoolNotOpen revert ends the hold (the pool is gone); any other failure waits for the next sweep as today.
Done when
A keeper test with a hashless hold whose nonce goes vacant shows one re-send at N, and the hold clears on its receipt (keeper/tests.rs:264 covers only "transport loss until the nonce is used").
The keeper.rs module doc and docs/sponsord/operator.md describe the re-send.
Activity