Module traits

Source
Expand description

This module provides a generic set of traits for customizing nodes in the sparse Merkle tree.

For examples on how to use these traits, see the implementations of the example module.

Traitsยง

InclusionProvable
Trait for generating and verifying inclusion proofs.
Mergeable
Trait for merging two child nodes to extract the parent node in the SMT.
Paddable
Trait for generating a padding node in the SMT.
PaddingProvable
Trait for prove and verify padding nodes at random sampling.
ProofExtractable
Trait for extracting a node with necessary information in Merkle proofs from a tree node.
Rand
Trait for generating a random value.
RandomSampleable
Trait for random sampling and verifying sampling proofs.
Serializable
Trait for encoding.
TypeName
Trait for getting the type name of tree nodes in the SMT.