diff --git a/beacon-chain/rpc/apimiddleware/custom_hooks.go b/beacon-chain/rpc/apimiddleware/custom_hooks.go index 850e34343fe1..e9f566427e13 100644 --- a/beacon-chain/rpc/apimiddleware/custom_hooks.go +++ b/beacon-chain/rpc/apimiddleware/custom_hooks.go @@ -41,6 +41,29 @@ func wrapFeeRecipientsArray( return true, nil } +// https://ethereum.github.io/beacon-APIs/#/Validator/registerValidator expects posting a top-level array. +// We make it more proto-friendly by wrapping it in a struct. +func wrapSignedValidatorRegistrationsArray( + endpoint *apimiddleware.Endpoint, + _ http.ResponseWriter, + req *http.Request, +) (apimiddleware.RunDefault, apimiddleware.ErrorJson) { + if _, ok := endpoint.PostRequest.(*signedValidatorRegistrationsRequestJson); !ok { + return true, nil + } + registrations := make([]*signedValidatorRegistrationJson, 0) + if err := json.NewDecoder(req.Body).Decode(®istrations); err != nil { + return false, apimiddleware.InternalServerErrorWithMessage(err, "could not decode body") + } + j := &signedValidatorRegistrationsRequestJson{Registrations: registrations} + b, err := json.Marshal(j) + if err != nil { + return false, apimiddleware.InternalServerErrorWithMessage(err, "could not marshal wrapped body") + } + req.Body = io.NopCloser(bytes.NewReader(b)) + return true, nil +} + // https://ethereum.github.io/beacon-apis/#/Beacon/submitPoolAttestations expects posting a top-level array. // We make it more proto-friendly by wrapping it in a struct with a 'data' field. func wrapAttestationsArray( diff --git a/beacon-chain/rpc/apimiddleware/endpoint_factory.go b/beacon-chain/rpc/apimiddleware/endpoint_factory.go index 7019006ab7e3..a605e9d79e47 100644 --- a/beacon-chain/rpc/apimiddleware/endpoint_factory.go +++ b/beacon-chain/rpc/apimiddleware/endpoint_factory.go @@ -68,6 +68,7 @@ func (_ *BeaconEndpointFactory) Paths() []string { "/eth/v1/validator/sync_committee_contribution", "/eth/v1/validator/contribution_and_proofs", "/eth/v1/validator/prepare_beacon_proposer", + "/eth/v1/validator/register_validator", } } @@ -268,6 +269,11 @@ func (_ *BeaconEndpointFactory) Create(path string) (*apimiddleware.Endpoint, er endpoint.Hooks = apimiddleware.HookCollection{ OnPreDeserializeRequestBodyIntoContainer: wrapFeeRecipientsArray, } + case "/eth/v1/validator/register_validator": + endpoint.PostRequest = &signedValidatorRegistrationsRequestJson{} + endpoint.Hooks = apimiddleware.HookCollection{ + OnPreDeserializeRequestBodyIntoContainer: wrapSignedValidatorRegistrationsArray, + } default: return nil, errors.New("invalid path") } diff --git a/beacon-chain/rpc/apimiddleware/structs.go b/beacon-chain/rpc/apimiddleware/structs.go index 11def8b9c75f..d6b2a7b29103 100644 --- a/beacon-chain/rpc/apimiddleware/structs.go +++ b/beacon-chain/rpc/apimiddleware/structs.go @@ -773,6 +773,22 @@ type syncCommitteeContributionJson struct { Signature string `json:"signature" hex:"true"` } +type validatorRegistrationJson struct { + FeeRecipient string `json:"fee_recipient" hex:"true"` + GasLimit string `json:"gas_limit"` + Timestamp string `json:"timestamp"` + Pubkey string `json:"pubkey" hex:"true"` +} + +type signedValidatorRegistrationJson struct { + Message validatorRegistrationJson `json:"message"` + Signature string `json:"signature" hex:"true"` +} + +type signedValidatorRegistrationsRequestJson struct { + Registrations []*signedValidatorRegistrationJson `json:"registrations"` +} + //---------------- // SSZ // --------------- diff --git a/beacon-chain/rpc/eth/validator/BUILD.bazel b/beacon-chain/rpc/eth/validator/BUILD.bazel index 824691f842b1..77bf7f0f8af6 100644 --- a/beacon-chain/rpc/eth/validator/BUILD.bazel +++ b/beacon-chain/rpc/eth/validator/BUILD.bazel @@ -10,6 +10,7 @@ go_library( visibility = ["//beacon-chain:__subpackages__"], deps = [ "//beacon-chain/blockchain:go_default_library", + "//beacon-chain/builder:go_default_library", "//beacon-chain/cache:go_default_library", "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/transition:go_default_library", @@ -49,6 +50,7 @@ go_test( embed = [":go_default_library"], deps = [ "//beacon-chain/blockchain/testing:go_default_library", + "//beacon-chain/builder/testing:go_default_library", "//beacon-chain/cache:go_default_library", "//beacon-chain/core/altair:go_default_library", "//beacon-chain/core/signing:go_default_library", diff --git a/beacon-chain/rpc/eth/validator/validator.go b/beacon-chain/rpc/eth/validator/validator.go index da4f22f231e4..455457dbb405 100644 --- a/beacon-chain/rpc/eth/validator/validator.go +++ b/beacon-chain/rpc/eth/validator/validator.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v3/beacon-chain/builder" "github.com/prysmaticlabs/prysm/v3/beacon-chain/cache" "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/transition" @@ -579,6 +580,38 @@ func (vs *Server) PrepareBeaconProposer( return &emptypb.Empty{}, nil } +// SubmitValidatorRegistration submits validator registrations. +func (vs *Server) SubmitValidatorRegistration(ctx context.Context, reg *ethpbv1.SubmitValidatorRegistrationsRequest) (*empty.Empty, error) { + ctx, span := trace.StartSpan(ctx, "validator.SubmitValidatorRegistration") + defer span.End() + + if vs.V1Alpha1Server.BlockBuilder == nil || !vs.V1Alpha1Server.BlockBuilder.Configured() { + return &empty.Empty{}, status.Errorf(codes.Internal, "Could not register block builder: %v", builder.ErrNoBuilder) + } + var registrations []*ethpbalpha.SignedValidatorRegistrationV1 + for i, registration := range reg.Registrations { + message := reg.Registrations[i].Message + registrations = append(registrations, ðpbalpha.SignedValidatorRegistrationV1{ + Message: ðpbalpha.ValidatorRegistrationV1{ + FeeRecipient: message.FeeRecipient, + GasLimit: message.GasLimit, + Timestamp: message.Timestamp, + Pubkey: message.Pubkey, + }, + Signature: registration.Signature, + }) + } + if len(registrations) == 0 { + return &empty.Empty{}, status.Errorf(codes.InvalidArgument, "Validator registration request is empty") + } + + if err := vs.V1Alpha1Server.BlockBuilder.RegisterValidator(ctx, registrations); err != nil { + return nil, status.Errorf(codes.InvalidArgument, "Could not register block builder: %v", err) + } + + return &empty.Empty{}, nil +} + // ProduceAttestationData requests that the beacon node produces attestation data for // the requested committee index and slot based on the nodes current head. func (vs *Server) ProduceAttestationData(ctx context.Context, req *ethpbv1.ProduceAttestationDataRequest) (*ethpbv1.ProduceAttestationDataResponse, error) { diff --git a/beacon-chain/rpc/eth/validator/validator_test.go b/beacon-chain/rpc/eth/validator/validator_test.go index 8f1567437f0f..528d16aee8c3 100644 --- a/beacon-chain/rpc/eth/validator/validator_test.go +++ b/beacon-chain/rpc/eth/validator/validator_test.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/prysmaticlabs/go-bitfield" mockChain "github.com/prysmaticlabs/prysm/v3/beacon-chain/blockchain/testing" + builderTest "github.com/prysmaticlabs/prysm/v3/beacon-chain/builder/testing" "github.com/prysmaticlabs/prysm/v3/beacon-chain/cache" "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/altair" "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/signing" @@ -3717,3 +3718,64 @@ func TestPrepareBeaconProposer(t *testing.T) { }) } } + +func TestServer_SubmitValidatorRegistrations(t *testing.T) { + type args struct { + request *ethpbv1.SubmitValidatorRegistrationsRequest + } + tests := []struct { + name string + args args + wantErr string + }{ + { + name: "Happy Path", + args: args{ + request: ðpbv1.SubmitValidatorRegistrationsRequest{ + Registrations: []*ethpbv1.SubmitValidatorRegistrationsRequest_SignedValidatorRegistration{ + { + Message: ðpbv1.SubmitValidatorRegistrationsRequest_ValidatorRegistration{ + FeeRecipient: make([]byte, fieldparams.BLSPubkeyLength), + GasLimit: 30000000, + Timestamp: uint64(time.Now().Unix()), + Pubkey: make([]byte, fieldparams.BLSPubkeyLength), + }, + Signature: make([]byte, fieldparams.BLSSignatureLength), + }, + }, + }, + }, + wantErr: "", + }, + { + name: "Empty Request", + args: args{ + request: ðpbv1.SubmitValidatorRegistrationsRequest{ + Registrations: []*ethpbv1.SubmitValidatorRegistrationsRequest_SignedValidatorRegistration{}, + }, + }, + wantErr: "Validator registration request is empty", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + db := dbutil.SetupDB(t) + ctx := context.Background() + v1Server := &v1alpha1validator.Server{ + BlockBuilder: &builderTest.MockBuilderService{ + HasConfigured: true, + }, + BeaconDB: db, + } + server := &Server{ + V1Alpha1Server: v1Server, + } + _, err := server.SubmitValidatorRegistration(ctx, tt.args.request) + if tt.wantErr != "" { + require.ErrorContains(t, tt.wantErr, err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/proto/eth/service/validator_service.pb.go b/proto/eth/service/validator_service.pb.go index 58b3b2652e37..f56108c1e35f 100755 --- a/proto/eth/service/validator_service.pb.go +++ b/proto/eth/service/validator_service.pb.go @@ -47,7 +47,7 @@ var file_proto_eth_service_validator_service_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x73, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x32, 0xae, 0x15, 0x0a, 0x0f, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x56, 0x61, 0x6c, + 0x74, 0x6f, 0x32, 0xd6, 0x16, 0x0a, 0x0f, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0xa3, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, @@ -137,98 +137,108 @@ var file_proto_eth_service_validator_service_proto_rawDesc = []byte{ 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x5f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0xae, 0x01, 0x0a, - 0x16, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, - 0x12, 0x2b, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, - 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x12, 0xb0, 0x01, - 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0xa0, 0x01, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x30, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, - 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x34, 0x22, - 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, - 0x3a, 0x01, 0x2a, 0x12, 0xbd, 0x01, 0x0a, 0x21, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x44, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x22, 0x39, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x3a, 0x01, 0x2a, 0x12, 0xb7, 0x01, 0x0a, 0x1f, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x79, - 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 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, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x3c, 0x22, 0x37, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, - 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xd7, 0x01, - 0x0a, 0x20, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x38, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x50, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, - 0x36, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xa9, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, - 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, 0x32, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, - 0x3a, 0x01, 0x2a, 0x42, 0x96, 0x01, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x42, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 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, 0x33, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xaa, 0x02, - 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0xa5, 0x01, 0x0a, + 0x1b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 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, 0x38, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x32, 0x22, 0x2d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, + 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x3a, 0x01, 0x2a, 0x12, 0xae, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x12, 0xb0, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xa0, 0x01, 0x0a, 0x18, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x34, 0x22, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x6e, + 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xbd, 0x01, 0x0a, 0x21, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x22, 0x39, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xb7, 0x01, 0x0a, 0x1f, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x38, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x37, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xd7, 0x01, 0x0a, 0x20, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0xa9, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, + 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 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, 0x3d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x37, 0x22, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, + 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x3a, 0x01, 0x2a, 0x42, 0x96, 0x01, 0x0a, 0x18, + 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x33, 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, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xaa, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x14, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_proto_eth_service_validator_service_proto_goTypes = []interface{}{ @@ -237,24 +247,25 @@ var file_proto_eth_service_validator_service_proto_goTypes = []interface{}{ (*v2.SyncCommitteeDutiesRequest)(nil), // 2: ethereum.eth.v2.SyncCommitteeDutiesRequest (*v1.ProduceBlockRequest)(nil), // 3: ethereum.eth.v1.ProduceBlockRequest (*v1.PrepareBeaconProposerRequest)(nil), // 4: ethereum.eth.v1.PrepareBeaconProposerRequest - (*v1.ProduceAttestationDataRequest)(nil), // 5: ethereum.eth.v1.ProduceAttestationDataRequest - (*v1.AggregateAttestationRequest)(nil), // 6: ethereum.eth.v1.AggregateAttestationRequest - (*v1.SubmitAggregateAndProofsRequest)(nil), // 7: ethereum.eth.v1.SubmitAggregateAndProofsRequest - (*v1.SubmitBeaconCommitteeSubscriptionsRequest)(nil), // 8: ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest - (*v2.SubmitSyncCommitteeSubscriptionsRequest)(nil), // 9: ethereum.eth.v2.SubmitSyncCommitteeSubscriptionsRequest - (*v2.ProduceSyncCommitteeContributionRequest)(nil), // 10: ethereum.eth.v2.ProduceSyncCommitteeContributionRequest - (*v2.SubmitContributionAndProofsRequest)(nil), // 11: ethereum.eth.v2.SubmitContributionAndProofsRequest - (*v1.AttesterDutiesResponse)(nil), // 12: ethereum.eth.v1.AttesterDutiesResponse - (*v1.ProposerDutiesResponse)(nil), // 13: ethereum.eth.v1.ProposerDutiesResponse - (*v2.SyncCommitteeDutiesResponse)(nil), // 14: ethereum.eth.v2.SyncCommitteeDutiesResponse - (*v1.ProduceBlockResponse)(nil), // 15: ethereum.eth.v1.ProduceBlockResponse - (*v2.ProduceBlockResponseV2)(nil), // 16: ethereum.eth.v2.ProduceBlockResponseV2 - (*v2.SSZContainer)(nil), // 17: ethereum.eth.v2.SSZContainer - (*v2.ProduceBlindedBlockResponse)(nil), // 18: ethereum.eth.v2.ProduceBlindedBlockResponse - (*empty.Empty)(nil), // 19: google.protobuf.Empty - (*v1.ProduceAttestationDataResponse)(nil), // 20: ethereum.eth.v1.ProduceAttestationDataResponse - (*v1.AggregateAttestationResponse)(nil), // 21: ethereum.eth.v1.AggregateAttestationResponse - (*v2.ProduceSyncCommitteeContributionResponse)(nil), // 22: ethereum.eth.v2.ProduceSyncCommitteeContributionResponse + (*v1.SubmitValidatorRegistrationsRequest)(nil), // 5: ethereum.eth.v1.SubmitValidatorRegistrationsRequest + (*v1.ProduceAttestationDataRequest)(nil), // 6: ethereum.eth.v1.ProduceAttestationDataRequest + (*v1.AggregateAttestationRequest)(nil), // 7: ethereum.eth.v1.AggregateAttestationRequest + (*v1.SubmitAggregateAndProofsRequest)(nil), // 8: ethereum.eth.v1.SubmitAggregateAndProofsRequest + (*v1.SubmitBeaconCommitteeSubscriptionsRequest)(nil), // 9: ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest + (*v2.SubmitSyncCommitteeSubscriptionsRequest)(nil), // 10: ethereum.eth.v2.SubmitSyncCommitteeSubscriptionsRequest + (*v2.ProduceSyncCommitteeContributionRequest)(nil), // 11: ethereum.eth.v2.ProduceSyncCommitteeContributionRequest + (*v2.SubmitContributionAndProofsRequest)(nil), // 12: ethereum.eth.v2.SubmitContributionAndProofsRequest + (*v1.AttesterDutiesResponse)(nil), // 13: ethereum.eth.v1.AttesterDutiesResponse + (*v1.ProposerDutiesResponse)(nil), // 14: ethereum.eth.v1.ProposerDutiesResponse + (*v2.SyncCommitteeDutiesResponse)(nil), // 15: ethereum.eth.v2.SyncCommitteeDutiesResponse + (*v1.ProduceBlockResponse)(nil), // 16: ethereum.eth.v1.ProduceBlockResponse + (*v2.ProduceBlockResponseV2)(nil), // 17: ethereum.eth.v2.ProduceBlockResponseV2 + (*v2.SSZContainer)(nil), // 18: ethereum.eth.v2.SSZContainer + (*v2.ProduceBlindedBlockResponse)(nil), // 19: ethereum.eth.v2.ProduceBlindedBlockResponse + (*empty.Empty)(nil), // 20: google.protobuf.Empty + (*v1.ProduceAttestationDataResponse)(nil), // 21: ethereum.eth.v1.ProduceAttestationDataResponse + (*v1.AggregateAttestationResponse)(nil), // 22: ethereum.eth.v1.AggregateAttestationResponse + (*v2.ProduceSyncCommitteeContributionResponse)(nil), // 23: ethereum.eth.v2.ProduceSyncCommitteeContributionResponse } var file_proto_eth_service_validator_service_proto_depIdxs = []int32{ 0, // 0: ethereum.eth.service.BeaconValidator.GetAttesterDuties:input_type -> ethereum.eth.v1.AttesterDutiesRequest @@ -266,31 +277,33 @@ var file_proto_eth_service_validator_service_proto_depIdxs = []int32{ 3, // 6: ethereum.eth.service.BeaconValidator.ProduceBlindedBlock:input_type -> ethereum.eth.v1.ProduceBlockRequest 3, // 7: ethereum.eth.service.BeaconValidator.ProduceBlindedBlockSSZ:input_type -> ethereum.eth.v1.ProduceBlockRequest 4, // 8: ethereum.eth.service.BeaconValidator.PrepareBeaconProposer:input_type -> ethereum.eth.v1.PrepareBeaconProposerRequest - 5, // 9: ethereum.eth.service.BeaconValidator.ProduceAttestationData:input_type -> ethereum.eth.v1.ProduceAttestationDataRequest - 6, // 10: ethereum.eth.service.BeaconValidator.GetAggregateAttestation:input_type -> ethereum.eth.v1.AggregateAttestationRequest - 7, // 11: ethereum.eth.service.BeaconValidator.SubmitAggregateAndProofs:input_type -> ethereum.eth.v1.SubmitAggregateAndProofsRequest - 8, // 12: ethereum.eth.service.BeaconValidator.SubmitBeaconCommitteeSubscription:input_type -> ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest - 9, // 13: ethereum.eth.service.BeaconValidator.SubmitSyncCommitteeSubscription:input_type -> ethereum.eth.v2.SubmitSyncCommitteeSubscriptionsRequest - 10, // 14: ethereum.eth.service.BeaconValidator.ProduceSyncCommitteeContribution:input_type -> ethereum.eth.v2.ProduceSyncCommitteeContributionRequest - 11, // 15: ethereum.eth.service.BeaconValidator.SubmitContributionAndProofs:input_type -> ethereum.eth.v2.SubmitContributionAndProofsRequest - 12, // 16: ethereum.eth.service.BeaconValidator.GetAttesterDuties:output_type -> ethereum.eth.v1.AttesterDutiesResponse - 13, // 17: ethereum.eth.service.BeaconValidator.GetProposerDuties:output_type -> ethereum.eth.v1.ProposerDutiesResponse - 14, // 18: ethereum.eth.service.BeaconValidator.GetSyncCommitteeDuties:output_type -> ethereum.eth.v2.SyncCommitteeDutiesResponse - 15, // 19: ethereum.eth.service.BeaconValidator.ProduceBlock:output_type -> ethereum.eth.v1.ProduceBlockResponse - 16, // 20: ethereum.eth.service.BeaconValidator.ProduceBlockV2:output_type -> ethereum.eth.v2.ProduceBlockResponseV2 - 17, // 21: ethereum.eth.service.BeaconValidator.ProduceBlockV2SSZ:output_type -> ethereum.eth.v2.SSZContainer - 18, // 22: ethereum.eth.service.BeaconValidator.ProduceBlindedBlock:output_type -> ethereum.eth.v2.ProduceBlindedBlockResponse - 17, // 23: ethereum.eth.service.BeaconValidator.ProduceBlindedBlockSSZ:output_type -> ethereum.eth.v2.SSZContainer - 19, // 24: ethereum.eth.service.BeaconValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty - 20, // 25: ethereum.eth.service.BeaconValidator.ProduceAttestationData:output_type -> ethereum.eth.v1.ProduceAttestationDataResponse - 21, // 26: ethereum.eth.service.BeaconValidator.GetAggregateAttestation:output_type -> ethereum.eth.v1.AggregateAttestationResponse - 19, // 27: ethereum.eth.service.BeaconValidator.SubmitAggregateAndProofs:output_type -> google.protobuf.Empty - 19, // 28: ethereum.eth.service.BeaconValidator.SubmitBeaconCommitteeSubscription:output_type -> google.protobuf.Empty - 19, // 29: ethereum.eth.service.BeaconValidator.SubmitSyncCommitteeSubscription:output_type -> google.protobuf.Empty - 22, // 30: ethereum.eth.service.BeaconValidator.ProduceSyncCommitteeContribution:output_type -> ethereum.eth.v2.ProduceSyncCommitteeContributionResponse - 19, // 31: ethereum.eth.service.BeaconValidator.SubmitContributionAndProofs:output_type -> google.protobuf.Empty - 16, // [16:32] is the sub-list for method output_type - 0, // [0:16] is the sub-list for method input_type + 5, // 9: ethereum.eth.service.BeaconValidator.SubmitValidatorRegistration:input_type -> ethereum.eth.v1.SubmitValidatorRegistrationsRequest + 6, // 10: ethereum.eth.service.BeaconValidator.ProduceAttestationData:input_type -> ethereum.eth.v1.ProduceAttestationDataRequest + 7, // 11: ethereum.eth.service.BeaconValidator.GetAggregateAttestation:input_type -> ethereum.eth.v1.AggregateAttestationRequest + 8, // 12: ethereum.eth.service.BeaconValidator.SubmitAggregateAndProofs:input_type -> ethereum.eth.v1.SubmitAggregateAndProofsRequest + 9, // 13: ethereum.eth.service.BeaconValidator.SubmitBeaconCommitteeSubscription:input_type -> ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest + 10, // 14: ethereum.eth.service.BeaconValidator.SubmitSyncCommitteeSubscription:input_type -> ethereum.eth.v2.SubmitSyncCommitteeSubscriptionsRequest + 11, // 15: ethereum.eth.service.BeaconValidator.ProduceSyncCommitteeContribution:input_type -> ethereum.eth.v2.ProduceSyncCommitteeContributionRequest + 12, // 16: ethereum.eth.service.BeaconValidator.SubmitContributionAndProofs:input_type -> ethereum.eth.v2.SubmitContributionAndProofsRequest + 13, // 17: ethereum.eth.service.BeaconValidator.GetAttesterDuties:output_type -> ethereum.eth.v1.AttesterDutiesResponse + 14, // 18: ethereum.eth.service.BeaconValidator.GetProposerDuties:output_type -> ethereum.eth.v1.ProposerDutiesResponse + 15, // 19: ethereum.eth.service.BeaconValidator.GetSyncCommitteeDuties:output_type -> ethereum.eth.v2.SyncCommitteeDutiesResponse + 16, // 20: ethereum.eth.service.BeaconValidator.ProduceBlock:output_type -> ethereum.eth.v1.ProduceBlockResponse + 17, // 21: ethereum.eth.service.BeaconValidator.ProduceBlockV2:output_type -> ethereum.eth.v2.ProduceBlockResponseV2 + 18, // 22: ethereum.eth.service.BeaconValidator.ProduceBlockV2SSZ:output_type -> ethereum.eth.v2.SSZContainer + 19, // 23: ethereum.eth.service.BeaconValidator.ProduceBlindedBlock:output_type -> ethereum.eth.v2.ProduceBlindedBlockResponse + 18, // 24: ethereum.eth.service.BeaconValidator.ProduceBlindedBlockSSZ:output_type -> ethereum.eth.v2.SSZContainer + 20, // 25: ethereum.eth.service.BeaconValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty + 20, // 26: ethereum.eth.service.BeaconValidator.SubmitValidatorRegistration:output_type -> google.protobuf.Empty + 21, // 27: ethereum.eth.service.BeaconValidator.ProduceAttestationData:output_type -> ethereum.eth.v1.ProduceAttestationDataResponse + 22, // 28: ethereum.eth.service.BeaconValidator.GetAggregateAttestation:output_type -> ethereum.eth.v1.AggregateAttestationResponse + 20, // 29: ethereum.eth.service.BeaconValidator.SubmitAggregateAndProofs:output_type -> google.protobuf.Empty + 20, // 30: ethereum.eth.service.BeaconValidator.SubmitBeaconCommitteeSubscription:output_type -> google.protobuf.Empty + 20, // 31: ethereum.eth.service.BeaconValidator.SubmitSyncCommitteeSubscription:output_type -> google.protobuf.Empty + 23, // 32: ethereum.eth.service.BeaconValidator.ProduceSyncCommitteeContribution:output_type -> ethereum.eth.v2.ProduceSyncCommitteeContributionResponse + 20, // 33: ethereum.eth.service.BeaconValidator.SubmitContributionAndProofs:output_type -> google.protobuf.Empty + 17, // [17:34] is the sub-list for method output_type + 0, // [0:17] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -342,6 +355,7 @@ type BeaconValidatorClient interface { ProduceBlindedBlock(ctx context.Context, in *v1.ProduceBlockRequest, opts ...grpc.CallOption) (*v2.ProduceBlindedBlockResponse, error) ProduceBlindedBlockSSZ(ctx context.Context, in *v1.ProduceBlockRequest, opts ...grpc.CallOption) (*v2.SSZContainer, error) PrepareBeaconProposer(ctx context.Context, in *v1.PrepareBeaconProposerRequest, opts ...grpc.CallOption) (*empty.Empty, error) + SubmitValidatorRegistration(ctx context.Context, in *v1.SubmitValidatorRegistrationsRequest, opts ...grpc.CallOption) (*empty.Empty, error) ProduceAttestationData(ctx context.Context, in *v1.ProduceAttestationDataRequest, opts ...grpc.CallOption) (*v1.ProduceAttestationDataResponse, error) GetAggregateAttestation(ctx context.Context, in *v1.AggregateAttestationRequest, opts ...grpc.CallOption) (*v1.AggregateAttestationResponse, error) SubmitAggregateAndProofs(ctx context.Context, in *v1.SubmitAggregateAndProofsRequest, opts ...grpc.CallOption) (*empty.Empty, error) @@ -441,6 +455,15 @@ func (c *beaconValidatorClient) PrepareBeaconProposer(ctx context.Context, in *v return out, nil } +func (c *beaconValidatorClient) SubmitValidatorRegistration(ctx context.Context, in *v1.SubmitValidatorRegistrationsRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconValidator/SubmitValidatorRegistration", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *beaconValidatorClient) ProduceAttestationData(ctx context.Context, in *v1.ProduceAttestationDataRequest, opts ...grpc.CallOption) (*v1.ProduceAttestationDataResponse, error) { out := new(v1.ProduceAttestationDataResponse) err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconValidator/ProduceAttestationData", in, out, opts...) @@ -516,6 +539,7 @@ type BeaconValidatorServer interface { ProduceBlindedBlock(context.Context, *v1.ProduceBlockRequest) (*v2.ProduceBlindedBlockResponse, error) ProduceBlindedBlockSSZ(context.Context, *v1.ProduceBlockRequest) (*v2.SSZContainer, error) PrepareBeaconProposer(context.Context, *v1.PrepareBeaconProposerRequest) (*empty.Empty, error) + SubmitValidatorRegistration(context.Context, *v1.SubmitValidatorRegistrationsRequest) (*empty.Empty, error) ProduceAttestationData(context.Context, *v1.ProduceAttestationDataRequest) (*v1.ProduceAttestationDataResponse, error) GetAggregateAttestation(context.Context, *v1.AggregateAttestationRequest) (*v1.AggregateAttestationResponse, error) SubmitAggregateAndProofs(context.Context, *v1.SubmitAggregateAndProofsRequest) (*empty.Empty, error) @@ -556,6 +580,9 @@ func (*UnimplementedBeaconValidatorServer) ProduceBlindedBlockSSZ(context.Contex func (*UnimplementedBeaconValidatorServer) PrepareBeaconProposer(context.Context, *v1.PrepareBeaconProposerRequest) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method PrepareBeaconProposer not implemented") } +func (*UnimplementedBeaconValidatorServer) SubmitValidatorRegistration(context.Context, *v1.SubmitValidatorRegistrationsRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitValidatorRegistration not implemented") +} func (*UnimplementedBeaconValidatorServer) ProduceAttestationData(context.Context, *v1.ProduceAttestationDataRequest) (*v1.ProduceAttestationDataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ProduceAttestationData not implemented") } @@ -744,6 +771,24 @@ func _BeaconValidator_PrepareBeaconProposer_Handler(srv interface{}, ctx context return interceptor(ctx, in, info, handler) } +func _BeaconValidator_SubmitValidatorRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SubmitValidatorRegistrationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconValidatorServer).SubmitValidatorRegistration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.service.BeaconValidator/SubmitValidatorRegistration", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconValidatorServer).SubmitValidatorRegistration(ctx, req.(*v1.SubmitValidatorRegistrationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _BeaconValidator_ProduceAttestationData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.ProduceAttestationDataRequest) if err := dec(in); err != nil { @@ -910,6 +955,10 @@ var _BeaconValidator_serviceDesc = grpc.ServiceDesc{ MethodName: "PrepareBeaconProposer", Handler: _BeaconValidator_PrepareBeaconProposer_Handler, }, + { + MethodName: "SubmitValidatorRegistration", + Handler: _BeaconValidator_SubmitValidatorRegistration_Handler, + }, { MethodName: "ProduceAttestationData", Handler: _BeaconValidator_ProduceAttestationData_Handler, diff --git a/proto/eth/service/validator_service.pb.gw.go b/proto/eth/service/validator_service.pb.gw.go index 2f7c5439b955..6312dff73e01 100755 --- a/proto/eth/service/validator_service.pb.gw.go +++ b/proto/eth/service/validator_service.pb.gw.go @@ -627,6 +627,40 @@ func local_request_BeaconValidator_PrepareBeaconProposer_0(ctx context.Context, } +func request_BeaconValidator_SubmitValidatorRegistration_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.SubmitValidatorRegistrationsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SubmitValidatorRegistration(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BeaconValidator_SubmitValidatorRegistration_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.SubmitValidatorRegistrationsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SubmitValidatorRegistration(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_BeaconValidator_ProduceAttestationData_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -1084,6 +1118,29 @@ func RegisterBeaconValidatorHandlerServer(ctx context.Context, mux *runtime.Serv }) + mux.Handle("POST", pattern_BeaconValidator_SubmitValidatorRegistration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.BeaconValidator/SubmitValidatorRegistration") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BeaconValidator_SubmitValidatorRegistration_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BeaconValidator_SubmitValidatorRegistration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_BeaconValidator_ProduceAttestationData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1466,6 +1523,26 @@ func RegisterBeaconValidatorHandlerClient(ctx context.Context, mux *runtime.Serv }) + mux.Handle("POST", pattern_BeaconValidator_SubmitValidatorRegistration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.BeaconValidator/SubmitValidatorRegistration") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BeaconValidator_SubmitValidatorRegistration_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BeaconValidator_SubmitValidatorRegistration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_BeaconValidator_ProduceAttestationData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1628,6 +1705,8 @@ var ( pattern_BeaconValidator_PrepareBeaconProposer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "validator", "prepare_beacon_proposer"}, "")) + pattern_BeaconValidator_SubmitValidatorRegistration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "validator", "register_validator"}, "")) + pattern_BeaconValidator_ProduceAttestationData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "validator", "attestation_data"}, "")) pattern_BeaconValidator_GetAggregateAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "validator", "aggregate_attestation"}, "")) @@ -1662,6 +1741,8 @@ var ( forward_BeaconValidator_PrepareBeaconProposer_0 = runtime.ForwardResponseMessage + forward_BeaconValidator_SubmitValidatorRegistration_0 = runtime.ForwardResponseMessage + forward_BeaconValidator_ProduceAttestationData_0 = runtime.ForwardResponseMessage forward_BeaconValidator_GetAggregateAttestation_0 = runtime.ForwardResponseMessage diff --git a/proto/eth/service/validator_service.proto b/proto/eth/service/validator_service.proto index 730d663b5a39..2a5fca2522f0 100644 --- a/proto/eth/service/validator_service.proto +++ b/proto/eth/service/validator_service.proto @@ -183,6 +183,25 @@ service BeaconValidator { }; } + // SubmitValidatorRegistration prepares the beacon node for engaging with external builders. + // The information will be sent by the beacon node to the builder network. + // It is expected that the validator client will send this information periodically to ensure the beacon node has correct and timely registration information to provide to builders. + // The validator client should not sign blinded beacon blocks that do not adhere to their latest fee recipient and gas limit preferences. + // Note that requests containing currently inactive or unknown validator pubkeys will be accepted, as they may become active at a later epoch. + // + // HTTP response usage: + // - 200: Successful response + // - 400: Invalid request syntax + // - 500: Beacon node internal error + // + // Spec: https://ethereum.github.io/beacon-APIs/#/Validator/registerValidator + rpc SubmitValidatorRegistration (v1.SubmitValidatorRegistrationsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/internal/eth/v1/validator/register_validator" + body: "*" + }; + } + // ProduceAttestationData requests that the beacon node produces attestation data for // the requested committee index and slot based on the nodes current head. // diff --git a/proto/eth/v1/validator.pb.go b/proto/eth/v1/validator.pb.go index da1db81f183f..c98b04e9195c 100755 --- a/proto/eth/v1/validator.pb.go +++ b/proto/eth/v1/validator.pb.go @@ -1197,6 +1197,53 @@ func (x *PrepareBeaconProposerRequest) GetRecipients() []*PrepareBeaconProposerR return nil } +type SubmitValidatorRegistrationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Registrations []*SubmitValidatorRegistrationsRequest_SignedValidatorRegistration `protobuf:"bytes,1,rep,name=registrations,proto3" json:"registrations,omitempty"` +} + +func (x *SubmitValidatorRegistrationsRequest) Reset() { + *x = SubmitValidatorRegistrationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_validator_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubmitValidatorRegistrationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitValidatorRegistrationsRequest) ProtoMessage() {} + +func (x *SubmitValidatorRegistrationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_validator_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitValidatorRegistrationsRequest.ProtoReflect.Descriptor instead. +func (*SubmitValidatorRegistrationsRequest) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_validator_proto_rawDescGZIP(), []int{18} +} + +func (x *SubmitValidatorRegistrationsRequest) GetRegistrations() []*SubmitValidatorRegistrationsRequest_SignedValidatorRegistration { + if x != nil { + return x.Registrations + } + return nil +} + type PrepareBeaconProposerRequest_FeeRecipientContainer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1209,7 +1256,7 @@ type PrepareBeaconProposerRequest_FeeRecipientContainer struct { func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) Reset() { *x = PrepareBeaconProposerRequest_FeeRecipientContainer{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_validator_proto_msgTypes[18] + mi := &file_proto_eth_v1_validator_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1222,7 +1269,7 @@ func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) String() string { func (*PrepareBeaconProposerRequest_FeeRecipientContainer) ProtoMessage() {} func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_validator_proto_msgTypes[18] + mi := &file_proto_eth_v1_validator_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1252,6 +1299,132 @@ func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) GetValidatorIndex() return github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.ValidatorIndex(0) } +type SubmitValidatorRegistrationsRequest_ValidatorRegistration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FeeRecipient []byte `protobuf:"bytes,1,opt,name=fee_recipient,json=feeRecipient,proto3" json:"fee_recipient,omitempty" ssz-size:"20"` + GasLimit uint64 `protobuf:"varint,2,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Pubkey []byte `protobuf:"bytes,4,opt,name=pubkey,proto3" json:"pubkey,omitempty" ssz-size:"48"` +} + +func (x *SubmitValidatorRegistrationsRequest_ValidatorRegistration) Reset() { + *x = SubmitValidatorRegistrationsRequest_ValidatorRegistration{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_validator_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubmitValidatorRegistrationsRequest_ValidatorRegistration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitValidatorRegistrationsRequest_ValidatorRegistration) ProtoMessage() {} + +func (x *SubmitValidatorRegistrationsRequest_ValidatorRegistration) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_validator_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitValidatorRegistrationsRequest_ValidatorRegistration.ProtoReflect.Descriptor instead. +func (*SubmitValidatorRegistrationsRequest_ValidatorRegistration) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_validator_proto_rawDescGZIP(), []int{18, 0} +} + +func (x *SubmitValidatorRegistrationsRequest_ValidatorRegistration) GetFeeRecipient() []byte { + if x != nil { + return x.FeeRecipient + } + return nil +} + +func (x *SubmitValidatorRegistrationsRequest_ValidatorRegistration) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *SubmitValidatorRegistrationsRequest_ValidatorRegistration) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SubmitValidatorRegistrationsRequest_ValidatorRegistration) GetPubkey() []byte { + if x != nil { + return x.Pubkey + } + return nil +} + +type SubmitValidatorRegistrationsRequest_SignedValidatorRegistration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message *SubmitValidatorRegistrationsRequest_ValidatorRegistration `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` +} + +func (x *SubmitValidatorRegistrationsRequest_SignedValidatorRegistration) Reset() { + *x = SubmitValidatorRegistrationsRequest_SignedValidatorRegistration{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_validator_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubmitValidatorRegistrationsRequest_SignedValidatorRegistration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitValidatorRegistrationsRequest_SignedValidatorRegistration) ProtoMessage() {} + +func (x *SubmitValidatorRegistrationsRequest_SignedValidatorRegistration) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_validator_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitValidatorRegistrationsRequest_SignedValidatorRegistration.ProtoReflect.Descriptor instead. +func (*SubmitValidatorRegistrationsRequest_SignedValidatorRegistration) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_validator_proto_rawDescGZIP(), []int{18, 1} +} + +func (x *SubmitValidatorRegistrationsRequest_SignedValidatorRegistration) GetMessage() *SubmitValidatorRegistrationsRequest_ValidatorRegistration { + if x != nil { + return x.Message + } + return nil +} + +func (x *SubmitValidatorRegistrationsRequest_SignedValidatorRegistration) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + var File_proto_eth_v1_validator_proto protoreflect.FileDescriptor var file_proto_eth_v1_validator_proto_rawDesc = []byte{ @@ -1539,32 +1712,63 @@ var file_proto_eth_v1_validator_proto_rawDesc = []byte{ 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2a, 0x87, - 0x02, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, - 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x4f, 0x4e, 0x47, 0x4f, 0x49, 0x4e, - 0x47, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x45, 0x58, - 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56, - 0x45, 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x45, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x45, - 0x58, 0x49, 0x54, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x45, 0x44, 0x10, - 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x4c, 0x41, 0x53, - 0x48, 0x45, 0x44, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, - 0x57, 0x41, 0x4c, 0x5f, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x4c, 0x45, 0x10, 0x07, 0x12, 0x13, - 0x0a, 0x0f, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x5f, 0x44, 0x4f, 0x4e, - 0x45, 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x09, 0x12, - 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, - 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x57, 0x49, 0x54, 0x48, - 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x10, 0x0c, 0x42, 0x7b, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, - 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x2e, 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, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, - 0x74, 0x68, 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xeb, + 0x03, 0x0a, 0x23, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x76, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x9f, + 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, + 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x32, 0x30, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x1a, 0xa9, 0x01, 0x0a, 0x1b, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x64, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x4a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, + 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2a, 0x87, 0x02, 0x0a, + 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x17, 0x0a, 0x13, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x49, 0x54, + 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x45, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x4f, 0x4e, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x54, + 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, + 0x53, 0x4c, 0x41, 0x53, 0x48, 0x45, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x49, + 0x54, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x45, 0x44, 0x10, 0x05, 0x12, + 0x12, 0x0a, 0x0e, 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x45, + 0x44, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, + 0x4c, 0x5f, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x4c, 0x45, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, + 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, + 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x09, 0x12, 0x0b, 0x0a, + 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, + 0x49, 0x54, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, + 0x41, 0x57, 0x41, 0x4c, 0x10, 0x0c, 0x42, 0x7b, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2e, 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, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, + 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, + 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1580,49 +1784,54 @@ func file_proto_eth_v1_validator_proto_rawDescGZIP() []byte { } var file_proto_eth_v1_validator_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_eth_v1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_proto_eth_v1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_proto_eth_v1_validator_proto_goTypes = []interface{}{ - (ValidatorStatus)(0), // 0: ethereum.eth.v1.ValidatorStatus - (*ValidatorContainer)(nil), // 1: ethereum.eth.v1.ValidatorContainer - (*Validator)(nil), // 2: ethereum.eth.v1.Validator - (*AttesterDutiesRequest)(nil), // 3: ethereum.eth.v1.AttesterDutiesRequest - (*AttesterDutiesResponse)(nil), // 4: ethereum.eth.v1.AttesterDutiesResponse - (*AttesterDuty)(nil), // 5: ethereum.eth.v1.AttesterDuty - (*ProposerDutiesRequest)(nil), // 6: ethereum.eth.v1.ProposerDutiesRequest - (*ProposerDutiesResponse)(nil), // 7: ethereum.eth.v1.ProposerDutiesResponse - (*ProposerDuty)(nil), // 8: ethereum.eth.v1.ProposerDuty - (*ProduceBlockRequest)(nil), // 9: ethereum.eth.v1.ProduceBlockRequest - (*ProduceBlockResponse)(nil), // 10: ethereum.eth.v1.ProduceBlockResponse - (*ProduceAttestationDataRequest)(nil), // 11: ethereum.eth.v1.ProduceAttestationDataRequest - (*ProduceAttestationDataResponse)(nil), // 12: ethereum.eth.v1.ProduceAttestationDataResponse - (*AggregateAttestationRequest)(nil), // 13: ethereum.eth.v1.AggregateAttestationRequest - (*AggregateAttestationResponse)(nil), // 14: ethereum.eth.v1.AggregateAttestationResponse - (*SubmitAggregateAndProofsRequest)(nil), // 15: ethereum.eth.v1.SubmitAggregateAndProofsRequest - (*SubmitBeaconCommitteeSubscriptionsRequest)(nil), // 16: ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest - (*BeaconCommitteeSubscribe)(nil), // 17: ethereum.eth.v1.BeaconCommitteeSubscribe - (*PrepareBeaconProposerRequest)(nil), // 18: ethereum.eth.v1.PrepareBeaconProposerRequest - (*PrepareBeaconProposerRequest_FeeRecipientContainer)(nil), // 19: ethereum.eth.v1.PrepareBeaconProposerRequest.FeeRecipientContainer - (*BeaconBlock)(nil), // 20: ethereum.eth.v1.BeaconBlock - (*AttestationData)(nil), // 21: ethereum.eth.v1.AttestationData - (*Attestation)(nil), // 22: ethereum.eth.v1.Attestation - (*SignedAggregateAttestationAndProof)(nil), // 23: ethereum.eth.v1.SignedAggregateAttestationAndProof + (ValidatorStatus)(0), // 0: ethereum.eth.v1.ValidatorStatus + (*ValidatorContainer)(nil), // 1: ethereum.eth.v1.ValidatorContainer + (*Validator)(nil), // 2: ethereum.eth.v1.Validator + (*AttesterDutiesRequest)(nil), // 3: ethereum.eth.v1.AttesterDutiesRequest + (*AttesterDutiesResponse)(nil), // 4: ethereum.eth.v1.AttesterDutiesResponse + (*AttesterDuty)(nil), // 5: ethereum.eth.v1.AttesterDuty + (*ProposerDutiesRequest)(nil), // 6: ethereum.eth.v1.ProposerDutiesRequest + (*ProposerDutiesResponse)(nil), // 7: ethereum.eth.v1.ProposerDutiesResponse + (*ProposerDuty)(nil), // 8: ethereum.eth.v1.ProposerDuty + (*ProduceBlockRequest)(nil), // 9: ethereum.eth.v1.ProduceBlockRequest + (*ProduceBlockResponse)(nil), // 10: ethereum.eth.v1.ProduceBlockResponse + (*ProduceAttestationDataRequest)(nil), // 11: ethereum.eth.v1.ProduceAttestationDataRequest + (*ProduceAttestationDataResponse)(nil), // 12: ethereum.eth.v1.ProduceAttestationDataResponse + (*AggregateAttestationRequest)(nil), // 13: ethereum.eth.v1.AggregateAttestationRequest + (*AggregateAttestationResponse)(nil), // 14: ethereum.eth.v1.AggregateAttestationResponse + (*SubmitAggregateAndProofsRequest)(nil), // 15: ethereum.eth.v1.SubmitAggregateAndProofsRequest + (*SubmitBeaconCommitteeSubscriptionsRequest)(nil), // 16: ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest + (*BeaconCommitteeSubscribe)(nil), // 17: ethereum.eth.v1.BeaconCommitteeSubscribe + (*PrepareBeaconProposerRequest)(nil), // 18: ethereum.eth.v1.PrepareBeaconProposerRequest + (*SubmitValidatorRegistrationsRequest)(nil), // 19: ethereum.eth.v1.SubmitValidatorRegistrationsRequest + (*PrepareBeaconProposerRequest_FeeRecipientContainer)(nil), // 20: ethereum.eth.v1.PrepareBeaconProposerRequest.FeeRecipientContainer + (*SubmitValidatorRegistrationsRequest_ValidatorRegistration)(nil), // 21: ethereum.eth.v1.SubmitValidatorRegistrationsRequest.ValidatorRegistration + (*SubmitValidatorRegistrationsRequest_SignedValidatorRegistration)(nil), // 22: ethereum.eth.v1.SubmitValidatorRegistrationsRequest.SignedValidatorRegistration + (*BeaconBlock)(nil), // 23: ethereum.eth.v1.BeaconBlock + (*AttestationData)(nil), // 24: ethereum.eth.v1.AttestationData + (*Attestation)(nil), // 25: ethereum.eth.v1.Attestation + (*SignedAggregateAttestationAndProof)(nil), // 26: ethereum.eth.v1.SignedAggregateAttestationAndProof } var file_proto_eth_v1_validator_proto_depIdxs = []int32{ 0, // 0: ethereum.eth.v1.ValidatorContainer.status:type_name -> ethereum.eth.v1.ValidatorStatus 2, // 1: ethereum.eth.v1.ValidatorContainer.validator:type_name -> ethereum.eth.v1.Validator 5, // 2: ethereum.eth.v1.AttesterDutiesResponse.data:type_name -> ethereum.eth.v1.AttesterDuty 8, // 3: ethereum.eth.v1.ProposerDutiesResponse.data:type_name -> ethereum.eth.v1.ProposerDuty - 20, // 4: ethereum.eth.v1.ProduceBlockResponse.data:type_name -> ethereum.eth.v1.BeaconBlock - 21, // 5: ethereum.eth.v1.ProduceAttestationDataResponse.data:type_name -> ethereum.eth.v1.AttestationData - 22, // 6: ethereum.eth.v1.AggregateAttestationResponse.data:type_name -> ethereum.eth.v1.Attestation - 23, // 7: ethereum.eth.v1.SubmitAggregateAndProofsRequest.data:type_name -> ethereum.eth.v1.SignedAggregateAttestationAndProof + 23, // 4: ethereum.eth.v1.ProduceBlockResponse.data:type_name -> ethereum.eth.v1.BeaconBlock + 24, // 5: ethereum.eth.v1.ProduceAttestationDataResponse.data:type_name -> ethereum.eth.v1.AttestationData + 25, // 6: ethereum.eth.v1.AggregateAttestationResponse.data:type_name -> ethereum.eth.v1.Attestation + 26, // 7: ethereum.eth.v1.SubmitAggregateAndProofsRequest.data:type_name -> ethereum.eth.v1.SignedAggregateAttestationAndProof 17, // 8: ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest.data:type_name -> ethereum.eth.v1.BeaconCommitteeSubscribe - 19, // 9: ethereum.eth.v1.PrepareBeaconProposerRequest.recipients:type_name -> ethereum.eth.v1.PrepareBeaconProposerRequest.FeeRecipientContainer - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 20, // 9: ethereum.eth.v1.PrepareBeaconProposerRequest.recipients:type_name -> ethereum.eth.v1.PrepareBeaconProposerRequest.FeeRecipientContainer + 22, // 10: ethereum.eth.v1.SubmitValidatorRegistrationsRequest.registrations:type_name -> ethereum.eth.v1.SubmitValidatorRegistrationsRequest.SignedValidatorRegistration + 21, // 11: ethereum.eth.v1.SubmitValidatorRegistrationsRequest.SignedValidatorRegistration.message:type_name -> ethereum.eth.v1.SubmitValidatorRegistrationsRequest.ValidatorRegistration + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_proto_eth_v1_validator_proto_init() } @@ -1850,6 +2059,18 @@ func file_proto_eth_v1_validator_proto_init() { } } file_proto_eth_v1_validator_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitValidatorRegistrationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_v1_validator_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PrepareBeaconProposerRequest_FeeRecipientContainer); i { case 0: return &v.state @@ -1861,6 +2082,30 @@ func file_proto_eth_v1_validator_proto_init() { return nil } } + file_proto_eth_v1_validator_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitValidatorRegistrationsRequest_ValidatorRegistration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_v1_validator_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitValidatorRegistrationsRequest_SignedValidatorRegistration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_proto_eth_v1_validator_proto_msgTypes[8].OneofWrappers = []interface{}{} type x struct{} @@ -1869,7 +2114,7 @@ func file_proto_eth_v1_validator_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_eth_v1_validator_proto_rawDesc, NumEnums: 1, - NumMessages: 19, + NumMessages: 22, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/eth/v1/validator.proto b/proto/eth/v1/validator.proto index 447593c44f0f..3562e21b276d 100644 --- a/proto/eth/v1/validator.proto +++ b/proto/eth/v1/validator.proto @@ -221,4 +221,25 @@ message PrepareBeaconProposerRequest { uint64 validator_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.ValidatorIndex"]; } repeated FeeRecipientContainer recipients = 1; +} + +message SubmitValidatorRegistrationsRequest { + message ValidatorRegistration { + // The address of the fee recipient. + bytes fee_recipient = 1 [(ethereum.eth.ext.ssz_size) = "20"]; + // gas_limit value in gwei + uint64 gas_limit = 2; + // timestamp in utc seconds from unix epoch + uint64 timestamp = 3; + // validator public key + bytes pubkey = 4 [(ethereum.eth.ext.ssz_size) = "48"]; + } + + message SignedValidatorRegistration { + ValidatorRegistration message = 1; + // signature of ValidatorRegistration + bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"]; + } + + repeated SignedValidatorRegistration registrations = 1; } \ No newline at end of file