Documentation ¶
Index ¶
- type BootstrapConfig
- type Config
- type DAGVM
- type Engine
- type State
- type Transitive
- func (t *Transitive) Chits(vdr ids.ShortID, requestID uint32, votes ids.Set)
- func (t *Transitive) Context() *snow.Context
- func (b *Transitive) CurrentAcceptedFrontier() ids.Set
- func (b *Transitive) FilterAccepted(containerIDs ids.Set) ids.Set
- func (b *Transitive) ForceAccepted(acceptedContainerIDs ids.Set)
- func (t *Transitive) Get(vdr ids.ShortID, requestID uint32, vtxID ids.ID)
- func (t *Transitive) GetFailed(vdr ids.ShortID, requestID uint32, vtxID ids.ID)
- func (t *Transitive) Initialize(config Config)
- func (t *Transitive) Notify(msg common.Message)
- func (t *Transitive) PullQuery(vdr ids.ShortID, requestID uint32, vtxID ids.ID)
- func (t *Transitive) PushQuery(vdr ids.ShortID, requestID uint32, vtxID ids.ID, vtx []byte)
- func (t *Transitive) Put(vdr ids.ShortID, requestID uint32, vtxID ids.ID, vtxBytes []byte)
- func (t *Transitive) QueryFailed(vdr ids.ShortID, requestID uint32)
- func (t *Transitive) Shutdown()
- type VMTest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootstrapConfig ¶
type BootstrapConfig struct { common.Config // VtxBlocked tracks operations that are blocked on vertices // TxBlocked tracks operations that are blocked on transactions VtxBlocked, TxBlocked *queue.Jobs State State VM DAGVM }
BootstrapConfig ...
type Config ¶
type Config struct { BootstrapConfig Params avalanche.Parameters Consensus avalanche.Consensus }
Config wraps all the parameters needed for an avalanche engine
type DAGVM ¶
type DAGVM interface { common.VM // Return any transactions that have not been sent to consensus yet PendingTxs() []snowstorm.Tx // Convert a stream of bytes to a transaction or return an error ParseTx(tx []byte) (snowstorm.Tx, error) // Retrieve a transaction that was submitted previously GetTx(ids.ID) (snowstorm.Tx, error) }
DAGVM defines the minimum functionality that an avalanche VM must implement
type State ¶
type State interface { // Create a new vertex from the contents of a vertex BuildVertex(parentIDs ids.Set, txs []snowstorm.Tx) (avalanche.Vertex, error) // Attempt to convert a stream of bytes into a vertex ParseVertex(vertex []byte) (avalanche.Vertex, error) // GetVertex attempts to load a vertex by hash from storage GetVertex(vtxID ids.ID) (avalanche.Vertex, error) // Edge returns a list of accepted vertex IDs with no accepted children Edge() (vtxIDs []ids.ID) }
State defines the persistant storage that is required by the consensus engine
type Transitive ¶
type Transitive struct { Config // contains filtered or unexported fields }
Transitive implements the Engine interface by attempting to fetch all transitive dependencies.
func (*Transitive) Context ¶
func (t *Transitive) Context() *snow.Context
Context implements the Engine interface
func (*Transitive) CurrentAcceptedFrontier ¶
CurrentAcceptedFrontier ...
func (*Transitive) FilterAccepted ¶
FilterAccepted ...
func (*Transitive) ForceAccepted ¶
ForceAccepted ...
func (*Transitive) Initialize ¶
func (t *Transitive) Initialize(config Config)
Initialize implements the Engine interface
func (*Transitive) Notify ¶
func (t *Transitive) Notify(msg common.Message)
Notify implements the Engine interface
func (*Transitive) QueryFailed ¶
func (t *Transitive) QueryFailed(vdr ids.ShortID, requestID uint32)
QueryFailed implements the Engine interface
func (*Transitive) Shutdown ¶
func (t *Transitive) Shutdown()
Shutdown implements the Engine interface
type VMTest ¶
type VMTest struct { common.VMTest CantPendingTxs, CantParseTx, CantIssueTx, CantGetTx bool PendingTxsF func() []snowstorm.Tx ParseTxF func([]byte) (snowstorm.Tx, error) IssueTxF func([]byte, func(choices.Status), func(choices.Status)) (ids.ID, error) GetTxF func(ids.ID) (snowstorm.Tx, error) }
VMTest ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.