From 3a35a953bff92079f7d3163facd20a2f6773ae80 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Mon, 19 Jul 2021 15:42:06 -0500 Subject: [PATCH] proto/prysm/v2: Introduce Altair pb changes (#9222) * Copy v2 protos from hf1 * Remove some extra Altair naming * Build with github.com/ferranbt/fastssz/pull/50 * Regen pb.go * Update fastssz to master --- deps.bzl | 30 +- go.mod | 4 +- go.sum | 5 +- proto/eth/ext/options.pb.go | 14 +- proto/prysm/v2/BUILD.bazel | 21 +- proto/prysm/v2/beacon_chain.pb.go | 424 +++++++++++++++++++++++++++ proto/prysm/v2/beacon_chain.pb.gw.go | 176 +++++++++++ proto/prysm/v2/beacon_chain.proto | 77 +++++ proto/prysm/v2/generated.ssz.go | 2 +- proto/prysm/v2/validator.pb.go | 161 +++++----- proto/prysm/v2/validator.pb.gw.go | 2 +- proto/prysm/v2/validator.proto | 2 +- 12 files changed, 785 insertions(+), 133 deletions(-) create mode 100755 proto/prysm/v2/beacon_chain.pb.go create mode 100755 proto/prysm/v2/beacon_chain.pb.gw.go create mode 100644 proto/prysm/v2/beacon_chain.proto diff --git a/deps.bzl b/deps.bzl index 96349ce559..0cd7df9f5e 100644 --- a/deps.bzl +++ b/deps.bzl @@ -537,18 +537,6 @@ def prysm_deps(): version = "v0.4.1-0.20210426202927-39ac3d4b3f1f", ) - go_repository( - name = "com_github_consensys_goff", - importpath = "github.com/consensys/goff", - sum = "h1:eatQPk1I/aVec+F5qs47id17bWZsQFIjxu7C9MsrIHY=", - version = "v0.3.10", - ) - go_repository( - name = "com_github_consensys_gurvy", - importpath = "github.com/consensys/gurvy", - sum = "h1:H2hvjvT2OFMgdMn5ZbhXqHt+F8DJ2clZW7Vmc0kFFxc=", - version = "v0.3.8", - ) go_repository( name = "com_github_coreos_bbolt", importpath = "github.com/coreos/bbolt", @@ -822,9 +810,8 @@ def prysm_deps(): name = "com_github_ferranbt_fastssz", importpath = "github.com/ferranbt/fastssz", nofuzz = True, - replace = "github.com/rauljordan/fastssz", - sum = "h1:CoD/RaM9s8qfHA7jAqntW3jv+z9zPBXaxCaCByrKOmg=", - version = "v0.0.0-20210622230010-a131010e198f", + sum = "h1:R8HHtp9wrae6trZA2lgJtOhghKl16lWY4cG0l7hH8CM=", + version = "v0.0.0-20210719200358-90640294cb9c", ) go_repository( @@ -1765,12 +1752,6 @@ def prysm_deps(): version = "v0.0.0-20200115003610-082473db97ca", ) - go_repository( - name = "com_github_kilic_bls12_381", - importpath = "github.com/kilic/bls12-381", - sum = "h1:eZB80d/IKkIPjCTLUBT6+Imzn2zLpXtJFzY986jlHV4=", - version = "v0.0.0-20201226121925-69dacb279461", - ) go_repository( name = "com_github_kisielk_errcheck", importpath = "github.com/kisielk/errcheck", @@ -2822,12 +2803,7 @@ def prysm_deps(): sum = "h1:RnWNS9Hlm8BIkjr6wx8li5abe0fr73jljLycdfemTp0=", version = "v1.0.1-0.20180308014038-101a6d2f8b52", ) - go_repository( - name = "com_github_rjeczalik_notify", - importpath = "github.com/rjeczalik/notify", - sum = "h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=", - version = "v0.9.1", - ) + go_repository( name = "com_github_rogpeppe_fastuuid", importpath = "github.com/rogpeppe/fastuuid", diff --git a/go.mod b/go.mod index e7d8216ec0..fbac58e4d0 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/emicklei/dot v0.11.0 github.com/ethereum/go-ethereum v1.9.25 github.com/fatih/color v1.9.0 // indirect - github.com/ferranbt/fastssz v0.0.0-20210526181520-7df50c8568f8 + github.com/ferranbt/fastssz v0.0.0-20210719200358-90640294cb9c github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 github.com/form3tech-oss/jwt-go v3.2.1+incompatible github.com/fsnotify/fsnotify v1.4.9 @@ -134,5 +134,3 @@ replace github.com/json-iterator/go => github.com/prestonvanloon/go v1.1.7-0.201 // See https://github.com/prysmaticlabs/grpc-gateway/issues/2 replace github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/prysmaticlabs/grpc-gateway/v2 v2.3.1-0.20210622145107-ca3041e1b380 - -replace github.com/ferranbt/fastssz => github.com/rauljordan/fastssz v0.0.0-20210622230010-a131010e198f diff --git a/go.sum b/go.sum index b8e3f173da..3fb16ca174 100644 --- a/go.sum +++ b/go.sum @@ -253,6 +253,9 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/ferranbt/fastssz v0.0.0-20210120143747-11b9eff30ea9/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM= +github.com/ferranbt/fastssz v0.0.0-20210719200358-90640294cb9c h1:R8HHtp9wrae6trZA2lgJtOhghKl16lWY4cG0l7hH8CM= +github.com/ferranbt/fastssz v0.0.0-20210719200358-90640294cb9c/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= @@ -1084,8 +1087,6 @@ github.com/prysmaticlabs/protoc-gen-go-cast v0.0.0-20210504233148-1e141af6a0a1 h github.com/prysmaticlabs/protoc-gen-go-cast v0.0.0-20210504233148-1e141af6a0a1/go.mod h1:au9l1XcWNEKixIlSRzEe54fYGhyELWgJJIxKu8W75Mc= github.com/r3labs/sse v0.0.0-20210224172625-26fe804710bc h1:zAsgcP8MhzAbhMnB1QQ2O7ZhWYVGYSR2iVcjzQuPV+o= github.com/r3labs/sse v0.0.0-20210224172625-26fe804710bc/go.mod h1:S8xSOnV3CgpNrWd0GQ/OoQfMtlg2uPRSuTzcSGrzwK8= -github.com/rauljordan/fastssz v0.0.0-20210622230010-a131010e198f h1:CoD/RaM9s8qfHA7jAqntW3jv+z9zPBXaxCaCByrKOmg= -github.com/rauljordan/fastssz v0.0.0-20210622230010-a131010e198f/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= diff --git a/proto/eth/ext/options.pb.go b/proto/eth/ext/options.pb.go index f200d053e5..09e4ffef1b 100755 --- a/proto/eth/ext/options.pb.go +++ b/proto/eth/ext/options.pb.go @@ -10,9 +10,9 @@ import ( reflect "reflect" proto "github.com/golang/protobuf/proto" - descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" ) const ( @@ -28,7 +28,7 @@ const _ = proto.ProtoPackageIsVersion4 var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ { - ExtendedType: (*descriptor.FieldOptions)(nil), + ExtendedType: (*descriptorpb.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 50000, Name: "ethereum.eth.ext.cast_type", @@ -36,7 +36,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "proto/eth/ext/options.proto", }, { - ExtendedType: (*descriptor.FieldOptions)(nil), + ExtendedType: (*descriptorpb.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 50001, Name: "ethereum.eth.ext.ssz_size", @@ -44,7 +44,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "proto/eth/ext/options.proto", }, { - ExtendedType: (*descriptor.FieldOptions)(nil), + ExtendedType: (*descriptorpb.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 50002, Name: "ethereum.eth.ext.ssz_max", @@ -52,7 +52,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "proto/eth/ext/options.proto", }, { - ExtendedType: (*descriptor.FieldOptions)(nil), + ExtendedType: (*descriptorpb.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 50003, Name: "ethereum.eth.ext.spec_name", @@ -61,7 +61,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ }, } -// Extension fields to descriptor.FieldOptions. +// Extension fields to descriptorpb.FieldOptions. var ( // optional string cast_type = 50000; E_CastType = &file_proto_eth_ext_options_proto_extTypes[0] @@ -108,7 +108,7 @@ var file_proto_eth_ext_options_proto_rawDesc = []byte{ } var file_proto_eth_ext_options_proto_goTypes = []interface{}{ - (*descriptor.FieldOptions)(nil), // 0: google.protobuf.FieldOptions + (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions } var file_proto_eth_ext_options_proto_depIdxs = []int32{ 0, // 0: ethereum.eth.ext.cast_type:extendee -> google.protobuf.FieldOptions diff --git a/proto/prysm/v2/BUILD.bazel b/proto/prysm/v2/BUILD.bazel index c36373cb76..661802d3f4 100644 --- a/proto/prysm/v2/BUILD.bazel +++ b/proto/prysm/v2/BUILD.bazel @@ -21,8 +21,9 @@ load("@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2:defs.bzl" proto_library( name = "proto", srcs = [ - ":ssz_proto_files", + "beacon_chain.proto", "validator.proto", + ":ssz_proto_files", ], visibility = ["//visibility:public"], deps = [ @@ -44,9 +45,9 @@ ssz_gen_marshal( name = "ssz_generated_files", go_proto = ":go_proto", includes = [ + "//proto/eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", - "//proto/eth/v1alpha1:go_default_library", ], objs = [ "BeaconBlockAltair", @@ -71,17 +72,17 @@ go_proto_library( deps = [ "//proto/eth/ext:go_default_library", "//proto/eth/v1alpha1:go_default_library", - "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto", + "@com_github_prysmaticlabs_eth2_types//:go_default_library", + "@com_github_prysmaticlabs_go_bitfield//:go_default_library", + "@go_googleapis//google/api:annotations_go_proto", + "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@io_bazel_rules_go//proto/wkt:timestamp_go_proto", - "@org_golang_google_protobuf//types/known/timestamppb:go_default_library", - "@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto", - "@com_github_prysmaticlabs_go_bitfield//:go_default_library", - "@com_github_prysmaticlabs_eth2_types//:go_default_library", - "@go_googleapis//google/api:annotations_go_proto", "@org_golang_google_protobuf//reflect/protoreflect:go_default_library", "@org_golang_google_protobuf//runtime/protoimpl:go_default_library", + "@org_golang_google_protobuf//types/known/timestamppb:go_default_library", ], ) @@ -97,12 +98,12 @@ go_proto_library( deps = [ "//proto/eth/ext:go_default_library", "//proto/eth/v1alpha1:go_default_library", - "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@go_googleapis//google/api:annotations_go_proto", - "@io_bazel_rules_go//proto/wkt:timestamp_go_proto", "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", + "@io_bazel_rules_go//proto/wkt:timestamp_go_proto", ], ) diff --git a/proto/prysm/v2/beacon_chain.pb.go b/proto/prysm/v2/beacon_chain.pb.go new file mode 100755 index 0000000000..6477eacdea --- /dev/null +++ b/proto/prysm/v2/beacon_chain.pb.go @@ -0,0 +1,424 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.15.8 +// source: proto/prysm/v2/beacon_chain.proto + +package v2 + +import ( + context "context" + reflect "reflect" + sync "sync" + + proto "github.com/golang/protobuf/proto" + v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ListBlocksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockContainers []*BeaconBlockContainer `protobuf:"bytes,1,rep,name=blockContainers,proto3" json:"blockContainers,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` +} + +func (x *ListBlocksResponse) Reset() { + *x = ListBlocksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v2_beacon_chain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBlocksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBlocksResponse) ProtoMessage() {} + +func (x *ListBlocksResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v2_beacon_chain_proto_msgTypes[0] + 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 ListBlocksResponse.ProtoReflect.Descriptor instead. +func (*ListBlocksResponse) Descriptor() ([]byte, []int) { + return file_proto_prysm_v2_beacon_chain_proto_rawDescGZIP(), []int{0} +} + +func (x *ListBlocksResponse) GetBlockContainers() []*BeaconBlockContainer { + if x != nil { + return x.BlockContainers + } + return nil +} + +func (x *ListBlocksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListBlocksResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +type BeaconBlockContainer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockRoot []byte `protobuf:"bytes,1,opt,name=block_root,json=blockRoot,proto3" json:"block_root,omitempty"` + Canonical bool `protobuf:"varint,2,opt,name=canonical,proto3" json:"canonical,omitempty"` + // Types that are assignable to Block: + // *BeaconBlockContainer_Phase0Block + // *BeaconBlockContainer_AltairBlock + Block isBeaconBlockContainer_Block `protobuf_oneof:"block"` +} + +func (x *BeaconBlockContainer) Reset() { + *x = BeaconBlockContainer{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v2_beacon_chain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BeaconBlockContainer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeaconBlockContainer) ProtoMessage() {} + +func (x *BeaconBlockContainer) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v2_beacon_chain_proto_msgTypes[1] + 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 BeaconBlockContainer.ProtoReflect.Descriptor instead. +func (*BeaconBlockContainer) Descriptor() ([]byte, []int) { + return file_proto_prysm_v2_beacon_chain_proto_rawDescGZIP(), []int{1} +} + +func (x *BeaconBlockContainer) GetBlockRoot() []byte { + if x != nil { + return x.BlockRoot + } + return nil +} + +func (x *BeaconBlockContainer) GetCanonical() bool { + if x != nil { + return x.Canonical + } + return false +} + +func (m *BeaconBlockContainer) GetBlock() isBeaconBlockContainer_Block { + if m != nil { + return m.Block + } + return nil +} + +func (x *BeaconBlockContainer) GetPhase0Block() *v1alpha1.SignedBeaconBlock { + if x, ok := x.GetBlock().(*BeaconBlockContainer_Phase0Block); ok { + return x.Phase0Block + } + return nil +} + +func (x *BeaconBlockContainer) GetAltairBlock() *SignedBeaconBlockAltair { + if x, ok := x.GetBlock().(*BeaconBlockContainer_AltairBlock); ok { + return x.AltairBlock + } + return nil +} + +type isBeaconBlockContainer_Block interface { + isBeaconBlockContainer_Block() +} + +type BeaconBlockContainer_Phase0Block struct { + Phase0Block *v1alpha1.SignedBeaconBlock `protobuf:"bytes,3,opt,name=phase0_block,json=phase0Block,proto3,oneof"` +} + +type BeaconBlockContainer_AltairBlock struct { + AltairBlock *SignedBeaconBlockAltair `protobuf:"bytes,4,opt,name=altair_block,json=altairBlock,proto3,oneof"` +} + +func (*BeaconBlockContainer_Phase0Block) isBeaconBlockContainer_Block() {} + +func (*BeaconBlockContainer_AltairBlock) isBeaconBlockContainer_Block() {} + +var File_proto_prysm_v2_beacon_chain_proto protoreflect.FileDescriptor + +var file_proto_prysm_v2_beacon_chain_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, + 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, + 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, + 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x4d, 0x0a, 0x0c, + 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0b, + 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x4f, 0x0a, 0x0c, 0x61, + 0x6c, 0x74, 0x61, 0x69, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, + 0x0b, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x07, 0x0a, 0x05, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x32, 0x8d, 0x01, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x12, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x70, + 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x42, 0x85, 0x01, 0x0a, 0x15, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x42, + 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x30, 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, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, + 0x76, 0x32, 0x3b, 0x76, 0x32, 0xaa, 0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x50, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x11, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x50, 0x72, 0x79, 0x73, 0x6d, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_prysm_v2_beacon_chain_proto_rawDescOnce sync.Once + file_proto_prysm_v2_beacon_chain_proto_rawDescData = file_proto_prysm_v2_beacon_chain_proto_rawDesc +) + +func file_proto_prysm_v2_beacon_chain_proto_rawDescGZIP() []byte { + file_proto_prysm_v2_beacon_chain_proto_rawDescOnce.Do(func() { + file_proto_prysm_v2_beacon_chain_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_prysm_v2_beacon_chain_proto_rawDescData) + }) + return file_proto_prysm_v2_beacon_chain_proto_rawDescData +} + +var file_proto_prysm_v2_beacon_chain_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_proto_prysm_v2_beacon_chain_proto_goTypes = []interface{}{ + (*ListBlocksResponse)(nil), // 0: ethereum.prysm.v2.ListBlocksResponse + (*BeaconBlockContainer)(nil), // 1: ethereum.prysm.v2.BeaconBlockContainer + (*v1alpha1.SignedBeaconBlock)(nil), // 2: ethereum.eth.v1alpha1.SignedBeaconBlock + (*SignedBeaconBlockAltair)(nil), // 3: ethereum.prysm.v2.SignedBeaconBlockAltair + (*v1alpha1.ListBlocksRequest)(nil), // 4: ethereum.eth.v1alpha1.ListBlocksRequest +} +var file_proto_prysm_v2_beacon_chain_proto_depIdxs = []int32{ + 1, // 0: ethereum.prysm.v2.ListBlocksResponse.blockContainers:type_name -> ethereum.prysm.v2.BeaconBlockContainer + 2, // 1: ethereum.prysm.v2.BeaconBlockContainer.phase0_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlock + 3, // 2: ethereum.prysm.v2.BeaconBlockContainer.altair_block:type_name -> ethereum.prysm.v2.SignedBeaconBlockAltair + 4, // 3: ethereum.prysm.v2.BeaconChain.ListBlocks:input_type -> ethereum.eth.v1alpha1.ListBlocksRequest + 0, // 4: ethereum.prysm.v2.BeaconChain.ListBlocks:output_type -> ethereum.prysm.v2.ListBlocksResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_proto_prysm_v2_beacon_chain_proto_init() } +func file_proto_prysm_v2_beacon_chain_proto_init() { + if File_proto_prysm_v2_beacon_chain_proto != nil { + return + } + file_proto_prysm_v2_beacon_block_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_prysm_v2_beacon_chain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBlocksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v2_beacon_chain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BeaconBlockContainer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_proto_prysm_v2_beacon_chain_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*BeaconBlockContainer_Phase0Block)(nil), + (*BeaconBlockContainer_AltairBlock)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_prysm_v2_beacon_chain_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_prysm_v2_beacon_chain_proto_goTypes, + DependencyIndexes: file_proto_prysm_v2_beacon_chain_proto_depIdxs, + MessageInfos: file_proto_prysm_v2_beacon_chain_proto_msgTypes, + }.Build() + File_proto_prysm_v2_beacon_chain_proto = out.File + file_proto_prysm_v2_beacon_chain_proto_rawDesc = nil + file_proto_prysm_v2_beacon_chain_proto_goTypes = nil + file_proto_prysm_v2_beacon_chain_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// BeaconChainClient is the client API for BeaconChain service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type BeaconChainClient interface { + ListBlocks(ctx context.Context, in *v1alpha1.ListBlocksRequest, opts ...grpc.CallOption) (*ListBlocksResponse, error) +} + +type beaconChainClient struct { + cc grpc.ClientConnInterface +} + +func NewBeaconChainClient(cc grpc.ClientConnInterface) BeaconChainClient { + return &beaconChainClient{cc} +} + +func (c *beaconChainClient) ListBlocks(ctx context.Context, in *v1alpha1.ListBlocksRequest, opts ...grpc.CallOption) (*ListBlocksResponse, error) { + out := new(ListBlocksResponse) + err := c.cc.Invoke(ctx, "/ethereum.prysm.v2.BeaconChain/ListBlocks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BeaconChainServer is the server API for BeaconChain service. +type BeaconChainServer interface { + ListBlocks(context.Context, *v1alpha1.ListBlocksRequest) (*ListBlocksResponse, error) +} + +// UnimplementedBeaconChainServer can be embedded to have forward compatible implementations. +type UnimplementedBeaconChainServer struct { +} + +func (*UnimplementedBeaconChainServer) ListBlocks(context.Context, *v1alpha1.ListBlocksRequest) (*ListBlocksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListBlocks not implemented") +} + +func RegisterBeaconChainServer(s *grpc.Server, srv BeaconChainServer) { + s.RegisterService(&_BeaconChain_serviceDesc, srv) +} + +func _BeaconChain_ListBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.ListBlocksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconChainServer).ListBlocks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.prysm.v2.BeaconChain/ListBlocks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconChainServer).ListBlocks(ctx, req.(*v1alpha1.ListBlocksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _BeaconChain_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ethereum.prysm.v2.BeaconChain", + HandlerType: (*BeaconChainServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListBlocks", + Handler: _BeaconChain_ListBlocks_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/prysm/v2/beacon_chain.proto", +} diff --git a/proto/prysm/v2/beacon_chain.pb.gw.go b/proto/prysm/v2/beacon_chain.pb.gw.go new file mode 100755 index 0000000000..fc74b1df4f --- /dev/null +++ b/proto/prysm/v2/beacon_chain.pb.gw.go @@ -0,0 +1,176 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/prysm/v2/beacon_chain.proto + +/* +Package v2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v2 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/ptypes/empty" + emptypb "github.com/golang/protobuf/ptypes/empty" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types" + eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join +var _ = github_com_prysmaticlabs_eth2_types.Epoch(0) +var _ = emptypb.Empty{} +var _ = empty.Empty{} + +var ( + filter_BeaconChain_ListBlocks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_BeaconChain_ListBlocks_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconChainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq eth.ListBlocksRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconChain_ListBlocks_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListBlocks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BeaconChain_ListBlocks_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconChainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq eth.ListBlocksRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconChain_ListBlocks_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListBlocks(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterBeaconChainHandlerServer registers the http handlers for service BeaconChain to "mux". +// UnaryRPC :call BeaconChainServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBeaconChainHandlerFromEndpoint instead. +func RegisterBeaconChainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconChainServer) error { + + mux.Handle("GET", pattern_BeaconChain_ListBlocks_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.prysm.v2.BeaconChain/ListBlocks") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BeaconChain_ListBlocks_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_BeaconChain_ListBlocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterBeaconChainHandlerFromEndpoint is same as RegisterBeaconChainHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterBeaconChainHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterBeaconChainHandler(ctx, mux, conn) +} + +// RegisterBeaconChainHandler registers the http handlers for service BeaconChain to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterBeaconChainHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterBeaconChainHandlerClient(ctx, mux, NewBeaconChainClient(conn)) +} + +// RegisterBeaconChainHandlerClient registers the http handlers for service BeaconChain +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BeaconChainClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BeaconChainClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "BeaconChainClient" to call the correct interceptors. +func RegisterBeaconChainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconChainClient) error { + + mux.Handle("GET", pattern_BeaconChain_ListBlocks_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.prysm.v2.BeaconChain/ListBlocks") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BeaconChain_ListBlocks_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BeaconChain_ListBlocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_BeaconChain_ListBlocks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"prysm", "v2", "beacon", "blocks"}, "")) +) + +var ( + forward_BeaconChain_ListBlocks_0 = runtime.ForwardResponseMessage +) diff --git a/proto/prysm/v2/beacon_chain.proto b/proto/prysm/v2/beacon_chain.proto new file mode 100644 index 0000000000..16fd1a3c2c --- /dev/null +++ b/proto/prysm/v2/beacon_chain.proto @@ -0,0 +1,77 @@ +// Copyright 2021 Prysmatic Labs. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +syntax = "proto3"; + +package ethereum.prysm.v2; + +import "google/api/annotations.proto"; +import "proto/eth/v1alpha1/beacon_block.proto"; +import "proto/eth/v1alpha1/beacon_chain.proto"; +import "proto/prysm/v2/beacon_block.proto"; + +option csharp_namespace = "Ethereum.Prysm.V2"; +option go_package = "github.com/prysmaticlabs/prysm/proto/prysm/v2;v2"; +option java_multiple_files = true; +option java_outer_classname = "BeaconChainProto"; +option java_package = "org.ethereum.prysm.v2"; +option php_namespace = "Ethereum\\Prysm\\v2"; + +// Beacon chain API +// +// The beacon chain API can be used to access data relevant to the Ethereum Beacon Chain. +service BeaconChain { + // Retrieve blocks by root, slot, or epoch. + // + // The server may return multiple blocks in the case that a slot or epoch is + // provided as the filter criteria. The server may return an empty list when + // no blocks in their database match the filter criteria. This RPC should + // not return NOT_FOUND. Only one filter criteria should be used. This endpoint + // allows for retrieval of genesis information via a boolean query filter. + rpc ListBlocks(ethereum.eth.v1alpha1.ListBlocksRequest) returns (ListBlocksResponse) { + option (google.api.http) = { + get: "/prysm/v2/beacon/blocks" + }; + } +} + +message ListBlocksResponse { + repeated BeaconBlockContainer blockContainers = 1; + + // A pagination token returned from a previous call to `ListBlocks` + // that indicates from where listing should continue. + // This field is optional. + string next_page_token = 2; + + // Total count of Blocks matching the request filter. + int32 total_size = 3; +} + +// A container that contains both the beacon block +// and its corresponding root. +message BeaconBlockContainer { + // 32 byte merkle tree root of contained beacon block. + bytes block_root = 1; + + // Boolean indicating whether the block is canonical. + bool canonical = 2; + + // The desired block to be returned. + oneof block { + // Representing a phase 0 block. + ethereum.eth.v1alpha1.SignedBeaconBlock phase0_block = 3; + + // Representing an altair block. + SignedBeaconBlockAltair altair_block = 4; + } +} diff --git a/proto/prysm/v2/generated.ssz.go b/proto/prysm/v2/generated.ssz.go index 5f7e4d9a5c..86ff653ebd 100644 --- a/proto/prysm/v2/generated.ssz.go +++ b/proto/prysm/v2/generated.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: 42a90e41ab6d24bff4129db961d34921a0029e66055341893a96eaca9f66eedd +// Hash: 577b6f3ae5aaaf7838b498df8ada55a81b50923f042ce4decc6d967d480e8167 package v2 import ( diff --git a/proto/prysm/v2/validator.pb.go b/proto/prysm/v2/validator.pb.go index 9fb9f4e3a3..54a4595063 100755 --- a/proto/prysm/v2/validator.pb.go +++ b/proto/prysm/v2/validator.pb.go @@ -389,95 +389,94 @@ var file_proto_prysm_v2_validator_proto_rawDesc = []byte{ 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x32, 0xe4, 0x09, + 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x32, 0xe1, 0x09, 0x0a, 0x19, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x7b, 0x0a, 0x08, 0x47, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x78, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, - 0x69, 0x72, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x65, 0x74, 0x68, - 0x2f, 0x76, 0x32, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x88, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, - 0x6c, 0x74, 0x61, 0x69, 0x72, 0x1a, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x3a, 0x01, 0x2a, 0x12, 0x97, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, - 0x12, 0x2b, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x81, 0x01, - 0x0a, 0x11, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67, + 0x69, 0x72, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x88, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, + 0x69, 0x72, 0x1a, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x01, 0x2a, + 0x12, 0x97, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x01, - 0x2a, 0x12, 0xa8, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2f, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, - 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x70, 0x72, 0x79, 0x73, - 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0xb8, 0x01, 0x0a, - 0x1c, 0x47, 0x65, 0x74, 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, 0x33, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, - 0x32, 0x2e, 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, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, - 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 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, - 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2a, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, - 0x2f, 0x76, 0x32, 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, 0x3a, 0x01, 0x2a, 0x12, 0xa7, 0x01, 0x0a, 0x20, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x2d, 0x2e, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x81, 0x01, 0x0a, 0x11, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xa8, + 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2f, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 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, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x31, 0x2f, 0x70, 0x72, - 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x3a, 0x01, - 0x2a, 0x12, 0x90, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x12, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, - 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, - 0x21, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x30, 0x01, 0x42, 0x83, 0x01, 0x0a, 0x15, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x42, 0x0e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x30, 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, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x3b, - 0x76, 0x32, 0xaa, 0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x50, 0x72, - 0x79, 0x73, 0x6d, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x5c, 0x50, 0x72, 0x79, 0x73, 0x6d, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, + 0x32, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0xb8, 0x01, 0x0a, 0x1c, 0x47, 0x65, + 0x74, 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, 0x33, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 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, + 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x2e, 0x76, 0x32, 0x2e, 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, 0x22, 0x35, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2a, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, + 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, 0x3a, 0x01, 0x2a, 0x12, 0xa7, 0x01, 0x0a, 0x20, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 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, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x31, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0x90, + 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, + 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x70, + 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, + 0x01, 0x42, 0x83, 0x01, 0x0a, 0x15, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 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, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x32, 0x3b, 0x76, 0x32, 0xaa, + 0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x50, 0x72, 0x79, 0x73, 0x6d, + 0x2e, 0x56, 0x32, 0xca, 0x02, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x50, + 0x72, 0x79, 0x73, 0x6d, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/prysm/v2/validator.pb.gw.go b/proto/prysm/v2/validator.pb.gw.go index 2f68114bc9..bd7093d0ff 100755 --- a/proto/prysm/v2/validator.pb.gw.go +++ b/proto/prysm/v2/validator.pb.gw.go @@ -671,7 +671,7 @@ func RegisterBeaconNodeValidatorAltairHandlerClient(ctx context.Context, mux *ru } var ( - pattern_BeaconNodeValidatorAltair_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v2prysm", "validator", "block"}, "")) + pattern_BeaconNodeValidatorAltair_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"prysm", "v2", "validator", "block"}, "")) pattern_BeaconNodeValidatorAltair_ProposeBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"prysm", "v2", "validator", "block"}, "")) diff --git a/proto/prysm/v2/validator.proto b/proto/prysm/v2/validator.proto index 510398e9f8..b111e9140a 100644 --- a/proto/prysm/v2/validator.proto +++ b/proto/prysm/v2/validator.proto @@ -46,7 +46,7 @@ service BeaconNodeValidatorAltair { // data for proposer to sign. This block is versioned from Altair onwards. rpc GetBlock(ethereum.eth.v1alpha1.BlockRequest) returns (BeaconBlockAltair) { option (google.api.http) = { - get: "/eth/v2prysm/validator/block" + get: "/prysm/v2/validator/block" }; }