Documentation
¶
Index ¶
- type MessageHandler
- type NonCommitteeValidator
- type Options
- type State
- type Validator
- func (v *Validator) ConsumeQueue(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(msg *spectypes.SSVMessage)
- func (v *Validator) OnExecuteDuty(msg types.EventMsg) error
- func (v *Validator) ProcessMessage(msg *queue.DecodedSSVMessage) error
- func (v *Validator) Start() error
- func (v *Validator) StartDuty(duty *spectypes.Duty) error
- func (v *Validator) StartQueueConsumer(msgID spectypes.MessageID, handler MessageHandler)
- func (v *Validator) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
type MessageHandler func(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 NewNonCommitteeValidator ¶
func NewNonCommitteeValidator(identifier spectypes.MessageID, opts Options) *NonCommitteeValidator
func (*NonCommitteeValidator) ProcessMessage ¶
func (ncv *NonCommitteeValidator) ProcessMessage(msg *spectypes.SSVMessage)
type Options ¶
type Options struct {
Network specqbft.Network
Beacon specssv.BeaconNode
Storage *storage.QBFTStores
Signer spectypes.KeyManager
DutyRunners runner.DutyRunners
NewDecidedHandler qbftctrl.NewDecidedHandler
FullNode bool
Exporter bool
}
Options represents options that should be passed to a new instance of Validator.
type Validator ¶
type Validator struct {
DutyRunners runner.DutyRunners
Network specqbft.Network
Beacon specssv.BeaconNode
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(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(msg *spectypes.SSVMessage)
HandleMessage handles a spectypes.SSVMessage. TODO: accept DecodedSSVMessage once p2p is upgraded to decode messages during validation.
func (*Validator) ProcessMessage ¶
func (v *Validator) ProcessMessage(msg *queue.DecodedSSVMessage) error
ProcessMessage processes Network Message of all types
func (*Validator) StartQueueConsumer ¶
func (v *Validator) StartQueueConsumer(msgID spectypes.MessageID, handler MessageHandler)
StartQueueConsumer start ConsumeQueue with handler