Skip to main content

Crate tari_jellyfish

Crate tari_jellyfish 

Source

Modules§

memory_store

Structs§

Child
Each child of InternalNode encapsulates a nibble forking at this node.
InternalNode
Represents a 4-level subtree with 16 children at the bottom level. Theoretically, this reduces IOPS to query a tree by 4x since we compress 4 levels in a standard Merkle tree into 1 node. Though we choose the same internal node structure as that of Patricia Merkle tree, the root hash computation logic is similar to a 4-level sparse Merkle tree except for some customizations.
JellyfishMerkleTree
The Jellyfish Merkle tree data structure. See crate for description.
JmtHashDomain
A hashing domain instance
LeafKey
A leaf key (i.e. a complete nibble path).
LeafKeyBitIterator
An iterator over LeafKey that generates one bit for each iteration.
LeafKeyRef
A leaf key (i.e. a complete nibble path).
LeafNode
Leaf node, capturing the value hash and carrying an arbitrary payload.
Nibble
NibbleBitIterator
BitIterator iterates a nibble path by bit.
NibbleIterator
NibbleIterator iterates a nibble path by nibble.
NibblePath
NibblePath defines a path in Merkle tree in the unit of nibble (4 bits).
NodeKey
The unique key of each node.
SparseMerkleInternalNode
SparseMerkleLeafNode
SparseMerkleProof
A proof that can be used to authenticate an element in a Sparse Merkle Tree given trusted root hash. For example, TransactionInfoToAccountProof can be constructed on top of this structure.
SparseMerkleProofExt
A more detailed version of SparseMerkleProof with the only difference that all the leaf siblings are explicitly set as SparseMerkleLeafNode instead of its hash value.
SparseMerkleRangeProof
Note: this is not a range proof in the sense that a range of nodes is verified! Instead, it verifies the entire left part of the tree up to a known rightmost node. See the description below.
StaleNodeIndex
Indicates a node becomes stale since stale_since_version.
TreeHash
TreeHashSizeError
TreeUpdateBatch

Enums§

JmtProofVerifyError
JmtStorageError
Error originating from underlying storage failure / inconsistency.
Node
The concrete node type of [JellyfishMerkleTree].
NodeInProof
NodeType
StaleTreeNode
A part of a tree that may become stale (i.e. need eventual pruning).
TreeNode

Constants§

SPARSE_MERKLE_PLACEHOLDER_HASH

Traits§

IteratedLeafKey
Peekable
TreeStore
Implementers are able to read and write nodes to a tree store.
TreeStoreReader
Implementers are able to read nodes from a tree store.
TreeStoreWriter
Implementers are able to insert nodes to a tree store.

Functions§

jmt_node_hash
jmt_node_hash2

Type Aliases§

JmtHasher
ProofValue
Version