feat(dht): Phase 2 engine — real iroh-blobs provider behind iroh-swarm
Pulls iroh 1.0 + iroh-blobs 0.103 as OPTIONAL deps under the iroh-swarm feature and implements a real BlobProvider over them. Verified: the full iroh QUIC dep tree (260 pkgs) resolves and compiles against the pinned bitcoin/nostr-sdk/reqwest-rustls stack; the provider compiles against the 0.103/1.0 API. - swarm/iroh_provider.rs: IrohProvider::new binds a QUIC Endpoint, opens a persistent FsStore (data_dir/iroh-blobs), and serves blobs via the iroh-blobs protocol/Router — a node that fetches also SEEDS. try_fetch maps ContentDigest -> iroh Hash, asks discovery for seed EndpointIds, then downloader.download(hash, providers) (range-verified) + export to staging. - ProviderDiscovery trait: the seam Phase 3 (signed Nostr advertisement events) fills. discovery=None -> no seeds -> origin-only, so enabling the feature is never worse than today. - Default build untouched: iroh is optional, the module is cfg-gated, and providers() stays empty until Phase 3 wires discovery in. Build: cargo build --features iroh-swarm succeeds (dev). Default build + 44 swarm/update/content_hash/blobs tests unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2523c9e3dd
commit
082946aa30
Generated
+3015
-80
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user