Versions in this module Expand all Collapse all v0 v0.0.0 Mar 14, 2022 Changes in this version + func NewStateSync(root common.Hash, database ethdb.KeyValueReader, bloom *trie.SyncBloom, ...) *trie.Sync + type Account struct + Balance *big.Int + CodeHash []byte + Nonce uint64 + Root common.Hash + type Code []byte + func (c Code) String() string + type Database interface + CacheAccount func(root common.Hash, t Trie) + CacheStorage func(addrHash common.Hash, root common.Hash, t Trie) + ContractCode func(addrHash, codeHash common.Hash) ([]byte, error) + ContractCodeSize func(addrHash, codeHash common.Hash) (int, error) + CopyTrie func(Trie) Trie + OpenStorageTrie func(addrHash, root common.Hash) (Trie, error) + OpenTrie func(root common.Hash) (Trie, error) + Purge func() + TrieDB func() *trie.Database + func NewDatabase(db ethdb.Database) Database + func NewDatabaseWithConfig(db ethdb.Database, config *trie.Config) Database + func NewDatabaseWithConfigAndCache(db ethdb.Database, config *trie.Config) Database + type Dump struct + Accounts map[common.Address]DumpAccount + Root string + func (d *Dump) OnAccount(addr common.Address, account DumpAccount) + func (d *Dump) OnRoot(root common.Hash) + type DumpAccount struct + Address *common.Address + Balance string + Code string + CodeHash string + Nonce uint64 + Root string + SecureKey hexutil.Bytes + Storage map[common.Hash]string + type DumpCollector interface + OnAccount func(common.Address, DumpAccount) + OnRoot func(common.Hash) + type IteratorDump struct + Accounts map[common.Address]DumpAccount + Next []byte + Root string + func (d *IteratorDump) OnAccount(addr common.Address, account DumpAccount) + func (d *IteratorDump) OnRoot(root common.Hash) + type NodeIterator struct + Error error + Hash common.Hash + Parent common.Hash + func NewNodeIterator(state *StateDB) *NodeIterator + func (it *NodeIterator) Next() bool + type StateDB struct + AccountCommits time.Duration + AccountHashes time.Duration + AccountReads time.Duration + AccountUpdates time.Duration + MetricsMux sync.Mutex + SnapshotAccountReads time.Duration + SnapshotCommits time.Duration + SnapshotStorageReads time.Duration + StorageCommits time.Duration + StorageHashes time.Duration + StorageReads time.Duration + StorageUpdates time.Duration + func New(root common.Hash, db Database, snaps *snapshot.Tree) (*StateDB, error) + func (db *StateDB) ForEachStorage(addr common.Address, cb func(key, value common.Hash) bool) error + func (s *StateDB) AccountsIntermediateRoot() + func (s *StateDB) AddAddressToAccessList(addr common.Address) + func (s *StateDB) AddBalance(addr common.Address, amount *big.Int) + func (s *StateDB) AddLog(log *types.Log) + func (s *StateDB) AddPreimage(hash common.Hash, preimage []byte) + func (s *StateDB) AddRefund(gas uint64) + func (s *StateDB) AddSlotToAccessList(addr common.Address, slot common.Hash) + func (s *StateDB) AddressInAccessList(addr common.Address) bool + func (s *StateDB) BlockHash() common.Hash + func (s *StateDB) Commit(failPostCommitFunc func(), postCommitFuncs ...func() error) (common.Hash, *types.DiffLayer, error) + func (s *StateDB) Copy() *StateDB + func (s *StateDB) CreateAccount(addr common.Address) + func (s *StateDB) Database() Database + func (s *StateDB) DiffLayerToSnap(diffLayer *types.DiffLayer) (map[common.Address]struct{}, map[common.Address][]byte, ...) + func (s *StateDB) Dump(excludeCode, excludeStorage, excludeMissingPreimages bool) []byte + func (s *StateDB) DumpToCollector(c DumpCollector, excludeCode, excludeStorage, excludeMissingPreimages bool, ...) (nextKey []byte) + func (s *StateDB) Empty(addr common.Address) bool + func (s *StateDB) EnablePipeCommit() + func (s *StateDB) Error() error + func (s *StateDB) Exist(addr common.Address) bool + func (s *StateDB) Finalise(deleteEmptyObjects bool) + func (s *StateDB) GetBalance(addr common.Address) *big.Int + func (s *StateDB) GetCode(addr common.Address) []byte + func (s *StateDB) GetCodeHash(addr common.Address) common.Hash + func (s *StateDB) GetCodeSize(addr common.Address) int + func (s *StateDB) GetCommittedState(addr common.Address, hash common.Hash) common.Hash + func (s *StateDB) GetDirtyAccounts() []common.Address + func (s *StateDB) GetLogs(hash common.Hash) []*types.Log + func (s *StateDB) GetNonce(addr common.Address) uint64 + func (s *StateDB) GetOrNewStateObject(addr common.Address) *StateObject + func (s *StateDB) GetProof(addr common.Address) ([][]byte, error) + func (s *StateDB) GetProofByHash(addrHash common.Hash) ([][]byte, error) + func (s *StateDB) GetRefund() uint64 + func (s *StateDB) GetState(addr common.Address, hash common.Hash) common.Hash + func (s *StateDB) GetStorageProof(a common.Address, key common.Hash) ([][]byte, error) + func (s *StateDB) GetStorageProofByHash(a common.Address, key common.Hash) ([][]byte, error) + func (s *StateDB) HasSuicided(addr common.Address) bool + func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash + func (s *StateDB) IsLightProcessed() bool + func (s *StateDB) IterativeDump(excludeCode, excludeStorage, excludeMissingPreimages bool, ...) + func (s *StateDB) IteratorDump(excludeCode, excludeStorage, excludeMissingPreimages bool, start []byte, ...) IteratorDump + func (s *StateDB) LightCommit() (common.Hash, *types.DiffLayer, error) + func (s *StateDB) Logs() []*types.Log + func (s *StateDB) MarkFullProcessed() + func (s *StateDB) MarkLightProcessed() + func (s *StateDB) Preimages() map[common.Hash][]byte + func (s *StateDB) Prepare(thash, bhash common.Hash, ti int) + func (s *StateDB) PrepareAccessList(sender common.Address, dst *common.Address, precompiles []common.Address, ...) + func (s *StateDB) RawDump(excludeCode, excludeStorage, excludeMissingPreimages bool) Dump + func (s *StateDB) RevertToSnapshot(revid int) + func (s *StateDB) SetBalance(addr common.Address, amount *big.Int) + func (s *StateDB) SetCode(addr common.Address, code []byte) + func (s *StateDB) SetDiff(diffLayer *types.DiffLayer, diffTries map[common.Address]Trie, ...) + func (s *StateDB) SetExpectedStateRoot(root common.Hash) + func (s *StateDB) SetNonce(addr common.Address, nonce uint64) + func (s *StateDB) SetSnapData(snapDestructs map[common.Address]struct{}, ...) + func (s *StateDB) SetState(addr common.Address, key, value common.Hash) + func (s *StateDB) SetStateObject(object *StateObject) + func (s *StateDB) SetStorage(addr common.Address, storage map[common.Hash]common.Hash) + func (s *StateDB) SlotInAccessList(addr common.Address, slot common.Hash) (addressPresent bool, slotPresent bool) + func (s *StateDB) SnapToDiffLayer() ([]common.Address, []types.DiffAccount, []types.DiffStorage) + func (s *StateDB) Snapshot() int + func (s *StateDB) StartPrefetcher(namespace string) + func (s *StateDB) StateIntermediateRoot() common.Hash + func (s *StateDB) StopPrefetcher() + func (s *StateDB) StorageTrie(addr common.Address) Trie + func (s *StateDB) SubBalance(addr common.Address, amount *big.Int) + func (s *StateDB) SubRefund(gas uint64) + func (s *StateDB) Suicide(addr common.Address) bool + func (s *StateDB) Trie() (Trie, error) + func (s *StateDB) TryPreload(block *types.Block, signer types.Signer) + func (s *StateDB) TxIndex() int + func (s *StateDB) WaitPipeVerification() error + type StateObject struct + func (s *StateObject) AddBalance(amount *big.Int) + func (s *StateObject) Address() common.Address + func (s *StateObject) Balance() *big.Int + func (s *StateObject) Code(db Database) []byte + func (s *StateObject) CodeHash() []byte + func (s *StateObject) CodeSize(db Database) int + func (s *StateObject) CommitTrie(db Database) error + func (s *StateObject) EncodeRLP(w io.Writer) error + func (s *StateObject) GetCommittedState(db Database, key common.Hash) common.Hash + func (s *StateObject) GetState(db Database, key common.Hash) common.Hash + func (s *StateObject) Nonce() uint64 + func (s *StateObject) ReturnGas(gas *big.Int) + func (s *StateObject) SetBalance(amount *big.Int) + func (s *StateObject) SetCode(codeHash common.Hash, code []byte) + func (s *StateObject) SetNonce(nonce uint64) + func (s *StateObject) SetState(db Database, key, value common.Hash) + func (s *StateObject) SetStorage(storage map[common.Hash]common.Hash) + func (s *StateObject) SubBalance(amount *big.Int) + func (s *StateObject) Value() *big.Int + type Storage map[common.Hash]common.Hash + func (s Storage) Copy() Storage + func (s Storage) String() (str string) + type Trie interface + Commit func(onleaf trie.LeafCallback) (common.Hash, error) + GetKey func([]byte) []byte + Hash func() common.Hash + NodeIterator func(startKey []byte) trie.NodeIterator + Prove func(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) error + TryDelete func(key []byte) error + TryGet func(key []byte) ([]byte, error) + TryUpdate func(key, value []byte) error