Versions in this module Expand all Collapse all v1 v1.0.3 Sep 5, 2024 v1.0.2 Sep 5, 2024 Changes in this version + const AccessWitnessReadFlag + const AccessWitnessWriteFlag + const TriesInMemory + func NewStateSync(root common.Hash, database ethdb.KeyValueReader, ...) *trie.Sync + type AccessEvents struct + func NewAccessEvents(pointCache *utils.PointCache) *AccessEvents + func (ae *AccessEvents) AddAccount(addr common.Address, isWrite bool) uint64 + func (ae *AccessEvents) AddTxDestination(addr common.Address, sendsValue bool) + func (ae *AccessEvents) AddTxOrigin(originAddr common.Address) + func (ae *AccessEvents) BalanceGas(addr common.Address, isWrite bool) uint64 + func (ae *AccessEvents) CodeChunksRangeGas(contractAddr common.Address, startPC, size uint64, codeLen uint64, ...) uint64 + func (ae *AccessEvents) CodeHashGas(addr common.Address, isWrite bool) uint64 + func (ae *AccessEvents) CodeSizeGas(addr common.Address, isWrite bool) uint64 + func (ae *AccessEvents) ContractCreateInitGas(addr common.Address, createSendsValue bool) uint64 + func (ae *AccessEvents) Copy() *AccessEvents + func (ae *AccessEvents) Keys() [][]byte + func (ae *AccessEvents) Merge(other *AccessEvents) + func (ae *AccessEvents) MessageCallGas(destination common.Address) uint64 + func (ae *AccessEvents) NonceGas(addr common.Address, isWrite bool) uint64 + func (ae *AccessEvents) SlotGas(addr common.Address, slot common.Hash, isWrite bool) uint64 + func (ae *AccessEvents) ValueTransferGas(callerAddr, targetAddr common.Address) uint64 + func (ae *AccessEvents) VersionGas(addr common.Address, isWrite bool) uint64 + type Database interface + ContractCode func(addr common.Address, codeHash common.Hash) ([]byte, error) + ContractCodeSize func(addr common.Address, codeHash common.Hash) (int, error) + CopyTrie func(Trie) Trie + DiskDB func() ethdb.KeyValueStore + OpenStorageTrie func(stateRoot common.Hash, address common.Address, root common.Hash, trie Trie) (Trie, error) + OpenTrie func(root common.Hash) (Trie, error) + PointCache func() *utils.PointCache + TrieDB func() *triedb.Database + func NewDatabase(db ethdb.Database) Database + func NewDatabaseWithConfig(db ethdb.Database, config *triedb.Config) Database + func NewDatabaseWithNodeDB(db ethdb.Database, triedb *triedb.Database) Database + type Dump struct + Accounts map[string]DumpAccount + Next []byte + Root string + func (d *Dump) OnAccount(addr *common.Address, account DumpAccount) + func (d *Dump) OnRoot(root common.Hash) + type DumpAccount struct + Address *common.Address + AddressHash hexutil.Bytes + Balance string + Code hexutil.Bytes + CodeHash hexutil.Bytes + Nonce uint64 + Root hexutil.Bytes + Storage map[common.Hash]string + type DumpCollector interface + OnAccount func(*common.Address, DumpAccount) + OnRoot func(common.Hash) + type DumpConfig struct + Max uint64 + OnlyWithAddresses bool + SkipCode bool + SkipStorage bool + Start []byte + type StateDB struct + AccountCommits time.Duration + AccountDeleted int + AccountHashes time.Duration + AccountReads time.Duration + AccountUpdated int + AccountUpdates time.Duration + SnapshotAccountReads time.Duration + SnapshotCommits time.Duration + SnapshotStorageReads time.Duration + StorageCommits time.Duration + StorageDeleted atomic.Int64 + StorageReads time.Duration + StorageUpdated atomic.Int64 + StorageUpdates time.Duration + TrieDBCommits time.Duration + func New(root common.Hash, db Database, snaps *snapshot.Tree) (*StateDB, error) + func (s *StateDB) AddAddressToAccessList(addr common.Address) + func (s *StateDB) AddBalance(addr common.Address, amount *uint256.Int, reason tracing.BalanceChangeReason) + 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) Commit(block uint64, deleteEmptyObjects bool) (common.Hash, error) + func (s *StateDB) Copy() *StateDB + func (s *StateDB) CreateAccount(addr common.Address) + func (s *StateDB) CreateContract(addr common.Address) + func (s *StateDB) Database() Database + func (s *StateDB) Dump(opts *DumpConfig) []byte + func (s *StateDB) DumpToCollector(c DumpCollector, conf *DumpConfig) (nextKey []byte) + func (s *StateDB) Empty(addr common.Address) bool + 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) *uint256.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) GetLogs(hash common.Hash, blockNumber uint64, blockHash common.Hash) []*types.Log + func (s *StateDB) GetNonce(addr common.Address) uint64 + func (s *StateDB) GetRefund() uint64 + func (s *StateDB) GetState(addr common.Address, hash common.Hash) common.Hash + func (s *StateDB) GetStorageRoot(addr common.Address) common.Hash + func (s *StateDB) GetTransientState(addr common.Address, key common.Hash) common.Hash + func (s *StateDB) GetTrie() Trie + func (s *StateDB) HasSelfDestructed(addr common.Address) bool + func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash + func (s *StateDB) IterativeDump(opts *DumpConfig, output *json.Encoder) + func (s *StateDB) Logs() []*types.Log + func (s *StateDB) PointCache() *utils.PointCache + func (s *StateDB) Preimages() map[common.Hash][]byte + func (s *StateDB) Prepare(rules params.Rules, sender, coinbase common.Address, dst *common.Address, ...) + func (s *StateDB) RawDump(opts *DumpConfig) Dump + func (s *StateDB) RevertToSnapshot(revid int) + func (s *StateDB) SelfDestruct(addr common.Address) + func (s *StateDB) Selfdestruct6780(addr common.Address) + func (s *StateDB) SetBalance(addr common.Address, amount *uint256.Int, reason tracing.BalanceChangeReason) + func (s *StateDB) SetCode(addr common.Address, code []byte) + func (s *StateDB) SetLogger(l *tracing.Hooks) + func (s *StateDB) SetNonce(addr common.Address, nonce uint64) + func (s *StateDB) SetState(addr common.Address, key, value common.Hash) + func (s *StateDB) SetStorage(addr common.Address, storage map[common.Hash]common.Hash) + func (s *StateDB) SetTransientState(addr common.Address, key, value common.Hash) + func (s *StateDB) SetTxContext(thash common.Hash, ti int) + func (s *StateDB) SlotInAccessList(addr common.Address, slot common.Hash) (addressPresent bool, slotPresent bool) + func (s *StateDB) Snapshot() int + func (s *StateDB) StartPrefetcher(namespace string, witness *stateless.Witness) + func (s *StateDB) StopPrefetcher() + func (s *StateDB) SubBalance(addr common.Address, amount *uint256.Int, reason tracing.BalanceChangeReason) + func (s *StateDB) SubRefund(gas uint64) + func (s *StateDB) TxIndex() int + func (s *StateDB) Witness() *stateless.Witness + type Storage map[common.Hash]common.Hash + func (s Storage) Copy() Storage + type Trie interface + Commit func(collectLeaf bool) (common.Hash, *trienode.NodeSet) + DeleteAccount func(address common.Address) error + DeleteStorage func(addr common.Address, key []byte) error + GetAccount func(address common.Address) (*types.StateAccount, error) + GetKey func([]byte) []byte + GetStorage func(addr common.Address, key []byte) ([]byte, error) + Hash func() common.Hash + IsVerkle func() bool + NodeIterator func(startKey []byte) (trie.NodeIterator, error) + Prove func(key []byte, proofDb ethdb.KeyValueWriter) error + UpdateAccount func(address common.Address, account *types.StateAccount) error + UpdateContractCode func(address common.Address, codeHash common.Hash, code []byte) error + UpdateStorage func(addr common.Address, key, value []byte) error + Witness func() map[string]struct{}