Documentation ¶
Index ¶
- type Config
- type RelayValidatorRegistrationScraper
- type ValidatorMonitor
- type ValidatorRegistrationEvent
- type ValidatorSetWalker
- func (v *ValidatorSetWalker) GetValidator(index *phase0.ValidatorIndex) (*apiv1.Validator, error)
- func (v *ValidatorSetWalker) Marker() *phase0.ValidatorIndex
- func (v *ValidatorSetWalker) Max() phase0.ValidatorIndex
- func (v *ValidatorSetWalker) Min() phase0.ValidatorIndex
- func (v *ValidatorSetWalker) Next() (phase0.ValidatorIndex, error)
- func (v *ValidatorSetWalker) NumShards() int
- func (v *ValidatorSetWalker) NumValidatorsInShard() uint64
- func (v *ValidatorSetWalker) Shard() int
- func (v *ValidatorSetWalker) Update(validators map[phase0.ValidatorIndex]*apiv1.Validator)
- func (v *ValidatorSetWalker) ValidatorMap() map[phase0.ValidatorIndex]*apiv1.Validator
- func (v *ValidatorSetWalker) Validators() []phase0.ValidatorIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Enabled is the flag to enable the validator registration monitor Enabled *bool `yaml:"enabled" default:"false"` // NumShards is the number of shards to split the validator set into NumShards int `yaml:"numShards" default:"1"` // Shard is the shard to use for the validator set Shard int `yaml:"shard" default:"0"` // ActiveValidatorsFetchInterval is the interval at which to fetch active validators ActiveValidatorsFetchInterval human.Duration `yaml:"activeValidatorsFetchInterval" default:"24h"` // TargetSweepDuration is the duration at which we want to sweep all validators in this shard of // the validator set. // If this is set too low for the size of the validator set, the relays may ban you. // Defaults to 14 days. This means that we will sweep all validators in this shard // over the course of 14 days. TargetSweepDuration human.Duration `yaml:"targetSweepDuration" default:"336h"` // Workers is the number of workers to use for fetching active validators per relay Workers int `yaml:"workers" default:"10"` }
type RelayValidatorRegistrationScraper ¶
type RelayValidatorRegistrationScraper struct {
// contains filtered or unexported fields
}
func NewRelayValidatorRegistrationScraper ¶
func NewRelayValidatorRegistrationScraper( log logrus.FieldLogger, workers int, r *relay.Client, cb func(ctx context.Context, validator *apiv1.Validator, relay *relay.Client, registration *mevrelay.ValidatorRegistration), ) *RelayValidatorRegistrationScraper
NewRelayValidatorRegistrationScraper creates a new validator registration scraper
func (*RelayValidatorRegistrationScraper) Add ¶
func (w *RelayValidatorRegistrationScraper) Add(validator *apiv1.Validator)
func (*RelayValidatorRegistrationScraper) Start ¶
func (w *RelayValidatorRegistrationScraper) Start(ctx context.Context) error
func (*RelayValidatorRegistrationScraper) Stop ¶
func (w *RelayValidatorRegistrationScraper) Stop()
type ValidatorMonitor ¶
type ValidatorMonitor struct {
// contains filtered or unexported fields
}
func NewValidatorMonitor ¶
func NewValidatorMonitor( log logrus.FieldLogger, config *Config, relays []*relay.Client, beaconNode *ethereum.BeaconNode, eventsCh chan *ValidatorRegistrationEvent, ) *ValidatorMonitor
type ValidatorSetWalker ¶
type ValidatorSetWalker struct {
// contains filtered or unexported fields
}
ValidatorSetWalker is a struct that walks through the validator set and returns the next validator index to register
func NewValidatorSetWalker ¶
func NewValidatorSetWalker(shard, numShards int) *ValidatorSetWalker
NewValidatorSetWalker creates a new ValidatorSetWalker
func (*ValidatorSetWalker) GetValidator ¶
func (v *ValidatorSetWalker) GetValidator(index *phase0.ValidatorIndex) (*apiv1.Validator, error)
func (*ValidatorSetWalker) Marker ¶
func (v *ValidatorSetWalker) Marker() *phase0.ValidatorIndex
func (*ValidatorSetWalker) Max ¶
func (v *ValidatorSetWalker) Max() phase0.ValidatorIndex
func (*ValidatorSetWalker) Min ¶
func (v *ValidatorSetWalker) Min() phase0.ValidatorIndex
func (*ValidatorSetWalker) Next ¶
func (v *ValidatorSetWalker) Next() (phase0.ValidatorIndex, error)
func (*ValidatorSetWalker) NumShards ¶
func (v *ValidatorSetWalker) NumShards() int
func (*ValidatorSetWalker) NumValidatorsInShard ¶
func (v *ValidatorSetWalker) NumValidatorsInShard() uint64
func (*ValidatorSetWalker) Shard ¶
func (v *ValidatorSetWalker) Shard() int
func (*ValidatorSetWalker) Update ¶
func (v *ValidatorSetWalker) Update(validators map[phase0.ValidatorIndex]*apiv1.Validator)
func (*ValidatorSetWalker) ValidatorMap ¶
func (v *ValidatorSetWalker) ValidatorMap() map[phase0.ValidatorIndex]*apiv1.Validator
func (*ValidatorSetWalker) Validators ¶
func (v *ValidatorSetWalker) Validators() []phase0.ValidatorIndex
Click to show internal directories.
Click to hide internal directories.