Versions in this module Expand all Collapse all v1 v1.14.12 Nov 23, 2024 Changes in this version + const PUSH1 + const PUSH32 + var ErrCommitted = errors.New("trie is already committed") + func VerifyProof(rootHash common.Hash, key []byte, proofDb ethdb.KeyValueReader) (value []byte, err error) + func VerifyRangeProof(rootHash common.Hash, firstKey []byte, keys [][]byte, values [][]byte, ...) (bool, error) + type ChunkedCode []byte + func ChunkifyCode(code []byte) ChunkedCode + type ID struct + Owner common.Hash + Root common.Hash + StateRoot common.Hash + func StateTrieID(root common.Hash) *ID + func StorageTrieID(stateRoot common.Hash, owner common.Hash, root common.Hash) *ID + func TrieID(root common.Hash) *ID + type Iterator struct + Err error + Key []byte + Value []byte + func NewIterator(it NodeIterator) *Iterator + func (it *Iterator) Next() bool + func (it *Iterator) Prove() [][]byte + type MerkleLoader struct + func NewMerkleLoader(db database.Database) *MerkleLoader + func (l *MerkleLoader) OpenStorageTrie(stateRoot common.Hash, addrHash, root common.Hash) (triestate.Trie, error) + func (l *MerkleLoader) OpenTrie(root common.Hash) (triestate.Trie, error) + type MerkleResolver struct + func (resolver MerkleResolver) ForEach(node []byte, onChild func(common.Hash)) + type MissingNodeError struct + NodeHash common.Hash + Owner common.Hash + Path []byte + func (err *MissingNodeError) Error() string + func (err *MissingNodeError) Unwrap() error + type NodeIterator interface + AddResolver func(NodeResolver) + Error func() error + Hash func() common.Hash + Leaf func() bool + LeafBlob func() []byte + LeafKey func() []byte + LeafProof func() [][]byte + Next func(bool) bool + NodeBlob func() []byte + Parent func() common.Hash + Path func() []byte + func NewDifferenceIterator(a, b NodeIterator) (NodeIterator, *int) + func NewUnionIterator(iters []NodeIterator) (NodeIterator, *int) + type NodeResolver func(owner common.Hash, path []byte, hash common.Hash) []byte + type SecureTrie = StateTrie + func NewSecure(stateRoot common.Hash, owner common.Hash, root common.Hash, ...) (*SecureTrie, error) + type StackTrie struct + func NewStackTrie(options *StackTrieOptions) *StackTrie + func (t *StackTrie) Commit() common.Hash + func (t *StackTrie) Hash() common.Hash + func (t *StackTrie) MustUpdate(key, value []byte) + func (t *StackTrie) Reset() + func (t *StackTrie) Update(key, value []byte) error + type StackTrieOptions struct + Cleaner func(path []byte) + SkipLeftBoundary bool + SkipRightBoundary bool + Writer func(path []byte, hash common.Hash, blob []byte) + func NewStackTrieOptions() *StackTrieOptions + func (o *StackTrieOptions) WithCleaner(cleaner func(path []byte)) *StackTrieOptions + func (o *StackTrieOptions) WithSkipBoundary(skipLeft, skipRight bool, gauge metrics.Gauge) *StackTrieOptions + func (o *StackTrieOptions) WithWriter(writer func(path []byte, hash common.Hash, blob []byte)) *StackTrieOptions + type StateTrie struct + func NewStateTrie(id *ID, db database.Database) (*StateTrie, error) + func (t *StateTrie) Commit(collectLeaf bool) (common.Hash, *trienode.NodeSet, error) + func (t *StateTrie) Copy() *StateTrie + func (t *StateTrie) DeleteAccount(address common.Address) error + func (t *StateTrie) DeleteStorage(_ common.Address, key []byte) error + func (t *StateTrie) GetAccount(address common.Address) (*types.StateAccount, error) + func (t *StateTrie) GetAccountByHash(addrHash common.Hash) (*types.StateAccount, error) + func (t *StateTrie) GetKey(shaKey []byte) []byte + func (t *StateTrie) GetNode(path []byte) ([]byte, int, error) + func (t *StateTrie) GetStorage(_ common.Address, key []byte) ([]byte, error) + func (t *StateTrie) Hash() common.Hash + func (t *StateTrie) MustDelete(key []byte) + func (t *StateTrie) MustGet(key []byte) []byte + func (t *StateTrie) MustNodeIterator(start []byte) NodeIterator + func (t *StateTrie) MustUpdate(key, value []byte) + func (t *StateTrie) NodeIterator(start []byte) (NodeIterator, error) + func (t *StateTrie) Prove(key []byte, proofDb ethdb.KeyValueWriter) error + func (t *StateTrie) UpdateAccount(address common.Address, acc *types.StateAccount) error + func (t *StateTrie) UpdateContractCode(_ common.Address, _ common.Hash, _ []byte) error + func (t *StateTrie) UpdateStorage(_ common.Address, key, value []byte) error + type Trie struct + func New(id *ID, db database.Database) (*Trie, error) + func NewEmpty(db database.Database) *Trie + func (t *Trie) Commit(collectLeaf bool) (common.Hash, *trienode.NodeSet, error) + func (t *Trie) Copy() *Trie + func (t *Trie) Delete(key []byte) error + func (t *Trie) Get(key []byte) ([]byte, error) + func (t *Trie) GetNode(path []byte) ([]byte, int, error) + func (t *Trie) Hash() common.Hash + func (t *Trie) MustDelete(key []byte) + func (t *Trie) MustGet(key []byte) []byte + func (t *Trie) MustGetNode(path []byte) ([]byte, int) + func (t *Trie) MustNodeIterator(start []byte) NodeIterator + func (t *Trie) MustUpdate(key, value []byte) + func (t *Trie) NodeIterator(start []byte) (NodeIterator, error) + func (t *Trie) Prove(key []byte, proofDb ethdb.KeyValueWriter) error + func (t *Trie) Reset() + func (t *Trie) Update(key, value []byte) error + type VerkleTrie struct + func NewVerkleTrie(root common.Hash, db database.Database, cache *utils.PointCache) (*VerkleTrie, error) + func (t *VerkleTrie) Commit(_ bool) (common.Hash, *trienode.NodeSet, error) + func (t *VerkleTrie) Copy() *VerkleTrie + func (t *VerkleTrie) DeleteAccount(addr common.Address) error + func (t *VerkleTrie) DeleteStorage(addr common.Address, key []byte) error + func (t *VerkleTrie) GetAccount(addr common.Address) (*types.StateAccount, error) + func (t *VerkleTrie) GetKey(key []byte) []byte + func (t *VerkleTrie) GetStorage(addr common.Address, key []byte) ([]byte, error) + func (t *VerkleTrie) Hash() common.Hash + func (t *VerkleTrie) IsVerkle() bool + func (t *VerkleTrie) NodeIterator(startKey []byte) (NodeIterator, error) + func (t *VerkleTrie) Prove(key []byte, proofDb ethdb.KeyValueWriter) error + func (t *VerkleTrie) ToDot() string + func (t *VerkleTrie) UpdateAccount(addr common.Address, acc *types.StateAccount) error + func (t *VerkleTrie) UpdateContractCode(addr common.Address, codeHash common.Hash, code []byte) error + func (t *VerkleTrie) UpdateStorage(address common.Address, key, value []byte) error v1.14.12-1 Nov 23, 2024