Module tree

Source
Expand description

This module provides definitions of the tree node and the paddable sparse Merkle tree, together with methods of tree generation/update, Merkle proof generation, and random sampling.

Structs§

SparseMerkleTree
Paddable sparse Merkle tree.
TreeNode
A node in the SMT, consisting of the links to its parent, child nodes, value and node type.

Enums§

ChildDir
The direction of a child node, either left or right.
NodeType
The type of a tree node: an internal node has child nodes; a padding node has padding value and no child node; a leaf node has real value and no child node.