Documentation ¶
Index ¶
- Variables
- func GenerateMultipleValidatorStatusResponse(pubkeys [][]byte) *ethpb.MultipleValidatorStatusResponse
- type FakeValidator
- func (fv *FakeValidator) AllValidatorsAreExited(ctx context.Context) (bool, error)
- func (fv *FakeValidator) BalancesByPubkeys(_ context.Context) map[[48]byte]uint64
- func (fv *FakeValidator) CanonicalHeadSlot(_ context.Context) (types.Slot, error)
- func (fv *FakeValidator) CheckDoppelGanger(ctx context.Context) error
- func (fv *FakeValidator) Done()
- func (fv *FakeValidator) GetKeymanager() keymanager.IKeymanager
- func (fv *FakeValidator) HandleKeyReload(_ context.Context, newKeys [][48]byte) (anyActive bool, err error)
- func (fv *FakeValidator) IndicesToPubkeys(_ context.Context) map[uint64][48]byte
- func (fv *FakeValidator) LogAttestationsSubmitted()
- func (fv *FakeValidator) LogNextDutyTimeLeft(slot types.Slot) error
- func (fv *FakeValidator) LogValidatorGainsAndLosses(_ context.Context, _ types.Slot) error
- func (fv *FakeValidator) NextSlot() <-chan types.Slot
- func (fv *FakeValidator) ProposeBlock(_ context.Context, slot types.Slot, _ [48]byte)
- func (fv *FakeValidator) PubkeysToIndices(_ context.Context) map[[48]byte]uint64
- func (fv *FakeValidator) PubkeysToStatuses(_ context.Context) map[[48]byte]ethpb.ValidatorStatus
- func (fv *FakeValidator) ReceiveBlocks(ctx context.Context, connectionErrorChannel chan<- error)
- func (fv *FakeValidator) ResetAttesterProtectionData()
- func (fv *FakeValidator) RolesAt(_ context.Context, slot types.Slot) (map[[48]byte][]iface.ValidatorRole, error)
- func (fv *FakeValidator) SlasherReady(_ context.Context) error
- func (fv *FakeValidator) SlotDeadline(_ types.Slot) time.Time
- func (fv *FakeValidator) SubmitAggregateAndProof(_ context.Context, _ types.Slot, _ [48]byte)
- func (fv *FakeValidator) SubmitAttestation(_ context.Context, slot types.Slot, _ [48]byte)
- func (fv *FakeValidator) UpdateDomainDataCaches(context.Context, types.Slot)
- func (fv *FakeValidator) UpdateDuties(_ context.Context, slot types.Slot) error
- func (fv *FakeValidator) UpdateProtections(_ context.Context, _ uint64) error
- func (fv *FakeValidator) WaitForActivation(_ context.Context, _ chan [][48]byte) error
- func (fv *FakeValidator) WaitForChainStart(_ context.Context) error
- func (fv *FakeValidator) WaitForSync(_ context.Context) error
- func (fv *FakeValidator) WaitForWalletInitialization(_ context.Context) error
Constants ¶
This section is empty.
Variables ¶
var ActiveKey = bytesutil.ToBytes48([]byte("active"))
ActiveKey represents a public key whose status is ACTIVE.
var AllValidatorsAreExitedCtxKey = ctxKey("exited")
AllValidatorsAreExitedCtxKey represents the metadata context key used for exits.
Functions ¶
func GenerateMultipleValidatorStatusResponse ¶
func GenerateMultipleValidatorStatusResponse(pubkeys [][]byte) *ethpb.MultipleValidatorStatusResponse
GenerateMultipleValidatorStatusResponse prepares a response from the passed in keys.
Types ¶
type FakeValidator ¶
type FakeValidator struct { DoneCalled bool WaitForWalletInitializationCalled bool SlasherReadyCalled bool NextSlotCalled bool UpdateDutiesCalled bool UpdateProtectionsCalled bool RoleAtCalled bool AttestToBlockHeadCalled bool ProposeBlockCalled bool LogValidatorGainsAndLossesCalled bool SaveProtectionsCalled bool DeleteProtectionCalled bool SlotDeadlineCalled bool HandleKeyReloadCalled bool WaitForChainStartCalled int WaitForSyncCalled int WaitForActivationCalled int CanonicalHeadSlotCalled int ReceiveBlocksCalled int RetryTillSuccess int ProposeBlockArg1 uint64 AttestToBlockHeadArg1 uint64 RoleAtArg1 uint64 UpdateDutiesArg1 uint64 NextSlotRet <-chan types.Slot PublicKey string UpdateDutiesRet error RolesAtRet []iface.ValidatorRole Balances map[[48]byte]uint64 IndexToPubkeyMap map[uint64][48]byte PubkeyToIndexMap map[[48]byte]uint64 PubkeysToStatusesMap map[[48]byte]ethpb.ValidatorStatus Keymanager keymanager.IKeymanager }
FakeValidator for mocking.
func (*FakeValidator) AllValidatorsAreExited ¶
func (fv *FakeValidator) AllValidatorsAreExited(ctx context.Context) (bool, error)
AllValidatorsAreExited for mocking
func (*FakeValidator) BalancesByPubkeys ¶
func (fv *FakeValidator) BalancesByPubkeys(_ context.Context) map[[48]byte]uint64
BalancesByPubkeys for mocking.
func (*FakeValidator) CanonicalHeadSlot ¶
CanonicalHeadSlot for mocking.
func (*FakeValidator) CheckDoppelGanger ¶ added in v1.4.1
func (fv *FakeValidator) CheckDoppelGanger(ctx context.Context) error
CheckDoppelGanger for mocking
func (*FakeValidator) GetKeymanager ¶
func (fv *FakeValidator) GetKeymanager() keymanager.IKeymanager
GetKeymanager for mocking
func (*FakeValidator) HandleKeyReload ¶
func (fv *FakeValidator) HandleKeyReload(_ context.Context, newKeys [][48]byte) (anyActive bool, err error)
HandleKeyReload for mocking
func (*FakeValidator) IndicesToPubkeys ¶
func (fv *FakeValidator) IndicesToPubkeys(_ context.Context) map[uint64][48]byte
IndicesToPubkeys for mocking.
func (*FakeValidator) LogAttestationsSubmitted ¶
func (fv *FakeValidator) LogAttestationsSubmitted()
LogAttestationsSubmitted for mocking.
func (*FakeValidator) LogNextDutyTimeLeft ¶
func (fv *FakeValidator) LogNextDutyTimeLeft(slot types.Slot) error
LogNextDutyTimeLeft for mocking.
func (*FakeValidator) LogValidatorGainsAndLosses ¶
LogValidatorGainsAndLosses for mocking.
func (*FakeValidator) NextSlot ¶
func (fv *FakeValidator) NextSlot() <-chan types.Slot
NextSlot for mocking.
func (*FakeValidator) ProposeBlock ¶
ProposeBlock for mocking.
func (*FakeValidator) PubkeysToIndices ¶
func (fv *FakeValidator) PubkeysToIndices(_ context.Context) map[[48]byte]uint64
PubkeysToIndices for mocking.
func (*FakeValidator) PubkeysToStatuses ¶
func (fv *FakeValidator) PubkeysToStatuses(_ context.Context) map[[48]byte]ethpb.ValidatorStatus
PubkeysToStatuses for mocking.
func (*FakeValidator) ReceiveBlocks ¶
func (fv *FakeValidator) ReceiveBlocks(ctx context.Context, connectionErrorChannel chan<- error)
ReceiveBlocks for mocking
func (*FakeValidator) ResetAttesterProtectionData ¶
func (fv *FakeValidator) ResetAttesterProtectionData()
ResetAttesterProtectionData for mocking.
func (*FakeValidator) RolesAt ¶
func (fv *FakeValidator) RolesAt(_ context.Context, slot types.Slot) (map[[48]byte][]iface.ValidatorRole, error)
RolesAt for mocking.
func (*FakeValidator) SlasherReady ¶
func (fv *FakeValidator) SlasherReady(_ context.Context) error
SlasherReady for mocking.
func (*FakeValidator) SlotDeadline ¶
func (fv *FakeValidator) SlotDeadline(_ types.Slot) time.Time
SlotDeadline for mocking.
func (*FakeValidator) SubmitAggregateAndProof ¶
SubmitAggregateAndProof for mocking.
func (*FakeValidator) SubmitAttestation ¶
SubmitAttestation for mocking.
func (*FakeValidator) UpdateDomainDataCaches ¶
func (fv *FakeValidator) UpdateDomainDataCaches(context.Context, types.Slot)
UpdateDomainDataCaches for mocking.
func (*FakeValidator) UpdateDuties ¶
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, _ chan [][48]byte) error
WaitForActivation for mocking.
func (*FakeValidator) WaitForChainStart ¶
func (fv *FakeValidator) WaitForChainStart(_ context.Context) error
WaitForChainStart for mocking.
func (*FakeValidator) WaitForSync ¶
func (fv *FakeValidator) WaitForSync(_ context.Context) error
WaitForSync for mocking.
func (*FakeValidator) WaitForWalletInitialization ¶
func (fv *FakeValidator) WaitForWalletInitialization(_ context.Context) error
WaitForWalletInitialization for mocking.