Skip to main content

Module sparse

Module sparse 

Source
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 all zeroes. To optimize proofs and their verification, the hashing function is customized and returns all zeroes when both left and right branch are all zeroes, otherwise inner nodes are hashed like in a Balanced Merkle Tree.

Structs§

SparseMerkleTree
Sparse Merkle Tree variant that has hash-sized leaves, with most leaves being empty (all zeroes).

Enums§

Leaf
Sparse Merkle Tree Leaf

Constants§

PROOF_ELEMENTS
Number of elements in a proof for a tree with BITS