diff --git a/beacon-chain/node/node.go b/beacon-chain/node/node.go index e164ab444d98..56ccedb32e3f 100644 --- a/beacon-chain/node/node.go +++ b/beacon-chain/node/node.go @@ -1019,6 +1019,7 @@ func (b *BeaconNode) registerRPCService(router *http.ServeMux) error { BlobStorage: b.BlobStorage, DataColumnStorage: b.DataColumnStorage, TrackedValidatorsCache: b.trackedValidatorsCache, + ProposerPreferencesCache: b.proposerPreferencesCache, PayloadIDCache: b.payloadIDCache, LCStore: b.lcStore, GraffitiInfo: web3Service.GraffitiInfo(), diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel b/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel index 2d709b14b908..2f3f6650ebbf 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel @@ -31,6 +31,7 @@ go_library( "proposer_bid.go", "proposer_payload_attestation.go", "proposer_payload_envelope.go", + "proposer_preferences.go", "proposer_slashings.go", "proposer_sync_aggregate.go", "server.go", @@ -220,6 +221,7 @@ go_test( "proposer_exits_test.go", "proposer_payload_attestation_test.go", "proposer_payload_envelope_test.go", + "proposer_preferences_test.go", "proposer_slashings_test.go", "proposer_sync_aggregate_test.go", "proposer_test.go", diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_preferences.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_preferences.go new file mode 100644 index 000000000000..885fbe3e77d7 --- /dev/null +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_preferences.go @@ -0,0 +1,76 @@ +package validator + +import ( + "context" + + "github.com/OffchainLabs/prysm/v7/config/params" + "github.com/OffchainLabs/prysm/v7/monitoring/tracing/trace" + ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1" + "github.com/OffchainLabs/prysm/v7/time/slots" + "github.com/ethereum/go-ethereum/common" + "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/emptypb" +) + +// SubmitSignedProposerPreferences broadcasts signed proposer preferences and +// caches them locally for subsequent bid validation. +// Local submissions intentionally bypass full gossip verification (proposer +// lookahead, signature) because the validator client is trusted. +func (vs *Server) SubmitSignedProposerPreferences( + ctx context.Context, + msg *ethpb.SignedProposerPreferences, +) (*emptypb.Empty, error) { + ctx, span := trace.StartSpan(ctx, "ValidatorServer.SubmitSignedProposerPreferences") + defer span.End() + + if msg == nil || msg.Message == nil { + return nil, status.Errorf(codes.InvalidArgument, "signed proposer preferences message is nil") + } + + if vs.SyncChecker.Syncing() { + return nil, status.Errorf(codes.Unavailable, "Syncing to latest head, not ready to respond") + } + + proposalSlot := msg.Message.ProposalSlot + if slots.ToEpoch(proposalSlot) < params.BeaconConfig().GloasForkEpoch { + return nil, status.Errorf( + codes.InvalidArgument, + "signed proposer preferences are not supported before Gloas fork (slot %d)", + proposalSlot, + ) + } + + currentEpoch := slots.ToEpoch(vs.TimeFetcher.CurrentSlot()) + if slots.ToEpoch(proposalSlot) != currentEpoch+1 { + return nil, status.Errorf( + codes.InvalidArgument, + "signed proposer preferences proposal slot must be in the next epoch: slot %d currentEpoch %d", + proposalSlot, + currentEpoch, + ) + } + + if vs.ProposerPreferencesCache.Has(proposalSlot) { + log.WithFields(logrus.Fields{ + "slot": proposalSlot, + "validatorIndex": msg.Message.ValidatorIndex, + }).Debug("Ignoring duplicate signed proposer preferences submission") + return &emptypb.Empty{}, nil + } + + if err := vs.P2P.Broadcast(ctx, msg); err != nil { + return nil, status.Errorf(codes.Internal, "Could not broadcast signed proposer preferences: %v", err) + } + + vs.ProposerPreferencesCache.Add(proposalSlot, msg.Message.FeeRecipient, msg.Message.GasLimit) + + log.WithFields(logrus.Fields{ + "slot": proposalSlot, + "validatorIndex": msg.Message.ValidatorIndex, + "feeRecipient": common.BytesToAddress(msg.Message.FeeRecipient).Hex(), + "gasLimit": msg.Message.GasLimit, + }).Debug("Submitted signed proposer preferences") + return &emptypb.Empty{}, nil +} diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_preferences_test.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_preferences_test.go new file mode 100644 index 000000000000..e477eb726155 --- /dev/null +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_preferences_test.go @@ -0,0 +1,152 @@ +package validator + +import ( + "testing" + + chainMock "github.com/OffchainLabs/prysm/v7/beacon-chain/blockchain/testing" + "github.com/OffchainLabs/prysm/v7/beacon-chain/cache" + p2pmock "github.com/OffchainLabs/prysm/v7/beacon-chain/p2p/testing" + mockSync "github.com/OffchainLabs/prysm/v7/beacon-chain/sync/initial-sync/testing" + "github.com/OffchainLabs/prysm/v7/config/params" + "github.com/OffchainLabs/prysm/v7/consensus-types/primitives" + ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1" + "github.com/OffchainLabs/prysm/v7/testing/assert" + "github.com/OffchainLabs/prysm/v7/testing/require" + "google.golang.org/protobuf/types/known/emptypb" +) + +func TestSubmitSignedProposerPreferences_OK(t *testing.T) { + params.SetupTestConfigCleanup(t) + cfg := params.BeaconConfig().Copy() + cfg.GloasForkEpoch = 1 + params.OverrideBeaconConfig(cfg) + + currentSlot := primitives.Slot(31) + proposalSlot := currentSlot + 1 + chain := &chainMock.ChainService{Slot: ¤tSlot} + p2p := &p2pmock.MockBroadcaster{} + cache := cache.NewProposerPreferencesCache() + vs := &Server{ + SyncChecker: &mockSync.Sync{IsSyncing: false}, + TimeFetcher: chain, + P2P: p2p, + ProposerPreferencesCache: cache, + } + + msg := ðpb.SignedProposerPreferences{ + Message: ðpb.ProposerPreferences{ + ProposalSlot: proposalSlot, + ValidatorIndex: 2, + FeeRecipient: make([]byte, 20), + GasLimit: 30_000_000, + }, + Signature: make([]byte, 96), + } + + resp, err := vs.SubmitSignedProposerPreferences(t.Context(), msg) + require.NoError(t, err) + require.DeepEqual(t, &emptypb.Empty{}, resp) + assert.Equal(t, true, p2p.BroadcastCalled.Load()) + pref, ok := cache.Get(proposalSlot) + require.Equal(t, true, ok) + require.DeepEqual(t, msg.Message.FeeRecipient, pref.FeeRecipient) + require.Equal(t, msg.Message.GasLimit, pref.GasLimit) +} + +func TestSubmitSignedProposerPreferences_DuplicateSlot(t *testing.T) { + params.SetupTestConfigCleanup(t) + cfg := params.BeaconConfig().Copy() + cfg.GloasForkEpoch = 1 + params.OverrideBeaconConfig(cfg) + + currentSlot := primitives.Slot(31) + proposalSlot := currentSlot + 1 + chain := &chainMock.ChainService{Slot: ¤tSlot} + p2p := &p2pmock.MockBroadcaster{} + c := cache.NewProposerPreferencesCache() + c.Add(proposalSlot, make([]byte, 20), 30_000_000) + vs := &Server{ + SyncChecker: &mockSync.Sync{IsSyncing: false}, + TimeFetcher: chain, + P2P: p2p, + ProposerPreferencesCache: c, + } + + msg := ðpb.SignedProposerPreferences{ + Message: ðpb.ProposerPreferences{ + ProposalSlot: proposalSlot, + ValidatorIndex: 2, + FeeRecipient: make([]byte, 20), + GasLimit: 30_000_000, + }, + Signature: make([]byte, 96), + } + + resp, err := vs.SubmitSignedProposerPreferences(t.Context(), msg) + require.NoError(t, err) + require.DeepEqual(t, &emptypb.Empty{}, resp) + assert.Equal(t, false, p2p.BroadcastCalled.Load()) +} + +func TestSubmitSignedProposerPreferences_InvalidEpoch(t *testing.T) { + params.SetupTestConfigCleanup(t) + cfg := params.BeaconConfig().Copy() + cfg.GloasForkEpoch = 1 + params.OverrideBeaconConfig(cfg) + + currentSlot := primitives.Slot(31) + chain := &chainMock.ChainService{Slot: ¤tSlot} + vs := &Server{ + SyncChecker: &mockSync.Sync{IsSyncing: false}, + TimeFetcher: chain, + P2P: &p2pmock.MockBroadcaster{}, + ProposerPreferencesCache: cache.NewProposerPreferencesCache(), + } + + // Same epoch (current), not next epoch. + msg := ðpb.SignedProposerPreferences{ + Message: ðpb.ProposerPreferences{ + ProposalSlot: currentSlot, + ValidatorIndex: 2, + FeeRecipient: make([]byte, 20), + GasLimit: 30_000_000, + }, + Signature: make([]byte, 96), + } + _, err := vs.SubmitSignedProposerPreferences(t.Context(), msg) + require.ErrorContains(t, "next epoch", err) + + // Two epochs ahead. + msg.Message.ProposalSlot = currentSlot + primitives.Slot(2*params.BeaconConfig().SlotsPerEpoch) + _, err = vs.SubmitSignedProposerPreferences(t.Context(), msg) + require.ErrorContains(t, "next epoch", err) +} + +func TestSubmitSignedProposerPreferences_Syncing(t *testing.T) { + params.SetupTestConfigCleanup(t) + cfg := params.BeaconConfig().Copy() + cfg.GloasForkEpoch = 1 + params.OverrideBeaconConfig(cfg) + + currentSlot := primitives.Slot(31) + chain := &chainMock.ChainService{Slot: ¤tSlot} + vs := &Server{ + SyncChecker: &mockSync.Sync{IsSyncing: true}, + TimeFetcher: chain, + P2P: &p2pmock.MockBroadcaster{}, + ProposerPreferencesCache: cache.NewProposerPreferencesCache(), + } + + msg := ðpb.SignedProposerPreferences{ + Message: ðpb.ProposerPreferences{ + ProposalSlot: currentSlot + 1, + ValidatorIndex: 2, + FeeRecipient: make([]byte, 20), + GasLimit: 30_000_000, + }, + Signature: make([]byte, 96), + } + + _, err := vs.SubmitSignedProposerPreferences(t.Context(), msg) + require.ErrorContains(t, "not ready to respond", err) +} diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/server.go b/beacon-chain/rpc/prysm/v1alpha1/validator/server.go index a5450d0ff218..6ca825119750 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/server.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/server.go @@ -49,6 +49,7 @@ type Server struct { Ctx context.Context PayloadIDCache *cache.PayloadIDCache TrackedValidatorsCache *cache.TrackedValidatorsCache + ProposerPreferencesCache *cache.ProposerPreferencesCache executionPayloadEnvelopeMu sync.RWMutex executionPayloadEnvelope *ethpb.ExecutionPayloadEnvelope HeadFetcher blockchain.HeadFetcher diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index ae7e12dbb85b..6e887cccb27f 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -127,6 +127,7 @@ type Config struct { BlobStorage *filesystem.BlobStorage DataColumnStorage *filesystem.DataColumnStorage TrackedValidatorsCache *cache.TrackedValidatorsCache + ProposerPreferencesCache *cache.ProposerPreferencesCache PayloadIDCache *cache.PayloadIDCache LCStore *lightClient.Store GraffitiInfo *execution.GraffitiInfo @@ -263,6 +264,7 @@ func NewService(ctx context.Context, cfg *Config) *Service { ClockWaiter: s.cfg.ClockWaiter, CoreService: coreService, TrackedValidatorsCache: s.cfg.TrackedValidatorsCache, + ProposerPreferencesCache: s.cfg.ProposerPreferencesCache, PayloadIDCache: s.cfg.PayloadIDCache, AttestationStateFetcher: s.cfg.AttestationReceiver, GraffitiInfo: s.cfg.GraffitiInfo, diff --git a/changelog/t_gloas-proposer-preferences-rpc.md b/changelog/t_gloas-proposer-preferences-rpc.md new file mode 100644 index 000000000000..a23eff7bc106 --- /dev/null +++ b/changelog/t_gloas-proposer-preferences-rpc.md @@ -0,0 +1,3 @@ +### Added + +- Add gRPC endpoint `SubmitSignedProposerPreferences` for validators to broadcast proposer preferences diff --git a/proto/prysm/v1alpha1/validator.pb.go b/proto/prysm/v1alpha1/validator.pb.go index e284b1de8434..a1e3be73e610 100755 --- a/proto/prysm/v1alpha1/validator.pb.go +++ b/proto/prysm/v1alpha1/validator.pb.go @@ -4838,7 +4838,7 @@ var file_proto_prysm_v1alpha1_validator_proto_rawDesc = []byte{ 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x4c, 0x59, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, - 0x44, 0x10, 0x08, 0x32, 0xe2, 0x35, 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, + 0x44, 0x10, 0x08, 0x32, 0x8c, 0x37, 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x83, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, @@ -5268,17 +5268,27 @@ var file_proto_prysm_v1alpha1_validator_proto_rawDesc = []byte{ 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x02, 0x01, 0x42, 0x92, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x61, 0x62, - 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, - 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, - 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x02, 0x01, 0x12, 0xa7, 0x01, 0x0a, 0x1f, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x01, + 0x2a, 0x22, 0x2c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x88, + 0x02, 0x01, 0x42, 0x92, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, + 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5386,10 +5396,11 @@ var file_proto_prysm_v1alpha1_validator_proto_goTypes = []any{ (*SignedValidatorRegistrationsV1)(nil), // 87: ethereum.eth.v1alpha1.SignedValidatorRegistrationsV1 (*SignedExecutionPayloadEnvelope)(nil), // 88: ethereum.eth.v1alpha1.SignedExecutionPayloadEnvelope (*PayloadAttestationMessage)(nil), // 89: ethereum.eth.v1alpha1.PayloadAttestationMessage - (*GenericBeaconBlock)(nil), // 90: ethereum.eth.v1alpha1.GenericBeaconBlock - (*AttestationData)(nil), // 91: ethereum.eth.v1alpha1.AttestationData - (*SyncCommitteeContribution)(nil), // 92: ethereum.eth.v1alpha1.SyncCommitteeContribution - (*PayloadAttestationData)(nil), // 93: ethereum.eth.v1alpha1.PayloadAttestationData + (*SignedProposerPreferences)(nil), // 90: ethereum.eth.v1alpha1.SignedProposerPreferences + (*GenericBeaconBlock)(nil), // 91: ethereum.eth.v1alpha1.GenericBeaconBlock + (*AttestationData)(nil), // 92: ethereum.eth.v1alpha1.AttestationData + (*SyncCommitteeContribution)(nil), // 93: ethereum.eth.v1alpha1.SyncCommitteeContribution + (*PayloadAttestationData)(nil), // 94: ethereum.eth.v1alpha1.PayloadAttestationData } var file_proto_prysm_v1alpha1_validator_proto_depIdxs = []int32{ 67, // 0: ethereum.eth.v1alpha1.StreamBlocksResponse.phase0_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlock @@ -5464,48 +5475,50 @@ var file_proto_prysm_v1alpha1_validator_proto_depIdxs = []int32{ 88, // 69: ethereum.eth.v1alpha1.BeaconNodeValidator.PublishExecutionPayloadEnvelope:input_type -> ethereum.eth.v1alpha1.SignedExecutionPayloadEnvelope 60, // 70: ethereum.eth.v1alpha1.BeaconNodeValidator.PayloadAttestationData:input_type -> ethereum.eth.v1alpha1.PayloadAttestationDataRequest 89, // 71: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitPayloadAttestation:input_type -> ethereum.eth.v1alpha1.PayloadAttestationMessage - 20, // 72: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDuties:output_type -> ethereum.eth.v1alpha1.DutiesResponse - 21, // 73: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDutiesV2:output_type -> ethereum.eth.v1alpha1.DutiesV2Response - 47, // 74: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttesterDuties:output_type -> ethereum.eth.v1alpha1.AttesterDutiesResponse - 50, // 75: ethereum.eth.v1alpha1.BeaconNodeValidator.GetProposerDutiesV2:output_type -> ethereum.eth.v1alpha1.ProposerDutiesResponse - 53, // 76: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeDuties:output_type -> ethereum.eth.v1alpha1.SyncCommitteeDutiesResponse - 56, // 77: ethereum.eth.v1alpha1.BeaconNodeValidator.GetPTCDuties:output_type -> ethereum.eth.v1alpha1.PTCDutiesResponse - 8, // 78: ethereum.eth.v1alpha1.BeaconNodeValidator.DomainData:output_type -> ethereum.eth.v1alpha1.DomainResponse - 11, // 79: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForChainStart:output_type -> ethereum.eth.v1alpha1.ChainStartResponse - 10, // 80: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForActivation:output_type -> ethereum.eth.v1alpha1.ValidatorActivationResponse - 14, // 81: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorIndex:output_type -> ethereum.eth.v1alpha1.ValidatorIndexResponse - 16, // 82: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorStatus:output_type -> ethereum.eth.v1alpha1.ValidatorStatusResponse - 18, // 83: ethereum.eth.v1alpha1.BeaconNodeValidator.MultipleValidatorStatus:output_type -> ethereum.eth.v1alpha1.MultipleValidatorStatusResponse - 90, // 84: ethereum.eth.v1alpha1.BeaconNodeValidator.GetBeaconBlock:output_type -> ethereum.eth.v1alpha1.GenericBeaconBlock - 23, // 85: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeBeaconBlock:output_type -> ethereum.eth.v1alpha1.ProposeResponse - 81, // 86: ethereum.eth.v1alpha1.BeaconNodeValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty - 42, // 87: ethereum.eth.v1alpha1.BeaconNodeValidator.GetFeeRecipientByPubKey:output_type -> ethereum.eth.v1alpha1.FeeRecipientByPubKeyResponse - 91, // 88: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttestationData:output_type -> ethereum.eth.v1alpha1.AttestationData - 26, // 89: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestation:output_type -> ethereum.eth.v1alpha1.AttestResponse - 26, // 90: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestationElectra:output_type -> ethereum.eth.v1alpha1.AttestResponse - 28, // 91: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.AggregateSelectionResponse - 29, // 92: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.AggregateSelectionElectraResponse - 32, // 93: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse - 32, // 94: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse - 24, // 95: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeExit:output_type -> ethereum.eth.v1alpha1.ProposeExitResponse - 81, // 96: ethereum.eth.v1alpha1.BeaconNodeValidator.SubscribeCommitteeSubnets:output_type -> google.protobuf.Empty - 37, // 97: ethereum.eth.v1alpha1.BeaconNodeValidator.CheckDoppelGanger:output_type -> ethereum.eth.v1alpha1.DoppelGangerResponse - 1, // 98: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncMessageBlockRoot:output_type -> ethereum.eth.v1alpha1.SyncMessageBlockRootResponse - 81, // 99: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSyncMessage:output_type -> google.protobuf.Empty - 4, // 100: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncSubcommitteeIndex:output_type -> ethereum.eth.v1alpha1.SyncSubcommitteeIndexResponse - 92, // 101: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeContribution:output_type -> ethereum.eth.v1alpha1.SyncCommitteeContribution - 81, // 102: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedContributionAndProof:output_type -> google.protobuf.Empty - 5, // 103: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamSlots:output_type -> ethereum.eth.v1alpha1.StreamSlotsResponse - 6, // 104: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamBlocksAltair:output_type -> ethereum.eth.v1alpha1.StreamBlocksResponse - 81, // 105: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitValidatorRegistrations:output_type -> google.protobuf.Empty - 81, // 106: ethereum.eth.v1alpha1.BeaconNodeValidator.AssignValidatorToSubnet:output_type -> google.protobuf.Empty - 45, // 107: ethereum.eth.v1alpha1.BeaconNodeValidator.AggregatedSigAndAggregationBits:output_type -> ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsResponse - 59, // 108: ethereum.eth.v1alpha1.BeaconNodeValidator.GetExecutionPayloadEnvelope:output_type -> ethereum.eth.v1alpha1.ExecutionPayloadEnvelopeResponse - 81, // 109: ethereum.eth.v1alpha1.BeaconNodeValidator.PublishExecutionPayloadEnvelope:output_type -> google.protobuf.Empty - 93, // 110: ethereum.eth.v1alpha1.BeaconNodeValidator.PayloadAttestationData:output_type -> ethereum.eth.v1alpha1.PayloadAttestationData - 81, // 111: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitPayloadAttestation:output_type -> google.protobuf.Empty - 72, // [72:112] is the sub-list for method output_type - 32, // [32:72] is the sub-list for method input_type + 90, // 72: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedProposerPreferences:input_type -> ethereum.eth.v1alpha1.SignedProposerPreferences + 20, // 73: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDuties:output_type -> ethereum.eth.v1alpha1.DutiesResponse + 21, // 74: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDutiesV2:output_type -> ethereum.eth.v1alpha1.DutiesV2Response + 47, // 75: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttesterDuties:output_type -> ethereum.eth.v1alpha1.AttesterDutiesResponse + 50, // 76: ethereum.eth.v1alpha1.BeaconNodeValidator.GetProposerDutiesV2:output_type -> ethereum.eth.v1alpha1.ProposerDutiesResponse + 53, // 77: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeDuties:output_type -> ethereum.eth.v1alpha1.SyncCommitteeDutiesResponse + 56, // 78: ethereum.eth.v1alpha1.BeaconNodeValidator.GetPTCDuties:output_type -> ethereum.eth.v1alpha1.PTCDutiesResponse + 8, // 79: ethereum.eth.v1alpha1.BeaconNodeValidator.DomainData:output_type -> ethereum.eth.v1alpha1.DomainResponse + 11, // 80: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForChainStart:output_type -> ethereum.eth.v1alpha1.ChainStartResponse + 10, // 81: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForActivation:output_type -> ethereum.eth.v1alpha1.ValidatorActivationResponse + 14, // 82: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorIndex:output_type -> ethereum.eth.v1alpha1.ValidatorIndexResponse + 16, // 83: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorStatus:output_type -> ethereum.eth.v1alpha1.ValidatorStatusResponse + 18, // 84: ethereum.eth.v1alpha1.BeaconNodeValidator.MultipleValidatorStatus:output_type -> ethereum.eth.v1alpha1.MultipleValidatorStatusResponse + 91, // 85: ethereum.eth.v1alpha1.BeaconNodeValidator.GetBeaconBlock:output_type -> ethereum.eth.v1alpha1.GenericBeaconBlock + 23, // 86: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeBeaconBlock:output_type -> ethereum.eth.v1alpha1.ProposeResponse + 81, // 87: ethereum.eth.v1alpha1.BeaconNodeValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty + 42, // 88: ethereum.eth.v1alpha1.BeaconNodeValidator.GetFeeRecipientByPubKey:output_type -> ethereum.eth.v1alpha1.FeeRecipientByPubKeyResponse + 92, // 89: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttestationData:output_type -> ethereum.eth.v1alpha1.AttestationData + 26, // 90: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestation:output_type -> ethereum.eth.v1alpha1.AttestResponse + 26, // 91: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestationElectra:output_type -> ethereum.eth.v1alpha1.AttestResponse + 28, // 92: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.AggregateSelectionResponse + 29, // 93: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.AggregateSelectionElectraResponse + 32, // 94: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse + 32, // 95: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse + 24, // 96: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeExit:output_type -> ethereum.eth.v1alpha1.ProposeExitResponse + 81, // 97: ethereum.eth.v1alpha1.BeaconNodeValidator.SubscribeCommitteeSubnets:output_type -> google.protobuf.Empty + 37, // 98: ethereum.eth.v1alpha1.BeaconNodeValidator.CheckDoppelGanger:output_type -> ethereum.eth.v1alpha1.DoppelGangerResponse + 1, // 99: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncMessageBlockRoot:output_type -> ethereum.eth.v1alpha1.SyncMessageBlockRootResponse + 81, // 100: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSyncMessage:output_type -> google.protobuf.Empty + 4, // 101: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncSubcommitteeIndex:output_type -> ethereum.eth.v1alpha1.SyncSubcommitteeIndexResponse + 93, // 102: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeContribution:output_type -> ethereum.eth.v1alpha1.SyncCommitteeContribution + 81, // 103: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedContributionAndProof:output_type -> google.protobuf.Empty + 5, // 104: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamSlots:output_type -> ethereum.eth.v1alpha1.StreamSlotsResponse + 6, // 105: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamBlocksAltair:output_type -> ethereum.eth.v1alpha1.StreamBlocksResponse + 81, // 106: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitValidatorRegistrations:output_type -> google.protobuf.Empty + 81, // 107: ethereum.eth.v1alpha1.BeaconNodeValidator.AssignValidatorToSubnet:output_type -> google.protobuf.Empty + 45, // 108: ethereum.eth.v1alpha1.BeaconNodeValidator.AggregatedSigAndAggregationBits:output_type -> ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsResponse + 59, // 109: ethereum.eth.v1alpha1.BeaconNodeValidator.GetExecutionPayloadEnvelope:output_type -> ethereum.eth.v1alpha1.ExecutionPayloadEnvelopeResponse + 81, // 110: ethereum.eth.v1alpha1.BeaconNodeValidator.PublishExecutionPayloadEnvelope:output_type -> google.protobuf.Empty + 94, // 111: ethereum.eth.v1alpha1.BeaconNodeValidator.PayloadAttestationData:output_type -> ethereum.eth.v1alpha1.PayloadAttestationData + 81, // 112: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitPayloadAttestation:output_type -> google.protobuf.Empty + 81, // 113: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedProposerPreferences:output_type -> google.protobuf.Empty + 73, // [73:114] is the sub-list for method output_type + 32, // [32:73] is the sub-list for method input_type 32, // [32:32] is the sub-list for extension type_name 32, // [32:32] is the sub-list for extension extendee 0, // [0:32] is the sub-list for field type_name @@ -5643,6 +5656,8 @@ type BeaconNodeValidatorClient interface { PayloadAttestationData(ctx context.Context, in *PayloadAttestationDataRequest, opts ...grpc.CallOption) (*PayloadAttestationData, error) // Deprecated: Do not use. SubmitPayloadAttestation(ctx context.Context, in *PayloadAttestationMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deprecated: Do not use. + SubmitSignedProposerPreferences(ctx context.Context, in *SignedProposerPreferences, opts ...grpc.CallOption) (*emptypb.Empty, error) } type beaconNodeValidatorClient struct { @@ -6145,6 +6160,16 @@ func (c *beaconNodeValidatorClient) SubmitPayloadAttestation(ctx context.Context return out, nil } +// Deprecated: Do not use. +func (c *beaconNodeValidatorClient) SubmitSignedProposerPreferences(ctx context.Context, in *SignedProposerPreferences, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedProposerPreferences", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // BeaconNodeValidatorServer is the server API for BeaconNodeValidator service. type BeaconNodeValidatorServer interface { // Deprecated: Do not use. @@ -6227,6 +6252,8 @@ type BeaconNodeValidatorServer interface { PayloadAttestationData(context.Context, *PayloadAttestationDataRequest) (*PayloadAttestationData, error) // Deprecated: Do not use. SubmitPayloadAttestation(context.Context, *PayloadAttestationMessage) (*emptypb.Empty, error) + // Deprecated: Do not use. + SubmitSignedProposerPreferences(context.Context, *SignedProposerPreferences) (*emptypb.Empty, error) } // UnimplementedBeaconNodeValidatorServer can be embedded to have forward compatible implementations. @@ -6353,6 +6380,9 @@ func (*UnimplementedBeaconNodeValidatorServer) PayloadAttestationData(context.Co func (*UnimplementedBeaconNodeValidatorServer) SubmitPayloadAttestation(context.Context, *PayloadAttestationMessage) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitPayloadAttestation not implemented") } +func (*UnimplementedBeaconNodeValidatorServer) SubmitSignedProposerPreferences(context.Context, *SignedProposerPreferences) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitSignedProposerPreferences not implemented") +} func RegisterBeaconNodeValidatorServer(s *grpc.Server, srv BeaconNodeValidatorServer) { s.RegisterService(&_BeaconNodeValidator_serviceDesc, srv) @@ -7090,6 +7120,24 @@ func _BeaconNodeValidator_SubmitPayloadAttestation_Handler(srv interface{}, ctx return interceptor(ctx, in, info, handler) } +func _BeaconNodeValidator_SubmitSignedProposerPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignedProposerPreferences) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconNodeValidatorServer).SubmitSignedProposerPreferences(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedProposerPreferences", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconNodeValidatorServer).SubmitSignedProposerPreferences(ctx, req.(*SignedProposerPreferences)) + } + return interceptor(ctx, in, info, handler) +} + var _BeaconNodeValidator_serviceDesc = grpc.ServiceDesc{ ServiceName: "ethereum.eth.v1alpha1.BeaconNodeValidator", HandlerType: (*BeaconNodeValidatorServer)(nil), @@ -7238,6 +7286,10 @@ var _BeaconNodeValidator_serviceDesc = grpc.ServiceDesc{ MethodName: "SubmitPayloadAttestation", Handler: _BeaconNodeValidator_SubmitPayloadAttestation_Handler, }, + { + MethodName: "SubmitSignedProposerPreferences", + Handler: _BeaconNodeValidator_SubmitSignedProposerPreferences_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/proto/prysm/v1alpha1/validator.proto b/proto/prysm/v1alpha1/validator.proto index 4fa96469fd82..2b04d63f1bfb 100644 --- a/proto/prysm/v1alpha1/validator.proto +++ b/proto/prysm/v1alpha1/validator.proto @@ -527,6 +527,17 @@ service BeaconNodeValidator { body : "*" }; } + + // SubmitSignedProposerPreferences broadcasts signed proposer preferences for + // a future proposal slot. + rpc SubmitSignedProposerPreferences(SignedProposerPreferences) + returns (google.protobuf.Empty) { + option deprecated = true; + option (google.api.http) = { + post : "/eth/v1alpha1/validator/proposer_preferences" + body : "*" + }; + } } // SyncMessageBlockRootResponse for beacon chain validator to retrieve and diff --git a/testing/mock/beacon_validator_client_mock.go b/testing/mock/beacon_validator_client_mock.go index 24b0b04017ec..012f503bdbc7 100644 --- a/testing/mock/beacon_validator_client_mock.go +++ b/testing/mock/beacon_validator_client_mock.go @@ -144,6 +144,26 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) GetAttestationData(ctx, in return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttestationData", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetAttestationData), varargs...) } +// GetAttesterDuties mocks base method. +func (m *MockBeaconNodeValidatorClient) GetAttesterDuties(ctx context.Context, in *eth.AttesterDutiesRequest, opts ...grpc.CallOption) (*eth.AttesterDutiesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetAttesterDuties", varargs...) + ret0, _ := ret[0].(*eth.AttesterDutiesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAttesterDuties indicates an expected call of GetAttesterDuties. +func (mr *MockBeaconNodeValidatorClientMockRecorder) GetAttesterDuties(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttesterDuties", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetAttesterDuties), varargs...) +} + // GetBeaconBlock mocks base method. func (m *MockBeaconNodeValidatorClient) GetBeaconBlock(ctx context.Context, in *eth.BlockRequest, opts ...grpc.CallOption) (*eth.GenericBeaconBlock, error) { m.ctrl.T.Helper() @@ -204,19 +224,6 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) GetDutiesV2(ctx, in any, op return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDutiesV2", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetDutiesV2), varargs...) } -// GetAttesterDuties mocks base method. -func (m *MockBeaconNodeValidatorClient) GetAttesterDuties(arg0 context.Context, arg1 *eth.AttesterDutiesRequest, arg2 ...grpc.CallOption) (*eth.AttesterDutiesResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetAttesterDuties", varargs...) - ret0, _ := ret[0].(*eth.AttesterDutiesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - // GetExecutionPayloadEnvelope mocks base method. func (m *MockBeaconNodeValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, in *eth.ExecutionPayloadEnvelopeRequest, opts ...grpc.CallOption) (*eth.ExecutionPayloadEnvelopeResponse, error) { m.ctrl.T.Helper() @@ -230,58 +237,38 @@ func (m *MockBeaconNodeValidatorClient) GetExecutionPayloadEnvelope(ctx context. return ret0, ret1 } -// GetAttesterDuties indicates an expected call of GetAttesterDuties. -func (mr *MockBeaconNodeValidatorClientMockRecorder) GetAttesterDuties(arg0, arg1 any, arg2 ...any) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttesterDuties", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetAttesterDuties), varargs...) -} - -// GetProposerDutiesV2 mocks base method. -func (m *MockBeaconNodeValidatorClient) GetProposerDutiesV2(arg0 context.Context, arg1 *eth.ProposerDutiesRequest, arg2 ...grpc.CallOption) (*eth.ProposerDutiesResponse, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetProposerDutiesV2", varargs...) - ret0, _ := ret[0].(*eth.ProposerDutiesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetProposerDutiesV2 indicates an expected call of GetProposerDutiesV2. -func (mr *MockBeaconNodeValidatorClientMockRecorder) GetProposerDutiesV2(arg0, arg1 any, arg2 ...any) *gomock.Call { +// GetExecutionPayloadEnvelope indicates an expected call of GetExecutionPayloadEnvelope. +func (mr *MockBeaconNodeValidatorClientMockRecorder) GetExecutionPayloadEnvelope(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposerDutiesV2", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetProposerDutiesV2), varargs...) + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetExecutionPayloadEnvelope), varargs...) } -// GetSyncCommitteeDuties mocks base method. -func (m *MockBeaconNodeValidatorClient) GetSyncCommitteeDuties(arg0 context.Context, arg1 *eth.SyncCommitteeDutiesRequest, arg2 ...grpc.CallOption) (*eth.SyncCommitteeDutiesResponse, error) { +// GetFeeRecipientByPubKey mocks base method. +func (m *MockBeaconNodeValidatorClient) GetFeeRecipientByPubKey(ctx context.Context, in *eth.FeeRecipientByPubKeyRequest, opts ...grpc.CallOption) (*eth.FeeRecipientByPubKeyResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "GetSyncCommitteeDuties", varargs...) - ret0, _ := ret[0].(*eth.SyncCommitteeDutiesResponse) + ret := m.ctrl.Call(m, "GetFeeRecipientByPubKey", varargs...) + ret0, _ := ret[0].(*eth.FeeRecipientByPubKeyResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetSyncCommitteeDuties indicates an expected call of GetSyncCommitteeDuties. -func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncCommitteeDuties(arg0, arg1 any, arg2 ...any) *gomock.Call { +// GetFeeRecipientByPubKey indicates an expected call of GetFeeRecipientByPubKey. +func (mr *MockBeaconNodeValidatorClientMockRecorder) GetFeeRecipientByPubKey(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeDuties", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncCommitteeDuties), varargs...) + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeeRecipientByPubKey", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetFeeRecipientByPubKey), varargs...) } // GetPTCDuties mocks base method. -func (m *MockBeaconNodeValidatorClient) GetPTCDuties(arg0 context.Context, arg1 *eth.PTCDutiesRequest, arg2 ...grpc.CallOption) (*eth.PTCDutiesResponse, error) { +func (m *MockBeaconNodeValidatorClient) GetPTCDuties(ctx context.Context, in *eth.PTCDutiesRequest, opts ...grpc.CallOption) (*eth.PTCDutiesResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetPTCDuties", varargs...) @@ -291,37 +278,30 @@ func (m *MockBeaconNodeValidatorClient) GetPTCDuties(arg0 context.Context, arg1 } // GetPTCDuties indicates an expected call of GetPTCDuties. -func (mr *MockBeaconNodeValidatorClientMockRecorder) GetPTCDuties(arg0, arg1 any, arg2 ...any) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPTCDuties", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetPTCDuties), varargs...) -} - -// GetExecutionPayloadEnvelope indicates an expected call of GetExecutionPayloadEnvelope. -func (mr *MockBeaconNodeValidatorClientMockRecorder) GetExecutionPayloadEnvelope(ctx, in any, opts ...any) *gomock.Call { +func (mr *MockBeaconNodeValidatorClientMockRecorder) GetPTCDuties(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetExecutionPayloadEnvelope), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPTCDuties", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetPTCDuties), varargs...) } -// GetFeeRecipientByPubKey mocks base method. -func (m *MockBeaconNodeValidatorClient) GetFeeRecipientByPubKey(ctx context.Context, in *eth.FeeRecipientByPubKeyRequest, opts ...grpc.CallOption) (*eth.FeeRecipientByPubKeyResponse, error) { +// GetProposerDutiesV2 mocks base method. +func (m *MockBeaconNodeValidatorClient) GetProposerDutiesV2(ctx context.Context, in *eth.ProposerDutiesRequest, opts ...grpc.CallOption) (*eth.ProposerDutiesResponse, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "GetFeeRecipientByPubKey", varargs...) - ret0, _ := ret[0].(*eth.FeeRecipientByPubKeyResponse) + ret := m.ctrl.Call(m, "GetProposerDutiesV2", varargs...) + ret0, _ := ret[0].(*eth.ProposerDutiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetFeeRecipientByPubKey indicates an expected call of GetFeeRecipientByPubKey. -func (mr *MockBeaconNodeValidatorClientMockRecorder) GetFeeRecipientByPubKey(ctx, in any, opts ...any) *gomock.Call { +// GetProposerDutiesV2 indicates an expected call of GetProposerDutiesV2. +func (mr *MockBeaconNodeValidatorClientMockRecorder) GetProposerDutiesV2(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeeRecipientByPubKey", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetFeeRecipientByPubKey), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposerDutiesV2", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetProposerDutiesV2), varargs...) } // GetSyncCommitteeContribution mocks base method. @@ -344,6 +324,26 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncCommitteeContributio return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeContribution", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncCommitteeContribution), varargs...) } +// GetSyncCommitteeDuties mocks base method. +func (m *MockBeaconNodeValidatorClient) GetSyncCommitteeDuties(ctx context.Context, in *eth.SyncCommitteeDutiesRequest, opts ...grpc.CallOption) (*eth.SyncCommitteeDutiesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetSyncCommitteeDuties", varargs...) + ret0, _ := ret[0].(*eth.SyncCommitteeDutiesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSyncCommitteeDuties indicates an expected call of GetSyncCommitteeDuties. +func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncCommitteeDuties(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeDuties", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncCommitteeDuties), varargs...) +} + // GetSyncMessageBlockRoot mocks base method. func (m *MockBeaconNodeValidatorClient) GetSyncMessageBlockRoot(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*eth.SyncMessageBlockRootResponse, error) { m.ctrl.T.Helper() @@ -704,6 +704,26 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedContributionAnd return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedContributionAndProof), varargs...) } +// SubmitSignedProposerPreferences mocks base method. +func (m *MockBeaconNodeValidatorClient) SubmitSignedProposerPreferences(ctx context.Context, in *eth.SignedProposerPreferences, opts ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SubmitSignedProposerPreferences", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedProposerPreferences indicates an expected call of SubmitSignedProposerPreferences. +func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedProposerPreferences(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedProposerPreferences", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedProposerPreferences), varargs...) +} + // SubmitSyncMessage mocks base method. func (m *MockBeaconNodeValidatorClient) SubmitSyncMessage(ctx context.Context, in *eth.SyncCommitteeMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() diff --git a/testing/mock/beacon_validator_server_mock.go b/testing/mock/beacon_validator_server_mock.go index 2e2d05280af7..c914ef473e8f 100644 --- a/testing/mock/beacon_validator_server_mock.go +++ b/testing/mock/beacon_validator_server_mock.go @@ -118,6 +118,21 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) GetAttestationData(arg0, ar return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttestationData", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetAttestationData), arg0, arg1) } +// GetAttesterDuties mocks base method. +func (m *MockBeaconNodeValidatorServer) GetAttesterDuties(arg0 context.Context, arg1 *eth.AttesterDutiesRequest) (*eth.AttesterDutiesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAttesterDuties", arg0, arg1) + ret0, _ := ret[0].(*eth.AttesterDutiesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAttesterDuties indicates an expected call of GetAttesterDuties. +func (mr *MockBeaconNodeValidatorServerMockRecorder) GetAttesterDuties(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttesterDuties", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetAttesterDuties), arg0, arg1) +} + // GetBeaconBlock mocks base method. func (m *MockBeaconNodeValidatorServer) GetBeaconBlock(arg0 context.Context, arg1 *eth.BlockRequest) (*eth.GenericBeaconBlock, error) { m.ctrl.T.Helper() @@ -163,15 +178,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) GetDutiesV2(arg0, arg1 any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDutiesV2", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetDutiesV2), arg0, arg1) } -// GetAttesterDuties mocks base method. -func (m *MockBeaconNodeValidatorServer) GetAttesterDuties(arg0 context.Context, arg1 *eth.AttesterDutiesRequest) (*eth.AttesterDutiesResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAttesterDuties", arg0, arg1) - ret0, _ := ret[0].(*eth.AttesterDutiesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - // GetExecutionPayloadEnvelope mocks base method. func (m *MockBeaconNodeValidatorServer) GetExecutionPayloadEnvelope(arg0 context.Context, arg1 *eth.ExecutionPayloadEnvelopeRequest) (*eth.ExecutionPayloadEnvelopeResponse, error) { m.ctrl.T.Helper() @@ -181,40 +187,25 @@ func (m *MockBeaconNodeValidatorServer) GetExecutionPayloadEnvelope(arg0 context return ret0, ret1 } -// GetAttesterDuties indicates an expected call of GetAttesterDuties. -func (mr *MockBeaconNodeValidatorServerMockRecorder) GetAttesterDuties(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttesterDuties", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetAttesterDuties), arg0, arg1) -} - -// GetProposerDutiesV2 mocks base method. -func (m *MockBeaconNodeValidatorServer) GetProposerDutiesV2(arg0 context.Context, arg1 *eth.ProposerDutiesRequest) (*eth.ProposerDutiesResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetProposerDutiesV2", arg0, arg1) - ret0, _ := ret[0].(*eth.ProposerDutiesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetProposerDutiesV2 indicates an expected call of GetProposerDutiesV2. -func (mr *MockBeaconNodeValidatorServerMockRecorder) GetProposerDutiesV2(arg0, arg1 any) *gomock.Call { +// GetExecutionPayloadEnvelope indicates an expected call of GetExecutionPayloadEnvelope. +func (mr *MockBeaconNodeValidatorServerMockRecorder) GetExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposerDutiesV2", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetProposerDutiesV2), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetExecutionPayloadEnvelope), arg0, arg1) } -// GetSyncCommitteeDuties mocks base method. -func (m *MockBeaconNodeValidatorServer) GetSyncCommitteeDuties(arg0 context.Context, arg1 *eth.SyncCommitteeDutiesRequest) (*eth.SyncCommitteeDutiesResponse, error) { +// GetFeeRecipientByPubKey mocks base method. +func (m *MockBeaconNodeValidatorServer) GetFeeRecipientByPubKey(arg0 context.Context, arg1 *eth.FeeRecipientByPubKeyRequest) (*eth.FeeRecipientByPubKeyResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSyncCommitteeDuties", arg0, arg1) - ret0, _ := ret[0].(*eth.SyncCommitteeDutiesResponse) + ret := m.ctrl.Call(m, "GetFeeRecipientByPubKey", arg0, arg1) + ret0, _ := ret[0].(*eth.FeeRecipientByPubKeyResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetSyncCommitteeDuties indicates an expected call of GetSyncCommitteeDuties. -func (mr *MockBeaconNodeValidatorServerMockRecorder) GetSyncCommitteeDuties(arg0, arg1 any) *gomock.Call { +// GetFeeRecipientByPubKey indicates an expected call of GetFeeRecipientByPubKey. +func (mr *MockBeaconNodeValidatorServerMockRecorder) GetFeeRecipientByPubKey(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeDuties", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetSyncCommitteeDuties), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeeRecipientByPubKey", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetFeeRecipientByPubKey), arg0, arg1) } // GetPTCDuties mocks base method. @@ -232,25 +223,19 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) GetPTCDuties(arg0, arg1 any return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPTCDuties", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetPTCDuties), arg0, arg1) } -// GetExecutionPayloadEnvelope indicates an expected call of GetExecutionPayloadEnvelope. -func (mr *MockBeaconNodeValidatorServerMockRecorder) GetExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetExecutionPayloadEnvelope), arg0, arg1) -} - -// GetFeeRecipientByPubKey mocks base method. -func (m *MockBeaconNodeValidatorServer) GetFeeRecipientByPubKey(arg0 context.Context, arg1 *eth.FeeRecipientByPubKeyRequest) (*eth.FeeRecipientByPubKeyResponse, error) { +// GetProposerDutiesV2 mocks base method. +func (m *MockBeaconNodeValidatorServer) GetProposerDutiesV2(arg0 context.Context, arg1 *eth.ProposerDutiesRequest) (*eth.ProposerDutiesResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetFeeRecipientByPubKey", arg0, arg1) - ret0, _ := ret[0].(*eth.FeeRecipientByPubKeyResponse) + ret := m.ctrl.Call(m, "GetProposerDutiesV2", arg0, arg1) + ret0, _ := ret[0].(*eth.ProposerDutiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetFeeRecipientByPubKey indicates an expected call of GetFeeRecipientByPubKey. -func (mr *MockBeaconNodeValidatorServerMockRecorder) GetFeeRecipientByPubKey(arg0, arg1 any) *gomock.Call { +// GetProposerDutiesV2 indicates an expected call of GetProposerDutiesV2. +func (mr *MockBeaconNodeValidatorServerMockRecorder) GetProposerDutiesV2(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeeRecipientByPubKey", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetFeeRecipientByPubKey), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposerDutiesV2", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetProposerDutiesV2), arg0, arg1) } // GetSyncCommitteeContribution mocks base method. @@ -268,6 +253,21 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) GetSyncCommitteeContributio return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeContribution", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetSyncCommitteeContribution), arg0, arg1) } +// GetSyncCommitteeDuties mocks base method. +func (m *MockBeaconNodeValidatorServer) GetSyncCommitteeDuties(arg0 context.Context, arg1 *eth.SyncCommitteeDutiesRequest) (*eth.SyncCommitteeDutiesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSyncCommitteeDuties", arg0, arg1) + ret0, _ := ret[0].(*eth.SyncCommitteeDutiesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSyncCommitteeDuties indicates an expected call of GetSyncCommitteeDuties. +func (mr *MockBeaconNodeValidatorServerMockRecorder) GetSyncCommitteeDuties(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeDuties", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetSyncCommitteeDuties), arg0, arg1) +} + // GetSyncMessageBlockRoot mocks base method. func (m *MockBeaconNodeValidatorServer) GetSyncMessageBlockRoot(arg0 context.Context, arg1 *emptypb.Empty) (*eth.SyncMessageBlockRootResponse, error) { m.ctrl.T.Helper() @@ -536,6 +536,21 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedContributionAnd return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedContributionAndProof), arg0, arg1) } +// SubmitSignedProposerPreferences mocks base method. +func (m *MockBeaconNodeValidatorServer) SubmitSignedProposerPreferences(arg0 context.Context, arg1 *eth.SignedProposerPreferences) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitSignedProposerPreferences", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedProposerPreferences indicates an expected call of SubmitSignedProposerPreferences. +func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedProposerPreferences(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedProposerPreferences", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedProposerPreferences), arg0, arg1) +} + // SubmitSyncMessage mocks base method. func (m *MockBeaconNodeValidatorServer) SubmitSyncMessage(arg0 context.Context, arg1 *eth.SyncCommitteeMessage) (*emptypb.Empty, error) { m.ctrl.T.Helper() diff --git a/testing/validator-mock/BUILD.bazel b/testing/validator-mock/BUILD.bazel index 818a4d0e3d9c..f6a0920b7951 100644 --- a/testing/validator-mock/BUILD.bazel +++ b/testing/validator-mock/BUILD.bazel @@ -22,7 +22,6 @@ go_library( "//validator/client/iface:go_default_library", "//validator/keymanager:go_default_library", "@com_github_golang_protobuf//ptypes/empty", - "@org_golang_google_protobuf//types/known/emptypb:go_default_library", "@org_uber_go_mock//gomock:go_default_library", ], ) diff --git a/testing/validator-mock/validator_client_mock.go b/testing/validator-mock/validator_client_mock.go index 679ca8cbebf4..5eafcec09941 100644 --- a/testing/validator-mock/validator_client_mock.go +++ b/testing/validator-mock/validator_client_mock.go @@ -17,14 +17,15 @@ import ( primitives "github.com/OffchainLabs/prysm/v7/consensus-types/primitives" eth "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1" iface "github.com/OffchainLabs/prysm/v7/validator/client/iface" + empty "github.com/golang/protobuf/ptypes/empty" gomock "go.uber.org/mock/gomock" - emptypb "google.golang.org/protobuf/types/known/emptypb" ) // MockValidatorClient is a mock of ValidatorClient interface. type MockValidatorClient struct { ctrl *gomock.Controller recorder *MockValidatorClientMockRecorder + isgomock struct{} } // MockValidatorClientMockRecorder is the mock recorder for MockValidatorClient. @@ -45,137 +46,137 @@ func (m *MockValidatorClient) EXPECT() *MockValidatorClientMockRecorder { } // AggregatedSelections mocks base method. -func (m *MockValidatorClient) AggregatedSelections(arg0 context.Context, arg1 []iface.BeaconCommitteeSelection) ([]iface.BeaconCommitteeSelection, error) { +func (m *MockValidatorClient) AggregatedSelections(ctx context.Context, selections []iface.BeaconCommitteeSelection) ([]iface.BeaconCommitteeSelection, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AggregatedSelections", arg0, arg1) + ret := m.ctrl.Call(m, "AggregatedSelections", ctx, selections) ret0, _ := ret[0].([]iface.BeaconCommitteeSelection) ret1, _ := ret[1].(error) return ret0, ret1 } // AggregatedSelections indicates an expected call of AggregatedSelections. -func (mr *MockValidatorClientMockRecorder) AggregatedSelections(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) AggregatedSelections(ctx, selections any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AggregatedSelections", reflect.TypeOf((*MockValidatorClient)(nil).AggregatedSelections), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AggregatedSelections", reflect.TypeOf((*MockValidatorClient)(nil).AggregatedSelections), ctx, selections) } // AggregatedSyncSelections mocks base method. -func (m *MockValidatorClient) AggregatedSyncSelections(arg0 context.Context, arg1 []iface.SyncCommitteeSelection) ([]iface.SyncCommitteeSelection, error) { +func (m *MockValidatorClient) AggregatedSyncSelections(ctx context.Context, selections []iface.SyncCommitteeSelection) ([]iface.SyncCommitteeSelection, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AggregatedSyncSelections", arg0, arg1) + ret := m.ctrl.Call(m, "AggregatedSyncSelections", ctx, selections) ret0, _ := ret[0].([]iface.SyncCommitteeSelection) ret1, _ := ret[1].(error) return ret0, ret1 } // AggregatedSyncSelections indicates an expected call of AggregatedSyncSelections. -func (mr *MockValidatorClientMockRecorder) AggregatedSyncSelections(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) AggregatedSyncSelections(ctx, selections any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AggregatedSyncSelections", reflect.TypeOf((*MockValidatorClient)(nil).AggregatedSyncSelections), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AggregatedSyncSelections", reflect.TypeOf((*MockValidatorClient)(nil).AggregatedSyncSelections), ctx, selections) } // AttestationData mocks base method. -func (m *MockValidatorClient) AttestationData(arg0 context.Context, arg1 *eth.AttestationDataRequest) (*eth.AttestationData, error) { +func (m *MockValidatorClient) AttestationData(ctx context.Context, in *eth.AttestationDataRequest) (*eth.AttestationData, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AttestationData", arg0, arg1) + ret := m.ctrl.Call(m, "AttestationData", ctx, in) ret0, _ := ret[0].(*eth.AttestationData) ret1, _ := ret[1].(error) return ret0, ret1 } // AttestationData indicates an expected call of AttestationData. -func (mr *MockValidatorClientMockRecorder) AttestationData(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) AttestationData(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttestationData", reflect.TypeOf((*MockValidatorClient)(nil).AttestationData), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttestationData", reflect.TypeOf((*MockValidatorClient)(nil).AttestationData), ctx, in) } // AttesterDuties mocks base method. -func (m *MockValidatorClient) AttesterDuties(arg0 context.Context, arg1 primitives.Epoch, arg2 []primitives.ValidatorIndex) (*eth.AttesterDutiesResponse, error) { +func (m *MockValidatorClient) AttesterDuties(ctx context.Context, epoch primitives.Epoch, validatorIndices []primitives.ValidatorIndex) (*eth.AttesterDutiesResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AttesterDuties", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AttesterDuties", ctx, epoch, validatorIndices) ret0, _ := ret[0].(*eth.AttesterDutiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // AttesterDuties indicates an expected call of AttesterDuties. -func (mr *MockValidatorClientMockRecorder) AttesterDuties(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) AttesterDuties(ctx, epoch, validatorIndices any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttesterDuties", reflect.TypeOf((*MockValidatorClient)(nil).AttesterDuties), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttesterDuties", reflect.TypeOf((*MockValidatorClient)(nil).AttesterDuties), ctx, epoch, validatorIndices) } // BeaconBlock mocks base method. -func (m *MockValidatorClient) BeaconBlock(arg0 context.Context, arg1 *eth.BlockRequest) (*eth.GenericBeaconBlock, error) { +func (m *MockValidatorClient) BeaconBlock(ctx context.Context, in *eth.BlockRequest) (*eth.GenericBeaconBlock, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeaconBlock", arg0, arg1) + ret := m.ctrl.Call(m, "BeaconBlock", ctx, in) ret0, _ := ret[0].(*eth.GenericBeaconBlock) ret1, _ := ret[1].(error) return ret0, ret1 } // BeaconBlock indicates an expected call of BeaconBlock. -func (mr *MockValidatorClientMockRecorder) BeaconBlock(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) BeaconBlock(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeaconBlock", reflect.TypeOf((*MockValidatorClient)(nil).BeaconBlock), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeaconBlock", reflect.TypeOf((*MockValidatorClient)(nil).BeaconBlock), ctx, in) } // CheckDoppelGanger mocks base method. -func (m *MockValidatorClient) CheckDoppelGanger(arg0 context.Context, arg1 *eth.DoppelGangerRequest) (*eth.DoppelGangerResponse, error) { +func (m *MockValidatorClient) CheckDoppelGanger(ctx context.Context, in *eth.DoppelGangerRequest) (*eth.DoppelGangerResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CheckDoppelGanger", arg0, arg1) + ret := m.ctrl.Call(m, "CheckDoppelGanger", ctx, in) ret0, _ := ret[0].(*eth.DoppelGangerResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // CheckDoppelGanger indicates an expected call of CheckDoppelGanger. -func (mr *MockValidatorClientMockRecorder) CheckDoppelGanger(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) CheckDoppelGanger(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckDoppelGanger", reflect.TypeOf((*MockValidatorClient)(nil).CheckDoppelGanger), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckDoppelGanger", reflect.TypeOf((*MockValidatorClient)(nil).CheckDoppelGanger), ctx, in) } // DomainData mocks base method. -func (m *MockValidatorClient) DomainData(arg0 context.Context, arg1 *eth.DomainRequest) (*eth.DomainResponse, error) { +func (m *MockValidatorClient) DomainData(ctx context.Context, in *eth.DomainRequest) (*eth.DomainResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DomainData", arg0, arg1) + ret := m.ctrl.Call(m, "DomainData", ctx, in) ret0, _ := ret[0].(*eth.DomainResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // DomainData indicates an expected call of DomainData. -func (mr *MockValidatorClientMockRecorder) DomainData(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) DomainData(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DomainData", reflect.TypeOf((*MockValidatorClient)(nil).DomainData), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DomainData", reflect.TypeOf((*MockValidatorClient)(nil).DomainData), ctx, in) } // Duties mocks base method. -func (m *MockValidatorClient) Duties(arg0 context.Context, arg1 *eth.DutiesRequest) (*eth.ValidatorDutiesContainer, error) { +func (m *MockValidatorClient) Duties(ctx context.Context, in *eth.DutiesRequest) (*eth.ValidatorDutiesContainer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Duties", arg0, arg1) + ret := m.ctrl.Call(m, "Duties", ctx, in) ret0, _ := ret[0].(*eth.ValidatorDutiesContainer) ret1, _ := ret[1].(error) return ret0, ret1 } // Duties indicates an expected call of Duties. -func (mr *MockValidatorClientMockRecorder) Duties(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) Duties(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Duties", reflect.TypeOf((*MockValidatorClient)(nil).Duties), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Duties", reflect.TypeOf((*MockValidatorClient)(nil).Duties), ctx, in) } // EnsureReady mocks base method. -func (m *MockValidatorClient) EnsureReady(arg0 context.Context) bool { +func (m *MockValidatorClient) EnsureReady(ctx context.Context) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureReady", arg0) + ret := m.ctrl.Call(m, "EnsureReady", ctx) ret0, _ := ret[0].(bool) return ret0 } // EnsureReady indicates an expected call of EnsureReady. -func (mr *MockValidatorClientMockRecorder) EnsureReady(arg0 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) EnsureReady(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureReady", reflect.TypeOf((*MockValidatorClient)(nil).EnsureReady), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureReady", reflect.TypeOf((*MockValidatorClient)(nil).EnsureReady), ctx) } // EventStreamIsRunning mocks base method. @@ -193,33 +194,33 @@ func (mr *MockValidatorClientMockRecorder) EventStreamIsRunning() *gomock.Call { } // FeeRecipientByPubKey mocks base method. -func (m *MockValidatorClient) FeeRecipientByPubKey(arg0 context.Context, arg1 *eth.FeeRecipientByPubKeyRequest) (*eth.FeeRecipientByPubKeyResponse, error) { +func (m *MockValidatorClient) FeeRecipientByPubKey(ctx context.Context, in *eth.FeeRecipientByPubKeyRequest) (*eth.FeeRecipientByPubKeyResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "FeeRecipientByPubKey", arg0, arg1) + ret := m.ctrl.Call(m, "FeeRecipientByPubKey", ctx, in) ret0, _ := ret[0].(*eth.FeeRecipientByPubKeyResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // FeeRecipientByPubKey indicates an expected call of FeeRecipientByPubKey. -func (mr *MockValidatorClientMockRecorder) FeeRecipientByPubKey(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) FeeRecipientByPubKey(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FeeRecipientByPubKey", reflect.TypeOf((*MockValidatorClient)(nil).FeeRecipientByPubKey), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FeeRecipientByPubKey", reflect.TypeOf((*MockValidatorClient)(nil).FeeRecipientByPubKey), ctx, in) } // GetExecutionPayloadEnvelope mocks base method. -func (m *MockValidatorClient) GetExecutionPayloadEnvelope(arg0 context.Context, arg1 primitives.Slot) (*eth.ExecutionPayloadEnvelope, error) { +func (m *MockValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, slot primitives.Slot) (*eth.ExecutionPayloadEnvelope, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetExecutionPayloadEnvelope", arg0, arg1) + ret := m.ctrl.Call(m, "GetExecutionPayloadEnvelope", ctx, slot) ret0, _ := ret[0].(*eth.ExecutionPayloadEnvelope) ret1, _ := ret[1].(error) return ret0, ret1 } // GetExecutionPayloadEnvelope indicates an expected call of GetExecutionPayloadEnvelope. -func (mr *MockValidatorClientMockRecorder) GetExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) GetExecutionPayloadEnvelope(ctx, slot any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockValidatorClient)(nil).GetExecutionPayloadEnvelope), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockValidatorClient)(nil).GetExecutionPayloadEnvelope), ctx, slot) } // Host mocks base method. @@ -237,403 +238,403 @@ func (mr *MockValidatorClientMockRecorder) Host() *gomock.Call { } // MultipleValidatorStatus mocks base method. -func (m *MockValidatorClient) MultipleValidatorStatus(arg0 context.Context, arg1 *eth.MultipleValidatorStatusRequest) (*eth.MultipleValidatorStatusResponse, error) { +func (m *MockValidatorClient) MultipleValidatorStatus(ctx context.Context, in *eth.MultipleValidatorStatusRequest) (*eth.MultipleValidatorStatusResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "MultipleValidatorStatus", arg0, arg1) + ret := m.ctrl.Call(m, "MultipleValidatorStatus", ctx, in) ret0, _ := ret[0].(*eth.MultipleValidatorStatusResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // MultipleValidatorStatus indicates an expected call of MultipleValidatorStatus. -func (mr *MockValidatorClientMockRecorder) MultipleValidatorStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) MultipleValidatorStatus(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MultipleValidatorStatus", reflect.TypeOf((*MockValidatorClient)(nil).MultipleValidatorStatus), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MultipleValidatorStatus", reflect.TypeOf((*MockValidatorClient)(nil).MultipleValidatorStatus), ctx, in) +} + +// PTCDuties mocks base method. +func (m *MockValidatorClient) PTCDuties(ctx context.Context, epoch primitives.Epoch, validatorIndices []primitives.ValidatorIndex) (*eth.PTCDutiesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PTCDuties", ctx, epoch, validatorIndices) + ret0, _ := ret[0].(*eth.PTCDutiesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// PTCDuties indicates an expected call of PTCDuties. +func (mr *MockValidatorClientMockRecorder) PTCDuties(ctx, epoch, validatorIndices any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PTCDuties", reflect.TypeOf((*MockValidatorClient)(nil).PTCDuties), ctx, epoch, validatorIndices) +} + +// PayloadAttestationData mocks base method. +func (m *MockValidatorClient) PayloadAttestationData(ctx context.Context, slot primitives.Slot) (*eth.PayloadAttestationData, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PayloadAttestationData", ctx, slot) + ret0, _ := ret[0].(*eth.PayloadAttestationData) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// PayloadAttestationData indicates an expected call of PayloadAttestationData. +func (mr *MockValidatorClientMockRecorder) PayloadAttestationData(ctx, slot any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PayloadAttestationData", reflect.TypeOf((*MockValidatorClient)(nil).PayloadAttestationData), ctx, slot) } // PrepareBeaconProposer mocks base method. -func (m *MockValidatorClient) PrepareBeaconProposer(arg0 context.Context, arg1 *eth.PrepareBeaconProposerRequest) (*emptypb.Empty, error) { +func (m *MockValidatorClient) PrepareBeaconProposer(ctx context.Context, in *eth.PrepareBeaconProposerRequest) (*empty.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PrepareBeaconProposer", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) + ret := m.ctrl.Call(m, "PrepareBeaconProposer", ctx, in) + ret0, _ := ret[0].(*empty.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } // PrepareBeaconProposer indicates an expected call of PrepareBeaconProposer. -func (mr *MockValidatorClientMockRecorder) PrepareBeaconProposer(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) PrepareBeaconProposer(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareBeaconProposer", reflect.TypeOf((*MockValidatorClient)(nil).PrepareBeaconProposer), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareBeaconProposer", reflect.TypeOf((*MockValidatorClient)(nil).PrepareBeaconProposer), ctx, in) } // ProposeAttestation mocks base method. -func (m *MockValidatorClient) ProposeAttestation(arg0 context.Context, arg1 *eth.Attestation) (*eth.AttestResponse, error) { +func (m *MockValidatorClient) ProposeAttestation(ctx context.Context, in *eth.Attestation) (*eth.AttestResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProposeAttestation", arg0, arg1) + ret := m.ctrl.Call(m, "ProposeAttestation", ctx, in) ret0, _ := ret[0].(*eth.AttestResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ProposeAttestation indicates an expected call of ProposeAttestation. -func (mr *MockValidatorClientMockRecorder) ProposeAttestation(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) ProposeAttestation(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeAttestation", reflect.TypeOf((*MockValidatorClient)(nil).ProposeAttestation), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeAttestation", reflect.TypeOf((*MockValidatorClient)(nil).ProposeAttestation), ctx, in) } // ProposeAttestationElectra mocks base method. -func (m *MockValidatorClient) ProposeAttestationElectra(arg0 context.Context, arg1 *eth.SingleAttestation) (*eth.AttestResponse, error) { +func (m *MockValidatorClient) ProposeAttestationElectra(ctx context.Context, in *eth.SingleAttestation) (*eth.AttestResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProposeAttestationElectra", arg0, arg1) + ret := m.ctrl.Call(m, "ProposeAttestationElectra", ctx, in) ret0, _ := ret[0].(*eth.AttestResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ProposeAttestationElectra indicates an expected call of ProposeAttestationElectra. -func (mr *MockValidatorClientMockRecorder) ProposeAttestationElectra(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) ProposeAttestationElectra(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeAttestationElectra", reflect.TypeOf((*MockValidatorClient)(nil).ProposeAttestationElectra), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeAttestationElectra", reflect.TypeOf((*MockValidatorClient)(nil).ProposeAttestationElectra), ctx, in) } // ProposeBeaconBlock mocks base method. -func (m *MockValidatorClient) ProposeBeaconBlock(arg0 context.Context, arg1 *eth.GenericSignedBeaconBlock) (*eth.ProposeResponse, error) { +func (m *MockValidatorClient) ProposeBeaconBlock(ctx context.Context, in *eth.GenericSignedBeaconBlock) (*eth.ProposeResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProposeBeaconBlock", arg0, arg1) + ret := m.ctrl.Call(m, "ProposeBeaconBlock", ctx, in) ret0, _ := ret[0].(*eth.ProposeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ProposeBeaconBlock indicates an expected call of ProposeBeaconBlock. -func (mr *MockValidatorClientMockRecorder) ProposeBeaconBlock(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) ProposeBeaconBlock(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeBeaconBlock", reflect.TypeOf((*MockValidatorClient)(nil).ProposeBeaconBlock), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeBeaconBlock", reflect.TypeOf((*MockValidatorClient)(nil).ProposeBeaconBlock), ctx, in) } // ProposeExit mocks base method. -func (m *MockValidatorClient) ProposeExit(arg0 context.Context, arg1 *eth.SignedVoluntaryExit) (*eth.ProposeExitResponse, error) { +func (m *MockValidatorClient) ProposeExit(ctx context.Context, in *eth.SignedVoluntaryExit) (*eth.ProposeExitResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProposeExit", arg0, arg1) + ret := m.ctrl.Call(m, "ProposeExit", ctx, in) ret0, _ := ret[0].(*eth.ProposeExitResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ProposeExit indicates an expected call of ProposeExit. -func (mr *MockValidatorClientMockRecorder) ProposeExit(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) ProposeExit(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeExit", reflect.TypeOf((*MockValidatorClient)(nil).ProposeExit), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeExit", reflect.TypeOf((*MockValidatorClient)(nil).ProposeExit), ctx, in) } // ProposerDuties mocks base method. -func (m *MockValidatorClient) ProposerDuties(arg0 context.Context, arg1 primitives.Epoch) (*eth.ProposerDutiesResponse, error) { +func (m *MockValidatorClient) ProposerDuties(ctx context.Context, epoch primitives.Epoch) (*eth.ProposerDutiesResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProposerDuties", arg0, arg1) + ret := m.ctrl.Call(m, "ProposerDuties", ctx, epoch) ret0, _ := ret[0].(*eth.ProposerDutiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ProposerDuties indicates an expected call of ProposerDuties. -func (mr *MockValidatorClientMockRecorder) ProposerDuties(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) ProposerDuties(ctx, epoch any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposerDuties", reflect.TypeOf((*MockValidatorClient)(nil).ProposerDuties), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposerDuties", reflect.TypeOf((*MockValidatorClient)(nil).ProposerDuties), ctx, epoch) } // PublishExecutionPayloadEnvelope mocks base method. -func (m *MockValidatorClient) PublishExecutionPayloadEnvelope(arg0 context.Context, arg1 *eth.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) { +func (m *MockValidatorClient) PublishExecutionPayloadEnvelope(ctx context.Context, in *eth.SignedExecutionPayloadEnvelope) (*empty.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PublishExecutionPayloadEnvelope", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) + ret := m.ctrl.Call(m, "PublishExecutionPayloadEnvelope", ctx, in) + ret0, _ := ret[0].(*empty.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } // PublishExecutionPayloadEnvelope indicates an expected call of PublishExecutionPayloadEnvelope. -func (mr *MockValidatorClientMockRecorder) PublishExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishExecutionPayloadEnvelope", reflect.TypeOf((*MockValidatorClient)(nil).PublishExecutionPayloadEnvelope), arg0, arg1) -} - -// PayloadAttestationData mocks base method. -func (m *MockValidatorClient) PayloadAttestationData(ctx context.Context, slot primitives.Slot) (*eth.PayloadAttestationData, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PayloadAttestationData", ctx, slot) - ret0, _ := ret[0].(*eth.PayloadAttestationData) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// PayloadAttestationData indicates an expected call of PayloadAttestationData. -func (mr *MockValidatorClientMockRecorder) PayloadAttestationData(ctx, slot any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PayloadAttestationData", reflect.TypeOf((*MockValidatorClient)(nil).PayloadAttestationData), ctx, slot) -} - -// SubmitPayloadAttestation mocks base method. -func (m *MockValidatorClient) SubmitPayloadAttestation(ctx context.Context, in *eth.PayloadAttestationMessage) (*emptypb.Empty, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitPayloadAttestation", ctx, in) - ret0, _ := ret[0].(*emptypb.Empty) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// SubmitPayloadAttestation indicates an expected call of SubmitPayloadAttestation. -func (mr *MockValidatorClientMockRecorder) SubmitPayloadAttestation(ctx, in any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) PublishExecutionPayloadEnvelope(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitPayloadAttestation", reflect.TypeOf((*MockValidatorClient)(nil).SubmitPayloadAttestation), ctx, in) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishExecutionPayloadEnvelope", reflect.TypeOf((*MockValidatorClient)(nil).PublishExecutionPayloadEnvelope), ctx, in) } // StartEventStream mocks base method. -func (m *MockValidatorClient) StartEventStream(arg0 context.Context, arg1 []string, arg2 chan<- *event.Event) { +func (m *MockValidatorClient) StartEventStream(ctx context.Context, topics []string, eventsChannel chan<- *event.Event) { m.ctrl.T.Helper() - m.ctrl.Call(m, "StartEventStream", arg0, arg1, arg2) + m.ctrl.Call(m, "StartEventStream", ctx, topics, eventsChannel) } // StartEventStream indicates an expected call of StartEventStream. -func (mr *MockValidatorClientMockRecorder) StartEventStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) StartEventStream(ctx, topics, eventsChannel any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartEventStream", reflect.TypeOf((*MockValidatorClient)(nil).StartEventStream), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartEventStream", reflect.TypeOf((*MockValidatorClient)(nil).StartEventStream), ctx, topics, eventsChannel) } // SubmitAggregateSelectionProof mocks base method. -func (m *MockValidatorClient) SubmitAggregateSelectionProof(arg0 context.Context, arg1 *eth.AggregateSelectionRequest, arg2 primitives.ValidatorIndex, arg3 uint64) (*eth.AggregateSelectionResponse, error) { +func (m *MockValidatorClient) SubmitAggregateSelectionProof(ctx context.Context, in *eth.AggregateSelectionRequest, index primitives.ValidatorIndex, committeeLength uint64) (*eth.AggregateSelectionResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitAggregateSelectionProof", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "SubmitAggregateSelectionProof", ctx, in, index, committeeLength) ret0, _ := ret[0].(*eth.AggregateSelectionResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SubmitAggregateSelectionProof indicates an expected call of SubmitAggregateSelectionProof. -func (mr *MockValidatorClientMockRecorder) SubmitAggregateSelectionProof(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SubmitAggregateSelectionProof(ctx, in, index, committeeLength any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProof", reflect.TypeOf((*MockValidatorClient)(nil).SubmitAggregateSelectionProof), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProof", reflect.TypeOf((*MockValidatorClient)(nil).SubmitAggregateSelectionProof), ctx, in, index, committeeLength) } // SubmitAggregateSelectionProofElectra mocks base method. -func (m *MockValidatorClient) SubmitAggregateSelectionProofElectra(arg0 context.Context, arg1 *eth.AggregateSelectionRequest, arg2 primitives.ValidatorIndex, arg3 uint64) (*eth.AggregateSelectionElectraResponse, error) { +func (m *MockValidatorClient) SubmitAggregateSelectionProofElectra(ctx context.Context, in *eth.AggregateSelectionRequest, arg2 primitives.ValidatorIndex, arg3 uint64) (*eth.AggregateSelectionElectraResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitAggregateSelectionProofElectra", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "SubmitAggregateSelectionProofElectra", ctx, in, arg2, arg3) ret0, _ := ret[0].(*eth.AggregateSelectionElectraResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SubmitAggregateSelectionProofElectra indicates an expected call of SubmitAggregateSelectionProofElectra. -func (mr *MockValidatorClientMockRecorder) SubmitAggregateSelectionProofElectra(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SubmitAggregateSelectionProofElectra(ctx, in, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProofElectra", reflect.TypeOf((*MockValidatorClient)(nil).SubmitAggregateSelectionProofElectra), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProofElectra", reflect.TypeOf((*MockValidatorClient)(nil).SubmitAggregateSelectionProofElectra), ctx, in, arg2, arg3) +} + +// SubmitPayloadAttestation mocks base method. +func (m *MockValidatorClient) SubmitPayloadAttestation(ctx context.Context, in *eth.PayloadAttestationMessage) (*empty.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitPayloadAttestation", ctx, in) + ret0, _ := ret[0].(*empty.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitPayloadAttestation indicates an expected call of SubmitPayloadAttestation. +func (mr *MockValidatorClientMockRecorder) SubmitPayloadAttestation(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitPayloadAttestation", reflect.TypeOf((*MockValidatorClient)(nil).SubmitPayloadAttestation), ctx, in) } // SubmitSignedAggregateSelectionProof mocks base method. -func (m *MockValidatorClient) SubmitSignedAggregateSelectionProof(arg0 context.Context, arg1 *eth.SignedAggregateSubmitRequest) (*eth.SignedAggregateSubmitResponse, error) { +func (m *MockValidatorClient) SubmitSignedAggregateSelectionProof(ctx context.Context, in *eth.SignedAggregateSubmitRequest) (*eth.SignedAggregateSubmitResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitSignedAggregateSelectionProof", arg0, arg1) + ret := m.ctrl.Call(m, "SubmitSignedAggregateSelectionProof", ctx, in) ret0, _ := ret[0].(*eth.SignedAggregateSubmitResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SubmitSignedAggregateSelectionProof indicates an expected call of SubmitSignedAggregateSelectionProof. -func (mr *MockValidatorClientMockRecorder) SubmitSignedAggregateSelectionProof(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SubmitSignedAggregateSelectionProof(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedAggregateSelectionProof", reflect.TypeOf((*MockValidatorClient)(nil).SubmitSignedAggregateSelectionProof), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedAggregateSelectionProof", reflect.TypeOf((*MockValidatorClient)(nil).SubmitSignedAggregateSelectionProof), ctx, in) } // SubmitSignedAggregateSelectionProofElectra mocks base method. -func (m *MockValidatorClient) SubmitSignedAggregateSelectionProofElectra(arg0 context.Context, arg1 *eth.SignedAggregateSubmitElectraRequest) (*eth.SignedAggregateSubmitResponse, error) { +func (m *MockValidatorClient) SubmitSignedAggregateSelectionProofElectra(ctx context.Context, in *eth.SignedAggregateSubmitElectraRequest) (*eth.SignedAggregateSubmitResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitSignedAggregateSelectionProofElectra", arg0, arg1) + ret := m.ctrl.Call(m, "SubmitSignedAggregateSelectionProofElectra", ctx, in) ret0, _ := ret[0].(*eth.SignedAggregateSubmitResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SubmitSignedAggregateSelectionProofElectra indicates an expected call of SubmitSignedAggregateSelectionProofElectra. -func (mr *MockValidatorClientMockRecorder) SubmitSignedAggregateSelectionProofElectra(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SubmitSignedAggregateSelectionProofElectra(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedAggregateSelectionProofElectra", reflect.TypeOf((*MockValidatorClient)(nil).SubmitSignedAggregateSelectionProofElectra), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedAggregateSelectionProofElectra", reflect.TypeOf((*MockValidatorClient)(nil).SubmitSignedAggregateSelectionProofElectra), ctx, in) } // SubmitSignedContributionAndProof mocks base method. -func (m *MockValidatorClient) SubmitSignedContributionAndProof(arg0 context.Context, arg1 *eth.SignedContributionAndProof) (*emptypb.Empty, error) { +func (m *MockValidatorClient) SubmitSignedContributionAndProof(ctx context.Context, in *eth.SignedContributionAndProof) (*empty.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitSignedContributionAndProof", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) + ret := m.ctrl.Call(m, "SubmitSignedContributionAndProof", ctx, in) + ret0, _ := ret[0].(*empty.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } // SubmitSignedContributionAndProof indicates an expected call of SubmitSignedContributionAndProof. -func (mr *MockValidatorClientMockRecorder) SubmitSignedContributionAndProof(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SubmitSignedContributionAndProof(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockValidatorClient)(nil).SubmitSignedContributionAndProof), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockValidatorClient)(nil).SubmitSignedContributionAndProof), ctx, in) } // SubmitSyncMessage mocks base method. -func (m *MockValidatorClient) SubmitSyncMessage(arg0 context.Context, arg1 *eth.SyncCommitteeMessage) (*emptypb.Empty, error) { +func (m *MockValidatorClient) SubmitSyncMessage(ctx context.Context, in *eth.SyncCommitteeMessage) (*empty.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitSyncMessage", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) + ret := m.ctrl.Call(m, "SubmitSyncMessage", ctx, in) + ret0, _ := ret[0].(*empty.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } // SubmitSyncMessage indicates an expected call of SubmitSyncMessage. -func (mr *MockValidatorClientMockRecorder) SubmitSyncMessage(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SubmitSyncMessage(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSyncMessage", reflect.TypeOf((*MockValidatorClient)(nil).SubmitSyncMessage), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSyncMessage", reflect.TypeOf((*MockValidatorClient)(nil).SubmitSyncMessage), ctx, in) } // SubmitValidatorRegistrations mocks base method. -func (m *MockValidatorClient) SubmitValidatorRegistrations(arg0 context.Context, arg1 *eth.SignedValidatorRegistrationsV1) (*emptypb.Empty, error) { +func (m *MockValidatorClient) SubmitValidatorRegistrations(ctx context.Context, in *eth.SignedValidatorRegistrationsV1) (*empty.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitValidatorRegistrations", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) + ret := m.ctrl.Call(m, "SubmitValidatorRegistrations", ctx, in) + ret0, _ := ret[0].(*empty.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } // SubmitValidatorRegistrations indicates an expected call of SubmitValidatorRegistrations. -func (mr *MockValidatorClientMockRecorder) SubmitValidatorRegistrations(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SubmitValidatorRegistrations(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitValidatorRegistrations", reflect.TypeOf((*MockValidatorClient)(nil).SubmitValidatorRegistrations), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitValidatorRegistrations", reflect.TypeOf((*MockValidatorClient)(nil).SubmitValidatorRegistrations), ctx, in) } // SubscribeCommitteeSubnets mocks base method. -func (m *MockValidatorClient) SubscribeCommitteeSubnets(arg0 context.Context, arg1 *eth.CommitteeSubnetsSubscribeRequest, arg2 []*eth.ValidatorDuty) (*emptypb.Empty, error) { +func (m *MockValidatorClient) SubscribeCommitteeSubnets(ctx context.Context, in *eth.CommitteeSubnetsSubscribeRequest, duties []*eth.ValidatorDuty) (*empty.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubscribeCommitteeSubnets", arg0, arg1, arg2) - ret0, _ := ret[0].(*emptypb.Empty) + ret := m.ctrl.Call(m, "SubscribeCommitteeSubnets", ctx, in, duties) + ret0, _ := ret[0].(*empty.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } // SubscribeCommitteeSubnets indicates an expected call of SubscribeCommitteeSubnets. -func (mr *MockValidatorClientMockRecorder) SubscribeCommitteeSubnets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SubscribeCommitteeSubnets(ctx, in, duties any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeCommitteeSubnets", reflect.TypeOf((*MockValidatorClient)(nil).SubscribeCommitteeSubnets), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeCommitteeSubnets", reflect.TypeOf((*MockValidatorClient)(nil).SubscribeCommitteeSubnets), ctx, in, duties) } // SyncCommitteeContribution mocks base method. -func (m *MockValidatorClient) SyncCommitteeContribution(arg0 context.Context, arg1 *eth.SyncCommitteeContributionRequest) (*eth.SyncCommitteeContribution, error) { +func (m *MockValidatorClient) SyncCommitteeContribution(ctx context.Context, in *eth.SyncCommitteeContributionRequest) (*eth.SyncCommitteeContribution, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncCommitteeContribution", arg0, arg1) + ret := m.ctrl.Call(m, "SyncCommitteeContribution", ctx, in) ret0, _ := ret[0].(*eth.SyncCommitteeContribution) ret1, _ := ret[1].(error) return ret0, ret1 } // SyncCommitteeContribution indicates an expected call of SyncCommitteeContribution. -func (mr *MockValidatorClientMockRecorder) SyncCommitteeContribution(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SyncCommitteeContribution(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncCommitteeContribution", reflect.TypeOf((*MockValidatorClient)(nil).SyncCommitteeContribution), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncCommitteeContribution", reflect.TypeOf((*MockValidatorClient)(nil).SyncCommitteeContribution), ctx, in) } // SyncCommitteeDuties mocks base method. -func (m *MockValidatorClient) SyncCommitteeDuties(arg0 context.Context, arg1 primitives.Epoch, arg2 []primitives.ValidatorIndex) (*eth.SyncCommitteeDutiesResponse, error) { +func (m *MockValidatorClient) SyncCommitteeDuties(ctx context.Context, epoch primitives.Epoch, validatorIndices []primitives.ValidatorIndex) (*eth.SyncCommitteeDutiesResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncCommitteeDuties", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "SyncCommitteeDuties", ctx, epoch, validatorIndices) ret0, _ := ret[0].(*eth.SyncCommitteeDutiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SyncCommitteeDuties indicates an expected call of SyncCommitteeDuties. -func (mr *MockValidatorClientMockRecorder) SyncCommitteeDuties(arg0, arg1, arg2 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncCommitteeDuties", reflect.TypeOf((*MockValidatorClient)(nil).SyncCommitteeDuties), arg0, arg1, arg2) -} - -// PTCDuties mocks base method. -func (m *MockValidatorClient) PTCDuties(arg0 context.Context, arg1 primitives.Epoch, arg2 []primitives.ValidatorIndex) (*eth.PTCDutiesResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PTCDuties", arg0, arg1, arg2) - ret0, _ := ret[0].(*eth.PTCDutiesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// PTCDuties indicates an expected call of PTCDuties. -func (mr *MockValidatorClientMockRecorder) PTCDuties(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SyncCommitteeDuties(ctx, epoch, validatorIndices any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PTCDuties", reflect.TypeOf((*MockValidatorClient)(nil).PTCDuties), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncCommitteeDuties", reflect.TypeOf((*MockValidatorClient)(nil).SyncCommitteeDuties), ctx, epoch, validatorIndices) } // SyncMessageBlockRoot mocks base method. -func (m *MockValidatorClient) SyncMessageBlockRoot(arg0 context.Context, arg1 *emptypb.Empty) (*eth.SyncMessageBlockRootResponse, error) { +func (m *MockValidatorClient) SyncMessageBlockRoot(ctx context.Context, in *empty.Empty) (*eth.SyncMessageBlockRootResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncMessageBlockRoot", arg0, arg1) + ret := m.ctrl.Call(m, "SyncMessageBlockRoot", ctx, in) ret0, _ := ret[0].(*eth.SyncMessageBlockRootResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SyncMessageBlockRoot indicates an expected call of SyncMessageBlockRoot. -func (mr *MockValidatorClientMockRecorder) SyncMessageBlockRoot(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SyncMessageBlockRoot(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncMessageBlockRoot", reflect.TypeOf((*MockValidatorClient)(nil).SyncMessageBlockRoot), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncMessageBlockRoot", reflect.TypeOf((*MockValidatorClient)(nil).SyncMessageBlockRoot), ctx, in) } // SyncSubcommitteeIndex mocks base method. -func (m *MockValidatorClient) SyncSubcommitteeIndex(arg0 context.Context, arg1 *eth.SyncSubcommitteeIndexRequest) (*eth.SyncSubcommitteeIndexResponse, error) { +func (m *MockValidatorClient) SyncSubcommitteeIndex(ctx context.Context, in *eth.SyncSubcommitteeIndexRequest) (*eth.SyncSubcommitteeIndexResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncSubcommitteeIndex", arg0, arg1) + ret := m.ctrl.Call(m, "SyncSubcommitteeIndex", ctx, in) ret0, _ := ret[0].(*eth.SyncSubcommitteeIndexResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SyncSubcommitteeIndex indicates an expected call of SyncSubcommitteeIndex. -func (mr *MockValidatorClientMockRecorder) SyncSubcommitteeIndex(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) SyncSubcommitteeIndex(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncSubcommitteeIndex", reflect.TypeOf((*MockValidatorClient)(nil).SyncSubcommitteeIndex), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncSubcommitteeIndex", reflect.TypeOf((*MockValidatorClient)(nil).SyncSubcommitteeIndex), ctx, in) } // ValidatorIndex mocks base method. -func (m *MockValidatorClient) ValidatorIndex(arg0 context.Context, arg1 *eth.ValidatorIndexRequest) (*eth.ValidatorIndexResponse, error) { +func (m *MockValidatorClient) ValidatorIndex(ctx context.Context, in *eth.ValidatorIndexRequest) (*eth.ValidatorIndexResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidatorIndex", arg0, arg1) + ret := m.ctrl.Call(m, "ValidatorIndex", ctx, in) ret0, _ := ret[0].(*eth.ValidatorIndexResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ValidatorIndex indicates an expected call of ValidatorIndex. -func (mr *MockValidatorClientMockRecorder) ValidatorIndex(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) ValidatorIndex(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorIndex", reflect.TypeOf((*MockValidatorClient)(nil).ValidatorIndex), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorIndex", reflect.TypeOf((*MockValidatorClient)(nil).ValidatorIndex), ctx, in) } // ValidatorStatus mocks base method. -func (m *MockValidatorClient) ValidatorStatus(arg0 context.Context, arg1 *eth.ValidatorStatusRequest) (*eth.ValidatorStatusResponse, error) { +func (m *MockValidatorClient) ValidatorStatus(ctx context.Context, in *eth.ValidatorStatusRequest) (*eth.ValidatorStatusResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidatorStatus", arg0, arg1) + ret := m.ctrl.Call(m, "ValidatorStatus", ctx, in) ret0, _ := ret[0].(*eth.ValidatorStatusResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ValidatorStatus indicates an expected call of ValidatorStatus. -func (mr *MockValidatorClientMockRecorder) ValidatorStatus(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) ValidatorStatus(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorStatus", reflect.TypeOf((*MockValidatorClient)(nil).ValidatorStatus), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorStatus", reflect.TypeOf((*MockValidatorClient)(nil).ValidatorStatus), ctx, in) } // WaitForChainStart mocks base method. -func (m *MockValidatorClient) WaitForChainStart(arg0 context.Context, arg1 *emptypb.Empty) (*eth.ChainStartResponse, error) { +func (m *MockValidatorClient) WaitForChainStart(ctx context.Context, in *empty.Empty) (*eth.ChainStartResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WaitForChainStart", arg0, arg1) + ret := m.ctrl.Call(m, "WaitForChainStart", ctx, in) ret0, _ := ret[0].(*eth.ChainStartResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // WaitForChainStart indicates an expected call of WaitForChainStart. -func (mr *MockValidatorClientMockRecorder) WaitForChainStart(arg0, arg1 any) *gomock.Call { +func (mr *MockValidatorClientMockRecorder) WaitForChainStart(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForChainStart", reflect.TypeOf((*MockValidatorClient)(nil).WaitForChainStart), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForChainStart", reflect.TypeOf((*MockValidatorClient)(nil).WaitForChainStart), ctx, in) } diff --git a/validator/client/beacon-api/mock/duties_mock.go b/validator/client/beacon-api/mock/duties_mock.go index 44334946f474..2e886b6ce710 100644 --- a/validator/client/beacon-api/mock/duties_mock.go +++ b/validator/client/beacon-api/mock/duties_mock.go @@ -72,34 +72,34 @@ func (mr *MockdutiesProviderMockRecorder) Committees(ctx, epoch any) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Committees", reflect.TypeOf((*MockdutiesProvider)(nil).Committees), ctx, epoch) } -// ProposerDuties mocks base method. -func (m *MockdutiesProvider) ProposerDuties(ctx context.Context, epoch primitives.Epoch) (*structs.GetProposerDutiesResponse, error) { +// PTCDuties mocks base method. +func (m *MockdutiesProvider) PTCDuties(ctx context.Context, epoch primitives.Epoch, validatorIndices []primitives.ValidatorIndex) (*structs.GetPTCDutiesResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProposerDuties", ctx, epoch) - ret0, _ := ret[0].(*structs.GetProposerDutiesResponse) + ret := m.ctrl.Call(m, "PTCDuties", ctx, epoch, validatorIndices) + ret0, _ := ret[0].(*structs.GetPTCDutiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// ProposerDuties indicates an expected call of ProposerDuties. -func (mr *MockdutiesProviderMockRecorder) ProposerDuties(ctx, epoch any) *gomock.Call { +// PTCDuties indicates an expected call of PTCDuties. +func (mr *MockdutiesProviderMockRecorder) PTCDuties(ctx, epoch, validatorIndices any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposerDuties", reflect.TypeOf((*MockdutiesProvider)(nil).ProposerDuties), ctx, epoch) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PTCDuties", reflect.TypeOf((*MockdutiesProvider)(nil).PTCDuties), ctx, epoch, validatorIndices) } -// PTCDuties mocks base method. -func (m *MockdutiesProvider) PTCDuties(ctx context.Context, epoch primitives.Epoch, validatorIndices []primitives.ValidatorIndex) (*structs.GetPTCDutiesResponse, error) { +// ProposerDuties mocks base method. +func (m *MockdutiesProvider) ProposerDuties(ctx context.Context, epoch primitives.Epoch) (*structs.GetProposerDutiesResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PTCDuties", ctx, epoch, validatorIndices) - ret0, _ := ret[0].(*structs.GetPTCDutiesResponse) + ret := m.ctrl.Call(m, "ProposerDuties", ctx, epoch) + ret0, _ := ret[0].(*structs.GetProposerDutiesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// PTCDuties indicates an expected call of PTCDuties. -func (mr *MockdutiesProviderMockRecorder) PTCDuties(ctx, epoch, validatorIndices any) *gomock.Call { +// ProposerDuties indicates an expected call of ProposerDuties. +func (mr *MockdutiesProviderMockRecorder) ProposerDuties(ctx, epoch any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PTCDuties", reflect.TypeOf((*MockdutiesProvider)(nil).PTCDuties), ctx, epoch, validatorIndices) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposerDuties", reflect.TypeOf((*MockdutiesProvider)(nil).ProposerDuties), ctx, epoch) } // SyncDuties mocks base method.