Documentation ¶
Overview ¶
Package beacon is a generated GoMock package.
Package beacon is a generated GoMock package.
Index ¶
- func FetchValidatorsMetadata(bc Beacon, pubKeys [][]byte) (map[string]*ValidatorMetadata, error)
- func UpdateValidatorsMetadata(logger *zap.Logger, pubKeys [][]byte, collection ValidatorMetadataStorage, ...) error
- func UpdateValidatorsMetadataBatch(logger *zap.Logger, pubKeys [][]byte, queue queue.Queue, ...)
- type Beacon
- type DutyData
- type InputValueAttestation
- type InputValueAttestationData
- type IsInputValueData
- type IsInputValueSignedData
- type MockBeacon
- func (m *MockBeacon) ComputeSigningRoot(object interface{}, domain phase0.Domain) ([32]byte, error)
- func (m *MockBeacon) DomainData(epoch phase0.Epoch, domain phase0.DomainType) (phase0.Domain, error)
- func (m *MockBeacon) EXPECT() *MockBeaconMockRecorder
- func (m *MockBeacon) Events(ctx context.Context, topics []string, handler client.EventHandlerFunc) error
- func (m *MockBeacon) GetAttestationData(slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeacon) GetBeaconBlock(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, ...) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeacon) GetBeaconNetwork() types.BeaconNetwork
- func (m *MockBeacon) GetBlindedBeaconBlock(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, ...) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeacon) GetDuties(logger *zap.Logger, epoch phase0.Epoch, ...) ([]*types.Duty, error)
- func (m *MockBeacon) GetSyncCommitteeContribution(slot phase0.Slot, selectionProofs []phase0.BLSSignature, subnetIDs []uint64) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeacon) GetSyncMessageBlockRoot(slot phase0.Slot) (phase0.Root, spec.DataVersion, error)
- func (m *MockBeacon) GetValidatorData(validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*v1.Validator, error)
- func (m *MockBeacon) IsSyncCommitteeAggregator(proof []byte) (bool, error)
- func (m *MockBeacon) SubmitAggregateSelectionProof(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, committeeLength uint64, ...) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeacon) SubmitAttestation(attestation *phase0.Attestation) error
- func (m *MockBeacon) SubmitBeaconBlock(block *spec.VersionedBeaconBlock, sig phase0.BLSSignature) error
- func (m *MockBeacon) SubmitBlindedBeaconBlock(block *api.VersionedBlindedBeaconBlock, sig phase0.BLSSignature) error
- func (m *MockBeacon) SubmitProposalPreparation(feeRecipients map[phase0.ValidatorIndex]bellatrix.ExecutionAddress) error
- func (m *MockBeacon) SubmitSignedAggregateSelectionProof(msg *phase0.SignedAggregateAndProof) error
- func (m *MockBeacon) SubmitSignedContributionAndProof(contribution *altair.SignedContributionAndProof) error
- func (m *MockBeacon) SubmitSyncCommitteeSubscriptions(subscription []*v1.SyncCommitteeSubscription) error
- func (m *MockBeacon) SubmitSyncMessage(msg *altair.SyncCommitteeMessage) error
- func (m *MockBeacon) SubscribeToCommitteeSubnet(subscription []*v1.BeaconCommitteeSubscription) error
- func (m *MockBeacon) SyncCommitteeDuties(epoch phase0.Epoch, indices []phase0.ValidatorIndex) ([]*v1.SyncCommitteeDuty, error)
- func (m *MockBeacon) SyncCommitteeSubnetID(index phase0.CommitteeIndex) (uint64, error)
- type MockBeaconMockRecorder
- func (mr *MockBeaconMockRecorder) ComputeSigningRoot(object, domain interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) DomainData(epoch, domain interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) Events(ctx, topics, handler interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) GetAttestationData(slot, committeeIndex interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) GetBeaconBlock(slot, committeeIndex, graffiti, randao interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) GetBeaconNetwork() *gomock.Call
- func (mr *MockBeaconMockRecorder) GetBlindedBeaconBlock(slot, committeeIndex, graffiti, randao interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) GetDuties(logger, epoch, validatorIndices interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) GetSyncCommitteeContribution(slot, selectionProofs, subnetIDs interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) GetSyncMessageBlockRoot(slot interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) GetValidatorData(validatorPubKeys interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) IsSyncCommitteeAggregator(proof interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitAggregateSelectionProof(slot, committeeIndex, committeeLength, index, slotSig interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitAttestation(attestation interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitBeaconBlock(block, sig interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitBlindedBeaconBlock(block, sig interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitProposalPreparation(feeRecipients interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitSignedAggregateSelectionProof(msg interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitSignedContributionAndProof(contribution interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitSyncCommitteeSubscriptions(subscription interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubmitSyncMessage(msg interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SubscribeToCommitteeSubnet(subscription interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SyncCommitteeDuties(epoch, indices interface{}) *gomock.Call
- func (mr *MockBeaconMockRecorder) SyncCommitteeSubnetID(index interface{}) *gomock.Call
- type MockValidatorMetadataStorage
- type MockValidatorMetadataStorageMockRecorder
- type MockbeaconDuties
- func (m *MockbeaconDuties) EXPECT() *MockbeaconDutiesMockRecorder
- func (m *MockbeaconDuties) Events(ctx context.Context, topics []string, handler client.EventHandlerFunc) error
- func (m *MockbeaconDuties) GetDuties(logger *zap.Logger, epoch phase0.Epoch, ...) ([]*types.Duty, error)
- func (m *MockbeaconDuties) SyncCommitteeDuties(epoch phase0.Epoch, indices []phase0.ValidatorIndex) ([]*v1.SyncCommitteeDuty, error)
- type MockbeaconDutiesMockRecorder
- func (mr *MockbeaconDutiesMockRecorder) Events(ctx, topics, handler interface{}) *gomock.Call
- func (mr *MockbeaconDutiesMockRecorder) GetDuties(logger, epoch, validatorIndices interface{}) *gomock.Call
- func (mr *MockbeaconDutiesMockRecorder) SyncCommitteeDuties(epoch, indices interface{}) *gomock.Call
- type MockbeaconSubscriber
- func (m *MockbeaconSubscriber) EXPECT() *MockbeaconSubscriberMockRecorder
- func (m *MockbeaconSubscriber) SubmitSyncCommitteeSubscriptions(subscription []*v1.SyncCommitteeSubscription) error
- func (m *MockbeaconSubscriber) SubscribeToCommitteeSubnet(subscription []*v1.BeaconCommitteeSubscription) error
- type MockbeaconSubscriberMockRecorder
- type MockbeaconValidator
- type MockbeaconValidatorMockRecorder
- type Mockproposer
- type MockproposerMockRecorder
- type Mocksigner
- type MocksignerMockRecorder
- type Network
- func (n Network) EstimatedCurrentEpoch() phase0.Epoch
- func (n Network) EstimatedCurrentSlot() phase0.Slot
- func (n Network) EstimatedEpochAtSlot(slot phase0.Slot) phase0.Epoch
- func (n Network) EstimatedSlotAtTime(time int64) phase0.Slot
- func (n Network) EstimatedSyncCommitteePeriodAtEpoch(epoch phase0.Epoch) uint64
- func (n Network) FirstEpochOfSyncPeriod(period uint64) phase0.Epoch
- func (n Network) GetEpochFirstSlot(epoch phase0.Epoch) phase0.Slot
- func (n Network) GetSlotStartTime(slot phase0.Slot) time.Time
- func (n Network) IsFirstSlotOfEpoch(slot phase0.Slot) bool
- func (n Network) LastSlotOfSyncPeriod(period uint64) phase0.Slot
- func (n Network) MinGenesisTime() uint64
- type OnUpdated
- type Options
- type ValidatorMetadata
- type ValidatorMetadataStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchValidatorsMetadata ¶
func FetchValidatorsMetadata(bc Beacon, pubKeys [][]byte) (map[string]*ValidatorMetadata, error)
FetchValidatorsMetadata is fetching validators data from beacon
func UpdateValidatorsMetadata ¶
func UpdateValidatorsMetadata(logger *zap.Logger, pubKeys [][]byte, collection ValidatorMetadataStorage, bc Beacon, onUpdated OnUpdated) error
UpdateValidatorsMetadata updates validator information for the given public keys
Types ¶
type Beacon ¶
type Beacon interface { ssv.BeaconNode // spec beacon interface // contains filtered or unexported methods }
Beacon interface for all beacon duty calls
type DutyData ¶
type DutyData struct { // Types that are valid to be assigned to Data: // *InputValueAttestationData // *InputValue_AggregationData // *InputValue_BeaconBlock Data IsInputValueData `protobuf_oneof:"data"` // Types that are valid to be assigned to SignedData: // *InputValueAttestation // *InputValue_Aggregation // *InputValue_Block SignedData IsInputValueSignedData `protobuf_oneof:"signed_data"` }
DutyData represent unified duty types data
func (*DutyData) GetAttestation ¶
func (m *DutyData) GetAttestation() *phase0.Attestation
GetAttestation return cast attestation input data
func (*DutyData) GetAttestationData ¶
func (m *DutyData) GetAttestationData() *phase0.AttestationData
GetAttestationData return cast input data
func (*DutyData) GetSignedData ¶
func (m *DutyData) GetSignedData() IsInputValueSignedData
GetSignedData returns input data
type InputValueAttestation ¶
type InputValueAttestation struct {
Attestation *phase0.Attestation
}
InputValueAttestation implementing IsInputValueSignedData
type InputValueAttestationData ¶
type InputValueAttestationData struct {
AttestationData *phase0.AttestationData
}
InputValueAttestationData implementing IsInputValueData
type IsInputValueData ¶
type IsInputValueData interface {
// contains filtered or unexported methods
}
IsInputValueData interface representing input data
type IsInputValueSignedData ¶
type IsInputValueSignedData interface {
// contains filtered or unexported methods
}
IsInputValueSignedData interface representing input signed data
type MockBeacon ¶
type MockBeacon struct {
// contains filtered or unexported fields
}
MockBeacon is a mock of Beacon interface.
func NewMockBeacon ¶
func NewMockBeacon(ctrl *gomock.Controller) *MockBeacon
NewMockBeacon creates a new mock instance.
func (*MockBeacon) ComputeSigningRoot ¶
func (m *MockBeacon) ComputeSigningRoot(object interface{}, domain phase0.Domain) ([32]byte, error)
ComputeSigningRoot mocks base method.
func (*MockBeacon) DomainData ¶
func (m *MockBeacon) DomainData(epoch phase0.Epoch, domain phase0.DomainType) (phase0.Domain, error)
DomainData mocks base method.
func (*MockBeacon) EXPECT ¶
func (m *MockBeacon) EXPECT() *MockBeaconMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBeacon) Events ¶ added in v0.4.7
func (m *MockBeacon) Events(ctx context.Context, topics []string, handler client.EventHandlerFunc) error
Events mocks base method.
func (*MockBeacon) GetAttestationData ¶
func (m *MockBeacon) GetAttestationData(slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (ssz.Marshaler, spec.DataVersion, error)
GetAttestationData mocks base method.
func (*MockBeacon) GetBeaconBlock ¶
func (m *MockBeacon) GetBeaconBlock(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, graffiti, randao []byte) (ssz.Marshaler, spec.DataVersion, error)
GetBeaconBlock mocks base method.
func (*MockBeacon) GetBeaconNetwork ¶
func (m *MockBeacon) GetBeaconNetwork() types.BeaconNetwork
GetBeaconNetwork mocks base method.
func (*MockBeacon) GetBlindedBeaconBlock ¶
func (m *MockBeacon) GetBlindedBeaconBlock(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, graffiti, randao []byte) (ssz.Marshaler, spec.DataVersion, error)
GetBlindedBeaconBlock mocks base method.
func (*MockBeacon) GetDuties ¶
func (m *MockBeacon) GetDuties(logger *zap.Logger, epoch phase0.Epoch, validatorIndices []phase0.ValidatorIndex) ([]*types.Duty, error)
GetDuties mocks base method.
func (*MockBeacon) GetSyncCommitteeContribution ¶
func (m *MockBeacon) GetSyncCommitteeContribution(slot phase0.Slot, selectionProofs []phase0.BLSSignature, subnetIDs []uint64) (ssz.Marshaler, spec.DataVersion, error)
GetSyncCommitteeContribution mocks base method.
func (*MockBeacon) GetSyncMessageBlockRoot ¶
func (m *MockBeacon) GetSyncMessageBlockRoot(slot phase0.Slot) (phase0.Root, spec.DataVersion, error)
GetSyncMessageBlockRoot mocks base method.
func (*MockBeacon) GetValidatorData ¶
func (m *MockBeacon) GetValidatorData(validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*v1.Validator, error)
GetValidatorData mocks base method.
func (*MockBeacon) IsSyncCommitteeAggregator ¶
func (m *MockBeacon) IsSyncCommitteeAggregator(proof []byte) (bool, error)
IsSyncCommitteeAggregator mocks base method.
func (*MockBeacon) SubmitAggregateSelectionProof ¶
func (m *MockBeacon) SubmitAggregateSelectionProof(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, committeeLength uint64, index phase0.ValidatorIndex, slotSig []byte) (ssz.Marshaler, spec.DataVersion, error)
SubmitAggregateSelectionProof mocks base method.
func (*MockBeacon) SubmitAttestation ¶
func (m *MockBeacon) SubmitAttestation(attestation *phase0.Attestation) error
SubmitAttestation mocks base method.
func (*MockBeacon) SubmitBeaconBlock ¶
func (m *MockBeacon) SubmitBeaconBlock(block *spec.VersionedBeaconBlock, sig phase0.BLSSignature) error
SubmitBeaconBlock mocks base method.
func (*MockBeacon) SubmitBlindedBeaconBlock ¶
func (m *MockBeacon) SubmitBlindedBeaconBlock(block *api.VersionedBlindedBeaconBlock, sig phase0.BLSSignature) error
SubmitBlindedBeaconBlock mocks base method.
func (*MockBeacon) SubmitProposalPreparation ¶
func (m *MockBeacon) SubmitProposalPreparation(feeRecipients map[phase0.ValidatorIndex]bellatrix.ExecutionAddress) error
SubmitProposalPreparation mocks base method.
func (*MockBeacon) SubmitSignedAggregateSelectionProof ¶
func (m *MockBeacon) SubmitSignedAggregateSelectionProof(msg *phase0.SignedAggregateAndProof) error
SubmitSignedAggregateSelectionProof mocks base method.
func (*MockBeacon) SubmitSignedContributionAndProof ¶
func (m *MockBeacon) SubmitSignedContributionAndProof(contribution *altair.SignedContributionAndProof) error
SubmitSignedContributionAndProof mocks base method.
func (*MockBeacon) SubmitSyncCommitteeSubscriptions ¶
func (m *MockBeacon) SubmitSyncCommitteeSubscriptions(subscription []*v1.SyncCommitteeSubscription) error
SubmitSyncCommitteeSubscriptions mocks base method.
func (*MockBeacon) SubmitSyncMessage ¶
func (m *MockBeacon) SubmitSyncMessage(msg *altair.SyncCommitteeMessage) error
SubmitSyncMessage mocks base method.
func (*MockBeacon) SubscribeToCommitteeSubnet ¶
func (m *MockBeacon) SubscribeToCommitteeSubnet(subscription []*v1.BeaconCommitteeSubscription) error
SubscribeToCommitteeSubnet mocks base method.
func (*MockBeacon) SyncCommitteeDuties ¶ added in v0.4.7
func (m *MockBeacon) SyncCommitteeDuties(epoch phase0.Epoch, indices []phase0.ValidatorIndex) ([]*v1.SyncCommitteeDuty, error)
SyncCommitteeDuties mocks base method.
func (*MockBeacon) SyncCommitteeSubnetID ¶
func (m *MockBeacon) SyncCommitteeSubnetID(index phase0.CommitteeIndex) (uint64, error)
SyncCommitteeSubnetID mocks base method.
type MockBeaconMockRecorder ¶
type MockBeaconMockRecorder struct {
// contains filtered or unexported fields
}
MockBeaconMockRecorder is the mock recorder for MockBeacon.
func (*MockBeaconMockRecorder) ComputeSigningRoot ¶
func (mr *MockBeaconMockRecorder) ComputeSigningRoot(object, domain interface{}) *gomock.Call
ComputeSigningRoot indicates an expected call of ComputeSigningRoot.
func (*MockBeaconMockRecorder) DomainData ¶
func (mr *MockBeaconMockRecorder) DomainData(epoch, domain interface{}) *gomock.Call
DomainData indicates an expected call of DomainData.
func (*MockBeaconMockRecorder) Events ¶ added in v0.4.7
func (mr *MockBeaconMockRecorder) Events(ctx, topics, handler interface{}) *gomock.Call
Events indicates an expected call of Events.
func (*MockBeaconMockRecorder) GetAttestationData ¶
func (mr *MockBeaconMockRecorder) GetAttestationData(slot, committeeIndex interface{}) *gomock.Call
GetAttestationData indicates an expected call of GetAttestationData.
func (*MockBeaconMockRecorder) GetBeaconBlock ¶
func (mr *MockBeaconMockRecorder) GetBeaconBlock(slot, committeeIndex, graffiti, randao interface{}) *gomock.Call
GetBeaconBlock indicates an expected call of GetBeaconBlock.
func (*MockBeaconMockRecorder) GetBeaconNetwork ¶
func (mr *MockBeaconMockRecorder) GetBeaconNetwork() *gomock.Call
GetBeaconNetwork indicates an expected call of GetBeaconNetwork.
func (*MockBeaconMockRecorder) GetBlindedBeaconBlock ¶
func (mr *MockBeaconMockRecorder) GetBlindedBeaconBlock(slot, committeeIndex, graffiti, randao interface{}) *gomock.Call
GetBlindedBeaconBlock indicates an expected call of GetBlindedBeaconBlock.
func (*MockBeaconMockRecorder) GetDuties ¶
func (mr *MockBeaconMockRecorder) GetDuties(logger, epoch, validatorIndices interface{}) *gomock.Call
GetDuties indicates an expected call of GetDuties.
func (*MockBeaconMockRecorder) GetSyncCommitteeContribution ¶
func (mr *MockBeaconMockRecorder) GetSyncCommitteeContribution(slot, selectionProofs, subnetIDs interface{}) *gomock.Call
GetSyncCommitteeContribution indicates an expected call of GetSyncCommitteeContribution.
func (*MockBeaconMockRecorder) GetSyncMessageBlockRoot ¶
func (mr *MockBeaconMockRecorder) GetSyncMessageBlockRoot(slot interface{}) *gomock.Call
GetSyncMessageBlockRoot indicates an expected call of GetSyncMessageBlockRoot.
func (*MockBeaconMockRecorder) GetValidatorData ¶
func (mr *MockBeaconMockRecorder) GetValidatorData(validatorPubKeys interface{}) *gomock.Call
GetValidatorData indicates an expected call of GetValidatorData.
func (*MockBeaconMockRecorder) IsSyncCommitteeAggregator ¶
func (mr *MockBeaconMockRecorder) IsSyncCommitteeAggregator(proof interface{}) *gomock.Call
IsSyncCommitteeAggregator indicates an expected call of IsSyncCommitteeAggregator.
func (*MockBeaconMockRecorder) SubmitAggregateSelectionProof ¶
func (mr *MockBeaconMockRecorder) SubmitAggregateSelectionProof(slot, committeeIndex, committeeLength, index, slotSig interface{}) *gomock.Call
SubmitAggregateSelectionProof indicates an expected call of SubmitAggregateSelectionProof.
func (*MockBeaconMockRecorder) SubmitAttestation ¶
func (mr *MockBeaconMockRecorder) SubmitAttestation(attestation interface{}) *gomock.Call
SubmitAttestation indicates an expected call of SubmitAttestation.
func (*MockBeaconMockRecorder) SubmitBeaconBlock ¶
func (mr *MockBeaconMockRecorder) SubmitBeaconBlock(block, sig interface{}) *gomock.Call
SubmitBeaconBlock indicates an expected call of SubmitBeaconBlock.
func (*MockBeaconMockRecorder) SubmitBlindedBeaconBlock ¶
func (mr *MockBeaconMockRecorder) SubmitBlindedBeaconBlock(block, sig interface{}) *gomock.Call
SubmitBlindedBeaconBlock indicates an expected call of SubmitBlindedBeaconBlock.
func (*MockBeaconMockRecorder) SubmitProposalPreparation ¶
func (mr *MockBeaconMockRecorder) SubmitProposalPreparation(feeRecipients interface{}) *gomock.Call
SubmitProposalPreparation indicates an expected call of SubmitProposalPreparation.
func (*MockBeaconMockRecorder) SubmitSignedAggregateSelectionProof ¶
func (mr *MockBeaconMockRecorder) SubmitSignedAggregateSelectionProof(msg interface{}) *gomock.Call
SubmitSignedAggregateSelectionProof indicates an expected call of SubmitSignedAggregateSelectionProof.
func (*MockBeaconMockRecorder) SubmitSignedContributionAndProof ¶
func (mr *MockBeaconMockRecorder) SubmitSignedContributionAndProof(contribution interface{}) *gomock.Call
SubmitSignedContributionAndProof indicates an expected call of SubmitSignedContributionAndProof.
func (*MockBeaconMockRecorder) SubmitSyncCommitteeSubscriptions ¶
func (mr *MockBeaconMockRecorder) SubmitSyncCommitteeSubscriptions(subscription interface{}) *gomock.Call
SubmitSyncCommitteeSubscriptions indicates an expected call of SubmitSyncCommitteeSubscriptions.
func (*MockBeaconMockRecorder) SubmitSyncMessage ¶
func (mr *MockBeaconMockRecorder) SubmitSyncMessage(msg interface{}) *gomock.Call
SubmitSyncMessage indicates an expected call of SubmitSyncMessage.
func (*MockBeaconMockRecorder) SubscribeToCommitteeSubnet ¶
func (mr *MockBeaconMockRecorder) SubscribeToCommitteeSubnet(subscription interface{}) *gomock.Call
SubscribeToCommitteeSubnet indicates an expected call of SubscribeToCommitteeSubnet.
func (*MockBeaconMockRecorder) SyncCommitteeDuties ¶ added in v0.4.7
func (mr *MockBeaconMockRecorder) SyncCommitteeDuties(epoch, indices interface{}) *gomock.Call
SyncCommitteeDuties indicates an expected call of SyncCommitteeDuties.
func (*MockBeaconMockRecorder) SyncCommitteeSubnetID ¶
func (mr *MockBeaconMockRecorder) SyncCommitteeSubnetID(index interface{}) *gomock.Call
SyncCommitteeSubnetID indicates an expected call of SyncCommitteeSubnetID.
type MockValidatorMetadataStorage ¶
type MockValidatorMetadataStorage struct {
// contains filtered or unexported fields
}
MockValidatorMetadataStorage is a mock of ValidatorMetadataStorage interface.
func NewMockValidatorMetadataStorage ¶
func NewMockValidatorMetadataStorage(ctrl *gomock.Controller) *MockValidatorMetadataStorage
NewMockValidatorMetadataStorage creates a new mock instance.
func (*MockValidatorMetadataStorage) EXPECT ¶
func (m *MockValidatorMetadataStorage) EXPECT() *MockValidatorMetadataStorageMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockValidatorMetadataStorage) UpdateValidatorMetadata ¶
func (m *MockValidatorMetadataStorage) UpdateValidatorMetadata(logger *zap.Logger, pk string, metadata *ValidatorMetadata) error
UpdateValidatorMetadata mocks base method.
type MockValidatorMetadataStorageMockRecorder ¶
type MockValidatorMetadataStorageMockRecorder struct {
// contains filtered or unexported fields
}
MockValidatorMetadataStorageMockRecorder is the mock recorder for MockValidatorMetadataStorage.
func (*MockValidatorMetadataStorageMockRecorder) UpdateValidatorMetadata ¶
func (mr *MockValidatorMetadataStorageMockRecorder) UpdateValidatorMetadata(logger, pk, metadata interface{}) *gomock.Call
UpdateValidatorMetadata indicates an expected call of UpdateValidatorMetadata.
type MockbeaconDuties ¶
type MockbeaconDuties struct {
// contains filtered or unexported fields
}
MockbeaconDuties is a mock of beaconDuties interface.
func NewMockbeaconDuties ¶
func NewMockbeaconDuties(ctrl *gomock.Controller) *MockbeaconDuties
NewMockbeaconDuties creates a new mock instance.
func (*MockbeaconDuties) EXPECT ¶
func (m *MockbeaconDuties) EXPECT() *MockbeaconDutiesMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockbeaconDuties) Events ¶ added in v0.4.7
func (m *MockbeaconDuties) Events(ctx context.Context, topics []string, handler client.EventHandlerFunc) error
Events mocks base method.
func (*MockbeaconDuties) GetDuties ¶
func (m *MockbeaconDuties) GetDuties(logger *zap.Logger, epoch phase0.Epoch, validatorIndices []phase0.ValidatorIndex) ([]*types.Duty, error)
GetDuties mocks base method.
func (*MockbeaconDuties) SyncCommitteeDuties ¶ added in v0.4.7
func (m *MockbeaconDuties) SyncCommitteeDuties(epoch phase0.Epoch, indices []phase0.ValidatorIndex) ([]*v1.SyncCommitteeDuty, error)
SyncCommitteeDuties mocks base method.
type MockbeaconDutiesMockRecorder ¶
type MockbeaconDutiesMockRecorder struct {
// contains filtered or unexported fields
}
MockbeaconDutiesMockRecorder is the mock recorder for MockbeaconDuties.
func (*MockbeaconDutiesMockRecorder) Events ¶ added in v0.4.7
func (mr *MockbeaconDutiesMockRecorder) Events(ctx, topics, handler interface{}) *gomock.Call
Events indicates an expected call of Events.
func (*MockbeaconDutiesMockRecorder) GetDuties ¶
func (mr *MockbeaconDutiesMockRecorder) GetDuties(logger, epoch, validatorIndices interface{}) *gomock.Call
GetDuties indicates an expected call of GetDuties.
func (*MockbeaconDutiesMockRecorder) SyncCommitteeDuties ¶ added in v0.4.7
func (mr *MockbeaconDutiesMockRecorder) SyncCommitteeDuties(epoch, indices interface{}) *gomock.Call
SyncCommitteeDuties indicates an expected call of SyncCommitteeDuties.
type MockbeaconSubscriber ¶
type MockbeaconSubscriber struct {
// contains filtered or unexported fields
}
MockbeaconSubscriber is a mock of beaconSubscriber interface.
func NewMockbeaconSubscriber ¶
func NewMockbeaconSubscriber(ctrl *gomock.Controller) *MockbeaconSubscriber
NewMockbeaconSubscriber creates a new mock instance.
func (*MockbeaconSubscriber) EXPECT ¶
func (m *MockbeaconSubscriber) EXPECT() *MockbeaconSubscriberMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockbeaconSubscriber) SubmitSyncCommitteeSubscriptions ¶
func (m *MockbeaconSubscriber) SubmitSyncCommitteeSubscriptions(subscription []*v1.SyncCommitteeSubscription) error
SubmitSyncCommitteeSubscriptions mocks base method.
func (*MockbeaconSubscriber) SubscribeToCommitteeSubnet ¶
func (m *MockbeaconSubscriber) SubscribeToCommitteeSubnet(subscription []*v1.BeaconCommitteeSubscription) error
SubscribeToCommitteeSubnet mocks base method.
type MockbeaconSubscriberMockRecorder ¶
type MockbeaconSubscriberMockRecorder struct {
// contains filtered or unexported fields
}
MockbeaconSubscriberMockRecorder is the mock recorder for MockbeaconSubscriber.
func (*MockbeaconSubscriberMockRecorder) SubmitSyncCommitteeSubscriptions ¶
func (mr *MockbeaconSubscriberMockRecorder) SubmitSyncCommitteeSubscriptions(subscription interface{}) *gomock.Call
SubmitSyncCommitteeSubscriptions indicates an expected call of SubmitSyncCommitteeSubscriptions.
func (*MockbeaconSubscriberMockRecorder) SubscribeToCommitteeSubnet ¶
func (mr *MockbeaconSubscriberMockRecorder) SubscribeToCommitteeSubnet(subscription interface{}) *gomock.Call
SubscribeToCommitteeSubnet indicates an expected call of SubscribeToCommitteeSubnet.
type MockbeaconValidator ¶
type MockbeaconValidator struct {
// contains filtered or unexported fields
}
MockbeaconValidator is a mock of beaconValidator interface.
func NewMockbeaconValidator ¶
func NewMockbeaconValidator(ctrl *gomock.Controller) *MockbeaconValidator
NewMockbeaconValidator creates a new mock instance.
func (*MockbeaconValidator) EXPECT ¶
func (m *MockbeaconValidator) EXPECT() *MockbeaconValidatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockbeaconValidator) GetValidatorData ¶
func (m *MockbeaconValidator) GetValidatorData(validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*v1.Validator, error)
GetValidatorData mocks base method.
type MockbeaconValidatorMockRecorder ¶
type MockbeaconValidatorMockRecorder struct {
// contains filtered or unexported fields
}
MockbeaconValidatorMockRecorder is the mock recorder for MockbeaconValidator.
func (*MockbeaconValidatorMockRecorder) GetValidatorData ¶
func (mr *MockbeaconValidatorMockRecorder) GetValidatorData(validatorPubKeys interface{}) *gomock.Call
GetValidatorData indicates an expected call of GetValidatorData.
type Mockproposer ¶
type Mockproposer struct {
// contains filtered or unexported fields
}
Mockproposer is a mock of proposer interface.
func NewMockproposer ¶
func NewMockproposer(ctrl *gomock.Controller) *Mockproposer
NewMockproposer creates a new mock instance.
func (*Mockproposer) EXPECT ¶
func (m *Mockproposer) EXPECT() *MockproposerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*Mockproposer) SubmitProposalPreparation ¶
func (m *Mockproposer) SubmitProposalPreparation(feeRecipients map[phase0.ValidatorIndex]bellatrix.ExecutionAddress) error
SubmitProposalPreparation mocks base method.
type MockproposerMockRecorder ¶
type MockproposerMockRecorder struct {
// contains filtered or unexported fields
}
MockproposerMockRecorder is the mock recorder for Mockproposer.
func (*MockproposerMockRecorder) SubmitProposalPreparation ¶
func (mr *MockproposerMockRecorder) SubmitProposalPreparation(feeRecipients interface{}) *gomock.Call
SubmitProposalPreparation indicates an expected call of SubmitProposalPreparation.
type Mocksigner ¶
type Mocksigner struct {
// contains filtered or unexported fields
}
Mocksigner is a mock of signer interface.
func NewMocksigner ¶
func NewMocksigner(ctrl *gomock.Controller) *Mocksigner
NewMocksigner creates a new mock instance.
func (*Mocksigner) ComputeSigningRoot ¶
func (m *Mocksigner) ComputeSigningRoot(object interface{}, domain phase0.Domain) ([32]byte, error)
ComputeSigningRoot mocks base method.
func (*Mocksigner) EXPECT ¶
func (m *Mocksigner) EXPECT() *MocksignerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MocksignerMockRecorder ¶
type MocksignerMockRecorder struct {
// contains filtered or unexported fields
}
MocksignerMockRecorder is the mock recorder for Mocksigner.
func (*MocksignerMockRecorder) ComputeSigningRoot ¶
func (mr *MocksignerMockRecorder) ComputeSigningRoot(object, domain interface{}) *gomock.Call
ComputeSigningRoot indicates an expected call of ComputeSigningRoot.
type Network ¶
Network is a beacon chain network.
func NewNetwork ¶
NewNetwork creates a new beacon chain network.
func (Network) EstimatedCurrentEpoch ¶
EstimatedCurrentEpoch estimates the current epoch https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#compute_start_slot_at_epoch
func (Network) EstimatedCurrentSlot ¶
EstimatedCurrentSlot returns the estimation of the current slot
func (Network) EstimatedEpochAtSlot ¶
EstimatedEpochAtSlot estimates epoch at the given slot
func (Network) EstimatedSlotAtTime ¶
EstimatedSlotAtTime estimates slot at the given time
func (Network) EstimatedSyncCommitteePeriodAtEpoch ¶ added in v0.4.7
EstimatedSyncCommitteePeriodAtEpoch estimates the current sync committee period at the given Epoch
func (Network) FirstEpochOfSyncPeriod ¶ added in v0.4.7
FirstEpochOfSyncPeriod calculates the first epoch of the given sync period.
func (Network) GetEpochFirstSlot ¶
GetEpochFirstSlot returns the beacon node first slot in epoch
func (Network) GetSlotStartTime ¶
GetSlotStartTime returns the start time for the given slot
func (Network) IsFirstSlotOfEpoch ¶
IsFirstSlotOfEpoch estimates epoch at the given slot
func (Network) LastSlotOfSyncPeriod ¶ added in v0.4.7
LastSlotOfSyncPeriod calculates the first epoch of the given sync period.
func (Network) MinGenesisTime ¶
type OnUpdated ¶
type OnUpdated func(logger *zap.Logger, pk string, meta *ValidatorMetadata)
OnUpdated represents a function to be called once validator's metadata was updated
type Options ¶
type Options struct { Context context.Context Network string `yaml:"Network" env:"NETWORK" env-default:"prater"` MinGenesisTime uint64 `yaml:"MinGenesisTime" env:"MinGenesisTime"` BeaconNodeAddr string `yaml:"BeaconNodeAddr" env:"BEACON_NODE_ADDR" env-required:"true"` Graffiti []byte }
Options for controller struct creation
type ValidatorMetadata ¶
type ValidatorMetadata struct { Balance phase0.Gwei `json:"balance"` Status eth2apiv1.ValidatorState `json:"status"` Index phase0.ValidatorIndex `json:"index"` // pointer in order to support nil }
ValidatorMetadata represents validator metdata from beacon
func (*ValidatorMetadata) Activated ¶
func (m *ValidatorMetadata) Activated() bool
Activated returns true if the validator is not unknown. It might be pending activation or active
func (*ValidatorMetadata) Equals ¶
func (m *ValidatorMetadata) Equals(other *ValidatorMetadata) bool
Equals returns true if the given metadata is equal to current
func (*ValidatorMetadata) Exiting ¶
func (m *ValidatorMetadata) Exiting() bool
Exiting returns true if the validator is existing or exited
func (*ValidatorMetadata) IsActive ¶
func (m *ValidatorMetadata) IsActive() bool
IsActive returns true if the validator is currently active. Cant be other state
func (*ValidatorMetadata) Pending ¶
func (m *ValidatorMetadata) Pending() bool
Pending returns true if the validator is pending
func (*ValidatorMetadata) Slashed ¶
func (m *ValidatorMetadata) Slashed() bool
Slashed returns true if the validator is existing or exited due to slashing
type ValidatorMetadataStorage ¶
type ValidatorMetadataStorage interface {
UpdateValidatorMetadata(logger *zap.Logger, pk string, metadata *ValidatorMetadata) error
}
ValidatorMetadataStorage interface for validator metadata