Expand description
Sparse Merkle Tree and related data structures.
Sparse Merkle Tree is essentially a huge Balanced Merkle Tree, where most of the leaves are
empty. By “empty” here we mean [0u8; 32]. To optimize proofs and their verification, the
hashing function is customized and returns [0u8; 32] when both left and right branch are
[0u8; 32], otherwise BLAKE3 hash is used like in a Balanced Merkle Tree.
Structs§
- Sparse
Merkle Tree - Sparse Merkle Tree variant that has hash-sized leaves, with most leaves being empty
(have value
[0u8; 32]).
Enums§
- Leaf
- Sparse Merkle Tree Leaf
Functions§
- ensure_
supported_ bits - Ensuring only supported
NUM_BITScan be specified forSparseMerkleTree.