merkel v1.0.1 Merkel.BinaryHashTree
Implements a merkle binary hash tree that is balanced using AVL rotations
Supports create, lookup, keys, insert, delete operations
Given an initial list of k-v pairs constructs an initial balanced tree without any initial rotations or initial rehashings
Keys are binary, e.g. a utf8 encoded sequence of bytes (string) or just bytes Values are any type but for compactness binary or numbers are preferred
Keys and values are only stored in the leaves Inner nodes use the search_key value to determine order
Hashes of the keys are stored in the node key_hash field Inner nodes store the concatenated hashes of their children in key_hash as well
Link to this section Summary
Functions
Create balanced tree given a list of {k,v} pairs or create empty tree
Delete the specified key, ensuring it resides in the tree. Updates binary tree search keys
Provides dump of tree info to be used in Inspect protocol implementation
Adds key value pair and then ensures tree is balanced
Returns list of keys from bottom left of tree to bottom right
Returns key value pair if key lookup is successful
Link to this section Types
Link to this section Functions
Create balanced tree given a list of {k,v} pairs or create empty tree
Delete the specified key, ensuring it resides in the tree. Updates binary tree search keys
Provides dump of tree info to be used in Inspect protocol implementation
Adds key value pair and then ensures tree is balanced.
Returns list of keys from bottom left of tree to bottom right
Returns key value pair if key lookup is successful