package
0.0.0-20220728222812-7e2f347744fb
Repository: https://github.com/ir4tech/webb-evm.git
Documentation: pkg.go.dev

# Functions

FullAccount decodes the data on the 'slim RLP' format and return the consensus format account.
FullAccountRLP converts data on the 'slim RLP' format into the full RLP-format.
GenerateAccountTrieRoot takes an account iterator and reproduces the root hash.
GenerateStorageTrieRoot takes a storage iterator and reproduces the root hash.
GenerateTrie takes the whole snapshot tree as the input, traverses all the accounts as well as the corresponding storages and regenerate the whole state (account trie + all storage tries).
New attempts to load an already existing snapshot from a persistent key-value store (with a number of memory layers from a journal), ensuring that the head of the snapshot matches the expected one.
NewTestTree creates a *Tree with a pre-populated diskLayer.
SlimAccount converts a state.Account content into a slim snapshot account.
SlimAccountRLP converts a state.Account content into a slim snapshot version RLP encoded.
WipeSnapshot starts a goroutine to iterate over the entire key-value database and delete all the data associated with the snapshot (accounts, storage, metadata).

# Variables

ErrNotConstructed is returned if the callers want to iterate the snapshot while the generation is not finished yet.
ErrNotCoveredYet is returned from data accessors if the underlying snapshot is being generated currently and the requested data item is not yet in the range of accounts covered.
ErrSnapshotStale is returned from data accessors if the underlying snapshot layer had been invalidated due to the chain progressing forward far enough to not maintain the layer's original state.
ErrStaleParentLayer is returned when Flatten attempts to flatten a diff layer into a stale parent.

# Structs

Account is a modified version of a state.Account, where the root is replaced with a byte slice.
Tree is an Ethereum state snapshot tree.

# Interfaces

AccountIterator is an iterator to step over all the accounts in a snapshot, which may or may not be composed of multiple layers.
Iterator is an iterator to step over all the accounts or the specific storage in a snapshot which may or may not be composed of multiple layers.
Snapshot represents the functionality supported by a snapshot storage layer.
StorageIterator is an iterator to step over the specific storage in a snapshot, which may or may not be composed of multiple layers.