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 late lane build's untracked escrow is dropped at debug by drain_builds #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
drain_builds (crates/client/src/scheduler.rs) discards a fatal EscrowUntracked error. The error is logged at debug only, and the command exits 0.
When acquire returns, it waits up to BUILD_DRAIN (30 s) for lane builds still in connecting. A late build can finish refill_if_low (or a lane-build openPool) in that window. When it does:
The topUp mines and its receipt is read. top_up releases its UnconfirmedEscrows entry.
store.add_deposit fails (or store.record for an open). grade_deposit_credit returns EscrowUntracked, which fault::classify grades Fault::Fatal.
drain_builds logs that error with tracing::debug!("a lane build that ended after the fetch failed") and drops it.
The USDC is now escrowed with no local record. The handle does not hold the tx, because its receipt was read. Nothing names the tx. CLI tracing is opt-in, so the user sees nothing, and decdn get exits 0. The low-water check then fires again on later fetches, while nobody reconciles the escrow.
A build that is still waiting for its receipt at the 30 s bound is a different case. It is dropped, and #2491 names it through the handle.
Fix direction
drain_builds returns the first drained error that fault::classify grades Fault::Fatal.
acquire folds that error into its result:
on an Ok, the error replaces it;
on an Err, the error is added as context, so the fatal escrow is not hidden.
Other drained errors stay at debug.
Checks
A late lane build whose refill mines and whose add_deposit fails turns a successful acquire into an error. That error carries EscrowUntracked and names the tx.
A late build that fails for any other reason leaves the result unchanged.
Found in the #2499 review (silent-failure pass). This behavior existed before #2499.
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