Documentation ¶
Index ¶
- func GenerateNodes(cnt int) (map[uint64]*bls.SecretKey, map[uint64]*proto.Node)
- func IdentifierFormat(pubKey []byte, role beacon.RoleType) string
- func ReportValidatorStatus(pk string, meta *beacon.ValidatorMetadata, logger *zap.Logger)
- func ReportValidatorStatusReady(pk string)
- func ShareFromValidatorAddedEvent(validatorAddedEvent eth1.ValidatorAddedEvent, operatorPubKey string) (*validatorstorage.Share, error)
- type ControllerOptions
- type IController
- type Options
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNodes ¶
GenerateNodes generates randomly nodes
func IdentifierFormat ¶ added in v0.0.4
IdentifierFormat return base format for lambda
func ReportValidatorStatus ¶ added in v0.0.20
func ReportValidatorStatus(pk string, meta *beacon.ValidatorMetadata, logger *zap.Logger)
ReportValidatorStatus reports the current status of validator
func ReportValidatorStatusReady ¶ added in v0.0.20
func ReportValidatorStatusReady(pk string)
ReportValidatorStatusReady reports the ready status of validator
func ShareFromValidatorAddedEvent ¶ added in v0.0.4
func ShareFromValidatorAddedEvent(validatorAddedEvent eth1.ValidatorAddedEvent, operatorPubKey string) (*validatorstorage.Share, error)
ShareFromValidatorAddedEvent takes the contract event data and creates the corresponding validator share
Types ¶
type ControllerOptions ¶
type ControllerOptions struct { Context context.Context DB basedb.IDb Logger *zap.Logger SignatureCollectionTimeout time.Duration `` /* 152-byte string literal not displayed */ ETHNetwork *core.Network Network network.Network Beacon beacon.Beacon CleanRegistryData bool }
ControllerOptions for creating a validator controller
type IController ¶
type IController interface { ListenToEth1Events(cn pubsub.SubjectChannel) ProcessEth1Event(e eth1.Event) error StartValidators() GetValidatorsIndices() []spec.ValidatorIndex GetValidator(pubKey string) (*Validator, bool) }
IController represent the validators controller, it takes care of bootstrapping, updating and managing existing validators and their shares
func NewController ¶
func NewController(options ControllerOptions) IController
NewController creates a new validator controller instance
type Options ¶
type Options struct { Context context.Context Logger *zap.Logger SignatureCollectionTimeout time.Duration Network network.Network Beacon beacon.Beacon ETHNetwork *core.Network DB basedb.IDb }
Options to add in validator struct creation
type Validator ¶
type Validator struct { // contains filtered or unexported fields }
Validator struct that manages all ibft wrappers
func (*Validator) ExecuteDuty ¶
ExecuteDuty executes the given duty