Skip to content

cli: a failed proactive topUp drops the lane at DEBUG even when the pool can still pay #2289

Closed

Description

@thiras

Component

cli (decdn binary)

Version

9f243c9f (main).

Summary

A failed proactive refill aborts the lane build, although the pool can still pay for the fetch. The failure is logged only at DEBUG, as a generic "lane build failed" against one provider. The operator sees nothing at the default level, and the run silently loses that provider for that entry.

In open_or_reuse_pool (crates/cli/src/commands/fetch.rs ~3049–3070), ensure_allowance(...).await? and top_up(...).await? propagate any error. The scheduler (crates/client/src/scheduler.rs ~3006, first_open.rs ~151) logs it with tracing::debug!(..., "lane build failed") and drops the lane.

Steps to reproduce

  1. Hold a buyer pool whose unspent balance is below the low water, but enough for the next fetch.
  2. Empty the client wallet's USDC (or make topUp revert for any reason).
  3. RUST_LOG=info,decdn_client=debug decdn bundle pull ...

Expected behavior

The proactive refill is an optimisation. If it fails and the pool still has unspent deposit, log a WARN that names the cause (wallet USDC balance, revert reason) and continue the lane build on the current deposit. The reactive mid-fetch top-up still covers a real exhaustion. Fail the lane only if the pool cannot pay at all.

Actual behavior

2026-10-02 03:50:58: buyer pool 0xcb5986… low on deposit (1509348 µUSDC remaining of 10000000 deposited); topping up 8490652 µUSDC (INFO). Then 03:50:59, at DEBUG only: lane build failed provider=0x6B82…(nbg1) error=building the payment lane failed: submit topUp: ... execution reverted: ERC20: transfer amount exceeds balance. The wallet held 0 USDC. The pool had 1.5 USDC unspent, about 150 GB of transfer at the current rate, and the run moved 17.1 GB. nbg1 lost its lane on the root entry. No line at INFO or above says the wallet is unfunded.

Related: the refill decision itself uses one lane's spend (#2288).

Activity

  1. added
    kind:bug
    area:cli
    area:payments
    on Oct 2, 2026
  2. self-assigned this
    on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cliarea:paymentskind:bug

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions