pub struct SmtProof {
pub key_hash: [u8; 32],
pub leaf: Option<([u8; 32], Vec<u8>)>,
pub siblings: Vec<[u8; 32]>,
}Expand description
A compact SMT proof for a single key.
siblings[d] is the sibling hash at depth d; the terminal
subtree (lone leaf or empty slot) sits at depth siblings.len().
Fields§
§key_hash: [u8; 32]The key hash this proof covers.
leaf: Option<([u8; 32], Vec<u8>)>The lone leaf occupying the terminal subtree, if any.
Some((leaf_key_hash, value)): membership when
leaf_key_hash == key_hash, otherwise a conflicting leaf
proving non-membership. None: the slot is empty.
siblings: Vec<[u8; 32]>Sibling hashes from depth 0 (root level) to the terminal
subtree, at most [TREE_DEPTH] entries.
Implementations§
Trait Implementations§
impl Eq for SmtProof
impl StructuralPartialEq for SmtProof
Auto Trait Implementations§
impl Freeze for SmtProof
impl RefUnwindSafe for SmtProof
impl Send for SmtProof
impl Sync for SmtProof
impl Unpin for SmtProof
impl UnsafeUnpin for SmtProof
impl UnwindSafe for SmtProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.