Skip to content

client: re-evaluate running decdn-client on the iroh-blobs store (0.104.1) #2881

Done

Description

@alpergundogdu

Summary

Re-evaluate running decdn-client on the iroh-blobs store, now that iroh-blobs 0.104.1 is out. The client and the CLI are kept free of iroh-blobs today (#578, #823, #915), which is why the client carries its own ranged store, its own bao range codec in decdn-bao-range, and its own resume records. If the store is usable client-side, a large part of that code can go.

The workspace pins iroh-blobs = "0.104". The latest release is 0.104.1 (2026-11-04).

What blocked it last time

A spike on 2026-10-16 ran ClientRangedStore on the iroh-blobs 0.103.1 FsStore behind a feature flag. The cost was small: the stripped decdn binary grew by 1.26 MiB (6.3%), 11 crates were added, and no aws-lc came in. Android built, and iOS needed the same libc pin as today. The verdict was "not yet", for six reasons.

# Blocker from the spike State now
1 A process that exits without sync_db loses a complete, exported blob, and a partial is recorded only when the fetch ends (n0-computer/iroh-blobs#254) Still open upstream. No comments on the issue. Needs a re-test on 0.104.1
2 A poisoned entry panics the store thread (n0-computer/iroh-blobs#233) Closed upstream on 2026-10-21
3 A second-process FsStore::load hangs (n0-computer/iroh-blobs#252) Closed upstream on 2026-10-21
4 No public delete Not checked. 0.104.1 removes the files an entry no longer uses when its state changes (n0-computer/iroh-blobs#334), which may or may not cover it
5 Bundle dedup splices unverified donor bytes, which the store cannot hold Ours to solve. Needs a design for donor dedup without unverified writes
6 61 paused-clock unit tests break because the store runs its own runtime Ours to solve

Three more issues filed from the spike are also closed upstream: n0-computer/iroh-blobs#286 (add_stream hangs when the source errors), n0-computer/iroh-blobs#287 (export_bao ends without Done or Error after a MemStore shuts down) and n0-computer/iroh-blobs#288 (Bitfield::total_bytes overflow).

0.104.1 also carries fixes that touch the paths the client would use: temp files left behind by an incomplete import, import_bao answering before its input closes, and the store reporting idle while a follow-up is queued.

What we could drop

Line counts from main today, tests included, as an upper bound on what is in play:

  • crates/client/src/ranged_store.rs and its tests: about 3,100 lines
  • crates/client/src/downloader.rs, streamer.rs, coverage_plan.rs: about 2,000 lines, part of which is store plumbing
  • crates/bao-range: about 700 lines, shared with the cache reader and decdn origin import, so only the client's use of it goes

The crate-edge table in .github/scripts/check_crate_edges.py forbids iroh-blobs in the closures of decdn-cli and the decdn-client SDK. Allowing it is a design change to that table and to the dependency-flow paragraph in CLAUDE.md.

It would also let the client use iroh-blobs helpers directly, for example ChunkRanges::last_chunk() and the verified-size request that #2879 needs.

What to do

  1. Re-run the spike's gap tests (crates/client/tests/iroh_store_gaps.rs on the spike branch) against 0.104.1, and record which still fail.
  2. Re-test A partial is only recorded when the fetch ends: SIGKILL during remote().fetch loses all progress n0-computer/iroh-blobs#254 specifically: SIGKILL during a fetch, and exit without sync_db. A download client that loses progress on a kill is not acceptable, so this one decides the outcome unless we keep our own resume record beside the store.
  3. Check whether a public delete exists.
  4. Re-measure the binary size, the crate count and the mobile builds on 0.104.1.
  5. If 1 to 4 pass: design bundle donor dedup without unverified writes, and decide what happens to the paused-clock tests.

Not in scope

The node already uses iroh-blobs through the cache crate. This issue is about the client, the CLI and the SDK only.

Activity

  1. added
    area:cli
    kind:chore
    area:client
    on Nov 11, 2026
  2. alpergundogdu commented on Nov 11, 2026

    @alpergundogdu
    ContributorAuthor

    Re-tested on iroh-blobs 0.104.1 (spike rebased on main: local branch spike/iroh-store-0.104.1, never merge).

    Gateway cache: yes, with conditions. Client store: not yet, and the blockers are now ours.

    Suggested order: gateway cache first, then the bundle design, then the client.

  3. yigitdot commented on Nov 26, 2026

    @yigitdot
    Contributor

    Done on main. The gateway cache moved onto decdn-cache in #2884, #2886, #2887, #2903 and #2908. The client store moved onto iroh-blobs in #2945 (donors splice outside the store), #2946 (iroh-blobs 0.105, with OS-crash recovery) and #2958 (each download keeps its state in an iroh-blobs file store). crates/client/src/ranged_store.rs is now a RangedStore over an iroh-blobs store, decdn-client depends on iroh-blobs, and .github/scripts/check_crate_edges.py allows it for decdn-client and decdn-cli.

  4. moved this from Backlog to Done in deCDNon Nov 26, 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:cliarea:clientkind:chore

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions