# Functions
DecodeNodeWithType decodes the node together with its type.
GetChildrenPaths returns a set of paths to the node's children who are non-empty HashNodes based on the node's path.
No description provided by the author
MapToMPTBatch makes a Batch from an unordered set of storage changes.
NewBillet returns a new billet for MPT trie restoring.
NewBranchNode returns a new branch node.
NewExtensionNode returns a hash node with the specified key and the next node.
NewHashNode returns a hash node with the specified hash.
NewLeafNode returns a hash node with the specified value.
NewTrie returns a new MPT trie.
NewTrieStore returns a new ready to use MPT-backed storage.
VerifyProof verifies that path indeed belongs to a MPT with the specified root hash.
# Constants
Node types definitions.
Node types definitions.
Node types definitions.
Node types definitions.
Node types definitions.
MaxKeyLength is the max length of the key to put in the trie before transforming to nibbles.
MaxValueLength is the max length of a leaf node value.
ModeAll is used to store everything.
ModeGC is used to store a set of roots with GC possible, it combines GCFlag and Latest (because it needs RC, but it has GC enabled).
ModeGCFlag is a flag for GC.
ModeLatest is used to only store the latest root.
# Variables
ErrNotFound is returned when the requested trie item is missing.
ErrRestoreFailed is returned when replacing HashNode by its "unhashed" candidate fails.
# Structs
BaseNode implements basic things every node needs like caching hash and serialized representation.
Batch is a batch of storage changes.
Billet is a part of an MPT trie with missing hash nodes that need to be restored.
BranchNode represents an MPT's branch node.
EmptyNode represents an empty node.
ExtensionNode represents an MPT's extension node.
HashNode represents an MPT's hash node.
LeafNode represents an MPT's leaf node.
NodeObject represents a Node together with it's type.
Trie is an MPT trie storing all key-value pairs.
TrieStore is an MPT-based storage implementation for storing and retrieving historic blockchain data.
# Interfaces
BaseNodeIface abstracts away basic Node functions.
Node represents a common interface of all MPT nodes.