Documentation ¶
Index ¶
- type AncestorTree
- type Config
- type Engine
- type EngineTest
- type Transitive
- func (t *Transitive) AppGossip(nodeID ids.NodeID, msg []byte) error
- func (t *Transitive) AppRequest(nodeID ids.NodeID, requestID uint32, deadline time.Time, request []byte) error
- func (t *Transitive) AppRequestFailed(nodeID ids.NodeID, requestID uint32) error
- func (t *Transitive) AppResponse(nodeID ids.NodeID, requestID uint32, response []byte) error
- func (t *Transitive) Chits(nodeID ids.NodeID, requestID uint32, votes []ids.ID) error
- func (t *Transitive) Connected(nodeID ids.NodeID, nodeVersion *version.Application) error
- func (t *Transitive) Context() *snow.ConsensusContext
- func (t *Transitive) Disconnected(nodeID ids.NodeID) error
- func (t *Transitive) GetBlock(blkID ids.ID) (snowman.Block, error)
- func (t *Transitive) GetFailed(nodeID ids.NodeID, requestID uint32) error
- func (t *Transitive) GetVM() common.VM
- func (t *Transitive) Gossip() error
- func (t *Transitive) Halt()
- func (t *Transitive) HealthCheck() (interface{}, error)
- func (m *Transitive) Initialize(namespace string, reg prometheus.Registerer) error
- func (t *Transitive) Notify(msg common.Message) error
- func (t *Transitive) PullQuery(nodeID ids.NodeID, requestID uint32, blkID ids.ID) error
- func (t *Transitive) PushQuery(nodeID ids.NodeID, requestID uint32, blkBytes []byte) error
- func (t *Transitive) Put(nodeID ids.NodeID, requestID uint32, blkBytes []byte) error
- func (t *Transitive) QueryFailed(vdr ids.NodeID, requestID uint32) error
- func (t *Transitive) Shutdown() error
- func (t *Transitive) Start(startReqID uint32) error
- func (t *Transitive) Timeout() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AncestorTree ¶
type AncestorTree interface { Add(blkID ids.ID, parentID ids.ID) Has(blkID ids.ID) bool GetRoot(blkID ids.ID) ids.ID Remove(blkID ids.ID) RemoveSubtree(blkID ids.ID) Len() int }
func NewAncestorTree ¶
func NewAncestorTree() AncestorTree
type Config ¶
type Config struct { common.AllGetsServer Ctx *snow.ConsensusContext VM block.ChainVM Sender common.Sender Validators validators.Set Params snowball.Parameters Consensus snowman.Consensus }
Config wraps all the parameters needed for a snowman engine
type Engine ¶
Engine describes the events that can occur to a Snowman instance.
The engine is used to fetch, order, and decide on the fate of blocks. This engine runs the leaderless version of the Snowman consensus protocol. Therefore, the liveness of this protocol tolerant to O(sqrt(n)) Byzantine Nodes where n is the number of nodes in the network. Therefore, this protocol should only be run in a Crash Fault Tolerant environment, or in an environment where lose of liveness and manual intervention is tolerable.
type EngineTest ¶
type EngineTest struct { common.EngineTest CantGetBlock bool GetBlockF func(ids.ID) (snowman.Block, error) }
EngineTest is a test engine
func (*EngineTest) Default ¶
func (e *EngineTest) Default(cant bool)
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) AppRequest ¶
func (*Transitive) AppRequestFailed ¶
func (t *Transitive) AppRequestFailed(nodeID ids.NodeID, requestID uint32) error
func (*Transitive) AppResponse ¶
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) 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
Initialize the metrics
func (*Transitive) QueryFailed ¶
func (t *Transitive) QueryFailed(vdr 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