PrepareBeaconProposer Protobuf Schema (#10332)

* prepare v1 protos

* add in protos

* prepare beacon proposer

* stubs

* builds

* gaz

* build

* rem

* ssz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Raul Jordan
2022-03-09 21:40:26 +00:00
committed by GitHub
parent 329a4a600c
commit f6eed74500
14 changed files with 1123 additions and 490 deletions

View File

@@ -303,6 +303,13 @@ func (vs *Server) ProduceBlockV2(ctx context.Context, req *ethpbv1.ProduceBlockR
}, nil
}
// PrepareBeaconProposer --
func (vs *Server) PrepareBeaconProposer(
_ context.Context, _ *ethpbv1.PrepareBeaconProposerRequest,
) (*emptypb.Empty, error) {
return &emptypb.Empty{}, status.Error(codes.Unimplemented, "Unimplemented")
}
// 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) {

View File

@@ -81,6 +81,7 @@ go_library(
"@com_github_prysmaticlabs_eth2_types//:go_default_library",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@io_opencensus_go//trace:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//status:go_default_library",

View File

@@ -6,6 +6,7 @@ import (
"fmt"
"time"
emptypb "github.com/golang/protobuf/ptypes/empty"
"github.com/pkg/errors"
"github.com/prysmaticlabs/prysm/beacon-chain/core/feed"
blockfeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/block"
@@ -115,6 +116,13 @@ func (vs *Server) ProposeBlock(ctx context.Context, rBlk *ethpb.SignedBeaconBloc
return vs.proposeGenericBeaconBlock(ctx, blk)
}
// PrepareBeaconProposer --
func (vs *Server) PrepareBeaconProposer(
_ context.Context, _ *ethpb.PrepareBeaconProposerRequest,
) (*emptypb.Empty, error) {
return &emptypb.Empty{}, status.Error(codes.Unimplemented, "Unimplemented")
}
func (vs *Server) proposeGenericBeaconBlock(ctx context.Context, blk block.SignedBeaconBlock) (*ethpb.ProposeResponse, error) {
ctx, span := trace.StartSpan(ctx, "ProposerServer.proposeGenericBeaconBlock")
defer span.End()

View File

@@ -45,7 +45,7 @@ var file_proto_eth_service_validator_service_proto_rawDesc = []byte{
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 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, 0xb6, 0x10, 0x0a, 0x0f, 0x42,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd6, 0x11, 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,
@@ -96,7 +96,17 @@ var file_proto_eth_service_validator_service_proto_rawDesc = []byte{
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x32, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x2a, 0x12, 0x28, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74,
0x68, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x73, 0x6c, 0x6f, 0x74, 0x7d, 0x12, 0xae, 0x01, 0x0a,
0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x73, 0x6c, 0x6f, 0x74, 0x7d, 0x12, 0x9d, 0x01, 0x0a,
0x15, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x72,
0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65,
0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 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, 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,
@@ -195,22 +205,23 @@ var file_proto_eth_service_validator_service_proto_goTypes = []interface{}{
(*v1.ProposerDutiesRequest)(nil), // 1: ethereum.eth.v1.ProposerDutiesRequest
(*v2.SyncCommitteeDutiesRequest)(nil), // 2: ethereum.eth.v2.SyncCommitteeDutiesRequest
(*v1.ProduceBlockRequest)(nil), // 3: ethereum.eth.v1.ProduceBlockRequest
(*v1.ProduceAttestationDataRequest)(nil), // 4: ethereum.eth.v1.ProduceAttestationDataRequest
(*v1.AggregateAttestationRequest)(nil), // 5: ethereum.eth.v1.AggregateAttestationRequest
(*v1.SubmitAggregateAndProofsRequest)(nil), // 6: ethereum.eth.v1.SubmitAggregateAndProofsRequest
(*v1.SubmitBeaconCommitteeSubscriptionsRequest)(nil), // 7: ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest
(*v2.SubmitSyncCommitteeSubscriptionsRequest)(nil), // 8: ethereum.eth.v2.SubmitSyncCommitteeSubscriptionsRequest
(*v2.ProduceSyncCommitteeContributionRequest)(nil), // 9: ethereum.eth.v2.ProduceSyncCommitteeContributionRequest
(*v2.SubmitContributionAndProofsRequest)(nil), // 10: ethereum.eth.v2.SubmitContributionAndProofsRequest
(*v1.AttesterDutiesResponse)(nil), // 11: ethereum.eth.v1.AttesterDutiesResponse
(*v1.ProposerDutiesResponse)(nil), // 12: ethereum.eth.v1.ProposerDutiesResponse
(*v2.SyncCommitteeDutiesResponse)(nil), // 13: ethereum.eth.v2.SyncCommitteeDutiesResponse
(*v1.ProduceBlockResponse)(nil), // 14: ethereum.eth.v1.ProduceBlockResponse
(*v2.ProduceBlockResponseV2)(nil), // 15: ethereum.eth.v2.ProduceBlockResponseV2
(*v1.ProduceAttestationDataResponse)(nil), // 16: ethereum.eth.v1.ProduceAttestationDataResponse
(*v1.AggregateAttestationResponse)(nil), // 17: ethereum.eth.v1.AggregateAttestationResponse
(*empty.Empty)(nil), // 18: google.protobuf.Empty
(*v2.ProduceSyncCommitteeContributionResponse)(nil), // 19: ethereum.eth.v2.ProduceSyncCommitteeContributionResponse
(*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
(*empty.Empty)(nil), // 17: google.protobuf.Empty
(*v1.ProduceAttestationDataResponse)(nil), // 18: ethereum.eth.v1.ProduceAttestationDataResponse
(*v1.AggregateAttestationResponse)(nil), // 19: ethereum.eth.v1.AggregateAttestationResponse
(*v2.ProduceSyncCommitteeContributionResponse)(nil), // 20: 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
@@ -218,27 +229,29 @@ var file_proto_eth_service_validator_service_proto_depIdxs = []int32{
2, // 2: ethereum.eth.service.BeaconValidator.GetSyncCommitteeDuties:input_type -> ethereum.eth.v2.SyncCommitteeDutiesRequest
3, // 3: ethereum.eth.service.BeaconValidator.ProduceBlock:input_type -> ethereum.eth.v1.ProduceBlockRequest
3, // 4: ethereum.eth.service.BeaconValidator.ProduceBlockV2:input_type -> ethereum.eth.v1.ProduceBlockRequest
4, // 5: ethereum.eth.service.BeaconValidator.ProduceAttestationData:input_type -> ethereum.eth.v1.ProduceAttestationDataRequest
5, // 6: ethereum.eth.service.BeaconValidator.GetAggregateAttestation:input_type -> ethereum.eth.v1.AggregateAttestationRequest
6, // 7: ethereum.eth.service.BeaconValidator.SubmitAggregateAndProofs:input_type -> ethereum.eth.v1.SubmitAggregateAndProofsRequest
7, // 8: ethereum.eth.service.BeaconValidator.SubmitBeaconCommitteeSubscription:input_type -> ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest
8, // 9: ethereum.eth.service.BeaconValidator.SubmitSyncCommitteeSubscription:input_type -> ethereum.eth.v2.SubmitSyncCommitteeSubscriptionsRequest
9, // 10: ethereum.eth.service.BeaconValidator.ProduceSyncCommitteeContribution:input_type -> ethereum.eth.v2.ProduceSyncCommitteeContributionRequest
10, // 11: ethereum.eth.service.BeaconValidator.SubmitContributionAndProofs:input_type -> ethereum.eth.v2.SubmitContributionAndProofsRequest
11, // 12: ethereum.eth.service.BeaconValidator.GetAttesterDuties:output_type -> ethereum.eth.v1.AttesterDutiesResponse
12, // 13: ethereum.eth.service.BeaconValidator.GetProposerDuties:output_type -> ethereum.eth.v1.ProposerDutiesResponse
13, // 14: ethereum.eth.service.BeaconValidator.GetSyncCommitteeDuties:output_type -> ethereum.eth.v2.SyncCommitteeDutiesResponse
14, // 15: ethereum.eth.service.BeaconValidator.ProduceBlock:output_type -> ethereum.eth.v1.ProduceBlockResponse
15, // 16: ethereum.eth.service.BeaconValidator.ProduceBlockV2:output_type -> ethereum.eth.v2.ProduceBlockResponseV2
16, // 17: ethereum.eth.service.BeaconValidator.ProduceAttestationData:output_type -> ethereum.eth.v1.ProduceAttestationDataResponse
17, // 18: ethereum.eth.service.BeaconValidator.GetAggregateAttestation:output_type -> ethereum.eth.v1.AggregateAttestationResponse
18, // 19: ethereum.eth.service.BeaconValidator.SubmitAggregateAndProofs:output_type -> google.protobuf.Empty
18, // 20: ethereum.eth.service.BeaconValidator.SubmitBeaconCommitteeSubscription:output_type -> google.protobuf.Empty
18, // 21: ethereum.eth.service.BeaconValidator.SubmitSyncCommitteeSubscription:output_type -> google.protobuf.Empty
19, // 22: ethereum.eth.service.BeaconValidator.ProduceSyncCommitteeContribution:output_type -> ethereum.eth.v2.ProduceSyncCommitteeContributionResponse
18, // 23: ethereum.eth.service.BeaconValidator.SubmitContributionAndProofs:output_type -> google.protobuf.Empty
12, // [12:24] is the sub-list for method output_type
0, // [0:12] is the sub-list for method input_type
4, // 5: ethereum.eth.service.BeaconValidator.PrepareBeaconProposer:input_type -> ethereum.eth.v1.PrepareBeaconProposerRequest
5, // 6: ethereum.eth.service.BeaconValidator.ProduceAttestationData:input_type -> ethereum.eth.v1.ProduceAttestationDataRequest
6, // 7: ethereum.eth.service.BeaconValidator.GetAggregateAttestation:input_type -> ethereum.eth.v1.AggregateAttestationRequest
7, // 8: ethereum.eth.service.BeaconValidator.SubmitAggregateAndProofs:input_type -> ethereum.eth.v1.SubmitAggregateAndProofsRequest
8, // 9: ethereum.eth.service.BeaconValidator.SubmitBeaconCommitteeSubscription:input_type -> ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest
9, // 10: ethereum.eth.service.BeaconValidator.SubmitSyncCommitteeSubscription:input_type -> ethereum.eth.v2.SubmitSyncCommitteeSubscriptionsRequest
10, // 11: ethereum.eth.service.BeaconValidator.ProduceSyncCommitteeContribution:input_type -> ethereum.eth.v2.ProduceSyncCommitteeContributionRequest
11, // 12: ethereum.eth.service.BeaconValidator.SubmitContributionAndProofs:input_type -> ethereum.eth.v2.SubmitContributionAndProofsRequest
12, // 13: ethereum.eth.service.BeaconValidator.GetAttesterDuties:output_type -> ethereum.eth.v1.AttesterDutiesResponse
13, // 14: ethereum.eth.service.BeaconValidator.GetProposerDuties:output_type -> ethereum.eth.v1.ProposerDutiesResponse
14, // 15: ethereum.eth.service.BeaconValidator.GetSyncCommitteeDuties:output_type -> ethereum.eth.v2.SyncCommitteeDutiesResponse
15, // 16: ethereum.eth.service.BeaconValidator.ProduceBlock:output_type -> ethereum.eth.v1.ProduceBlockResponse
16, // 17: ethereum.eth.service.BeaconValidator.ProduceBlockV2:output_type -> ethereum.eth.v2.ProduceBlockResponseV2
17, // 18: ethereum.eth.service.BeaconValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty
18, // 19: ethereum.eth.service.BeaconValidator.ProduceAttestationData:output_type -> ethereum.eth.v1.ProduceAttestationDataResponse
19, // 20: ethereum.eth.service.BeaconValidator.GetAggregateAttestation:output_type -> ethereum.eth.v1.AggregateAttestationResponse
17, // 21: ethereum.eth.service.BeaconValidator.SubmitAggregateAndProofs:output_type -> google.protobuf.Empty
17, // 22: ethereum.eth.service.BeaconValidator.SubmitBeaconCommitteeSubscription:output_type -> google.protobuf.Empty
17, // 23: ethereum.eth.service.BeaconValidator.SubmitSyncCommitteeSubscription:output_type -> google.protobuf.Empty
20, // 24: ethereum.eth.service.BeaconValidator.ProduceSyncCommitteeContribution:output_type -> ethereum.eth.v2.ProduceSyncCommitteeContributionResponse
17, // 25: ethereum.eth.service.BeaconValidator.SubmitContributionAndProofs:output_type -> google.protobuf.Empty
13, // [13:26] is the sub-list for method output_type
0, // [0:13] 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
@@ -285,6 +298,7 @@ type BeaconValidatorClient interface {
GetSyncCommitteeDuties(ctx context.Context, in *v2.SyncCommitteeDutiesRequest, opts ...grpc.CallOption) (*v2.SyncCommitteeDutiesResponse, error)
ProduceBlock(ctx context.Context, in *v1.ProduceBlockRequest, opts ...grpc.CallOption) (*v1.ProduceBlockResponse, error)
ProduceBlockV2(ctx context.Context, in *v1.ProduceBlockRequest, opts ...grpc.CallOption) (*v2.ProduceBlockResponseV2, error)
PrepareBeaconProposer(ctx context.Context, in *v1.PrepareBeaconProposerRequest, 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)
@@ -347,6 +361,15 @@ func (c *beaconValidatorClient) ProduceBlockV2(ctx context.Context, in *v1.Produ
return out, nil
}
func (c *beaconValidatorClient) PrepareBeaconProposer(ctx context.Context, in *v1.PrepareBeaconProposerRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconValidator/PrepareBeaconProposer", 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...)
@@ -417,6 +440,7 @@ type BeaconValidatorServer interface {
GetSyncCommitteeDuties(context.Context, *v2.SyncCommitteeDutiesRequest) (*v2.SyncCommitteeDutiesResponse, error)
ProduceBlock(context.Context, *v1.ProduceBlockRequest) (*v1.ProduceBlockResponse, error)
ProduceBlockV2(context.Context, *v1.ProduceBlockRequest) (*v2.ProduceBlockResponseV2, error)
PrepareBeaconProposer(context.Context, *v1.PrepareBeaconProposerRequest) (*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)
@@ -445,6 +469,9 @@ func (*UnimplementedBeaconValidatorServer) ProduceBlock(context.Context, *v1.Pro
func (*UnimplementedBeaconValidatorServer) ProduceBlockV2(context.Context, *v1.ProduceBlockRequest) (*v2.ProduceBlockResponseV2, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProduceBlockV2 not implemented")
}
func (*UnimplementedBeaconValidatorServer) PrepareBeaconProposer(context.Context, *v1.PrepareBeaconProposerRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method PrepareBeaconProposer not implemented")
}
func (*UnimplementedBeaconValidatorServer) ProduceAttestationData(context.Context, *v1.ProduceAttestationDataRequest) (*v1.ProduceAttestationDataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProduceAttestationData not implemented")
}
@@ -561,6 +588,24 @@ func _BeaconValidator_ProduceBlockV2_Handler(srv interface{}, ctx context.Contex
return interceptor(ctx, in, info, handler)
}
func _BeaconValidator_PrepareBeaconProposer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v1.PrepareBeaconProposerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconValidatorServer).PrepareBeaconProposer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.eth.service.BeaconValidator/PrepareBeaconProposer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconValidatorServer).PrepareBeaconProposer(ctx, req.(*v1.PrepareBeaconProposerRequest))
}
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 {
@@ -711,6 +756,10 @@ var _BeaconValidator_serviceDesc = grpc.ServiceDesc{
MethodName: "ProduceBlockV2",
Handler: _BeaconValidator_ProduceBlockV2_Handler,
},
{
MethodName: "PrepareBeaconProposer",
Handler: _BeaconValidator_PrepareBeaconProposer_Handler,
},
{
MethodName: "ProduceAttestationData",
Handler: _BeaconValidator_ProduceAttestationData_Handler,

View File

@@ -377,6 +377,40 @@ func local_request_BeaconValidator_ProduceBlockV2_0(ctx context.Context, marshal
}
func request_BeaconValidator_PrepareBeaconProposer_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq v1.PrepareBeaconProposerRequest
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.PrepareBeaconProposer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconValidator_PrepareBeaconProposer_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq v1.PrepareBeaconProposerRequest
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.PrepareBeaconProposer(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_BeaconValidator_ProduceAttestationData_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
@@ -742,6 +776,29 @@ func RegisterBeaconValidatorHandlerServer(ctx context.Context, mux *runtime.Serv
})
mux.Handle("POST", pattern_BeaconValidator_PrepareBeaconProposer_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/PrepareBeaconProposer")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconValidator_PrepareBeaconProposer_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_PrepareBeaconProposer_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()
@@ -1044,6 +1101,26 @@ func RegisterBeaconValidatorHandlerClient(ctx context.Context, mux *runtime.Serv
})
mux.Handle("POST", pattern_BeaconValidator_PrepareBeaconProposer_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/PrepareBeaconProposer")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconValidator_PrepareBeaconProposer_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_PrepareBeaconProposer_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()
@@ -1198,6 +1275,8 @@ var (
pattern_BeaconValidator_ProduceBlockV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"internal", "eth", "v2", "validator", "blocks", "slot"}, ""))
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_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"}, ""))
@@ -1224,6 +1303,8 @@ var (
forward_BeaconValidator_ProduceBlockV2_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_PrepareBeaconProposer_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_ProduceAttestationData_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_GetAggregateAttestation_0 = runtime.ForwardResponseMessage

View File

@@ -101,6 +101,20 @@ service BeaconValidator {
option (google.api.http) = { get: "/internal/eth/v2/validator/blocks/{slot}" };
}
// PrepareBeaconProposer submits fee recipient information to be used when preparing block
// proposal execution payloads.
//
// HTTP response usage:
// - 200: Successful response
// - 400: Invalid block production request
// - 500: Beacon node internal error
rpc PrepareBeaconProposer(v1.PrepareBeaconProposerRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/internal/eth/v1/validator/prepare_beacon_proposer"
body: "*"
};
}
// ProduceAttestationData requests that the beacon node produces attestation data for
// the requested committee index and slot based on the nodes current head.
//

View File

@@ -1134,6 +1134,108 @@ func (x *BeaconCommitteeSubscribe) GetIsAggregator() bool {
return false
}
type PrepareBeaconProposerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Recipients []*PrepareBeaconProposerRequest_FeeRecipientContainer `protobuf:"bytes,1,rep,name=recipients,proto3" json:"recipients,omitempty"`
}
func (x *PrepareBeaconProposerRequest) Reset() {
*x = PrepareBeaconProposerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_validator_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PrepareBeaconProposerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PrepareBeaconProposerRequest) ProtoMessage() {}
func (x *PrepareBeaconProposerRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_validator_proto_msgTypes[17]
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 PrepareBeaconProposerRequest.ProtoReflect.Descriptor instead.
func (*PrepareBeaconProposerRequest) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_validator_proto_rawDescGZIP(), []int{17}
}
func (x *PrepareBeaconProposerRequest) GetRecipients() []*PrepareBeaconProposerRequest_FeeRecipientContainer {
if x != nil {
return x.Recipients
}
return nil
}
type PrepareBeaconProposerRequest_FeeRecipientContainer 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"`
ValidatorIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,2,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
}
func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) Reset() {
*x = PrepareBeaconProposerRequest_FeeRecipientContainer{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_validator_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PrepareBeaconProposerRequest_FeeRecipientContainer) ProtoMessage() {}
func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) 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 PrepareBeaconProposerRequest_FeeRecipientContainer.ProtoReflect.Descriptor instead.
func (*PrepareBeaconProposerRequest_FeeRecipientContainer) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_validator_proto_rawDescGZIP(), []int{17, 0}
}
func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) GetFeeRecipient() []byte {
if x != nil {
return x.FeeRecipient
}
return nil
}
func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) GetValidatorIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.ValidatorIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
var File_proto_eth_v1_validator_proto protoreflect.FileDescriptor
var file_proto_eth_v1_validator_proto_rawDesc = []byte{
@@ -1362,31 +1464,50 @@ var file_proto_eth_v1_validator_proto_rawDesc = []byte{
0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69,
0x73, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72,
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, 0x78, 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, 0x2b, 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, 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,
0x22, 0xa3, 0x02, 0x0a, 0x1c, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x42, 0x65, 0x61, 0x63,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x63, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x42,
0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e,
0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x69,
0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x9d, 0x01, 0x0a, 0x15, 0x46, 0x65, 0x65, 0x52, 0x65,
0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69,
0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36,
0x82, 0xb5, 0x18, 0x32, 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, 0x65, 0x74, 0x68,
0x32, 0x2d, 0x74, 0x79, 0x70, 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, 0x78, 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, 0x2b, 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, 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 (
@@ -1402,46 +1523,49 @@ 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, 17)
var file_proto_eth_v1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
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
(*BeaconBlock)(nil), // 18: ethereum.eth.v1.BeaconBlock
(*AttestationData)(nil), // 19: ethereum.eth.v1.AttestationData
(*Attestation)(nil), // 20: ethereum.eth.v1.Attestation
(*SignedAggregateAttestationAndProof)(nil), // 21: 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
(*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
}
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
18, // 4: ethereum.eth.v1.ProduceBlockResponse.data:type_name -> ethereum.eth.v1.BeaconBlock
19, // 5: ethereum.eth.v1.ProduceAttestationDataResponse.data:type_name -> ethereum.eth.v1.AttestationData
20, // 6: ethereum.eth.v1.AggregateAttestationResponse.data:type_name -> ethereum.eth.v1.Attestation
21, // 7: ethereum.eth.v1.SubmitAggregateAndProofsRequest.data:type_name -> ethereum.eth.v1.SignedAggregateAttestationAndProof
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
17, // 8: ethereum.eth.v1.SubmitBeaconCommitteeSubscriptionsRequest.data:type_name -> ethereum.eth.v1.BeaconCommitteeSubscribe
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
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
}
func init() { file_proto_eth_v1_validator_proto_init() }
@@ -1656,6 +1780,30 @@ func file_proto_eth_v1_validator_proto_init() {
return nil
}
}
file_proto_eth_v1_validator_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PrepareBeaconProposerRequest); 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[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PrepareBeaconProposerRequest_FeeRecipientContainer); 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{}
@@ -1664,7 +1812,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: 17,
NumMessages: 19,
NumExtensions: 0,
NumServices: 0,
},

View File

@@ -209,3 +209,14 @@ message BeaconCommitteeSubscribe {
// If subscribing for aggregator, the beacon node will aggregate all attestations received.
bool is_aggregator = 5;
}
message PrepareBeaconProposerRequest {
message FeeRecipientContainer {
// The address of the fee recipient.
bytes fee_recipient = 1 [(ethereum.eth.ext.ssz_size) = "20"];
// The proposer validator index.
uint64 validator_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
repeated FeeRecipientContainer recipients = 1;
}

File diff suppressed because it is too large Load Diff

View File

@@ -430,6 +430,40 @@ func local_request_BeaconNodeValidator_ProposeBeaconBlock_0(ctx context.Context,
}
func request_BeaconNodeValidator_PrepareBeaconProposer_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PrepareBeaconProposerRequest
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.PrepareBeaconProposer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNodeValidator_PrepareBeaconProposer_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PrepareBeaconProposerRequest
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.PrepareBeaconProposer(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_BeaconNodeValidator_GetAttestationData_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
@@ -1090,6 +1124,29 @@ func RegisterBeaconNodeValidatorHandlerServer(ctx context.Context, mux *runtime.
})
mux.Handle("POST", pattern_BeaconNodeValidator_PrepareBeaconProposer_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.v1alpha1.BeaconNodeValidator/PrepareBeaconProposer")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNodeValidator_PrepareBeaconProposer_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_BeaconNodeValidator_PrepareBeaconProposer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetAttestationData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1654,6 +1711,26 @@ func RegisterBeaconNodeValidatorHandlerClient(ctx context.Context, mux *runtime.
})
mux.Handle("POST", pattern_BeaconNodeValidator_PrepareBeaconProposer_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.v1alpha1.BeaconNodeValidator/PrepareBeaconProposer")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNodeValidator_PrepareBeaconProposer_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNodeValidator_PrepareBeaconProposer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNodeValidator_GetAttestationData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1942,6 +2019,8 @@ var (
pattern_BeaconNodeValidator_ProposeBeaconBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha2", "validator", "block"}, ""))
pattern_BeaconNodeValidator_PrepareBeaconProposer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "prepare_beacon_proposer"}, ""))
pattern_BeaconNodeValidator_GetAttestationData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "attestation"}, ""))
pattern_BeaconNodeValidator_ProposeAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "validator", "attestation"}, ""))
@@ -1994,6 +2073,8 @@ var (
forward_BeaconNodeValidator_ProposeBeaconBlock_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_PrepareBeaconProposer_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_GetAttestationData_0 = runtime.ForwardResponseMessage
forward_BeaconNodeValidator_ProposeAttestation_0 = runtime.ForwardResponseMessage

View File

@@ -188,6 +188,15 @@ service BeaconNodeValidator {
};
}
// PrepareBeaconProposer submits fee recipient information to be used when preparing block
// proposal execution payloads.
rpc PrepareBeaconProposer(PrepareBeaconProposerRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/prepare_beacon_proposer"
body: "*"
};
}
// Retrieves the latest valid attestation data to be attested on the beacon chain.
//
// The server returns the latest valid data which represents the correct vote
@@ -719,3 +728,14 @@ message DoppelGangerResponse {
message StreamBlocksRequest {
bool verified_only = 1;
}
message PrepareBeaconProposerRequest {
message FeeRecipientContainer {
// The address of the fee recipient.
bytes fee_recipient = 1 [(ethereum.eth.ext.ssz_size) = "20"];
// The proposer validator index.
uint64 validator_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
repeated FeeRecipientContainer recipients = 1;
}

View File

@@ -27,6 +27,7 @@ go_library(
"//proto/prysm/v1alpha1/validator-client:go_default_library",
"@com_github_golang_mock//gomock:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//proto/gateway:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//metadata:go_default_library",
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",

View File

@@ -9,6 +9,7 @@ import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
"github.com/pkg/errors"
eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
grpc "google.golang.org/grpc"
metadata "google.golang.org/grpc/metadata"
@@ -238,6 +239,13 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) MultipleValidatorStatus(arg
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MultipleValidatorStatus", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).MultipleValidatorStatus), varargs...)
}
// ProposeBeaconBlock mocks base method
func (m *MockBeaconNodeValidatorClient) PrepareBeaconProposer(
arg0 context.Context, arg1 *eth.PrepareBeaconProposerRequest, arg2 ...grpc.CallOption,
) (*emptypb.Empty, error) {
return nil, errors.New("unimplemented")
}
// ProposeAttestation mocks base method
func (m *MockBeaconNodeValidatorClient) ProposeAttestation(arg0 context.Context, arg1 *eth.Attestation, arg2 ...grpc.CallOption) (*eth.AttestResponse, error) {
m.ctrl.T.Helper()

View File

@@ -9,6 +9,7 @@ import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
"github.com/pkg/errors"
eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
metadata "google.golang.org/grpc/metadata"
emptypb "google.golang.org/protobuf/types/known/emptypb"
@@ -211,6 +212,13 @@ func (m *MockBeaconNodeValidatorServer) ProposeBeaconBlock(arg0 context.Context,
return ret0, ret1
}
// ProposeBeaconBlock mocks base method
func (m *MockBeaconNodeValidatorServer) PrepareBeaconProposer(
arg0 context.Context, arg1 *eth.PrepareBeaconProposerRequest,
) (*emptypb.Empty, error) {
return nil, errors.New("unimplemented")
}
// ProposeBeaconBlock indicates an expected call of ProposeBeaconBlock
func (mr *MockBeaconNodeValidatorServerMockRecorder) ProposeBeaconBlock(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()