Repository navigation
Description
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.rsand its tests: about 3,100 linescrates/client/src/downloader.rs,streamer.rs,coverage_plan.rs: about 2,000 lines, part of which is store plumbingcrates/bao-range: about 700 lines, shared with the cache reader anddecdn 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
- Re-run the spike's gap tests (
crates/client/tests/iroh_store_gaps.rson the spike branch) against 0.104.1, and record which still fail. - 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. - Check whether a public delete exists.
- Re-measure the binary size, the crate count and the mobile builds on 0.104.1.
- 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.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
alpergundogdu commentedon Nov 11, 2026
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.
export_ranges/export_bao, sparse on disk, intact after restart, 10/10 rounds of concurrent writers and readers clean.sync_db()/shutdown()inside the window loses the blob. We can close it ourselves by calling both.observestream) loses later writes silently: a re-import returnsOk, and after a clean shutdown and reload the hash isNotFound. Same root cause as FsStore: deleting a loaded partial entry leaves its .bitfield file behind n0-computer/iroh-blobs#350. The draft upstream refactor refactor(store): replace write protection with GC sessions and coordinate entity deletes n0-computer/iroh-blobs#349 fixes the leftover.bitfieldfrom Reframe encrypted-content appendix: not end-to-end encryption #350 but not this lost write, because a plain partial write sends no metadata update to recreate the entry. Either way the cache must pin entries in use.BlobReaderis very slow with large buffers (255 MiB in 190 s, against 0.8 s forexport_ranges). Serve HTTP fromexport_ranges.Content-Lengthmust come from the validated size only; a partial'ssize()is the importer's claim. Fits proposal: a node proves the blob size, so total_bytes is verified #2879.ranged_store.rs, its tests and doubles).bao-range, the scheduler and the driver stay.Suggested order: gateway cache first, then the bundle design, then the client.
refactor(client): splice bundle donors into an assembly file, not the…
chore(deps): bump iroh-blobs to 0.105 (#2946)
feat(client)!: keep each download in an iroh-blobs store (#2958)
yigitdot commentedon Nov 26, 2026
Done on
main. The gateway cache moved ontodecdn-cachein #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.rsis now aRangedStoreover an iroh-blobs store,decdn-clientdepends oniroh-blobs, and.github/scripts/check_crate_edges.pyallows it fordecdn-clientanddecdn-cli.