Skip to main content

Module serve_store

Module serve_store 

Source
Expand description

ServeStore: node-only extension of RangedStore for progressive serve-while-filling (#1621).

ServeStore extends bao_range::RangedStore but is defined here, in cache, rather than in the bao-range leaf crate: its two methods speak iroh-blobs / futures_util::Stream types directly (a live present-ranges watch and a re-encoded wire-bao stream), and bao-range stays free of an iroh-blobs dependency (ADR 038). The node serve-miss serve path (crates/node/src/handlers/client/serve_encoder.rs) consumes it, observing the store’s present ranges as the blob fills; ServeStore is the typed seam that keeps those iroh-blobs types out of bao-range.

Traits§

ServeStore
Node-only extension of RangedStore: progressive serve-while-filling primitives over an already-open per-blob store.

Type Aliases§

EncodeStream
A stream of wire-format bao chunks for a re-encoded byte range — interleaved proof pairs and chunk-group data in tree order, header-less (no 8-byte size prefix; the signed StreamResponse.total_bytes is the authoritative size, ADR 038). Each item is fallible with the store’s RangedStoreError.
PresentRangeWatch
A live watch of which chunk ranges of a blob are present. The first item is the current bitfield; further items arrive as the blob fills. Mirrors iroh_blobs::api::blobs::ObserveProgress::stream() — NEVER await_completion, which hangs on a partial blob.