Skip to main content

Module state

Module state 

Source
Expand description

Support for generating the state root for memdb storage

Structsยง

DirtyAccount ๐Ÿ”’
IncrementalStateTrie ๐Ÿ”’
IncrementalTrie ๐Ÿ”’
A mutable Merkle Patricia trie that caches the RLP reference for every unchanged node.
StateRootCache
Incrementally maintains the state trie used for block headers.
TrieNode ๐Ÿ”’

Enumsยง

TrieNodeKind ๐Ÿ”’

Functionsยง

build_root
state_root
Builds state root from the given accounts
state_trie_witness
Builds the state trie for the given accounts and returns its root together with the RLP encoding of every node of the account trie and all storage tries.
storage_root
Builds storage root from the given storage
trie_account_rlp
Returns the RLP for this account.
trie_account_rlp_with_storage_root ๐Ÿ”’
Returns the RLP for this account with an already computed storage root.
trie_accounts
Builds iterator over stored key-value pairs ready for account trie root calculation.
trie_storage
Builds iterator over stored key-value pairs ready for storage trie root calculation.