Documentation ¶
Index ¶
- Constants
- type MessageHandler
- type NonCommitteeValidator
- type Options
- type State
- type Validator
- func (v *Validator) ConsumeQueue(logger *zap.Logger, msgID spectypes.MessageID, handler MessageHandler) error
- func (v *Validator) GetLastHeight(identifier spectypes.MessageID) specqbft.Height
- func (v *Validator) GetLastRound(identifier spectypes.MessageID) specqbft.Round
- func (v *Validator) HandleMessage(logger *zap.Logger, msg *spectypes.SSVMessage)
- func (v *Validator) OnExecuteDuty(logger *zap.Logger, msg types.EventMsg) error
- func (v *Validator) ProcessMessage(logger *zap.Logger, msg *queue.DecodedSSVMessage) error
- func (v *Validator) Start(logger *zap.Logger) error
- func (v *Validator) StartDuty(logger *zap.Logger, duty *spectypes.Duty) error
- func (v *Validator) StartQueueConsumer(logger *zap.Logger, msgID spectypes.MessageID, handler MessageHandler)
- func (v *Validator) Stop()
Constants ¶
const (
DefaultQueueSize = 32
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
type MessageHandler func(logger *zap.Logger, msg *queue.DecodedSSVMessage) error
MessageHandler process the msg. return error if exist
type NonCommitteeValidator ¶
type NonCommitteeValidator struct { Storage *storage.QBFTStores // contains filtered or unexported fields }
func (*NonCommitteeValidator) ProcessMessage ¶
func (ncv *NonCommitteeValidator) ProcessMessage(logger *zap.Logger, msg *spectypes.SSVMessage)
type Options ¶
type Options struct { Network specqbft.Network Beacon specssv.BeaconNode BeaconNetwork spectypes.BeaconNetwork Storage *storage.QBFTStores Signer spectypes.KeyManager DutyRunners runner.DutyRunners NewDecidedHandler qbftctrl.NewDecidedHandler FullNode bool Exporter bool BuilderProposals bool QueueSize int GasLimit uint64 }
Options represents options that should be passed to a new instance of Validator.
type Validator ¶
type Validator struct { DutyRunners runner.DutyRunners Network specqbft.Network Signer spectypes.KeyManager Storage *storage.QBFTStores Queues map[spectypes.BeaconRole]queueContainer // contains filtered or unexported fields }
Validator represents an SSV ETH consensus validator Share assigned, coordinates duty execution and more. Every validator has a validatorID which is validator's public key. Each validator has multiple DutyRunners, for each duty type.
func NewValidator ¶
NewValidator creates a new instance of Validator.
func (*Validator) ConsumeQueue ¶
func (v *Validator) ConsumeQueue(logger *zap.Logger, msgID spectypes.MessageID, handler MessageHandler) error
ConsumeQueue consumes messages from the queue.Queue of the controller it checks for current state
func (*Validator) GetLastHeight ¶
GetLastHeight returns the last height for the given identifier
func (*Validator) GetLastRound ¶
GetLastRound returns the last height for the given identifier
func (*Validator) HandleMessage ¶
func (v *Validator) HandleMessage(logger *zap.Logger, msg *spectypes.SSVMessage)
HandleMessage handles a spectypes.SSVMessage. TODO: accept DecodedSSVMessage once p2p is upgraded to decode messages during validation.
func (*Validator) OnExecuteDuty ¶
func (*Validator) ProcessMessage ¶
ProcessMessage processes Network Message of all types
func (*Validator) StartQueueConsumer ¶
func (v *Validator) StartQueueConsumer(logger *zap.Logger, msgID spectypes.MessageID, handler MessageHandler)
StartQueueConsumer start ConsumeQueue with handler