Repository navigation
Closed
Labels
area:paymentsPools, vouchers, redeem, reclaim, staking (incentive crate and chain)kind:bugSomething does not behave as documentedrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Description
Problem
A command can end without naming an escrow that mined with no local record (EscrowUntracked), and then tell the operator a re-run is safe. The re-run reads the uncredited row, sees the pool low, and escrows again.
#2509 covers one way this happens: a bundle pull drops sibling groups in the middle of their drain. This issue covers the rest.
- Ctrl-C during the drain.
decdn getdrops the fetch on an interrupt. The 30 s drain after a fatal build is when a user sees the command hang and presses Ctrl-C.name_unconfirmed_escrowsreads only the sharedUnconfirmedEscrows. The receipt read already removed the mined tx from it, so the command prints "interrupted; run the same command again to resume". A bundle pull interrupted the same way endsBundleEnd::Interruptedwith the same message. - Nothing reads the run's hold at the end. After fix(client): a lane build that drains after an untracked escrow can send a second topUp #2506,
RunFundingholds the run's first untracked escrow, and every later escrow of the run is refused. But no end-of-run path reads that hold.RunFundingis also rebuilt for each pass (fetch.rs, bundle engine), so it does not outlive a dropped fetch or group.
Fix direction
- Keep the hold on the command-wide handle (
UnconfirmedEscrows, or a slot beside it), so it outlives a dropped fetch, a dropped group and a pass. - When a run ends, add the hold to any end that does not already carry the escrow:
name_unconfirmed_escrows, the interrupt message, and the bundle's end (engine.rs:1656, next to the shortfall warning). Keep the original stop as text, asfold_late_escrowdoes. This also gives fix(client): a bundle pull drops sibling entries mid-drain, losing a late escrow and allowing exit 75 #2509 a fallback when a group is dropped before its drain ends.
Checks
- Ctrl-C while a fatal build's drain runs names the untracked tx. It does not say "run the same command again".
- A bundle pull that ends
GaveUpwhile the run holds an untracked escrow exits nonzero, not 75, and names the tx.
Found in the #2506 review (silent-failure pass). This behavior existed before #2506.
Metadata
Metadata
Assignees
Labels
area:paymentsPools, vouchers, redeem, reclaim, staking (incentive crate and chain)kind:bugSomething does not behave as documentedrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Type
Fields
Priority
None yet
Projects
- StatusShow more project fieldsDone
Activity
[-]fix(client,cli): a run that ends on another stop loses its untracked escrow[/-][+]fix(client,cli): an interrupted or dropped run does not name the untracked escrow it holds[/+]fix(client): refuse every escrow of a run after an untracked one
fix(client): refuse every escrow of a run after an untracked one (#2514)
fix(client,cli): name a run's untracked escrows on every end of the c…