Skip to content

e2e: deposit-short top-up fetch under-pays by one interval under parallel load #2629

Closed

Description

@thiras

Found while verifying #2619: one anvil e2e fails often under parallel load, on main as well as on the #2619 branch.

Test. crates/e2e/tests/cli_fetch_topup.rs — fetch_of_blob_far_exceeding_deposit_settles_whole_wire_cost_once (the deposit-short journey: a 20 MiB + 4113 B blob at 1000 µUSDC/MB against an 8000 µUSDC working deposit).

Failure. Always the same numbers:

Error: under-pay: settled 19087 µUSDC, below the whole-blob WIRE cost of 20083 µUSDC. A paid frontier derived from a stale per-leg baseline overshoots the true one and skips billing exactly this way

The delivered file is byte-exact (that check runs first and passes). The settled lane amount is 996 µUSDC short, about one 1 MiB interval at this rate. The node logs mid-stream PoolExhausted and then refusing paying clients: pool's refundable remaining deposit below the reserved cost before the failure.

Rate. Measured on one host (2026-10-26), running the 12 e2e binaries that pin --node-id together (cargo nextest run -p decdn-e2e --features anvil-e2e --retries 0, 23 tests):

Tree Batch runs Failed
main @ 3b079e7 3 3
#2619 branch 4 2

Run alone (-E 'test(fetch_of_blob_far_exceeding_deposit_settles_whole_wire_cost_once)' --retries 0) it passed 6 of 6, so load is the trigger. CI's nextest retries can hide it, and the CI suite is fail-fast, so one hard failure there cancels the rest of the suite.

Ask. Find out whether this is a real under-pay (a paid frontier that skips an interval when the solvency re-check trips under load and the fetch resumes reactively) or a test that reads the persisted lane watermark before the last voucher is recorded. Fix the cause, not the bound.

Repro.

cargo build -p decdn-cli -p decdn-node
cargo nextest run -p decdn-e2e --features anvil-e2e --retries 0 --no-fail-fast \
  -E 'binary(cli_bundle_pull_pool_id) | binary(cli_bundle_pull_range_dedup) | binary(cli_fetch_delegated) | binary(cli_fetch_recovers_one_holder) | binary(cli_fetch_resume) | binary(cli_fetch_topup) | binary(cli_fetch_two_data_dirs) | binary(cli_quote) | binary(cli_receipt) | binary(gateway_concurrent_pulls) | binary(gateway_pointer) | binary(gateway_public)'

🤖 Generated with Claude Code

Activity

  1. added
    kind:bug
    kind:test
    area:payments
    on Oct 26, 2026
  2. self-assigned this
    on Oct 26, 2026
  3. added
    area:client
    on Oct 26, 2026
  4. assigned and unassigned on Oct 26, 2026
  5. added this to the v0.3 milestone on Oct 28, 2026
  6. moved this from Backlog to In progress in deCDNon Oct 28, 2026
  7. moved this from In progress to Done in deCDNon Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clientarea:paymentskind:bugkind:test

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions