Milestone 2: persistent blob store, add/materialize/gc

iroh-blobs 0.35 fs store under <store_dir>/blobs. Add imports files or
whole directory trees (as Collections, deterministic order), Materialize
exports them with a real FICLONE reflink attempt and streaming-copy
fallback, Gc is an explicit mark-and-sweep rooted at the pins. Pins,
trusted peers and hash formats persist in meta.json (atomic writes).
Store reads run on a LocalPool because iroh-blobs entry readers are not
Send. Integration tests drive the real daemon binary: directory round
trip byte-identical, gc keeps pinned/drops unpinned, reflink verified on
the repo's own filesystem (XFS), plus a 32-case proptest round trip.

Dependencies: iroh-blobs =0.35.0 (the store itself; pinned per spec),
iroh-io (AsyncSliceReader traits to read store entries), reflink-copy
(FICLONE with copy fallback, per spec), proptest (dev-only, round-trip
property test).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 20:47:11 +02:00
parent 4e1a95613b
commit e256f73439
12 changed files with 5816 additions and 50 deletions
+7
View File
@@ -12,6 +12,13 @@ rust-version = "1.85"
[workspace.dependencies]
varde-proto = { path = "varde-proto" }
# Pinned per spec: 0.35 is the recommended production line of iroh-blobs;
# the post-0.35 rewrite is not yet production quality.
iroh-blobs = "=0.35.0"
iroh = "0.35"
iroh-io = "0.6"
reflink-copy = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"