avalanche

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Ctx *snow.ConsensusContext
	common.AllGetsServer
	VM         vertex.DAGVM
	Manager    vertex.Manager
	Sender     common.Sender
	Validators validators.Set

	Params    avalanche.Parameters
	Consensus avalanche.Consensus
}

Config wraps all the parameters needed for an avalanche engine

type Engine

type Engine interface {
	common.Engine

	// GetVtx returns a vertex by its ID.
	// Returns an error if unknown.
	GetVtx(vtxID ids.ID) (avalanche.Vertex, error)
}

Engine describes the events that can occur on a consensus instance

func New

func New(config Config) (Engine, error)

type EngineTest

type EngineTest struct {
	common.EngineTest

	CantGetVtx bool
	GetVtxF    func(vtxID ids.ID) (avalanche.Vertex, error)
}

EngineTest is a test engine

func (*EngineTest) Default

func (e *EngineTest) Default(cant bool)

func (*EngineTest) GetVtx

func (e *EngineTest) GetVtx(vtxID ids.ID) (avalanche.Vertex, error)

type Transitive

type Transitive struct {
	Config

	// list of NoOpsHandler for messages dropped by engine
	common.StateSummaryFrontierHandler
	common.AcceptedStateSummaryHandler
	common.AcceptedFrontierHandler
	common.AcceptedHandler
	common.AncestorsHandler

	RequestID uint32
	// contains filtered or unexported fields
}

Transitive implements the Engine interface by attempting to fetch all transitive dependencies.

func (*Transitive) AppGossip

func (t *Transitive) AppGossip(nodeID ids.NodeID, msg []byte) error

func (*Transitive) AppRequest

func (t *Transitive) AppRequest(nodeID ids.NodeID, requestID uint32, deadline time.Time, request []byte) error

func (*Transitive) AppRequestFailed

func (t *Transitive) AppRequestFailed(nodeID ids.NodeID, requestID uint32) error

func (*Transitive) AppResponse

func (t *Transitive) AppResponse(nodeID ids.NodeID, requestID uint32, response []byte) error

func (*Transitive) Chits

func (t *Transitive) Chits(nodeID ids.NodeID, requestID uint32, votes []ids.ID) error

func (*Transitive) Connected

func (t *Transitive) Connected(nodeID ids.NodeID, nodeVersion *version.Application) error

func (*Transitive) Context

func (t *Transitive) Context() *snow.ConsensusContext

func (*Transitive) Disconnected

func (t *Transitive) Disconnected(nodeID ids.NodeID) error

func (*Transitive) GetFailed

func (t *Transitive) GetFailed(nodeID ids.NodeID, requestID uint32) error

func (*Transitive) GetVM

func (t *Transitive) GetVM() common.VM

func (*Transitive) GetVtx

func (t *Transitive) GetVtx(vtxID ids.ID) (avalanche.Vertex, error)

func (*Transitive) Gossip

func (t *Transitive) Gossip() error

func (*Transitive) Halt

func (t *Transitive) Halt()

func (*Transitive) HealthCheck

func (t *Transitive) HealthCheck() (interface{}, error)

func (*Transitive) Initialize

func (m *Transitive) Initialize(namespace string, reg prometheus.Registerer) error

func (*Transitive) Notify

func (t *Transitive) Notify(msg common.Message) error

func (*Transitive) PullQuery

func (t *Transitive) PullQuery(nodeID ids.NodeID, requestID uint32, vtxID ids.ID) error

func (*Transitive) PushQuery

func (t *Transitive) PushQuery(nodeID ids.NodeID, requestID uint32, vtxBytes []byte) error

func (*Transitive) Put

func (t *Transitive) Put(nodeID ids.NodeID, requestID uint32, vtxBytes []byte) error

func (*Transitive) QueryFailed

func (t *Transitive) QueryFailed(nodeID ids.NodeID, requestID uint32) error

func (*Transitive) Shutdown

func (t *Transitive) Shutdown() error

func (*Transitive) Start

func (t *Transitive) Start(startReqID uint32) error

func (*Transitive) Timeout

func (t *Transitive) Timeout() error

Directories

Path Synopsis
Package state manages the meta-data required by consensus for an avalanche dag.
Package state manages the meta-data required by consensus for an avalanche dag.

Jump to

Keyboard shortcuts

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