sigil-state · commitment::proof
Source declarations, signatures and documentation for commitment::proof.
Source: sigil/node/sigil-state/src/commitment/proof.rs. SHA-256: c975bdb664cbea13a581c47d3980ca3f421d737de193488bb9f0ee255b090b3a.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
commitment::proof::Side
Which side a sibling sits on in the Merkle path.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum Side {
Left,
Right,
}Source line: 5.
commitment::proof::InclusionProof
An inclusion proof for a key-value pair in a [super::tree::CommitmentTree].
Contains the sibling hashes along the Merkle path from the leaf to the root. Verification walks from the leaf upward, hashing with each sibling, and checks that the final hash equals the expected root.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InclusionProof {
/// The original key.
pub key: Vec<u8>,
/// The original value.
pub value: Vec<u8>,
/// Sibling hashes from leaf to root, each annotated with which side the
/// sibling is on (so we know the concatenation order).
pub siblings: Vec<([u8; 32], Side)>
}Source line: 16.