[][src]Crate reference_trie

Reference implementation of a streamer.

Modules

nibble_ops

Utility methods to work on radix 16 nibble.

Structs

Bitmap

Children bitmap codec for radix 16 trie.

ExtensionLayout

Trie layout using extension nodes.

GenericNoExtensionLayout

Trie layout without extension nodes, allowing generic hasher.

NibbleSlice

Nibble-orientated view onto byte-slice, allowing nibble-precision offsets.

Record

A record of a visited node.

Recorder

Records trie nodes as they pass it.

ReferenceNodeCodec

Simple reference implementation of a NodeCodec.

ReferenceNodeCodecNoExt

Simple reference implementation of a NodeCodec. Even if implementation follows initial specification of https://github.com/w3f/polkadot-re-spec/issues/8, this may not follow it in the future, it is mainly the testing codec without extension node.

ReferenceTrieStream

Reference implementation of a TrieStream with extension nodes.

ReferenceTrieStreamNoExt

Reference implementation of a TrieStream without extension.

Traits

NodeCodec

Trait for trie node encoding/decoding.

Trie

A key-value datastore implemented as a database-backed modified Merkle tree.

TrieConfiguration

This traits associates a trie definition with prefered methods. It also contains own default implementations and can be use to allow switching implementation.

TrieLayout

Trait with definition of trie layout. Contains all associated trait needed for a trie definition or implementation.

TrieMut

A key-value datastore implemented as a database-backed modified Merkle tree.

TrieStream

Byte-stream oriented trait for constructing closed-form tries.

Functions

calc_root

Trie builder root calculation utility.

calc_root_build

Trie builder trie building utility.

calc_root_build_no_extension

Trie builder trie building utility. This uses the variant without extension nodes.

calc_root_no_extension

Trie builder root calculation utility. This uses the variant without extension nodes.

compare_implementations

Compare trie builder and in memory trie.

compare_implementations_no_extension

Compare trie builder and in memory trie. This uses the variant without extension nodes.

compare_implementations_no_extension_unordered

compare_implementations_no_extension for unordered input (trie_root does ordering before running when trie_build expect correct ordering).

compare_no_extension_insert_remove

Testing utility that uses some periodic removal over its input test data.

compare_root

Compare trie builder and trie root implementations.

compare_unhashed

Compare trie builder and trie root unhashed implementations.

compare_unhashed_no_extension

Compare trie builder and trie root unhashed implementations. This uses the variant without extension nodes.

reference_trie_root
reference_trie_root_no_extension

Type Definitions

NoExtensionLayout

Trie layout without extension nodes.

RefFatDB
RefFatDBMut
RefLookup
RefLookupNoExt
RefSecTrieDB
RefSecTrieDBMut
RefTrieDB
RefTrieDBMut
RefTrieDBMutNoExt
RefTrieDBNoExt