pub fn verify_sparse(
manifest: &SparseManifest,
delivered_entries: &[TreeEntry],
filter: &[PathBuf],
proof: &SparseProof,
) -> boolExpand description
Verify a sparse delivery against a manifest.
Returns true iff all of the following hold:
manifest.leaf_count <= MAX_LEAVES.manifest.filter_hash == hash_filter(filter)— the manifest was issued against the same filter the client supplied.- The set of leaf-indices implied by
bitmap_bytesmatches the canonical leaf-indices the filter would select. - The bitmap reconstructed from
bitmap_byteshashes tomanifest.bitmap_rootunder the upstream bitmap commitment. delivered_entries, in order, are exactly the entries whose leaf-index has its bit set.
This build cannot independently check tree_hash because the
verifier doesn’t have the full tree (that’s the whole point of
sparse delivery). The transport layer will recompute the
tree hash once it has assembled enough of the structure.
§Panics
Never. All failure modes return false.