Skip to main content

verify_leaf_span

Function verify_leaf_span 

Source
pub fn verify_leaf_span<'a>(
    spec: &TreeSpec,
    root: StrongDigest,
    first: u64,
    bytes: &'a [u8],
    proofs: &[&[u8]],
    sibling_scratch: &mut [StrongDigest],
    limits: SpanLimits,
) -> Result<VerifiedLeafSpan<'a>, ProofError>
Expand description

Each proof uses the existing exact sibling codec. Proof i authenticates leaf first+i; omitted/trailing bytes, partial boundary leaves and trailing proof bytes refuse. Typed sibling scratch is reused, not allocated. The caller must match BOTH the complete TreeSpec and root to its recognized entry selection.