Documentation
¶
Index ¶
- Constants
- type Node
- func (n *Node) Cleanup()
- func (n *Node) GetStatus() (*api.Status, error)
- func (n *Node) HandleNewBlockLocked(bi *runtime.BlockInfo)
- func (n *Node) HandleRuntimeHostEventLocked(ev *host.Event)
- func (n *Node) Initialized() <-chan struct{}
- func (n *Node) Name() string
- func (n *Node) Quit() <-chan struct{}
- func (n *Node) Start() error
- func (n *Node) Stop()
- func (n *Node) WatchStateTransitions() (<-chan NodeState, *pubsub.Subscription)
- type NodeState
- type PruneHandler
- type StateName
- type StateProcessingBatch
- type StateWaitingForBatch
- type StateWaitingForEvent
- type StateWaitingForTxs
Constants ¶
const ( // WaitingForBatch is the name of StateWaitingForBatch. WaitingForBatch = "WaitingForBatch" // WaitingForTxs is the name of the StateWaitingForTxs. WaitingForTxs = "WaitingForTxs" // WaitingForEvent is the name of StateWaitingForEvent. WaitingForEvent = "WaitingForEvent" // ProcessingBatch is the name of StateProcessingBatch. ProcessingBatch = "ProcessingBatch" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a committee node.
func NewNode ¶
func NewNode( commonNode *committee.Node, commonCfg commonWorker.Config, roleProvider registration.RoleProvider, ) (*Node, error)
NewNode initializes a new executor node.
func (*Node) Cleanup ¶
func (n *Node) Cleanup()
Cleanup performs the service specific post-termination cleanup.
func (*Node) HandleNewBlockLocked ¶
HandleNewBlockLocked implements NodeHooks. Guarded by n.commonNode.CrossNode.
func (*Node) HandleRuntimeHostEventLocked ¶ added in v0.2202.0
func (*Node) Initialized ¶
func (n *Node) Initialized() <-chan struct{}
Initialized returns a channel that will be closed when the node is initialized and ready to service requests.
func (*Node) Quit ¶
func (n *Node) Quit() <-chan struct{}
Quit returns a channel that will be closed when the service terminates.
func (*Node) WatchStateTransitions ¶
func (n *Node) WatchStateTransitions() (<-chan NodeState, *pubsub.Subscription)
WatchStateTransitions subscribes to the node's state transitions.
type NodeState ¶
type NodeState interface {
// Name returns the name of the state.
Name() StateName
}
NodeState is a node's state.
type PruneHandler ¶ added in v0.2507.0
type PruneHandler struct {
// contains filtered or unexported fields
}
PruneHandler is a prune handler that prevents pruning of the last normal round.
func NewPruneHandler ¶ added in v0.2507.0
func NewPruneHandler(runtimeID common.Namespace, consensus consensus.Service) *PruneHandler
NewPruneHandler creates a new prune handler.
func (*PruneHandler) CanPruneRuntime ¶ added in v0.2509.0
func (p *PruneHandler) CanPruneRuntime(rounds []uint64) error
CanPruneRuntime returns no error when pruning runtime rounds would not go past last normal round.
This is important as some runtimes will do historic queries for things that are not available in the last consensus state (e.g. delegation/undelegation events that happened while the runtime was suspended or not producing blocks).
Implements runtime.history.PruneHandler.
type StateProcessingBatch ¶
type StateProcessingBatch struct {
// contains filtered or unexported fields
}
StateProcessingBatch is the processing batch state.
func (*StateProcessingBatch) Cancel ¶ added in v0.2300.0
func (s *StateProcessingBatch) Cancel(cause error)
Cancel invokes the cancellation function and waits for the processing to actually stop.
func (StateProcessingBatch) Name ¶
func (s StateProcessingBatch) Name() StateName
Name returns the name of the state.
func (StateProcessingBatch) String ¶
func (s StateProcessingBatch) String() string
String returns a string representation of the state.
type StateWaitingForBatch ¶
type StateWaitingForBatch struct{}
StateWaitingForBatch is the waiting for batch state.
func (StateWaitingForBatch) Name ¶
func (s StateWaitingForBatch) Name() StateName
Name returns the name of the state.
func (StateWaitingForBatch) String ¶
func (s StateWaitingForBatch) String() string
String returns a string representation of the state.
type StateWaitingForEvent ¶
type StateWaitingForEvent struct {
// contains filtered or unexported fields
}
StateWaitingForEvent is the waiting for event state.
func (StateWaitingForEvent) Name ¶
func (s StateWaitingForEvent) Name() StateName
Name returns the name of the state.
func (StateWaitingForEvent) String ¶
func (s StateWaitingForEvent) String() string
String returns a string representation of the state.
type StateWaitingForTxs ¶ added in v0.2200.0
type StateWaitingForTxs struct {
// contains filtered or unexported fields
}
func (StateWaitingForTxs) Cancel ¶ added in v0.2300.0
func (s StateWaitingForTxs) Cancel()
Cancel invokes the cancellation function and waits for the fetching to actually stop.
func (StateWaitingForTxs) Name ¶ added in v0.2200.0
func (s StateWaitingForTxs) Name() StateName
Name returns the name of the state.
func (StateWaitingForTxs) String ¶ added in v0.2200.0
func (s StateWaitingForTxs) String() string
String returns a string representation of the state.