Help us shape the future of Go! Take the 2026 Go Developer Survey

syncer

package
v1.16.15 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.15.6

func New(
	cfg Config,
	onDoneStateSyncing func(ctx context.Context, lastReqID uint32) error,
) core.StateSyncer

Types

type Config

type Config struct {
	core.AllGetsServer

	Ctx *consensus.Context

	StartupTracker tracker.Startup
	Sender         core.Sender

	// SampleK determines the number of nodes to attempt to fetch the latest
	// state sync summary from. In order for a round of voting to succeed, there
	// must be at least one correct node sampled.
	SampleK int

	// Alpha specifies the amount of weight that validators must put behind a
	// state summary to consider it valid to sync to.
	Alpha uint64

	// StateSyncBeacons are the nodes that will be used to sample and vote over
	// state summaries.
	StateSyncBeacons validators.Manager

	VM block.ChainVM
}

func NewConfig added in v0.15.6

func NewConfig(
	consensusGetHandler core.AllGetsServer,
	ctx *consensus.Context,
	startupTracker tracker.Startup,
	sender core.Sender,
	beacons validators.Manager,
	sampleK int,
	alpha uint64,
	stateSyncerIDs []ids.NodeID,
	vm block.ChainVM,
) (Config, error)

Jump to

Keyboard shortcuts

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