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

bootstrap

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrapper

type Bootstrapper interface {
	core.Engine

	// Initialize initializes the bootstrapper
	Initialize(Config) error

	// CurrentAcceptedFrontier returns the current accepted frontier
	CurrentAcceptedFrontier(context.Context) []ids.ID

	// FilterAccepted returns the accepted vertex IDs from the provided set
	FilterAccepted(context.Context, []ids.ID) []ids.ID

	// Add adds a vertex to the bootstrapper
	Add(context.Context, vertex.Vertex) error

	// GetMissingVertices returns vertices that are missing
	GetMissingVertices(context.Context) ([]ids.ID, error)

	// ForceAccepted forces a vertex to be accepted
	ForceAccepted(context.Context, []ids.ID) error
}

Bootstrapper bootstraps a DAG

type Config

type Config struct {
	// Context provides engine context
	Context *core.Context

	// StartupTracker tracks startup progress
	StartupTracker tracker.StartupTracker

	// Sender sends consensus messages
	Sender sender.Sender

	// AncestorsMaxContainersReceived is the maximum number of containers to receive from a peer
	AncestorsMaxContainersReceived int

	// VtxBlocked tracks operations that are blocked on vertices
	VtxBlocked *queue.JobsWithMissing

	// TxBlocked tracks operations that are blocked on transactions
	TxBlocked *queue.Jobs

	// Manager manages the DAG vertices
	Manager vertex.Manager

	// VM is the VM that the consensus engine is running on
	VM vertex.LinearizableVM
}

Config configures the bootstrapper

type Parameters

type Parameters struct {
	// ShouldBootstrap returns true if bootstrapping should be performed
	ShouldBootstrap bool

	// NumAcceptedRequired is the number of vertices that must be accepted before bootstrapping is considered complete
	NumAcceptedRequired uint64

	// NumAcceptedStarting is the number of accepted vertices at the start of bootstrapping
	NumAcceptedStarting uint64

	// AcceptedFrontierRequestTimeout is the timeout for accepted frontier requests
	AcceptedFrontierRequestTimeout time.Duration
}

Parameters configures bootstrapping behavior

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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