diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs.go index e16b9d09a9e..04fef506093 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs.go @@ -6,6 +6,7 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epbs" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" @@ -14,6 +15,7 @@ import ( "google.golang.org/protobuf/types/known/emptypb" ) +// SubmitSignedExecutionPayloadEnvelope submits a signed execution payload envelope to the network. func (vs *Server) SubmitSignedExecutionPayloadEnvelope(ctx context.Context, env *enginev1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) { if err := vs.P2P.Broadcast(ctx, env); err != nil { return nil, status.Errorf(codes.Internal, "failed to broadcast signed execution payload envelope: %v", err) @@ -31,6 +33,32 @@ func (vs *Server) SubmitSignedExecutionPayloadEnvelope(ctx context.Context, env return nil, nil } +// SubmitSignedExecutionPayloadHeader submits a signed execution payload header to the beacon node. +func (vs *Server) SubmitSignedExecutionPayloadHeader(ctx context.Context, h *enginev1.SignedExecutionPayloadHeader) (*emptypb.Empty, error) { + currentSlot := vs.TimeFetcher.CurrentSlot() + if currentSlot != h.Message.Slot && currentSlot != h.Message.Slot-1 { + return nil, status.Errorf(codes.InvalidArgument, "invalid slot: current slot %d, got %d", vs.TimeFetcher.CurrentSlot(), h.Message.Slot) + } + + vs.signedExecutionPayloadHeader = h + + headState, err := vs.HeadFetcher.HeadStateReadOnly(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to retrieve head state: %v", err) + } + proposerIndex, err := helpers.BeaconProposerIndexAtSlot(ctx, headState, h.Message.Slot) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to retrieve proposer index: %v", err) + } + if proposerIndex != h.Message.BuilderIndex { + if err := vs.P2P.Broadcast(ctx, h); err != nil { + return nil, status.Errorf(codes.Internal, "failed to broadcast signed execution payload header: %v", err) + } + } + + return nil, nil +} + // computePostPayloadStateRoot computes the state root after an execution // payload envelope has been processed through a state transition and // returns it to the validator client. diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs_test.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs_test.go index 05c66fa57f5..ea263f3b9d6 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs_test.go @@ -12,6 +12,7 @@ import ( p2ptest "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p/testing" "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/stategen" "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" "github.com/prysmaticlabs/prysm/v5/testing/require" "github.com/prysmaticlabs/prysm/v5/testing/util" @@ -47,6 +48,34 @@ func TestServer_SubmitSignedExecutionPayloadEnvelope(t *testing.T) { }) } +func TestServer_SubmitSignedExecutionPayloadHeader(t *testing.T) { + st, _ := util.DeterministicGenesisStateEpbs(t, 1) + h := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + }, + } + slot := primitives.Slot(1) + server := &Server{ + TimeFetcher: &mockChain.ChainService{Slot: &slot}, + HeadFetcher: &mockChain.ChainService{State: st}, + P2P: p2ptest.NewTestP2P(t), + } + + t.Run("Happy case", func(t *testing.T) { + h.Message.BuilderIndex = 1 + _, err := server.SubmitSignedExecutionPayloadHeader(context.Background(), h) + require.NoError(t, err) + require.DeepEqual(t, server.signedExecutionPayloadHeader, h) + }) + + t.Run("Incorrect slot", func(t *testing.T) { + h.Message.Slot = 3 + _, err := server.SubmitSignedExecutionPayloadHeader(context.Background(), h) + require.ErrorContains(t, "invalid slot: current slot 1, got 3", err) + }) +} + func TestProposer_ComputePostPayloadStateRoot(t *testing.T) { db := dbutil.SetupDB(t) ctx := context.Background() diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/server.go b/beacon-chain/rpc/prysm/v1alpha1/validator/server.go index 0f12c50aa78..95856084d6d 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/server.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/server.go @@ -30,6 +30,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/config/params" "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" "github.com/prysmaticlabs/prysm/v5/network/forks" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/runtime/version" "google.golang.org/grpc/codes" @@ -42,44 +43,45 @@ import ( // and committees in which particular validators need to perform their responsibilities, // and more. type Server struct { - Ctx context.Context - PayloadIDCache *cache.PayloadIDCache - TrackedValidatorsCache *cache.TrackedValidatorsCache - HeadFetcher blockchain.HeadFetcher - ForkFetcher blockchain.ForkFetcher - ForkchoiceFetcher blockchain.ForkchoiceFetcher - GenesisFetcher blockchain.GenesisFetcher - FinalizationFetcher blockchain.FinalizationFetcher - TimeFetcher blockchain.TimeFetcher - BlockFetcher execution.POWBlockFetcher - DepositFetcher cache.DepositFetcher - ChainStartFetcher execution.ChainStartFetcher - Eth1InfoFetcher execution.ChainInfoFetcher - OptimisticModeFetcher blockchain.OptimisticModeFetcher - SyncChecker sync.Checker - StateNotifier statefeed.Notifier - BlockNotifier blockfeed.Notifier - P2P p2p.Broadcaster - AttPool attestations.Pool - SlashingsPool slashings.PoolManager - ExitPool voluntaryexits.PoolManager - SyncCommitteePool synccommittee.Pool - BlockReceiver blockchain.BlockReceiver - BlobReceiver blockchain.BlobReceiver - PayloadAttestationReceiver blockchain.PayloadAttestationReceiver - ExecutionPayloadReceiver blockchain.ExecutionPayloadReceiver - MockEth1Votes bool - Eth1BlockFetcher execution.POWBlockFetcher - PendingDepositsFetcher depositsnapshot.PendingDepositsFetcher - OperationNotifier opfeed.Notifier - StateGen stategen.StateManager - ReplayerBuilder stategen.ReplayerBuilder - BeaconDB db.HeadAccessDatabase - ExecutionEngineCaller execution.EngineCaller - BlockBuilder builder.BlockBuilder - BLSChangesPool blstoexec.PoolManager - ClockWaiter startup.ClockWaiter - CoreService *core.Service + Ctx context.Context + PayloadIDCache *cache.PayloadIDCache + TrackedValidatorsCache *cache.TrackedValidatorsCache + HeadFetcher blockchain.HeadFetcher + ForkFetcher blockchain.ForkFetcher + ForkchoiceFetcher blockchain.ForkchoiceFetcher + GenesisFetcher blockchain.GenesisFetcher + FinalizationFetcher blockchain.FinalizationFetcher + TimeFetcher blockchain.TimeFetcher + BlockFetcher execution.POWBlockFetcher + DepositFetcher cache.DepositFetcher + ChainStartFetcher execution.ChainStartFetcher + Eth1InfoFetcher execution.ChainInfoFetcher + OptimisticModeFetcher blockchain.OptimisticModeFetcher + SyncChecker sync.Checker + StateNotifier statefeed.Notifier + BlockNotifier blockfeed.Notifier + P2P p2p.Broadcaster + AttPool attestations.Pool + SlashingsPool slashings.PoolManager + ExitPool voluntaryexits.PoolManager + SyncCommitteePool synccommittee.Pool + BlockReceiver blockchain.BlockReceiver + BlobReceiver blockchain.BlobReceiver + PayloadAttestationReceiver blockchain.PayloadAttestationReceiver + ExecutionPayloadReceiver blockchain.ExecutionPayloadReceiver + MockEth1Votes bool + Eth1BlockFetcher execution.POWBlockFetcher + PendingDepositsFetcher depositsnapshot.PendingDepositsFetcher + OperationNotifier opfeed.Notifier + StateGen stategen.StateManager + ReplayerBuilder stategen.ReplayerBuilder + BeaconDB db.HeadAccessDatabase + ExecutionEngineCaller execution.EngineCaller + BlockBuilder builder.BlockBuilder + BLSChangesPool blstoexec.PoolManager + ClockWaiter startup.ClockWaiter + CoreService *core.Service + signedExecutionPayloadHeader *enginev1.SignedExecutionPayloadHeader } // WaitForActivation checks if a validator public key exists in the active validator registry of the current diff --git a/proto/prysm/v1alpha1/validator.pb.go b/proto/prysm/v1alpha1/validator.pb.go index f3386f4e4ce..338dcffa369 100755 --- a/proto/prysm/v1alpha1/validator.pb.go +++ b/proto/prysm/v1alpha1/validator.pb.go @@ -3802,8 +3802,8 @@ var file_proto_prysm_v1alpha1_validator_proto_rawDesc = []byte{ 0x0a, 0x08, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x49, 0x4e, 0x47, 0x10, 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, 0xdb, - 0x2b, 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, + 0x4c, 0x59, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x44, 0x10, 0x08, 0x32, 0xcd, + 0x2c, 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x80, 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, 0x31, 0x2e, 0x44, 0x75, 0x74, @@ -4152,17 +4152,24 @@ var file_proto_prysm_v1alpha1_validator_proto_rawDesc = []byte{ 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 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, 0x00, 0x42, 0x93, 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, 0x3a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, - 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 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, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x22, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 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, 0x00, 0x42, 0x93, + 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, 0x3a, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, + 0x35, 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 ( @@ -4253,10 +4260,11 @@ var file_proto_prysm_v1alpha1_validator_proto_goTypes = []interface{}{ (*SignedValidatorRegistrationsV1)(nil), // 70: ethereum.eth.v1alpha1.SignedValidatorRegistrationsV1 (*PayloadAttestationMessage)(nil), // 71: ethereum.eth.v1alpha1.PayloadAttestationMessage (*v1.SignedExecutionPayloadEnvelope)(nil), // 72: ethereum.engine.v1.SignedExecutionPayloadEnvelope - (*GenericBeaconBlock)(nil), // 73: ethereum.eth.v1alpha1.GenericBeaconBlock - (*AttestationData)(nil), // 74: ethereum.eth.v1alpha1.AttestationData - (*SyncCommitteeContribution)(nil), // 75: ethereum.eth.v1alpha1.SyncCommitteeContribution - (*PayloadAttestationData)(nil), // 76: ethereum.eth.v1alpha1.PayloadAttestationData + (*v1.SignedExecutionPayloadHeader)(nil), // 73: ethereum.engine.v1.SignedExecutionPayloadHeader + (*GenericBeaconBlock)(nil), // 74: ethereum.eth.v1alpha1.GenericBeaconBlock + (*AttestationData)(nil), // 75: ethereum.eth.v1alpha1.AttestationData + (*SyncCommitteeContribution)(nil), // 76: ethereum.eth.v1alpha1.SyncCommitteeContribution + (*PayloadAttestationData)(nil), // 77: ethereum.eth.v1alpha1.PayloadAttestationData } var file_proto_prysm_v1alpha1_validator_proto_depIdxs = []int32{ 52, // 0: ethereum.eth.v1alpha1.StreamBlocksResponse.phase0_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlock @@ -4317,42 +4325,44 @@ var file_proto_prysm_v1alpha1_validator_proto_depIdxs = []int32{ 1, // 55: ethereum.eth.v1alpha1.BeaconNodeValidator.GetPayloadAttestationData:input_type -> ethereum.eth.v1alpha1.GetPayloadAttestationDataRequest 71, // 56: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitPayloadAttestation:input_type -> ethereum.eth.v1alpha1.PayloadAttestationMessage 72, // 57: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadEnvelope:input_type -> ethereum.engine.v1.SignedExecutionPayloadEnvelope - 21, // 58: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDuties:output_type -> ethereum.eth.v1alpha1.DutiesResponse - 9, // 59: ethereum.eth.v1alpha1.BeaconNodeValidator.DomainData:output_type -> ethereum.eth.v1alpha1.DomainResponse - 12, // 60: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForChainStart:output_type -> ethereum.eth.v1alpha1.ChainStartResponse - 11, // 61: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForActivation:output_type -> ethereum.eth.v1alpha1.ValidatorActivationResponse - 15, // 62: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorIndex:output_type -> ethereum.eth.v1alpha1.ValidatorIndexResponse - 17, // 63: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorStatus:output_type -> ethereum.eth.v1alpha1.ValidatorStatusResponse - 19, // 64: ethereum.eth.v1alpha1.BeaconNodeValidator.MultipleValidatorStatus:output_type -> ethereum.eth.v1alpha1.MultipleValidatorStatusResponse - 73, // 65: ethereum.eth.v1alpha1.BeaconNodeValidator.GetBeaconBlock:output_type -> ethereum.eth.v1alpha1.GenericBeaconBlock - 23, // 66: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeBeaconBlock:output_type -> ethereum.eth.v1alpha1.ProposeResponse - 64, // 67: ethereum.eth.v1alpha1.BeaconNodeValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty - 43, // 68: ethereum.eth.v1alpha1.BeaconNodeValidator.GetFeeRecipientByPubKey:output_type -> ethereum.eth.v1alpha1.FeeRecipientByPubKeyResponse - 74, // 69: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttestationData:output_type -> ethereum.eth.v1alpha1.AttestationData - 26, // 70: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestation:output_type -> ethereum.eth.v1alpha1.AttestResponse - 26, // 71: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestationElectra:output_type -> ethereum.eth.v1alpha1.AttestResponse - 28, // 72: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.AggregateSelectionResponse - 29, // 73: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.AggregateSelectionElectraResponse - 32, // 74: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse - 32, // 75: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse - 24, // 76: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeExit:output_type -> ethereum.eth.v1alpha1.ProposeExitResponse - 64, // 77: ethereum.eth.v1alpha1.BeaconNodeValidator.SubscribeCommitteeSubnets:output_type -> google.protobuf.Empty - 38, // 78: ethereum.eth.v1alpha1.BeaconNodeValidator.CheckDoppelGanger:output_type -> ethereum.eth.v1alpha1.DoppelGangerResponse - 2, // 79: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncMessageBlockRoot:output_type -> ethereum.eth.v1alpha1.SyncMessageBlockRootResponse - 64, // 80: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSyncMessage:output_type -> google.protobuf.Empty - 5, // 81: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncSubcommitteeIndex:output_type -> ethereum.eth.v1alpha1.SyncSubcommitteeIndexResponse - 75, // 82: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeContribution:output_type -> ethereum.eth.v1alpha1.SyncCommitteeContribution - 64, // 83: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedContributionAndProof:output_type -> google.protobuf.Empty - 6, // 84: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamSlots:output_type -> ethereum.eth.v1alpha1.StreamSlotsResponse - 7, // 85: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamBlocksAltair:output_type -> ethereum.eth.v1alpha1.StreamBlocksResponse - 64, // 86: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitValidatorRegistrations:output_type -> google.protobuf.Empty - 64, // 87: ethereum.eth.v1alpha1.BeaconNodeValidator.AssignValidatorToSubnet:output_type -> google.protobuf.Empty - 46, // 88: ethereum.eth.v1alpha1.BeaconNodeValidator.AggregatedSigAndAggregationBits:output_type -> ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsResponse - 76, // 89: ethereum.eth.v1alpha1.BeaconNodeValidator.GetPayloadAttestationData:output_type -> ethereum.eth.v1alpha1.PayloadAttestationData - 64, // 90: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitPayloadAttestation:output_type -> google.protobuf.Empty - 64, // 91: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadEnvelope:output_type -> google.protobuf.Empty - 58, // [58:92] is the sub-list for method output_type - 24, // [24:58] is the sub-list for method input_type + 73, // 58: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadHeader:input_type -> ethereum.engine.v1.SignedExecutionPayloadHeader + 21, // 59: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDuties:output_type -> ethereum.eth.v1alpha1.DutiesResponse + 9, // 60: ethereum.eth.v1alpha1.BeaconNodeValidator.DomainData:output_type -> ethereum.eth.v1alpha1.DomainResponse + 12, // 61: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForChainStart:output_type -> ethereum.eth.v1alpha1.ChainStartResponse + 11, // 62: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForActivation:output_type -> ethereum.eth.v1alpha1.ValidatorActivationResponse + 15, // 63: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorIndex:output_type -> ethereum.eth.v1alpha1.ValidatorIndexResponse + 17, // 64: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorStatus:output_type -> ethereum.eth.v1alpha1.ValidatorStatusResponse + 19, // 65: ethereum.eth.v1alpha1.BeaconNodeValidator.MultipleValidatorStatus:output_type -> ethereum.eth.v1alpha1.MultipleValidatorStatusResponse + 74, // 66: ethereum.eth.v1alpha1.BeaconNodeValidator.GetBeaconBlock:output_type -> ethereum.eth.v1alpha1.GenericBeaconBlock + 23, // 67: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeBeaconBlock:output_type -> ethereum.eth.v1alpha1.ProposeResponse + 64, // 68: ethereum.eth.v1alpha1.BeaconNodeValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty + 43, // 69: ethereum.eth.v1alpha1.BeaconNodeValidator.GetFeeRecipientByPubKey:output_type -> ethereum.eth.v1alpha1.FeeRecipientByPubKeyResponse + 75, // 70: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttestationData:output_type -> ethereum.eth.v1alpha1.AttestationData + 26, // 71: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestation:output_type -> ethereum.eth.v1alpha1.AttestResponse + 26, // 72: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestationElectra:output_type -> ethereum.eth.v1alpha1.AttestResponse + 28, // 73: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.AggregateSelectionResponse + 29, // 74: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.AggregateSelectionElectraResponse + 32, // 75: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse + 32, // 76: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse + 24, // 77: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeExit:output_type -> ethereum.eth.v1alpha1.ProposeExitResponse + 64, // 78: ethereum.eth.v1alpha1.BeaconNodeValidator.SubscribeCommitteeSubnets:output_type -> google.protobuf.Empty + 38, // 79: ethereum.eth.v1alpha1.BeaconNodeValidator.CheckDoppelGanger:output_type -> ethereum.eth.v1alpha1.DoppelGangerResponse + 2, // 80: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncMessageBlockRoot:output_type -> ethereum.eth.v1alpha1.SyncMessageBlockRootResponse + 64, // 81: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSyncMessage:output_type -> google.protobuf.Empty + 5, // 82: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncSubcommitteeIndex:output_type -> ethereum.eth.v1alpha1.SyncSubcommitteeIndexResponse + 76, // 83: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeContribution:output_type -> ethereum.eth.v1alpha1.SyncCommitteeContribution + 64, // 84: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedContributionAndProof:output_type -> google.protobuf.Empty + 6, // 85: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamSlots:output_type -> ethereum.eth.v1alpha1.StreamSlotsResponse + 7, // 86: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamBlocksAltair:output_type -> ethereum.eth.v1alpha1.StreamBlocksResponse + 64, // 87: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitValidatorRegistrations:output_type -> google.protobuf.Empty + 64, // 88: ethereum.eth.v1alpha1.BeaconNodeValidator.AssignValidatorToSubnet:output_type -> google.protobuf.Empty + 46, // 89: ethereum.eth.v1alpha1.BeaconNodeValidator.AggregatedSigAndAggregationBits:output_type -> ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsResponse + 77, // 90: ethereum.eth.v1alpha1.BeaconNodeValidator.GetPayloadAttestationData:output_type -> ethereum.eth.v1alpha1.PayloadAttestationData + 64, // 91: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitPayloadAttestation:output_type -> google.protobuf.Empty + 64, // 92: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadEnvelope:output_type -> google.protobuf.Empty + 64, // 93: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadHeader:output_type -> google.protobuf.Empty + 59, // [59:94] is the sub-list for method output_type + 24, // [24:59] is the sub-list for method input_type 24, // [24:24] is the sub-list for extension type_name 24, // [24:24] is the sub-list for extension extendee 0, // [0:24] is the sub-list for field type_name @@ -5060,6 +5070,7 @@ type BeaconNodeValidatorClient interface { GetPayloadAttestationData(ctx context.Context, in *GetPayloadAttestationDataRequest, opts ...grpc.CallOption) (*PayloadAttestationData, error) SubmitPayloadAttestation(ctx context.Context, in *PayloadAttestationMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) SubmitSignedExecutionPayloadEnvelope(ctx context.Context, in *v1.SignedExecutionPayloadEnvelope, opts ...grpc.CallOption) (*emptypb.Empty, error) + SubmitSignedExecutionPayloadHeader(ctx context.Context, in *v1.SignedExecutionPayloadHeader, opts ...grpc.CallOption) (*emptypb.Empty, error) } type beaconNodeValidatorClient struct { @@ -5472,6 +5483,15 @@ func (c *beaconNodeValidatorClient) SubmitSignedExecutionPayloadEnvelope(ctx con return out, nil } +func (c *beaconNodeValidatorClient) SubmitSignedExecutionPayloadHeader(ctx context.Context, in *v1.SignedExecutionPayloadHeader, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedExecutionPayloadHeader", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // BeaconNodeValidatorServer is the server API for BeaconNodeValidator service. type BeaconNodeValidatorServer interface { GetDuties(context.Context, *DutiesRequest) (*DutiesResponse, error) @@ -5512,6 +5532,7 @@ type BeaconNodeValidatorServer interface { GetPayloadAttestationData(context.Context, *GetPayloadAttestationDataRequest) (*PayloadAttestationData, error) SubmitPayloadAttestation(context.Context, *PayloadAttestationMessage) (*emptypb.Empty, error) SubmitSignedExecutionPayloadEnvelope(context.Context, *v1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) + SubmitSignedExecutionPayloadHeader(context.Context, *v1.SignedExecutionPayloadHeader) (*emptypb.Empty, error) } // UnimplementedBeaconNodeValidatorServer can be embedded to have forward compatible implementations. @@ -5620,6 +5641,9 @@ func (*UnimplementedBeaconNodeValidatorServer) SubmitPayloadAttestation(context. func (*UnimplementedBeaconNodeValidatorServer) SubmitSignedExecutionPayloadEnvelope(context.Context, *v1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitSignedExecutionPayloadEnvelope not implemented") } +func (*UnimplementedBeaconNodeValidatorServer) SubmitSignedExecutionPayloadHeader(context.Context, *v1.SignedExecutionPayloadHeader) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitSignedExecutionPayloadHeader not implemented") +} func RegisterBeaconNodeValidatorServer(s *grpc.Server, srv BeaconNodeValidatorServer) { s.RegisterService(&_BeaconNodeValidator_serviceDesc, srv) @@ -6249,6 +6273,24 @@ func _BeaconNodeValidator_SubmitSignedExecutionPayloadEnvelope_Handler(srv inter return interceptor(ctx, in, info, handler) } +func _BeaconNodeValidator_SubmitSignedExecutionPayloadHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SignedExecutionPayloadHeader) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconNodeValidatorServer).SubmitSignedExecutionPayloadHeader(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedExecutionPayloadHeader", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconNodeValidatorServer).SubmitSignedExecutionPayloadHeader(ctx, req.(*v1.SignedExecutionPayloadHeader)) + } + return interceptor(ctx, in, info, handler) +} + var _BeaconNodeValidator_serviceDesc = grpc.ServiceDesc{ ServiceName: "ethereum.eth.v1alpha1.BeaconNodeValidator", HandlerType: (*BeaconNodeValidatorServer)(nil), @@ -6373,6 +6415,10 @@ var _BeaconNodeValidator_serviceDesc = grpc.ServiceDesc{ MethodName: "SubmitSignedExecutionPayloadEnvelope", Handler: _BeaconNodeValidator_SubmitSignedExecutionPayloadEnvelope_Handler, }, + { + MethodName: "SubmitSignedExecutionPayloadHeader", + Handler: _BeaconNodeValidator_SubmitSignedExecutionPayloadHeader_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/proto/prysm/v1alpha1/validator.proto b/proto/prysm/v1alpha1/validator.proto index a2105f712ae..6ed15e31aa6 100644 --- a/proto/prysm/v1alpha1/validator.proto +++ b/proto/prysm/v1alpha1/validator.proto @@ -357,7 +357,9 @@ service BeaconNodeValidator { rpc GetPayloadAttestationData(GetPayloadAttestationDataRequest) returns (PayloadAttestationData) {} rpc SubmitPayloadAttestation(PayloadAttestationMessage) returns (google.protobuf.Empty) {} + // ePBS RPC endpoints rpc SubmitSignedExecutionPayloadEnvelope(ethereum.engine.v1.SignedExecutionPayloadEnvelope) returns (google.protobuf.Empty) {} + rpc SubmitSignedExecutionPayloadHeader(ethereum.engine.v1.SignedExecutionPayloadHeader) returns (google.protobuf.Empty) {} } message GetPayloadAttestationDataRequest { diff --git a/testing/mock/beacon_validator_client_mock.go b/testing/mock/beacon_validator_client_mock.go index d1b86530b6d..d0f8a05b0ef 100644 --- a/testing/mock/beacon_validator_client_mock.go +++ b/testing/mock/beacon_validator_client_mock.go @@ -484,26 +484,6 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitAggregateSelectionPro return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProofElectra", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitAggregateSelectionProofElectra), varargs...) } -// SubmitSignedExecutionPayloadEnvelope mocks base method. -func (m *MockBeaconNodeValidatorClient) SubmitSignedExecutionPayloadEnvelope(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadEnvelope, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { - m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadEnvelope", varargs...) - ret0, _ := ret[0].(*emptypb.Empty) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// SubmitSignedExecutionPayloadEnvelope indicates an expected call of SubmitSignedExecutionPayloadEnvelope. -func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedExecutionPayloadEnvelope(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, "SubmitSignedExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedExecutionPayloadEnvelope), varargs...) -} - // SubmitPayloadAttestation mocks base method. func (m *MockBeaconNodeValidatorClient) SubmitPayloadAttestation(arg0 context.Context, arg1 *eth.PayloadAttestationMessage, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -584,6 +564,46 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedContributionAnd return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedContributionAndProof), varargs...) } +// SubmitSignedExecutionPayloadEnvelope mocks base method. +func (m *MockBeaconNodeValidatorClient) SubmitSignedExecutionPayloadEnvelope(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadEnvelope, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadEnvelope", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedExecutionPayloadEnvelope indicates an expected call of SubmitSignedExecutionPayloadEnvelope. +func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedExecutionPayloadEnvelope(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, "SubmitSignedExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedExecutionPayloadEnvelope), varargs...) +} + +// SubmitSignedExecutionPayloadHeader mocks base method. +func (m *MockBeaconNodeValidatorClient) SubmitSignedExecutionPayloadHeader(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadHeader, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadHeader", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedExecutionPayloadHeader indicates an expected call of SubmitSignedExecutionPayloadHeader. +func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedExecutionPayloadHeader(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, "SubmitSignedExecutionPayloadHeader", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedExecutionPayloadHeader), varargs...) +} + // SubmitSyncMessage mocks base method. func (m *MockBeaconNodeValidatorClient) SubmitSyncMessage(arg0 context.Context, arg1 *eth.SyncCommitteeMessage, arg2 ...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 67a9f7a10ea..7d3363c9bf0 100644 --- a/testing/mock/beacon_validator_server_mock.go +++ b/testing/mock/beacon_validator_server_mock.go @@ -371,21 +371,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitAggregateSelectionPro return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProofElectra", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitAggregateSelectionProofElectra), arg0, arg1) } -// SubmitSignedExecutionPayloadEnvelope mocks base method. -func (m *MockBeaconNodeValidatorServer) SubmitSignedExecutionPayloadEnvelope(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadEnvelope", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// SubmitSignedExecutionPayloadEnvelope indicates an expected call of SubmitSignedExecutionPayloadEnvelope. -func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedExecutionPayloadEnvelope), arg0, arg1) -} - // SubmitPayloadAttestation mocks base method. func (m *MockBeaconNodeValidatorServer) SubmitPayloadAttestation(arg0 context.Context, arg1 *eth.PayloadAttestationMessage) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -446,6 +431,36 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedContributionAnd return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedContributionAndProof), arg0, arg1) } +// SubmitSignedExecutionPayloadEnvelope mocks base method. +func (m *MockBeaconNodeValidatorServer) SubmitSignedExecutionPayloadEnvelope(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadEnvelope", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedExecutionPayloadEnvelope indicates an expected call of SubmitSignedExecutionPayloadEnvelope. +func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedExecutionPayloadEnvelope), arg0, arg1) +} + +// SubmitSignedExecutionPayloadHeader mocks base method. +func (m *MockBeaconNodeValidatorServer) SubmitSignedExecutionPayloadHeader(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadHeader) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadHeader", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedExecutionPayloadHeader indicates an expected call of SubmitSignedExecutionPayloadHeader. +func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedExecutionPayloadHeader(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedExecutionPayloadHeader", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedExecutionPayloadHeader), 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/validator/client/grpc-api/BUILD.bazel b/validator/client/grpc-api/BUILD.bazel index 3dd77c8311c..eb335587c87 100644 --- a/validator/client/grpc-api/BUILD.bazel +++ b/validator/client/grpc-api/BUILD.bazel @@ -20,6 +20,7 @@ go_library( "//consensus-types/primitives:go_default_library", "//consensus-types/validator:go_default_library", "//monitoring/tracing/trace:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/eth/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//validator/client/iface:go_default_library", diff --git a/validator/client/grpc-api/grpc_validator_client.go b/validator/client/grpc-api/grpc_validator_client.go index d27527d3ea2..e602d97c74b 100644 --- a/validator/client/grpc-api/grpc_validator_client.go +++ b/validator/client/grpc-api/grpc_validator_client.go @@ -12,6 +12,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/api/server/structs" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/validator/client/iface" log "github.com/sirupsen/logrus" @@ -166,6 +167,10 @@ func (c *grpcValidatorClient) SubmitPayloadAttestation(ctx context.Context, in * return c.beaconNodeValidatorClient.SubmitPayloadAttestation(ctx, in) } +func (c *grpcValidatorClient) SubmitSignedExecutionPayloadHeader(ctx context.Context, in *enginev1.SignedExecutionPayloadHeader) (*empty.Empty, error) { + return c.beaconNodeValidatorClient.SubmitSignedExecutionPayloadHeader(ctx, in) +} + func NewGrpcValidatorClient(cc grpc.ClientConnInterface) iface.ValidatorClient { return &grpcValidatorClient{ethpb.NewBeaconNodeValidatorClient(cc), false} }