Documentation
¶
Index ¶
- func NewMainTrieTask(sync *stateSync) syncTask
- func NewStorageTrieTask(sync *stateSync, root common.Hash, accounts []common.Hash) syncTask
- func NewSyncer(client syncclient.Client, db ethdb.Database, root common.Hash, config Config) (synccommon.Syncer, error)
- func NewTrieQueue(db ethdb.Database) *trieQueue
- func NewTrieToSync(sync *stateSync, root common.Hash, account common.Hash, syncTask syncTask) (*trieToSync, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMainTrieTask ¶ added in v0.8.14
func NewMainTrieTask(sync *stateSync) syncTask
func NewStorageTrieTask ¶ added in v0.8.14
func NewSyncer ¶ added in v0.15.3
func NewSyncer(client syncclient.Client, db ethdb.Database, root common.Hash, config Config) (synccommon.Syncer, error)
func NewTrieQueue ¶ added in v0.8.14
Types ¶
type Config ¶ added in v0.15.3
type Config struct {
BatchSize uint
// Maximum number of code hashes in the code syncer queue.
MaxOutstandingCodeHashes int
NumCodeFetchingWorkers int
// Number of leafs to request from a peer at a time.
// NOTE: user facing option validated as the parameter [plugin/evm/config.Config.StateSyncRequestSize].
RequestSize uint16
}
func NewDefaultConfig ¶
NewDefaultConfig returns a Config with the default values for the state syncer. TODO: as a next feature we should probably introduce functional options for the config, e.g. func WithRequestSize(requestSize uint16) SyncerOption, because this function is not very flexible.
func (Config) WithUnsetDefaults ¶
WithUnsetDefaults applies defaults for unset fields. Zero values are treated as "unset" and replaced with sensible defaults.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.