Versions in this module Expand all Collapse all v0 v0.1.1 May 14, 2023 Changes in this version + const FlagTrieAccStoreCache + const FlagTrieAsyncDB + const FlagTrieAsyncDBAutoPruningOff + const FlagTrieAsyncDBInitCap + const FlagTrieAsyncDBSyncPruning + const FlagTrieCacheSize + const FlagTrieDirtyDisabled + const FlagTrieImgsLimit + const FlagTrieInMemory + const FlagTrieNodesLimit + const ProofOpMptAbsence + const ProofOpMptValue + const StoreKey + const StoreTypeMPT + var AccountStateRootRetriever StateRootRetriever = EmptyStateRootRetriever + var EmptyCodeHash = crypto.Keccak256Hash(nil) + var EmptyCodeHashBytes = crypto.Keccak256(nil) + var EnableAsyncCommit = false + var GAccToPrefetchChannel = make(chan [][]byte, 2000) + var GAccTrieUpdatedChannel = make(chan struct{}) + var GAccTryUpdateTrieChannel = make(chan struct{}) + var KeyPrefixAccLatestStoredHeight = []byte + var KeyPrefixAccRootMptHash = []byte + var NilHash = ethcmn.Hash + var TrieAccStoreCache uint = 32 + var TrieAsyncDB = true + var TrieAsyncDBAutoPruningOff = false + var TrieAsyncDBInitCap = 200_0000 + var TrieAsyncDBSyncPruning = false + var TrieCacheSize uint = 2048 + var TrieCommitGap int64 = 100 + var TrieDirtyDisabled = false + var TrieImgsLimit uint = 4 + var TrieNodesLimit uint = 256 + var TriesInMemory uint = 100 + func AddressStoragePrefixMpt(address ethcmn.Address, stateRoot ethcmn.Hash) []byte + func AddressStoreKey(addr []byte) []byte + func DisableSnapshot() + func GetAddressFromStoragePrefix(prefix []byte) ethcmn.Address + func GetEthDB() ethdb.Database + func HasVersionByDiskDB(height int64) bool + func InstanceOfMptStore() ethstate.Database + func IsStoragePrefix(prefix []byte) bool + func NewStatKeyValueStore(db ethdb.KeyValueStore, stat *RuntimeState) ethdb.KeyValueStore + func SetApplyDelta(val bool) + func SetProduceDelta(val bool) + func SetSnapshotRebuild(rebuild bool) + func UpdateCommitGapHeight(gap int64) + type AsyncKeyValueStore struct + func NewAsyncKeyValueStore(db ethdb.KeyValueStore) *AsyncKeyValueStore + func NewAsyncKeyValueStoreWithOptions(db ethdb.KeyValueStore, options AsyncKeyValueStoreOptions) *AsyncKeyValueStore + func (store *AsyncKeyValueStore) ActionAfterWriteDone(act func(), once bool) + func (store *AsyncKeyValueStore) Close() error + func (store *AsyncKeyValueStore) Compact(start []byte, limit []byte) error + func (store *AsyncKeyValueStore) Delete(key []byte) error + func (store *AsyncKeyValueStore) Get(key []byte) ([]byte, error) + func (store *AsyncKeyValueStore) Has(key []byte) (bool, error) + func (store *AsyncKeyValueStore) LogInfoAfterWriteDone(msg string, args ...interface{}) + func (store *AsyncKeyValueStore) LogStats() + func (store *AsyncKeyValueStore) NewBatch() ethdb.Batch + func (store *AsyncKeyValueStore) NewIterator(prefix []byte, start []byte) ethdb.Iterator + func (store *AsyncKeyValueStore) Prune() + func (store *AsyncKeyValueStore) Put(key []byte, value []byte) error + func (store *AsyncKeyValueStore) SetLogger(logger log.Logger) + func (store *AsyncKeyValueStore) Stat(property string) (string, error) + func (store *AsyncKeyValueStore) WaitCurrentWriteDone() + type AsyncKeyValueStoreOptions struct + DisableAutoPrune bool + InitCap int + SyncPrune bool + type Batch struct + func (s *Batch) Delete(key []byte) error + func (s *Batch) Put(key []byte, value []byte) error + type EmptyStateRootRetriever struct + func (e EmptyStateRootRetriever) GetAccStateRoot(rootBytes []byte) ethcmn.Hash + func (e EmptyStateRootRetriever) GetStateRootAndCodeHash(rootBytes []byte) (ethcmn.Hash, []byte) + func (e EmptyStateRootRetriever) ModifyAccStateRoot(before []byte, rootHash ethcmn.Hash) []byte + func (e EmptyStateRootRetriever) RetrieveStateRoot([]byte) ethcmn.Hash + type ImmutableMptStore struct + func NewImmutableMptStore(db ethstate.Database, root ethcmn.Hash) (*ImmutableMptStore, error) + func NewImmutableMptStoreFromTrie(db ethstate.Database, trie ethstate.Trie) *ImmutableMptStore + func (ms *ImmutableMptStore) CacheWrap() types.CacheWrap + func (ms *ImmutableMptStore) CacheWrapWithTrace(w io.Writer, tc types.TraceContext) types.CacheWrap + func (ms *ImmutableMptStore) Delete(key []byte) + func (ms *ImmutableMptStore) Get(key []byte) []byte + func (ms *ImmutableMptStore) GetStoreType() types.StoreType + func (ms *ImmutableMptStore) Has(key []byte) bool + func (ms *ImmutableMptStore) Iterator(start, end []byte) types.Iterator + func (ms *ImmutableMptStore) ReverseIterator(start, end []byte) types.Iterator + func (ms *ImmutableMptStore) Set(key []byte, value []byte) + type MptStore struct + func NewMptStore(logger tmlog.Logger, id types.CommitID) (*MptStore, error) + func (ms *MptStore) CacheWrap() types.CacheWrap + func (ms *MptStore) CacheWrapWithTrace(w io.Writer, tc types.TraceContext) types.CacheWrap + func (ms *MptStore) CommitterCommit(inputDelta interface{}) (rootHash types.CommitID, outputDelta interface{}) + func (ms *MptStore) CommitterCommitMap(deltaMap iavl.TreeDeltaMap) (_ types.CommitID, _ iavl.TreeDeltaMap) + func (ms *MptStore) CurrentVersion() int64 + func (ms *MptStore) Delete(key []byte) + func (ms *MptStore) EndTiming(tag string) + func (ms *MptStore) Get(key []byte) []byte + func (ms *MptStore) GetCacheReadCount() int + func (ms *MptStore) GetDBReadCount() int + func (ms *MptStore) GetDBReadTime() int + func (ms *MptStore) GetDBWriteCount() int + func (ms *MptStore) GetFlatKVReadCount() int + func (ms *MptStore) GetFlatKVReadTime() int + func (ms *MptStore) GetFlatKVWriteCount() int + func (ms *MptStore) GetFlatKVWriteTime() int + func (ms *MptStore) GetImmutable(height int64) (*ImmutableMptStore, error) + func (ms *MptStore) GetLatestStoredBlockHeight() uint64 + func (ms *MptStore) GetMptRootHash(height uint64) ethcmn.Hash + func (ms *MptStore) GetNodeReadCount() int + func (ms *MptStore) GetStoreType() types.StoreType + func (ms *MptStore) Has(key []byte) bool + func (ms *MptStore) HasVersion(height int64) bool + func (ms *MptStore) Iterator(start, end []byte) types.Iterator + func (ms *MptStore) LastCommitID() types.CommitID + func (ms *MptStore) LastCommitVersion() int64 + func (ms *MptStore) OnStop() error + func (ms *MptStore) PushData2Database(curHeight int64) + func (ms *MptStore) Query(req abci.RequestQuery) (res abci.ResponseQuery) + func (ms *MptStore) ResetCount() + func (ms *MptStore) ReverseIterator(start, end []byte) types.Iterator + func (ms *MptStore) Set(key, value []byte) + func (ms *MptStore) SetLatestStoredBlockHeight(height uint64) + func (ms *MptStore) SetMptRootHash(height uint64, hash ethcmn.Hash) + func (ms *MptStore) SetPruning(options types.PruningOptions) + func (ms *MptStore) SetUpgradeVersion(i int64) + func (ms *MptStore) SnapshotAccountIterator(root, seek ethcmn.Hash) (SnapshotAccountIterator, error) + func (ms *MptStore) SnapshotStorageIterator(root, account, seek ethcmn.Hash) (SnapshotStorageIterator, error) + func (ms *MptStore) StartPrefetcher(namespace string) + func (ms *MptStore) StartTiming() + func (ms *MptStore) StopPrefetcher() + func (ms *MptStore) StopWithVersion(targetVersion int64) error + type ProofList [][]byte + func (n *ProofList) Delete(key []byte) error + func (n *ProofList) Put(key []byte, value []byte) error + type RuntimeState struct + func NewRuntimeState() *RuntimeState + type SnapshotAccountIterator interface + type SnapshotStorageIterator interface + type StatKeyValueStore struct + func (s *StatKeyValueStore) Delete(key []byte) error + func (s *StatKeyValueStore) Get(key []byte) ([]byte, error) + func (s *StatKeyValueStore) NewBatch() ethdb.Batch + func (s *StatKeyValueStore) Put(key []byte, value []byte) error + type StateRootRetriever interface + GetAccStateRoot func(rootBytes []byte) ethcmn.Hash + GetStateRootAndCodeHash func([]byte) (ethcmn.Hash, []byte) + ModifyAccStateRoot func(before []byte, rootHash ethcmn.Hash) []byte + RetrieveStateRoot func([]byte) ethcmn.Hash + type TriePrefetcher struct + func NewTriePrefetcher(db ethstate.Database, root common.Hash, namespace string) *TriePrefetcher + func (p *TriePrefetcher) Close() + func (p *TriePrefetcher) Copy() *TriePrefetcher + func (p *TriePrefetcher) Prefetch(root common.Hash, keys [][]byte) + func (p *TriePrefetcher) Trie(root common.Hash) ethstate.Trie + func (p *TriePrefetcher) Used(root common.Hash, used [][]byte)