Documentation
¶
Index ¶
- Variables
- func GenerateMultipleValidatorStatusResponse(pubkeys [][]byte) *ethpb.MultipleValidatorStatusResponse
- type FakeValidator
- func (fv *FakeValidator) AccountsChangedChan() <-chan [][fieldparams.BLSPubkeyLength]byte
- func (fv *FakeValidator) BalancesByPubkeys(_ context.Context) map[[fieldparams.BLSPubkeyLength]byte]uint64
- func (*FakeValidator) CheckDoppelGanger(_ context.Context) error
- func (fv *FakeValidator) DeleteGraffiti(_ context.Context, _ [fieldparams.BLSPubkeyLength]byte) error
- func (fv *FakeValidator) Done()
- func (*FakeValidator) EventStreamIsRunning() bool
- func (fv *FakeValidator) EventsChan() <-chan *event.Event
- func (fv *FakeValidator) FindHealthyHost(_ context.Context) bool
- func (fv *FakeValidator) GenesisTime() time.Time
- func (fv *FakeValidator) Graffiti(_ context.Context, _ [fieldparams.BLSPubkeyLength]byte) ([]byte, error)
- func (fv *FakeValidator) HandleKeyReload(_ context.Context, newKeys [][fieldparams.BLSPubkeyLength]byte) (anyActive bool, err error)
- func (*FakeValidator) HasProposerSettings() bool
- func (*FakeValidator) Host() string
- func (fv *FakeValidator) IndicesToPubkeys(_ context.Context) map[uint64][fieldparams.BLSPubkeyLength]byte
- func (fv *FakeValidator) Keymanager() (keymanager.IKeymanager, error)
- func (*FakeValidator) LogSubmittedAtts(_ primitives.Slot)
- func (fv *FakeValidator) LogSubmittedSyncCommitteeMessages()
- func (fv *FakeValidator) LogValidatorGainsAndLosses(_ context.Context, _ primitives.Slot) error
- func (fv *FakeValidator) NextSlot() <-chan primitives.Slot
- func (*FakeValidator) ProcessEvent(_ context.Context, _ *event.Event)
- func (fv *FakeValidator) ProposeBlock(_ context.Context, slot primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
- func (fv *FakeValidator) ProposerSettings() *proposer.Settings
- func (fv *FakeValidator) PubkeysToIndices(_ context.Context) map[[fieldparams.BLSPubkeyLength]byte]uint64
- func (fv *FakeValidator) PubkeysToStatuses(_ context.Context) map[[fieldparams.BLSPubkeyLength]byte]ethpb.ValidatorStatus
- func (fv *FakeValidator) PushProposerSettings(ctx context.Context, _ primitives.Slot, _ bool) error
- func (fv *FakeValidator) ResetAttesterProtectionData()
- func (fv *FakeValidator) RolesAt(_ context.Context, slot primitives.Slot) (map[[fieldparams.BLSPubkeyLength]byte][]iface.ValidatorRole, error)
- func (fv *FakeValidator) SetGraffiti(_ context.Context, _ [fieldparams.BLSPubkeyLength]byte, graffiti []byte) error
- func (fv *FakeValidator) SetProposerSettings(_ context.Context, settings *proposer.Settings) error
- func (*FakeValidator) SetPubKeyToValidatorIndexMap(_ context.Context, _ keymanager.IKeymanager) error
- func (fv *FakeValidator) SetTicker()
- func (*FakeValidator) SignValidatorRegistrationRequest(_ context.Context, _ iface.SigningFunc, _ *ethpb.ValidatorRegistrationV1) (*ethpb.SignedValidatorRegistrationV1, bool, error)
- func (fv *FakeValidator) SlasherReady(_ context.Context) error
- func (fv *FakeValidator) SlotDeadline(_ primitives.Slot) time.Time
- func (*FakeValidator) StartEventStream(_ context.Context, _ []string)
- func (*FakeValidator) SubmitAggregateAndProof(_ context.Context, _ primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
- func (fv *FakeValidator) SubmitAttestation(_ context.Context, slot primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
- func (*FakeValidator) SubmitSignedContributionAndProof(_ context.Context, _ primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
- func (*FakeValidator) SubmitSyncCommitteeMessage(_ context.Context, _ primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
- func (*FakeValidator) UpdateDomainDataCaches(context.Context, primitives.Slot)
- func (fv *FakeValidator) UpdateDuties(_ context.Context) error
- func (fv *FakeValidator) UpdateProtections(_ context.Context, _ uint64) error
- func (fv *FakeValidator) WaitForActivation(_ context.Context) error
- func (fv *FakeValidator) WaitForChainStart(_ context.Context) error
- func (fv *FakeValidator) WaitForKeymanagerInitialization(_ context.Context) error
- func (fv *FakeValidator) WaitForSync(_ context.Context) error
Constants ¶
This section is empty.
Variables ¶
var ActiveKey = bytesutil.ToBytes48([]byte("active"))
ActiveKey represents a public key whose status is ACTIVE.
Functions ¶
func GenerateMultipleValidatorStatusResponse ¶
func GenerateMultipleValidatorStatusResponse(pubkeys [][]byte) *ethpb.MultipleValidatorStatusResponse
GenerateMultipleValidatorStatusResponse prepares a response from the passed in keys.
Types ¶
type FakeValidator ¶
type FakeValidator struct {
CanChangeHost bool
LogValidatorGainsAndLossesCalled bool
SaveProtectionsCalled bool
DeleteProtectionCalled bool
SlotDeadlineCalled bool
HandleKeyReloadCalled bool
AttestToBlockHeadCalled bool
SlasherReadyCalled bool
DoneCalled bool
RoleAtCalled bool
IsRegularDeadline bool
ProposeBlockCalled bool
UpdateProtectionsCalled bool
UpdateDutiesCalled bool
WaitForWalletInitializationCalled bool
NextSlotCalled bool
WaitForActivationCalled int
WaitForSyncCalled int
RetryTillSuccess int
ProposeBlockArg1 uint64
AttestToBlockHeadArg1 uint64
RoleAtArg1 uint64
UpdateDutiesArg1 uint64
NextSlotRet <-chan primitives.Slot
ProposerSettingWait time.Duration
PubkeysToStatusesMap map[[fieldparams.BLSPubkeyLength]byte]ethpb.ValidatorStatus
PubkeyToIndexMap map[[fieldparams.BLSPubkeyLength]byte]uint64
IndexToPubkeyMap map[uint64][fieldparams.BLSPubkeyLength]byte
WaitForChainStartCalled int
AttSubmitted chan any
BlockProposed chan any
AccountsChannel chan [][fieldparams.BLSPubkeyLength]byte
GenesisT time.Time
ReceiveBlocksCalled int
Balances map[[48]byte]uint64
EventsChannel chan *event.Event
ProposerSettingsErr error
Km keymanager.IKeymanager
PublicKey string
UpdateDutiesRet error
RolesAtRet []iface.ValidatorRole
// contains filtered or unexported fields
}
FakeValidator for mocking.
func (*FakeValidator) AccountsChangedChan ¶
func (fv *FakeValidator) AccountsChangedChan() <-chan [][fieldparams.BLSPubkeyLength]byte
func (*FakeValidator) BalancesByPubkeys ¶
func (fv *FakeValidator) BalancesByPubkeys(_ context.Context) map[[fieldparams.BLSPubkeyLength]byte]uint64
BalancesByPubkeys for mocking.
func (*FakeValidator) CheckDoppelGanger ¶
func (*FakeValidator) CheckDoppelGanger(_ context.Context) error
CheckDoppelGanger for mocking
func (*FakeValidator) DeleteGraffiti ¶
func (fv *FakeValidator) DeleteGraffiti(_ context.Context, _ [fieldparams.BLSPubkeyLength]byte) error
DeleteGraffiti for mocking
func (*FakeValidator) EventStreamIsRunning ¶
func (*FakeValidator) EventStreamIsRunning() bool
func (*FakeValidator) EventsChan ¶
func (fv *FakeValidator) EventsChan() <-chan *event.Event
func (*FakeValidator) FindHealthyHost ¶
func (fv *FakeValidator) FindHealthyHost(_ context.Context) bool
func (*FakeValidator) GenesisTime ¶
func (fv *FakeValidator) GenesisTime() time.Time
func (*FakeValidator) Graffiti ¶
func (fv *FakeValidator) Graffiti(_ context.Context, _ [fieldparams.BLSPubkeyLength]byte) ([]byte, error)
Graffiti for mocking
func (*FakeValidator) HandleKeyReload ¶
func (fv *FakeValidator) HandleKeyReload(_ context.Context, newKeys [][fieldparams.BLSPubkeyLength]byte) (anyActive bool, err error)
HandleKeyReload for mocking
func (*FakeValidator) HasProposerSettings ¶
func (*FakeValidator) HasProposerSettings() bool
HasProposerSettings for mocking
func (*FakeValidator) Host ¶
func (*FakeValidator) Host() string
func (*FakeValidator) IndicesToPubkeys ¶
func (fv *FakeValidator) IndicesToPubkeys(_ context.Context) map[uint64][fieldparams.BLSPubkeyLength]byte
IndicesToPubkeys for mocking.
func (*FakeValidator) Keymanager ¶
func (fv *FakeValidator) Keymanager() (keymanager.IKeymanager, error)
Keymanager for mocking
func (*FakeValidator) LogSubmittedAtts ¶
func (*FakeValidator) LogSubmittedAtts(_ primitives.Slot)
LogSubmittedAtts for mocking.
func (*FakeValidator) LogSubmittedSyncCommitteeMessages ¶
func (fv *FakeValidator) LogSubmittedSyncCommitteeMessages()
LogSubmittedSyncCommitteeMessages --
func (*FakeValidator) LogValidatorGainsAndLosses ¶
func (fv *FakeValidator) LogValidatorGainsAndLosses(_ context.Context, _ primitives.Slot) error
LogValidatorGainsAndLosses for mocking.
func (*FakeValidator) NextSlot ¶
func (fv *FakeValidator) NextSlot() <-chan primitives.Slot
NextSlot for mocking.
func (*FakeValidator) ProcessEvent ¶
func (*FakeValidator) ProcessEvent(_ context.Context, _ *event.Event)
func (*FakeValidator) ProposeBlock ¶
func (fv *FakeValidator) ProposeBlock(_ context.Context, slot primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
ProposeBlock for mocking.
func (*FakeValidator) ProposerSettings ¶
func (fv *FakeValidator) ProposerSettings() *proposer.Settings
ProposerSettings for mocking
func (*FakeValidator) PubkeysToIndices ¶
func (fv *FakeValidator) PubkeysToIndices(_ context.Context) map[[fieldparams.BLSPubkeyLength]byte]uint64
PubkeysToIndices for mocking.
func (*FakeValidator) PubkeysToStatuses ¶
func (fv *FakeValidator) PubkeysToStatuses(_ context.Context) map[[fieldparams.BLSPubkeyLength]byte]ethpb.ValidatorStatus
PubkeysToStatuses for mocking.
func (*FakeValidator) PushProposerSettings ¶
func (fv *FakeValidator) PushProposerSettings(ctx context.Context, _ primitives.Slot, _ bool) error
PushProposerSettings for mocking
func (*FakeValidator) ResetAttesterProtectionData ¶
func (fv *FakeValidator) ResetAttesterProtectionData()
ResetAttesterProtectionData for mocking.
func (*FakeValidator) RolesAt ¶
func (fv *FakeValidator) RolesAt(_ context.Context, slot primitives.Slot) (map[[fieldparams.BLSPubkeyLength]byte][]iface.ValidatorRole, error)
RolesAt for mocking.
func (*FakeValidator) SetGraffiti ¶
func (fv *FakeValidator) SetGraffiti(_ context.Context, _ [fieldparams.BLSPubkeyLength]byte, graffiti []byte) error
SetGraffiti for mocking
func (*FakeValidator) SetProposerSettings ¶
SetProposerSettings for mocking
func (*FakeValidator) SetPubKeyToValidatorIndexMap ¶
func (*FakeValidator) SetPubKeyToValidatorIndexMap(_ context.Context, _ keymanager.IKeymanager) error
SetPubKeyToValidatorIndexMap for mocking
func (*FakeValidator) SetTicker ¶
func (fv *FakeValidator) SetTicker()
func (*FakeValidator) SignValidatorRegistrationRequest ¶
func (*FakeValidator) SignValidatorRegistrationRequest(_ context.Context, _ iface.SigningFunc, _ *ethpb.ValidatorRegistrationV1) (*ethpb.SignedValidatorRegistrationV1, bool, error)
SignValidatorRegistrationRequest for mocking
func (*FakeValidator) SlasherReady ¶
func (fv *FakeValidator) SlasherReady(_ context.Context) error
SlasherReady for mocking.
func (*FakeValidator) SlotDeadline ¶
func (fv *FakeValidator) SlotDeadline(_ primitives.Slot) time.Time
SlotDeadline for mocking.
func (*FakeValidator) StartEventStream ¶
func (*FakeValidator) StartEventStream(_ context.Context, _ []string)
func (*FakeValidator) SubmitAggregateAndProof ¶
func (*FakeValidator) SubmitAggregateAndProof(_ context.Context, _ primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
SubmitAggregateAndProof for mocking.
func (*FakeValidator) SubmitAttestation ¶
func (fv *FakeValidator) SubmitAttestation(_ context.Context, slot primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
SubmitAttestation for mocking.
func (*FakeValidator) SubmitSignedContributionAndProof ¶
func (*FakeValidator) SubmitSignedContributionAndProof(_ context.Context, _ primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
SubmitSignedContributionAndProof for mocking
func (*FakeValidator) SubmitSyncCommitteeMessage ¶
func (*FakeValidator) SubmitSyncCommitteeMessage(_ context.Context, _ primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte)
SubmitSyncCommitteeMessage for mocking.
func (*FakeValidator) UpdateDomainDataCaches ¶
func (*FakeValidator) UpdateDomainDataCaches(context.Context, primitives.Slot)
UpdateDomainDataCaches for mocking.
func (*FakeValidator) UpdateDuties ¶
func (fv *FakeValidator) UpdateDuties(_ context.Context) error
UpdateDuties for mocking.
func (*FakeValidator) UpdateProtections ¶
func (fv *FakeValidator) UpdateProtections(_ context.Context, _ uint64) error
UpdateProtections for mocking.
func (*FakeValidator) WaitForActivation ¶
func (fv *FakeValidator) WaitForActivation(_ context.Context) error
WaitForActivation for mocking.
func (*FakeValidator) WaitForChainStart ¶
func (fv *FakeValidator) WaitForChainStart(_ context.Context) error
WaitForChainStart for mocking.
func (*FakeValidator) WaitForKeymanagerInitialization ¶
func (fv *FakeValidator) WaitForKeymanagerInitialization(_ context.Context) error
WaitForKeymanagerInitialization for mocking.
func (*FakeValidator) WaitForSync ¶
func (fv *FakeValidator) WaitForSync(_ context.Context) error
WaitForSync for mocking.