Skip to content

bundle pull: the summary "downloaded" figure comes from file sizes, so wasted or duplicate paid bytes never show #2377

Closed

Description

@yigitdot

Problem

The downloaded figure in the decdn bundle pull summary (human line and --json) is computed from entry sizes, not counted from the bytes the run paid for:

  • EntryBytes::whole_blob: paid = len - resumed (crates/cli/src/commands/bundle_pull.rs:3291-3297).
  • EntryBytes::dedup: paid = total - spliced - resumed (bundle_pull.rs:3302-3309).
  • group_transfer takes downloaded from that paid (bundle_pull.rs:5397-5425), and transfer_line prints it (bundle_pull.rs:5376).

No other summary line, PullReport field (bundle_pull.rs:1193-1214) or -v log line reports the bytes a pull actually paid for, or received over the wire. The client does track paid bytes per lane: Cumulative.bytes (crates/client/src/ledger.rs:23-28), which the lane ledgers persist in ~/.decdn/client/buyer-pools.redb. But the run never reports a total.

So a pull that pays for bytes twice, or pays for bytes it then discards after a lane fault, prints the same summary as a clean pull.

Evidence

Two SDXL base 1.0 pulls, testnet, 2026-10-09, same bundle (b3:4621f13e…):

Run 1 (--jobs 5): 0 lane faults, 16 slow-victim steals.
Run 2 (--jobs 10): 2 lane faults, 13 slow-victim steals, for example:

07:35:17.295 WARN a lane faulted; its remainder goes to the other lanes provider=0xAFb6…5832 hash=11e20da0… offset=4567613440 len=190545920 landed=6275072 … error=no verified progress for 10s

Both runs print the same summary:

pulled into /Users/…/sdxl (52 fetched, 4 linked, 0 skipped, 0 reused, 0 excluded, 0 failed)
downloaded 45.7 GB → reconstructed 76.9 GB
range-dedup: spliced 31.2 GB from disk, 0 hint(s) ignored

The steal and fault lines show no overlap of verified ranges (see #2376). But bytes that arrived and did not verify before a fault, and paid bytes past the verified frontier, appear in no line at -v.

Proposal

Add the bytes this run actually paid for, summed over every lane (the change in each lane Cumulative.bytes across the run), next to downloaded:

  • Human summary: downloaded 45.7 GB (paid 45.7 GB) → reconstructed 76.9 GB. Print the paid part always, or only when it differs from downloaded.
  • --json: a paid_bytes field beside downloaded.

Optional: also report the bytes received over the wire, if the client can count them cheaply, so wire-level waste is visible too.

Related

Activity

  1. added
    kind:feature
    area:cli
    prio:low
    on Oct 9, 2026
  2. added a commit that references this issue on Oct 12, 2026
    0ddc3fe
  3. moved this from Backlog to In progress in deCDNon Oct 12, 2026
  4. moved this from In progress to Done in deCDNon Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clikind:featureprio:low

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions