bootstrap

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: BSD-3-Clause Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrapper

type Bootstrapper struct {
	common.Bootstrapper
	common.Fetcher

	// 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.DAGVM
	// contains filtered or unexported fields
}

Bootstrapper ...

func (*Bootstrapper) Connected

func (b *Bootstrapper) Connected(validatorID ids.ShortID) error

Connected implements the Engine interface.

func (*Bootstrapper) CurrentAcceptedFrontier

func (b *Bootstrapper) CurrentAcceptedFrontier() ([]ids.ID, error)

CurrentAcceptedFrontier returns the set of vertices that this node has accepted that have no accepted children

func (*Bootstrapper) Disconnected

func (b *Bootstrapper) Disconnected(validatorID ids.ShortID) error

Disconnected implements the Engine interface.

func (*Bootstrapper) FilterAccepted

func (b *Bootstrapper) FilterAccepted(containerIDs []ids.ID) []ids.ID

FilterAccepted returns the IDs of vertices in [containerIDs] that this node has accepted

func (*Bootstrapper) ForceAccepted

func (b *Bootstrapper) ForceAccepted(acceptedContainerIDs []ids.ID) error

ForceAccepted starts bootstrapping. Process the vertices in [accepterContainerIDs].

func (*Bootstrapper) GetAncestorsFailed

func (b *Bootstrapper) GetAncestorsFailed(vdr ids.ShortID, requestID uint32) error

GetAncestorsFailed is called when a GetAncestors message we sent fails

func (*Bootstrapper) Initialize

func (b *Bootstrapper) Initialize(
	config Config,
	onFinished func() error,
	namespace string,
	registerer prometheus.Registerer,
) error

Initialize this engine.

func (*Bootstrapper) MultiPut

func (b *Bootstrapper) MultiPut(vdr ids.ShortID, requestID uint32, vtxs [][]byte) error

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

func (*Bootstrapper) Timeout

func (b *Bootstrapper) Timeout() error

type Config

type Config struct {
	common.Config

	// 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.DAGVM
}

Config ...

Jump to

Keyboard shortcuts

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