merkle_patricia_tree v0.2.5 API Reference
Modules
Defines a general key-value storage to back and persist
out Merkle Patricia Trie. This is generally LevelDB in the
community, but for testing, we’ll generally use :ets
Implementation of MerklePatriciaTree.DB
which
is backed by :ets
Implementation of MerklePatriciaTree.DB which is backed by leveldb
Helpers for navigating lists, specifically for finding shared prefixes and postfixes
Helper functions related to creating a MerklePatriciaTree database in :ets or :leveldb. This is to be used when you need to have a persisted table for a test case, which is basically any test that involves these tables. The tables generated by this module are supposed to be exceedingly temporary
Builder is responsible for adding keys to an existing merkle trie. To add a key, we need to make a delta to our trie that ends up as the canonical form of the given tree as defined in http://gavwood.com/Paper.pdf
Destroyer is responsible for removing keys from a merkle trie. To remove a key, we need to make a delta to our trie which ends up as the canonical form of the given tree as defined in http://gavwood.com/Paper.pdf
Functions to help with manipulating or working with tries
A simple module to inspect and print the structure of tries
This module encodes and decodes nodes from a
trie encoding back into RLP form. We effectively implement
c(I, i)
from the Yellow Paper
Module to get and put nodes in a trie by the given
storage mechanism. Generally, handles the function n(I, i)
,
Eq.(178) from the Yellow Paper
Function to verify the structure of a trie meets the spec as defined in http://gavwood.com/Paper.pdf