Documentation ¶
Index ¶
- func FillAccountsWithOverlappingStorage(t *testing.T, trieDB *trie.Database, root common.Hash, numAccounts int, ...) (common.Hash, map[*keystore.Key]*types.StateAccount)
- func NewEVMStateSyncer(config *EVMStateSyncerConfig) (*stateSyncer, error)
- type EVMStateSyncerConfig
- type StateSyncProgress
- type StorageTrieProgress
- type SyncETA
- type TrieProgress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FillAccountsWithOverlappingStorage ¶
func FillAccountsWithOverlappingStorage( t *testing.T, trieDB *trie.Database, root common.Hash, numAccounts int, numOverlappingStorageRoots int, ) (common.Hash, map[*keystore.Key]*types.StateAccount)
FillAccountsWithOverlappingStorage adds [numAccounts] randomly generated accounts to the secure trie at [root] and commits it to [trieDB]. For each 3 accounts created: - One does not have a storage trie, - One has a storage trie shared with other accounts (total number of shared storage tries [numOverlappingStorageRoots]), - One has a uniquely generated storage trie, returns the new trie root and a map of funded keys to StateAccount structs.
func NewEVMStateSyncer ¶
func NewEVMStateSyncer(config *EVMStateSyncerConfig) (*stateSyncer, error)
Types ¶
type EVMStateSyncerConfig ¶
type StateSyncProgress ¶
type StateSyncProgress struct { MainTrie *TrieProgress MainTrieDone bool Root common.Hash StorageTries map[common.Hash]*StorageTrieProgress }
StateSyncProgress tracks the progress of syncing the main trie and the sub-tasks for syncing storage tries.
type StorageTrieProgress ¶
type SyncETA ¶
type SyncETA interface { // NotifyProgress is called when leafs are received to estimate progress and // updates the overall ETA if needed, logging a message if it has been more // than [updateInterval] since the last update. NotifyProgress(root common.Hash, startTime time.Time, startKey []byte, key []byte) // RemoveSyncedTrie is called when a trie is done syncing, so it will no longer // be considered for calculating the ETA. RemoveSyncedTrie(root common.Hash, skipped bool) }
func NewSyncEta ¶
type TrieProgress ¶
type TrieProgress struct {
// contains filtered or unexported fields
}
func NewTrieProgress ¶
func NewTrieProgress(db ethdb.Batcher, batchSize int, eta SyncETA) *TrieProgress
Click to show internal directories.
Click to hide internal directories.