beacon

package
v0.5.5-jatov2-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2023 License: GPL-3.0 Imports: 19 Imported by: 1

Documentation

Overview

Package beacon is a generated GoMock package.

Package beacon is a generated GoMock package.

Index

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) GetData

func (m *DutyData) GetData() IsInputValueData

GetData returns 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

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

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

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

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

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

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
}

Network is a beacon chain network.

func NewNetwork

func NewNetwork(network spectypes.BeaconNetwork) Network

NewNetwork creates a new beacon chain network.

func (Network) EstimatedCurrentEpoch

func (n Network) EstimatedCurrentEpoch() phase0.Epoch

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

func (n Network) EstimatedCurrentSlot() phase0.Slot

EstimatedCurrentSlot returns the estimation of the current slot

func (Network) EstimatedEpochAtSlot

func (n Network) EstimatedEpochAtSlot(slot phase0.Slot) phase0.Epoch

EstimatedEpochAtSlot estimates epoch at the given slot

func (Network) EstimatedSlotAtTime

func (n Network) EstimatedSlotAtTime(time int64) phase0.Slot

EstimatedSlotAtTime estimates slot at the given time

func (Network) EstimatedSyncCommitteePeriodAtEpoch added in v0.4.7

func (n Network) EstimatedSyncCommitteePeriodAtEpoch(epoch phase0.Epoch) uint64

EstimatedSyncCommitteePeriodAtEpoch estimates the current sync committee period at the given Epoch

func (Network) FirstEpochOfSyncPeriod added in v0.4.7

func (n Network) FirstEpochOfSyncPeriod(period uint64) phase0.Epoch

FirstEpochOfSyncPeriod calculates the first epoch of the given sync period.

func (Network) GetEpochFirstSlot

func (n Network) GetEpochFirstSlot(epoch phase0.Epoch) phase0.Slot

GetEpochFirstSlot returns the beacon node first slot in epoch

func (Network) GetSlotStartTime

func (n Network) GetSlotStartTime(slot phase0.Slot) time.Time

GetSlotStartTime returns the start time for the given slot

func (Network) IsFirstSlotOfEpoch

func (n Network) IsFirstSlotOfEpoch(slot phase0.Slot) bool

IsFirstSlotOfEpoch estimates epoch at the given slot

func (Network) LastSlotOfSyncPeriod added in v0.4.7

func (n Network) LastSlotOfSyncPeriod(period uint64) phase0.Slot

LastSlotOfSyncPeriod calculates the first epoch of the given sync period.

func (Network) MarshalJSON added in v1.1.0

func (n Network) MarshalJSON() ([]byte, error)

func (Network) String added in v1.1.0

func (n Network) String() string

func (*Network) UnmarshalJSON added in v1.1.0

func (n *Network) UnmarshalJSON(b []byte) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL