Documentation ¶
Index ¶
- type Bootstrapper
- func (b *Bootstrapper) Ancestors(ctx context.Context, nodeID ids.NodeID, requestID uint32, blks [][]byte) error
- func (b *Bootstrapper) Clear(context.Context) error
- func (b *Bootstrapper) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
- func (b *Bootstrapper) Context() *snow.ConsensusContext
- func (b *Bootstrapper) Disconnected(ctx context.Context, nodeID ids.NodeID) error
- func (b *Bootstrapper) ForceAccepted(ctx context.Context, acceptedContainerIDs []ids.ID) error
- func (b *Bootstrapper) GetAncestorsFailed(ctx context.Context, nodeID ids.NodeID, requestID uint32) error
- func (b *Bootstrapper) GetVM() common.VM
- func (*Bootstrapper) Gossip(context.Context) error
- func (b *Bootstrapper) HealthCheck(ctx context.Context) (interface{}, error)
- func (b *Bootstrapper) Notify(_ context.Context, msg common.Message) error
- func (b *Bootstrapper) Shutdown(ctx context.Context) error
- func (b *Bootstrapper) Start(ctx context.Context, startReqID uint32) error
- func (b *Bootstrapper) Timeout(ctx context.Context) error
- type Config
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 common.StateSummaryFrontierHandler common.AcceptedStateSummaryHandler common.PutHandler common.QueryHandler common.ChitsHandler common.AppHandler common.Bootstrapper common.Fetcher // contains filtered or unexported fields }
bootstrapper repeatedly performs the bootstrapping protocol.
- Wait until a sufficient amount of stake is connected.
- Sample a small number of nodes to get the last accepted block ID
- Verify against the full network that the last accepted block ID received in step 2 is an accepted block.
- Sync the full ancestry of the last accepted block.
- Execute all the fetched blocks that haven't already been executed.
- Restart the bootstrapping protocol until the number of blocks being accepted during a bootstrapping round stops decreasing.
Note: Because of step 6, the bootstrapping protocol will generally be performed multiple times.
Invariant: The VM is not guaranteed to be initialized until Start has been called, so it must be guaranteed the VM is not used until after Start.
func (*Bootstrapper) Ancestors ¶ added in v1.10.16
func (b *Bootstrapper) Ancestors(ctx context.Context, nodeID ids.NodeID, requestID uint32, blks [][]byte) error
Ancestors handles the receipt of multiple containers. Should be received in response to a GetAncestors message to [nodeID] with request ID [requestID]
func (*Bootstrapper) Connected ¶ added in v0.8.2
func (b *Bootstrapper) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
func (*Bootstrapper) Context ¶ added in v1.10.16
func (b *Bootstrapper) Context() *snow.ConsensusContext
func (*Bootstrapper) Disconnected ¶ added in v0.8.2
func (*Bootstrapper) ForceAccepted ¶
func (*Bootstrapper) GetAncestorsFailed ¶
func (*Bootstrapper) GetVM ¶ added in v1.10.16
func (b *Bootstrapper) GetVM() common.VM
func (*Bootstrapper) HealthCheck ¶ added in v1.10.16
func (b *Bootstrapper) HealthCheck(ctx context.Context) (interface{}, error)
func (*Bootstrapper) Shutdown ¶ added in v1.10.16
func (b *Bootstrapper) Shutdown(ctx context.Context) error
type Config ¶
type Config struct { common.Config common.AllGetsServer // Blocked tracks operations that are blocked on blocks // // It should be guaranteed that `MissingIDs` should contain all IDs // referenced by the `MissingDependencies` that have not already been added // to the queue. Blocked *queue.JobsWithMissing VM block.ChainVM Bootstrapped func() }
Click to show internal directories.
Click to hide internal directories.