statesync

package
v0.15.4-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2025 License: GPL-3.0, LGPL-3.0 Imports: 29 Imported by: 3

Documentation

Index

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 NewStorageTrieTask(sync *stateSync, root common.Hash, accounts []common.Hash) syncTask

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

func NewTrieQueue(db ethdb.Database) *trieQueue

func NewTrieToSync added in v0.8.14

func NewTrieToSync(sync *stateSync, root common.Hash, account common.Hash, syncTask syncTask) (*trieToSync, error)

NewTrieToSync initializes a trieToSync and restores any previously started segments.

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

func NewDefaultConfig(requestSize uint16) Config

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

func (c Config) WithUnsetDefaults() Config

WithUnsetDefaults applies defaults for unset fields. Zero values are treated as "unset" and replaced with sensible defaults.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL