Skip to main content

Module span

Module span 

Source
Expand description

MKDS v1 multi-chunk range proofs (SPEC-DISCLOSURE §8).

The decoder borrows its inner bundles. Verification retains only small summaries and the requested output, so it never keeps decoded chunks from earlier bundles alive while checking later bundles.

Structs§

DisclosedSpan
An authenticated byte range spanning at least two chunks.
Plan
Pure prefetch plan for a chunked file. needed_chunk_indices contains every preceding chunk needed for absolute length proofs and each span chunk, in ascending order.

Enums§

RangeProof
Encoded representation chosen for a requested range.
RangeProofError
Typed builder and planner failures.
RangeProofKind
Proof format, independent of encoded bytes.
SpanError
First failed MKDS check, in SPEC-DISCLOSURE §8.2 order.

Functions§

build_range_proof_from
Build the smallest representation for a range, reading each preceding chunk once for its length proof and no chunk after the span. boundaries, when supplied, are the chunks.len() + 1 prefix content offsets, beginning at zero and ending at the manifest’s total size. Every hint for a chunk actually read is checked against its canonical Blob length.
encode_span
Encode an MKDS v1 container from already encoded MKDP v2 bundles.
plan_range_proof
Plan a range from canonical chunk content lengths. The end is exclusive; an end exactly on a chunk boundary does not need the next chunk.
verify_disclosure_span
Verify a multi-chunk range against a trusted commit id.