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
cli: proactive pool refill checks one lane's spend, not the pool's, so it never fires on a multi-provider pool #2288
area:clidecdn binary: get, gateway, pool, publish, origin, setuparea:paymentsPools, vouchers, redeem, reclaim, staking (incentive crate and chain)kind:bugSomething does not behave as documented
9f243c9f (main), client and fleet on the same build.
Summary
The proactive low-water refill in open_or_reuse_pool (crates/cli/src/commands/fetch.rs ~3034–3047) compares the pool deposit with the spend of one lane. The spend of the whole pool is the sum over every provider lane. A pool that is spent across several providers never reaches the low-water mark, so the proactive refill does not fire. The pull then runs until the reactive mid-fetch top-up (driver.rs ~1070) catches a real exhaustion.
let(prior_bytes, prior_amount) = match state.lane_progress(lane){ ...};// one provider's lanelet spent = prior_amount.max(spent_elsewhere);// spent_elsewhere is 0 for a tracked poollet additional = refill_amount(state.deposit, spent, working_deposit, low_water);
The refill_amount doc says the opposite: "prior_amount the cumulative amount already vouchered across its lanes". Only the adoption path (pool_to_reuse → adopt_owned_pool) passes a pool-wide figure (spent_elsewhere = on-chain totalRedeemed).
Steps to reproduce
Use one buyer pool (10 USDC working deposit) for many bundle pull runs that spread over several providers.
decdn pool list --json: the per-lane last_amount_usdc values.
Expected behavior
When the pool-wide unspent balance (deposit − Σ lane last_amount) is below working_deposit / LOW_WATER_DIVISOR, the next lane build tops the pool back up to working_deposit.
Actual behavior
Live pool 0xcb5986… on 2026-10-02 had 6 lanes. Their cumulative spends were 2.374 + 2.360 + 2.147 + 1.043 + 0.483 + 0.248 = 8.655 of 10 USDC, so 1.345 USDC was unspent. That is below the 2 USDC low water. The largest single lane is 2.374, so every lane build computes 10 − 2.374 = 7.6 USDC "remaining" and does not refill. The proactive refill fired in this run only because the local pool row was missing and the pool was adopted from chain (the adoption path uses totalRedeemed).
Fix direction
Pass the pool-wide spend: max(Σ state.lanes().last_amount, spent_elsewhere), not one lane's last_amount. Keep refill_amount pure. Add a unit test with N lanes, each below the low water, whose sum is above it.
Field repro on the pre-fix binary (2026-10-02, CLI 2e1a93c5)
An overnight batch of 34 bundle pulls drained pool 0xdb5db181… (deposit 19.42 USDC). The proactive refill never fired: no low on deposit line appears in any of the 34 run logs. Meanwhile the wallet 0x96bF…d03d kept 20.58 USDC untouched. The last two runs then failed:
Run 29 (gpt-oss, 07:02:24 UTC, after 485 s): bcl refused with voucher rejected: PoolExhausted. The client classified it as Fatal(Command), which ended the whole bundle with 1 file failed.
Run 30 (SDXL, 7 s): NoAffordableSource, no provider's next voucher fits the pool's deposit of 0 (micro-USDC).
One point for verification after #2291: a provider-side VoucherRejected { PoolExhausted } is still fatal to the command, not Unaffordable. With pool-wide spend in the gate, the client should not send such a voucher. If it does, for example because of a stale view of totalRedeemed (#2292), the whole bundle aborts and does not top up. I will rerun this batch on origin/main to confirm.
area:clidecdn binary: get, gateway, pool, publish, origin, setuparea:paymentsPools, vouchers, redeem, reclaim, staking (incentive crate and chain)kind:bugSomething does not behave as documented
Activity
altanoruc commentedon Oct 2, 2026
Field repro on the pre-fix binary (2026-10-02, CLI
2e1a93c5)An overnight batch of 34 bundle pulls drained pool
0xdb5db181…(deposit 19.42 USDC). The proactive refill never fired: nolow on depositline appears in any of the 34 run logs. Meanwhile the wallet0x96bF…d03dkept 20.58 USDC untouched. The last two runs then failed:voucher rejected: PoolExhausted. The client classified it asFatal(Command), which ended the whole bundle with 1 file failed.NoAffordableSource,no provider's next voucher fits the pool's deposit of 0 (micro-USDC).On-chain afterwards:
deposit=19.42,totalRedeemed=18.77.One point for verification after #2291: a provider-side
VoucherRejected { PoolExhausted }is still fatal to the command, notUnaffordable. With pool-wide spend in the gate, the client should not send such a voucher. If it does, for example because of a stale view oftotalRedeemed(#2292), the whole bundle aborts and does not top up. I will rerun this batch onorigin/mainto confirm.