Expand description
Merkle Tree traits and implementations
Re-exports§
pub use crate::errors::MerkleTreeError;
Modules§
- append_
only - Implementation of a typical append only merkle tree
- errors
- Error types
- examples
- Provides sample instantiations of merkle tree. E.g. Sparse merkle tree with BigUInt index.
- hasher
- A convenience wrapper
HasherMerkleTree
to instantiateMerkleTree
for any RustCrypto-compatible hash function. - light_
weight - A light weight merkle tree is an append only merkle tree who only keeps its frontier – the right-most path.
- macros
- Useful macros
- prelude
- Prelude. Also provides sample instantiations of merkle trees.
- universal_
merkle_ tree - Implementation of a typical Sparse Merkle Tree.
Macros§
- impl_
forgetable_ merkle_ tree_ scheme - Macro for generating a forgetable merkle tree implementation
- impl_
merkle_ tree_ scheme - Macro for generating a standard merkle tree implementation
- impl_
to_ traversal_ path_ biguint - Macros for implementing ToTreversalPath for BigUint types
- impl_
to_ traversal_ path_ primitives - Macros for implementing ToTreversalPath for primitive types
Enums§
- Lookup
Result - The result of querying at an index in the tree Typically, F for element type, P for membership proof type and N for non-membership proof type
Constants§
Traits§
- Appendable
Merkle Tree Scheme - Merkle tree that allows insertion at back. Abstracted as a commitment for append-only vector.
- Digest
Algorithm - Merkle tree hash function WARN: it’s important to domain separate the two digest functions. Otherwise, you may suffer from the length extension attack.
- Element
- An element of a Merkle tree.
- Forgetable
Merkle Tree Scheme - Merkle tree that allows forget/remember elements from the memory
- Forgetable
Universal Merkle Tree Scheme - Universal Merkle tree that allows forget/remember elements from the memory
- Index
- An index type of a leaf in a Merkle tree.
- Merkle
Proof - Trait for a Merkle proof
- Merkle
Tree Scheme - Basic functionalities for a merkle tree implementation. Abstracted as an accumulator for fixed-length array. Supports generating membership proof at a given position and verify a membership proof.
- Node
Value - An internal node value type in a Merkle tree.
- Persistent
Universal Merkle Tree Scheme - A universal merkle tree that allows non destructive updates. A non destructive update doesn’t directly modify the existing content, it creates a new copy about the update so that people could access both the old version and the new.
- ToTraversal
Path - A trait for Merkle tree index type.
- Universal
Merkle Tree Scheme - A universal merkle tree is abstracted as a random-access array or a key-value map. It allows manipulation at any given position, and has ability to generate/verify a non-membership proof.