bootstrap

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: BSD-3-Clause Imports: 22 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 struct {
	Config

	// list of NoOpsHandler for messages dropped by Bootstrapper
	engine.StateSummaryFrontierHandler
	engine.AcceptedStateSummaryHandler
	engine.AcceptedFrontierHandler
	engine.AcceptedHandler
	engine.PutHandler
	engine.QueryHandler
	engine.ChitsHandler
	engine.AppHandler
	// contains filtered or unexported fields
}

Note: To align with the Snowman invariant, it should be guaranteed the VM is not used until after the Bootstrapper has been Started.

func New added in v0.15.6

func New(
	config Config,
	onFinished func(ctx context.Context, lastReqID uint32) error,
	reg prometheus.Registerer,
) (*Bootstrapper, error)

func (*Bootstrapper) Ancestors added in v0.15.6

func (b *Bootstrapper) Ancestors(ctx context.Context, nodeID ids.NodeID, requestID uint32, vtxs [][]byte) error

Ancestors handles the receipt of multiple containers. Should be received in response to a GetAncestors message to [nodeID] with request ID [requestID]. Expects vtxs[0] to be the vertex requested in the corresponding GetAncestors.

func (*Bootstrapper) Clear added in v0.15.6

func (b *Bootstrapper) Clear(context.Context) error

func (*Bootstrapper) Connected added in v0.15.6

func (b *Bootstrapper) Connected(
	ctx context.Context,
	nodeID ids.NodeID,
	nodeVersion *version.Application,
) error

func (*Bootstrapper) Context added in v0.15.6

func (b *Bootstrapper) Context() *consensus.Context

func (*Bootstrapper) Disconnected added in v0.15.6

func (b *Bootstrapper) Disconnected(ctx context.Context, nodeID ids.NodeID) error

func (*Bootstrapper) GetAncestorsFailed added in v0.15.6

func (b *Bootstrapper) GetAncestorsFailed(ctx context.Context, nodeID ids.NodeID, requestID uint32) error

func (*Bootstrapper) Gossip added in v0.15.6

func (*Bootstrapper) Gossip(context.Context) error

func (*Bootstrapper) HealthCheck added in v0.15.6

func (b *Bootstrapper) HealthCheck(ctx context.Context) (interface{}, error)

func (*Bootstrapper) Initialize

func (m *Bootstrapper) Initialize(registerer prometheus.Registerer) error

func (*Bootstrapper) Notify added in v0.15.6

func (*Bootstrapper) Shutdown added in v0.15.6

func (b *Bootstrapper) Shutdown(ctx context.Context) error

func (*Bootstrapper) Start added in v0.15.6

func (b *Bootstrapper) Start(ctx context.Context, startReqID uint32) error

func (*Bootstrapper) Timeout added in v0.15.6

func (*Bootstrapper) Timeout(context.Context) error

type Config

type Config struct {
	engine.AllGetsServer

	Ctx *consensus.Context

	StartupTracker tracker.Startup
	Sender         engine.Sender

	// PeerTracker manages the set of nodes that we fetch the next block from.
	PeerTracker *p2p.PeerTracker

	// This node will only consider the first [AncestorsMaxContainersReceived]
	// containers in an ancestors message it receives.
	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 vertex.Manager
	VM      vertex.LinearizableVM

	// If StopVertexID is empty, the engine will generate the stop vertex based
	// on the current state.
	StopVertexID ids.ID

	// Haltable signals when the engine is stopped
	engine.Haltable
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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