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
fix(client): a lane build that drains after an untracked escrow can send a second topUp #2506
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
A lane build that drains after an untracked escrow can send a second topUp for the same pool.
Build A's topUp mines. store.add_deposit fails, so grade_deposit_credit returns EscrowUntracked. top_up already released its UnconfirmedEscrows entry when it read the receipt.
The acquire loop returns that error as fatal (scheduler.rs:4098), then drains the builds still in connecting for up to 30 s (scheduler.rs:4182).
Build B was parked behind A. In the drain it reads the same pool row, which has no credit for A's top-up, so it still looks low.
escrow_top_up refuses a second topUp only while an earlier one is unconfirmed. A's entry is gone, so nothing refuses B, and refill_if_low escrows again.
The second escrow is exactly what EscrowUntracked is fatal to prevent: "a retry escrows again".
The drain can also start a fresh refill after a fetch that completed, for a lane that never runs. That escrow is recorded, but it is not needed.
Fix direction
Record on RunFunding that an untracked escrow happened in this run. escrow_top_up and the open path refuse while it is set, the same way they refuse while a topUp is unconfirmed.
Or: let the drain cancel builds that have not yet submitted a transaction, and await only those that have.
Checks
A build that drains after a sibling's EscrowUntracked on the same pool sends no topUp.
A build already past its submit when the fetch ends is still awaited, as today.
Found in the #2500 review (silent-failure pass). This behavior existed before #2500.
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
Activity
fix(client): refuse every escrow of a run after an untracked one