Documentation ¶
Index ¶
- func GenerateNodes(cnt int) (map[uint64]*bls.SecretKey, map[uint64]*proto.Node)
- func ReportValidatorStatus(pk string, meta *beaconprotocol.ValidatorMetadata, logger *zap.Logger)
- type ICollection
- type IValidator
- type Options
- type Validator
- func (v *Validator) ExecuteDuty(slot uint64, duty *beaconprotocol.Duty)
- func (v *Validator) GetShare() *beaconprotocol.Share
- func (v *Validator) Ibfts() controller.Controllers
- func (v *Validator) OnFork(forkVersion forksprotocol.ForkVersion) error
- func (v *Validator) ProcessMsg(msg *message.SSVMessage)
- func (v *Validator) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNodes ¶
GenerateNodes generates randomly nodes
func ReportValidatorStatus ¶
func ReportValidatorStatus(pk string, meta *beaconprotocol.ValidatorMetadata, logger *zap.Logger)
ReportValidatorStatus reports the current status of validator
Types ¶
type ICollection ¶
type ICollection interface { eth1.RegistryStore }
ICollection interface for validator storage
type IValidator ¶
type IValidator interface { Start() error ExecuteDuty(slot uint64, duty *beaconprotocol.Duty) ProcessMsg(msg *message.SSVMessage) // TODO need to be as separate interface? forksprotocol.ForkHandler }
IValidator is the interface for validator
type Options ¶
type Options struct { Context context.Context Logger *zap.Logger IbftStorage qbftstorage.QBFTStore Network beaconprotocol.Network P2pNetwork p2pprotocol.Network Beacon beaconprotocol.Beacon ForkVersion forksprotocol.ForkVersion Signer beaconprotocol.Signer SyncRateLimit time.Duration SignatureCollectionTimeout time.Duration ReadMode bool FullNode bool }
Options is the validator options
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator represents the validator
func (*Validator) ExecuteDuty ¶
func (v *Validator) ExecuteDuty(slot uint64, duty *beaconprotocol.Duty)
ExecuteDuty executes the given duty
func (*Validator) GetShare ¶
func (v *Validator) GetShare() *beaconprotocol.Share
GetShare returns the validator share
func (*Validator) Ibfts ¶
func (v *Validator) Ibfts() controller.Controllers
Ibfts returns the ibft controllers
func (*Validator) OnFork ¶
func (v *Validator) OnFork(forkVersion forksprotocol.ForkVersion) error
OnFork updates all QFBT controllers with the new fork version
func (*Validator) ProcessMsg ¶
func (v *Validator) ProcessMsg(msg *message.SSVMessage)
ProcessMsg processes a new msg, returns true if Decided, non nil byte slice if Decided (Decided value) and error Decided returns just once per instance as true, following messages (for example additional commit msgs) will not return Decided true