Skip to main content

verify_inclusion_path_structure

Function verify_inclusion_path_structure 

Source
pub fn verify_inclusion_path_structure(
    skeleton: &[SkeletonStep],
    path: &[ProofStep],
) -> bool
Expand description

Validate that the trailing steps of an inclusion proof path match the consumer-supplied skeleton.

The skeleton — its length and, per step, the path node’s position and sibling count — is the structure’s canonical topology, computed once by the consumer (the single authority on its own topology, shared with proof generation). The trailing skeleton.len() steps are checked field-by-field against it; the leading path.len() - skeleton.len() steps are the subtree portion and carry no topological claim here (they are verified by hash chaining in reconstruct_inclusion_root).