Documentation ¶
Overview ¶
Package beacon is a generated GoMock package.
Package beacon is a generated GoMock package.
Index ¶
- func FetchValidatorsMetadata(bc BeaconNode, 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 BeaconNode
- type DutyData
- type InputValueAttestation
- type InputValueAttestationData
- type IsInputValueData
- type IsInputValueSignedData
- type MockBeaconNode
- func (m *MockBeaconNode) ComputeSigningRoot(object interface{}, domain phase0.Domain) ([32]byte, error)
- func (m *MockBeaconNode) DomainData(epoch phase0.Epoch, domain phase0.DomainType) (phase0.Domain, error)
- func (m *MockBeaconNode) EXPECT() *MockBeaconNodeMockRecorder
- func (m *MockBeaconNode) Events(ctx context.Context, topics []string, handler client.EventHandlerFunc) error
- func (m *MockBeaconNode) GetAttestationData(slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeaconNode) GetBeaconBlock(slot phase0.Slot, graffiti, randao []byte) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeaconNode) GetBeaconNetwork() types.BeaconNetwork
- func (m *MockBeaconNode) GetBlindedBeaconBlock(slot phase0.Slot, graffiti, randao []byte) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeaconNode) GetDuties(logger *zap.Logger, epoch phase0.Epoch, ...) ([]*types.Duty, error)
- func (m *MockBeaconNode) GetSyncCommitteeContribution(slot phase0.Slot, selectionProofs []phase0.BLSSignature, subnetIDs []uint64) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeaconNode) GetSyncMessageBlockRoot(slot phase0.Slot) (phase0.Root, spec.DataVersion, error)
- func (m *MockBeaconNode) GetValidatorData(validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*v1.Validator, error)
- func (m *MockBeaconNode) IsSyncCommitteeAggregator(proof []byte) (bool, error)
- func (m *MockBeaconNode) SubmitAggregateSelectionProof(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, committeeLength uint64, ...) (ssz.Marshaler, spec.DataVersion, error)
- func (m *MockBeaconNode) SubmitAttestation(attestation *phase0.Attestation) error
- func (m *MockBeaconNode) SubmitBeaconBlock(block *spec.VersionedBeaconBlock, sig phase0.BLSSignature) error
- func (m *MockBeaconNode) SubmitBlindedBeaconBlock(block *api.VersionedBlindedBeaconBlock, sig phase0.BLSSignature) error
- func (m *MockBeaconNode) SubmitProposalPreparation(feeRecipients map[phase0.ValidatorIndex]bellatrix.ExecutionAddress) error
- func (m *MockBeaconNode) SubmitSignedAggregateSelectionProof(msg *phase0.SignedAggregateAndProof) error
- func (m *MockBeaconNode) SubmitSignedContributionAndProof(contribution *altair.SignedContributionAndProof) error
- func (m *MockBeaconNode) SubmitSyncCommitteeSubscriptions(subscription []*v1.SyncCommitteeSubscription) error
- func (m *MockBeaconNode) SubmitSyncMessage(msg *altair.SyncCommitteeMessage) error
- func (m *MockBeaconNode) SubmitValidatorRegistration(pubkey []byte, feeRecipient bellatrix.ExecutionAddress, ...) error
- func (m *MockBeaconNode) SubscribeToCommitteeSubnet(subscription []*v1.BeaconCommitteeSubscription) error
- func (m *MockBeaconNode) SyncCommitteeDuties(epoch phase0.Epoch, indices []phase0.ValidatorIndex) ([]*v1.SyncCommitteeDuty, error)
- func (m *MockBeaconNode) SyncCommitteeSubnetID(index phase0.CommitteeIndex) (uint64, error)
- type MockBeaconNodeMockRecorder
- func (mr *MockBeaconNodeMockRecorder) ComputeSigningRoot(object, domain interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) DomainData(epoch, domain interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) Events(ctx, topics, handler interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) GetAttestationData(slot, committeeIndex interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) GetBeaconBlock(slot, graffiti, randao interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) GetBeaconNetwork() *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) GetBlindedBeaconBlock(slot, graffiti, randao interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) GetDuties(logger, epoch, validatorIndices interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) GetSyncCommitteeContribution(slot, selectionProofs, subnetIDs interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) GetSyncMessageBlockRoot(slot interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) GetValidatorData(validatorPubKeys interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) IsSyncCommitteeAggregator(proof interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitAggregateSelectionProof(slot, committeeIndex, committeeLength, index, slotSig interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitAttestation(attestation interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitBeaconBlock(block, sig interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitBlindedBeaconBlock(block, sig interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitProposalPreparation(feeRecipients interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitSignedAggregateSelectionProof(msg interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitSignedContributionAndProof(contribution interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitSyncCommitteeSubscriptions(subscription interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitSyncMessage(msg interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubmitValidatorRegistration(pubkey, feeRecipient, sig interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SubscribeToCommitteeSubnet(subscription interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) SyncCommitteeDuties(epoch, indices interface{}) *gomock.Call
- func (mr *MockBeaconNodeMockRecorder) 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) MarshalJSON() ([]byte, error)
- func (n Network) MinGenesisTime() uint64
- func (n Network) String() string
- func (n *Network) UnmarshalJSON(b []byte) error
- type OnUpdated
- type Options
- type ValidatorMetadata
- func (m *ValidatorMetadata) Activated() bool
- func (m *ValidatorMetadata) Equals(other *ValidatorMetadata) bool
- func (m *ValidatorMetadata) Exiting() bool
- func (m *ValidatorMetadata) IsActive() bool
- func (m *ValidatorMetadata) IsAttesting() bool
- func (m *ValidatorMetadata) Pending() bool
- func (m *ValidatorMetadata) Slashed() bool
- type ValidatorMetadataStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchValidatorsMetadata ¶
func FetchValidatorsMetadata(bc BeaconNode, 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 BeaconNode, onUpdated OnUpdated) error
UpdateValidatorsMetadata updates validator information for the given public keys
func UpdateValidatorsMetadataBatch ¶
func UpdateValidatorsMetadataBatch(logger *zap.Logger, pubKeys [][]byte, queue queue.Queue, collection ValidatorMetadataStorage, bc BeaconNode, onUpdated OnUpdated, batchSize int)
UpdateValidatorsMetadataBatch updates the given public keys in batches
Types ¶
type BeaconNode ¶ added in v1.1.0
type BeaconNode interface { specssv.BeaconNode // spec beacon interface // contains filtered or unexported methods }
BeaconNode 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 MockBeaconNode ¶ added in v1.1.0
type MockBeaconNode struct {
// contains filtered or unexported fields
}
MockBeaconNode is a mock of BeaconNode interface.
func NewMockBeaconNode ¶ added in v1.1.0
func NewMockBeaconNode(ctrl *gomock.Controller) *MockBeaconNode
NewMockBeaconNode creates a new mock instance.
func (*MockBeaconNode) ComputeSigningRoot ¶ added in v1.1.0
func (m *MockBeaconNode) ComputeSigningRoot(object interface{}, domain phase0.Domain) ([32]byte, error)
ComputeSigningRoot mocks base method.
func (*MockBeaconNode) DomainData ¶ added in v1.1.0
func (m *MockBeaconNode) DomainData(epoch phase0.Epoch, domain phase0.DomainType) (phase0.Domain, error)
DomainData mocks base method.
func (*MockBeaconNode) EXPECT ¶ added in v1.1.0
func (m *MockBeaconNode) EXPECT() *MockBeaconNodeMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBeaconNode) Events ¶ added in v1.1.0
func (m *MockBeaconNode) Events(ctx context.Context, topics []string, handler client.EventHandlerFunc) error
Events mocks base method.
func (*MockBeaconNode) GetAttestationData ¶ added in v1.1.0
func (m *MockBeaconNode) GetAttestationData(slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (ssz.Marshaler, spec.DataVersion, error)
GetAttestationData mocks base method.
func (*MockBeaconNode) GetBeaconBlock ¶ added in v1.1.0
func (m *MockBeaconNode) GetBeaconBlock(slot phase0.Slot, graffiti, randao []byte) (ssz.Marshaler, spec.DataVersion, error)
GetBeaconBlock mocks base method.
func (*MockBeaconNode) GetBeaconNetwork ¶ added in v1.1.0
func (m *MockBeaconNode) GetBeaconNetwork() types.BeaconNetwork
GetBeaconNetwork mocks base method.
func (*MockBeaconNode) GetBlindedBeaconBlock ¶ added in v1.1.0
func (m *MockBeaconNode) GetBlindedBeaconBlock(slot phase0.Slot, graffiti, randao []byte) (ssz.Marshaler, spec.DataVersion, error)
GetBlindedBeaconBlock mocks base method.
func (*MockBeaconNode) GetDuties ¶
func (m *MockBeaconNode) GetDuties(logger *zap.Logger, epoch phase0.Epoch, validatorIndices []phase0.ValidatorIndex) ([]*types.Duty, error)
GetDuties mocks base method.
func (*MockBeaconNode) GetSyncCommitteeContribution ¶ added in v1.1.0
func (m *MockBeaconNode) GetSyncCommitteeContribution(slot phase0.Slot, selectionProofs []phase0.BLSSignature, subnetIDs []uint64) (ssz.Marshaler, spec.DataVersion, error)
GetSyncCommitteeContribution mocks base method.
func (*MockBeaconNode) GetSyncMessageBlockRoot ¶ added in v1.1.0
func (m *MockBeaconNode) GetSyncMessageBlockRoot(slot phase0.Slot) (phase0.Root, spec.DataVersion, error)
GetSyncMessageBlockRoot mocks base method.
func (*MockBeaconNode) GetValidatorData ¶ added in v1.1.0
func (m *MockBeaconNode) GetValidatorData(validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*v1.Validator, error)
GetValidatorData mocks base method.
func (*MockBeaconNode) IsSyncCommitteeAggregator ¶ added in v1.1.0
func (m *MockBeaconNode) IsSyncCommitteeAggregator(proof []byte) (bool, error)
IsSyncCommitteeAggregator mocks base method.
func (*MockBeaconNode) SubmitAggregateSelectionProof ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitAggregateSelectionProof(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, committeeLength uint64, index phase0.ValidatorIndex, slotSig []byte) (ssz.Marshaler, spec.DataVersion, error)
SubmitAggregateSelectionProof mocks base method.
func (*MockBeaconNode) SubmitAttestation ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitAttestation(attestation *phase0.Attestation) error
SubmitAttestation mocks base method.
func (*MockBeaconNode) SubmitBeaconBlock ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitBeaconBlock(block *spec.VersionedBeaconBlock, sig phase0.BLSSignature) error
SubmitBeaconBlock mocks base method.
func (*MockBeaconNode) SubmitBlindedBeaconBlock ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitBlindedBeaconBlock(block *api.VersionedBlindedBeaconBlock, sig phase0.BLSSignature) error
SubmitBlindedBeaconBlock mocks base method.
func (*MockBeaconNode) SubmitProposalPreparation ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitProposalPreparation(feeRecipients map[phase0.ValidatorIndex]bellatrix.ExecutionAddress) error
SubmitProposalPreparation mocks base method.
func (*MockBeaconNode) SubmitSignedAggregateSelectionProof ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitSignedAggregateSelectionProof(msg *phase0.SignedAggregateAndProof) error
SubmitSignedAggregateSelectionProof mocks base method.
func (*MockBeaconNode) SubmitSignedContributionAndProof ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitSignedContributionAndProof(contribution *altair.SignedContributionAndProof) error
SubmitSignedContributionAndProof mocks base method.
func (*MockBeaconNode) SubmitSyncCommitteeSubscriptions ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitSyncCommitteeSubscriptions(subscription []*v1.SyncCommitteeSubscription) error
SubmitSyncCommitteeSubscriptions mocks base method.
func (*MockBeaconNode) SubmitSyncMessage ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitSyncMessage(msg *altair.SyncCommitteeMessage) error
SubmitSyncMessage mocks base method.
func (*MockBeaconNode) SubmitValidatorRegistration ¶ added in v1.1.0
func (m *MockBeaconNode) SubmitValidatorRegistration(pubkey []byte, feeRecipient bellatrix.ExecutionAddress, sig phase0.BLSSignature) error
SubmitValidatorRegistration mocks base method.
func (*MockBeaconNode) SubscribeToCommitteeSubnet ¶
func (m *MockBeaconNode) SubscribeToCommitteeSubnet(subscription []*v1.BeaconCommitteeSubscription) error
SubscribeToCommitteeSubnet mocks base method.
func (*MockBeaconNode) SyncCommitteeDuties ¶ added in v1.1.0
func (m *MockBeaconNode) SyncCommitteeDuties(epoch phase0.Epoch, indices []phase0.ValidatorIndex) ([]*v1.SyncCommitteeDuty, error)
SyncCommitteeDuties mocks base method.
func (*MockBeaconNode) SyncCommitteeSubnetID ¶ added in v1.1.0
func (m *MockBeaconNode) SyncCommitteeSubnetID(index phase0.CommitteeIndex) (uint64, error)
SyncCommitteeSubnetID mocks base method.
type MockBeaconNodeMockRecorder ¶ added in v1.1.0
type MockBeaconNodeMockRecorder struct {
// contains filtered or unexported fields
}
MockBeaconNodeMockRecorder is the mock recorder for MockBeaconNode.
func (*MockBeaconNodeMockRecorder) ComputeSigningRoot ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) ComputeSigningRoot(object, domain interface{}) *gomock.Call
ComputeSigningRoot indicates an expected call of ComputeSigningRoot.
func (*MockBeaconNodeMockRecorder) DomainData ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) DomainData(epoch, domain interface{}) *gomock.Call
DomainData indicates an expected call of DomainData.
func (*MockBeaconNodeMockRecorder) Events ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) Events(ctx, topics, handler interface{}) *gomock.Call
Events indicates an expected call of Events.
func (*MockBeaconNodeMockRecorder) GetAttestationData ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) GetAttestationData(slot, committeeIndex interface{}) *gomock.Call
GetAttestationData indicates an expected call of GetAttestationData.
func (*MockBeaconNodeMockRecorder) GetBeaconBlock ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) GetBeaconBlock(slot, graffiti, randao interface{}) *gomock.Call
GetBeaconBlock indicates an expected call of GetBeaconBlock.
func (*MockBeaconNodeMockRecorder) GetBeaconNetwork ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) GetBeaconNetwork() *gomock.Call
GetBeaconNetwork indicates an expected call of GetBeaconNetwork.
func (*MockBeaconNodeMockRecorder) GetBlindedBeaconBlock ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) GetBlindedBeaconBlock(slot, graffiti, randao interface{}) *gomock.Call
GetBlindedBeaconBlock indicates an expected call of GetBlindedBeaconBlock.
func (*MockBeaconNodeMockRecorder) GetDuties ¶
func (mr *MockBeaconNodeMockRecorder) GetDuties(logger, epoch, validatorIndices interface{}) *gomock.Call
GetDuties indicates an expected call of GetDuties.
func (*MockBeaconNodeMockRecorder) GetSyncCommitteeContribution ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) GetSyncCommitteeContribution(slot, selectionProofs, subnetIDs interface{}) *gomock.Call
GetSyncCommitteeContribution indicates an expected call of GetSyncCommitteeContribution.
func (*MockBeaconNodeMockRecorder) GetSyncMessageBlockRoot ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) GetSyncMessageBlockRoot(slot interface{}) *gomock.Call
GetSyncMessageBlockRoot indicates an expected call of GetSyncMessageBlockRoot.
func (*MockBeaconNodeMockRecorder) GetValidatorData ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) GetValidatorData(validatorPubKeys interface{}) *gomock.Call
GetValidatorData indicates an expected call of GetValidatorData.
func (*MockBeaconNodeMockRecorder) IsSyncCommitteeAggregator ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) IsSyncCommitteeAggregator(proof interface{}) *gomock.Call
IsSyncCommitteeAggregator indicates an expected call of IsSyncCommitteeAggregator.
func (*MockBeaconNodeMockRecorder) SubmitAggregateSelectionProof ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitAggregateSelectionProof(slot, committeeIndex, committeeLength, index, slotSig interface{}) *gomock.Call
SubmitAggregateSelectionProof indicates an expected call of SubmitAggregateSelectionProof.
func (*MockBeaconNodeMockRecorder) SubmitAttestation ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitAttestation(attestation interface{}) *gomock.Call
SubmitAttestation indicates an expected call of SubmitAttestation.
func (*MockBeaconNodeMockRecorder) SubmitBeaconBlock ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitBeaconBlock(block, sig interface{}) *gomock.Call
SubmitBeaconBlock indicates an expected call of SubmitBeaconBlock.
func (*MockBeaconNodeMockRecorder) SubmitBlindedBeaconBlock ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitBlindedBeaconBlock(block, sig interface{}) *gomock.Call
SubmitBlindedBeaconBlock indicates an expected call of SubmitBlindedBeaconBlock.
func (*MockBeaconNodeMockRecorder) SubmitProposalPreparation ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitProposalPreparation(feeRecipients interface{}) *gomock.Call
SubmitProposalPreparation indicates an expected call of SubmitProposalPreparation.
func (*MockBeaconNodeMockRecorder) SubmitSignedAggregateSelectionProof ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitSignedAggregateSelectionProof(msg interface{}) *gomock.Call
SubmitSignedAggregateSelectionProof indicates an expected call of SubmitSignedAggregateSelectionProof.
func (*MockBeaconNodeMockRecorder) SubmitSignedContributionAndProof ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitSignedContributionAndProof(contribution interface{}) *gomock.Call
SubmitSignedContributionAndProof indicates an expected call of SubmitSignedContributionAndProof.
func (*MockBeaconNodeMockRecorder) SubmitSyncCommitteeSubscriptions ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitSyncCommitteeSubscriptions(subscription interface{}) *gomock.Call
SubmitSyncCommitteeSubscriptions indicates an expected call of SubmitSyncCommitteeSubscriptions.
func (*MockBeaconNodeMockRecorder) SubmitSyncMessage ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitSyncMessage(msg interface{}) *gomock.Call
SubmitSyncMessage indicates an expected call of SubmitSyncMessage.
func (*MockBeaconNodeMockRecorder) SubmitValidatorRegistration ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SubmitValidatorRegistration(pubkey, feeRecipient, sig interface{}) *gomock.Call
SubmitValidatorRegistration indicates an expected call of SubmitValidatorRegistration.
func (*MockBeaconNodeMockRecorder) SubscribeToCommitteeSubnet ¶
func (mr *MockBeaconNodeMockRecorder) SubscribeToCommitteeSubnet(subscription interface{}) *gomock.Call
SubscribeToCommitteeSubnet indicates an expected call of SubscribeToCommitteeSubnet.
func (*MockBeaconNodeMockRecorder) SyncCommitteeDuties ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) SyncCommitteeDuties(epoch, indices interface{}) *gomock.Call
SyncCommitteeDuties indicates an expected call of SyncCommitteeDuties.
func (*MockBeaconNodeMockRecorder) SyncCommitteeSubnetID ¶ added in v1.1.0
func (mr *MockBeaconNodeMockRecorder) 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 ¶
type Network struct { spectypes.BeaconNetwork LocalTestNet bool }
Network is a beacon chain network.
func NewLocalTestNetwork ¶ added in v1.1.0
func NewLocalTestNetwork(network spectypes.BeaconNetwork) Network
NewLocalTestNetwork creates a new local beacon chain network.
func NewNetwork ¶
func NewNetwork(network spectypes.BeaconNetwork) Network
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) MarshalJSON ¶ added in v1.1.0
func (Network) MinGenesisTime ¶
MinGenesisTime returns min genesis time value
func (*Network) UnmarshalJSON ¶ added in v1.1.0
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 Network BeaconNodeAddr string `yaml:"BeaconNodeAddr" env:"BEACON_NODE_ADDR" env-required:"true"` Graffiti []byte GasLimit uint64 }
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) IsAttesting ¶ added in v1.1.0
func (m *ValidatorMetadata) IsAttesting() bool
IsAttesting returns true if the validator should be attesting.
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