diff --git a/BUILD.bazel b/BUILD.bazel index 7bd7a5931..f78e7b902 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -31,27 +31,21 @@ alias( alias( name = "grpc_proto_compiler", actual = "@io_bazel_rules_go//proto:gogofast_grpc", - visibility = [ - "//proto:__subpackages__", - ], + visibility = ["//visibility:public"], ) # Protobuf gRPC compiler without gogoproto. Required for gRPC gateway. alias( name = "grpc_nogogo_proto_compiler", actual = "@io_bazel_rules_go//proto:go_grpc", - visibility = [ - "//proto:__subpackages__", - ], + visibility = ["//visibility:public"], ) # Protobuf gRPC gateway compiler alias( name = "grpc_gateway_proto_compiler", actual = "@grpc_ecosystem_grpc_gateway//protoc-gen-grpc-gateway:go_gen_grpc_gateway", - visibility = [ - "//proto:__subpackages__", - ], + visibility = ["//visibility:public"], ) gometalinter( diff --git a/WORKSPACE b/WORKSPACE index c919a41ac..2eac2542e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,3 +1,5 @@ +workspace(name = "prysm") + load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") @@ -1199,7 +1201,11 @@ go_repository( go_repository( name = "com_github_prysmaticlabs_ethereumapis", - commit = "367ca574419a062ae26818f60bdeb5751a6f5380", + commit = "367ca574419a062ae26818f60bdeb5751a6f538", + patch_args = ["-p1"], + patches = [ + "//third_party:com_github_prysmaticlabs_ethereumapis-tags.patch", + ], importpath = "github.com/prysmaticlabs/ethereumapis", ) diff --git a/beacon-chain/archiver/BUILD.bazel b/beacon-chain/archiver/BUILD.bazel index f76c56a10..1a79d79f2 100644 --- a/beacon-chain/archiver/BUILD.bazel +++ b/beacon-chain/archiver/BUILD.bazel @@ -13,7 +13,6 @@ go_library( "//beacon-chain/core/validators:go_default_library", "//beacon-chain/db:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", @@ -31,10 +30,10 @@ go_test( "//beacon-chain/db:go_default_library", "//beacon-chain/db/testing:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", diff --git a/beacon-chain/archiver/service.go b/beacon-chain/archiver/service.go index 44364793a..0ea59becc 100644 --- a/beacon-chain/archiver/service.go +++ b/beacon-chain/archiver/service.go @@ -12,7 +12,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" "github.com/prysmaticlabs/prysm/beacon-chain/db" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/sirupsen/logrus" ) @@ -77,7 +76,7 @@ func (s *Service) archiveCommitteeInfo(ctx context.Context, headState *pb.Beacon return errors.Wrap(err, "could not generate seed") } - info := ðpb.ArchivedCommitteeInfo{ + info := &pb.ArchivedCommitteeInfo{ ProposerSeed: proposerSeed[:], AttesterSeed: attesterSeed[:], } @@ -100,7 +99,7 @@ func (s *Service) archiveActiveSetChanges(ctx context.Context, headState *pb.Bea if err != nil { return errors.Wrap(err, "could not determine exited validator indices") } - activeSetChanges := ðpb.ArchivedActiveSetChanges{ + activeSetChanges := &pb.ArchivedActiveSetChanges{ Activated: activations, Exited: exited, Slashed: slashings, diff --git a/beacon-chain/archiver/service_test.go b/beacon-chain/archiver/service_test.go index 1a2674e3d..db4a0618d 100644 --- a/beacon-chain/archiver/service_test.go +++ b/beacon-chain/archiver/service_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" @@ -15,7 +16,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/db" dbutil "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/sirupsen/logrus" @@ -221,7 +221,7 @@ func TestArchiverService_SavesCommitteeInfo(t *testing.T) { if err != nil { t.Fatal(err) } - wanted := ðpb.ArchivedCommitteeInfo{ + wanted := &pb.ArchivedCommitteeInfo{ ProposerSeed: proposerSeed[:], AttesterSeed: attesterSeed[:], } diff --git a/beacon-chain/blockchain/BUILD.bazel b/beacon-chain/blockchain/BUILD.bazel index b14858cee..43fc72905 100644 --- a/beacon-chain/blockchain/BUILD.bazel +++ b/beacon-chain/blockchain/BUILD.bazel @@ -25,7 +25,6 @@ go_library( "//beacon-chain/p2p:go_default_library", "//beacon-chain/powchain:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/featureconfig:go_default_library", "//shared/params:go_default_library", @@ -34,6 +33,7 @@ go_library( "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", @@ -68,7 +68,6 @@ go_test( "//beacon-chain/p2p:go_default_library", "//beacon-chain/powchain:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/event:go_default_library", "//shared/params:go_default_library", @@ -77,6 +76,7 @@ go_test( "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//core/types:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", @@ -103,7 +103,6 @@ go_test( "//beacon-chain/p2p:go_default_library", "//beacon-chain/powchain:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/event:go_default_library", "//shared/params:go_default_library", @@ -112,6 +111,7 @@ go_test( "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//core/types:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", diff --git a/beacon-chain/blockchain/chain_info.go b/beacon-chain/blockchain/chain_info.go index db5bfa425..52e771aa1 100644 --- a/beacon-chain/blockchain/chain_info.go +++ b/beacon-chain/blockchain/chain_info.go @@ -6,8 +6,8 @@ import ( "time" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/blockchain/chain_info_norace_test.go b/beacon-chain/blockchain/chain_info_norace_test.go index 032a357c9..68a5b9b09 100644 --- a/beacon-chain/blockchain/chain_info_norace_test.go +++ b/beacon-chain/blockchain/chain_info_norace_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) func TestHeadSlot_DataRace(t *testing.T) { diff --git a/beacon-chain/blockchain/chain_info_test.go b/beacon-chain/blockchain/chain_info_test.go index 01dab1543..a40d00802 100644 --- a/beacon-chain/blockchain/chain_info_test.go +++ b/beacon-chain/blockchain/chain_info_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/blockchain/forkchoice/BUILD.bazel b/beacon-chain/blockchain/forkchoice/BUILD.bazel index 0f2361027..f3183febe 100644 --- a/beacon-chain/blockchain/forkchoice/BUILD.bazel +++ b/beacon-chain/blockchain/forkchoice/BUILD.bazel @@ -21,7 +21,6 @@ go_library( "//beacon-chain/db/filters:go_default_library", "//beacon-chain/flags:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/featureconfig:go_default_library", "//shared/hashutil:go_default_library", @@ -31,6 +30,7 @@ go_library( "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", @@ -58,11 +58,11 @@ go_test( "//beacon-chain/db/filters:go_default_library", "//beacon-chain/db/testing:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@in_gopkg_yaml_v2//:go_default_library", diff --git a/beacon-chain/blockchain/forkchoice/benchmark_test.go b/beacon-chain/blockchain/forkchoice/benchmark_test.go index d3cb0c033..05d588ae3 100644 --- a/beacon-chain/blockchain/forkchoice/benchmark_test.go +++ b/beacon-chain/blockchain/forkchoice/benchmark_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/cache" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/beacon-chain/blockchain/forkchoice/lmd_ghost_yaml_test.go b/beacon-chain/blockchain/forkchoice/lmd_ghost_yaml_test.go index 036f1c53f..3a5809888 100644 --- a/beacon-chain/blockchain/forkchoice/lmd_ghost_yaml_test.go +++ b/beacon-chain/blockchain/forkchoice/lmd_ghost_yaml_test.go @@ -8,12 +8,12 @@ import ( "strconv" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/cache" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "gopkg.in/yaml.v2" ) diff --git a/beacon-chain/blockchain/forkchoice/process_attestation.go b/beacon-chain/blockchain/forkchoice/process_attestation.go index 9a29438bc..4153e6758 100644 --- a/beacon-chain/blockchain/forkchoice/process_attestation.go +++ b/beacon-chain/blockchain/forkchoice/process_attestation.go @@ -6,13 +6,13 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/cache" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/sirupsen/logrus" @@ -108,7 +108,7 @@ func (s *Store) OnAttestation(ctx context.Context, a *ethpb.Attestation) error { log := log.WithFields(logrus.Fields{ "Slot": a.Data.Slot, - "Index": a.Data.Index, + "Index": a.Data.CommitteeIndex, "AggregatedBitfield": fmt.Sprintf("%08b", a.AggregationBits), "BeaconBlockRoot": fmt.Sprintf("%#x", bytesutil.Trunc(a.Data.BeaconBlockRoot)), }) diff --git a/beacon-chain/blockchain/forkchoice/process_attestation_test.go b/beacon-chain/blockchain/forkchoice/process_attestation_test.go index 5e3febcbb..4d1c95fd2 100644 --- a/beacon-chain/blockchain/forkchoice/process_attestation_test.go +++ b/beacon-chain/blockchain/forkchoice/process_attestation_test.go @@ -6,11 +6,11 @@ import ( "strings" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/blockchain/forkchoice/process_block.go b/beacon-chain/blockchain/forkchoice/process_block.go index 69cc8c808..0a42529da 100644 --- a/beacon-chain/blockchain/forkchoice/process_block.go +++ b/beacon-chain/blockchain/forkchoice/process_block.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" @@ -14,7 +15,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" "github.com/prysmaticlabs/prysm/beacon-chain/flags" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/hashutil" diff --git a/beacon-chain/blockchain/forkchoice/process_block_test.go b/beacon-chain/blockchain/forkchoice/process_block_test.go index e136af6b3..28c9b5eb5 100644 --- a/beacon-chain/blockchain/forkchoice/process_block_test.go +++ b/beacon-chain/blockchain/forkchoice/process_block_test.go @@ -6,6 +6,7 @@ import ( "strings" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" @@ -13,7 +14,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/core/state" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/blockchain/forkchoice/service.go b/beacon-chain/blockchain/forkchoice/service.go index c1110efe5..8bc6d8355 100644 --- a/beacon-chain/blockchain/forkchoice/service.go +++ b/beacon-chain/blockchain/forkchoice/service.go @@ -7,12 +7,12 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/cache" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "go.opencensus.io/trace" diff --git a/beacon-chain/blockchain/forkchoice/service_test.go b/beacon-chain/blockchain/forkchoice/service_test.go index 5c7e8491b..da95d4e61 100644 --- a/beacon-chain/blockchain/forkchoice/service_test.go +++ b/beacon-chain/blockchain/forkchoice/service_test.go @@ -7,6 +7,7 @@ import ( "testing" "time" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/cache" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" @@ -14,7 +15,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/beacon-chain/blockchain/forkchoice/tree_test.go b/beacon-chain/blockchain/forkchoice/tree_test.go index cdb98d3bb..7d9bf03d2 100644 --- a/beacon-chain/blockchain/forkchoice/tree_test.go +++ b/beacon-chain/blockchain/forkchoice/tree_test.go @@ -3,10 +3,10 @@ package forkchoice import ( "context" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/db" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/beacon-chain/blockchain/log.go b/beacon-chain/blockchain/log.go index 030ef0ed0..0722e6c64 100644 --- a/beacon-chain/blockchain/log.go +++ b/beacon-chain/blockchain/log.go @@ -1,7 +1,7 @@ package blockchain import ( - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/sirupsen/logrus" ) diff --git a/beacon-chain/blockchain/receive_attestation.go b/beacon-chain/blockchain/receive_attestation.go index 847c30bcd..35fa43dcd 100644 --- a/beacon-chain/blockchain/receive_attestation.go +++ b/beacon-chain/blockchain/receive_attestation.go @@ -6,7 +6,7 @@ import ( "time" "github.com/pkg/errors" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "go.opencensus.io/trace" diff --git a/beacon-chain/blockchain/receive_attestation_test.go b/beacon-chain/blockchain/receive_attestation_test.go index 1863b1e3d..012286cf2 100644 --- a/beacon-chain/blockchain/receive_attestation_test.go +++ b/beacon-chain/blockchain/receive_attestation_test.go @@ -3,10 +3,10 @@ package blockchain import ( "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/testutil" logTest "github.com/sirupsen/logrus/hooks/test" "golang.org/x/net/context" diff --git a/beacon-chain/blockchain/receive_block.go b/beacon-chain/blockchain/receive_block.go index c6ed6e9c8..6f373f02b 100644 --- a/beacon-chain/blockchain/receive_block.go +++ b/beacon-chain/blockchain/receive_block.go @@ -7,9 +7,9 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/statefeed" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/traceutil" "github.com/sirupsen/logrus" diff --git a/beacon-chain/blockchain/receive_block_test.go b/beacon-chain/blockchain/receive_block_test.go index 03201981a..3de78666c 100644 --- a/beacon-chain/blockchain/receive_block_test.go +++ b/beacon-chain/blockchain/receive_block_test.go @@ -6,12 +6,12 @@ import ( "reflect" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/testutil" logTest "github.com/sirupsen/logrus/hooks/test" ) diff --git a/beacon-chain/blockchain/service.go b/beacon-chain/blockchain/service.go index b5416af46..fabde2a12 100644 --- a/beacon-chain/blockchain/service.go +++ b/beacon-chain/blockchain/service.go @@ -11,6 +11,7 @@ import ( "time" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/forkchoice" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" @@ -23,7 +24,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/p2p" "github.com/prysmaticlabs/prysm/beacon-chain/powchain" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/sirupsen/logrus" diff --git a/beacon-chain/blockchain/service_norace_test.go b/beacon-chain/blockchain/service_norace_test.go index 062ae72ee..7672a2993 100644 --- a/beacon-chain/blockchain/service_norace_test.go +++ b/beacon-chain/blockchain/service_norace_test.go @@ -5,8 +5,8 @@ import ( "io/ioutil" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/sirupsen/logrus" ) diff --git a/beacon-chain/blockchain/service_test.go b/beacon-chain/blockchain/service_test.go index 3e8c1428b..fcff98651 100644 --- a/beacon-chain/blockchain/service_test.go +++ b/beacon-chain/blockchain/service_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ssz "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" @@ -25,7 +26,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/p2p" "github.com/prysmaticlabs/prysm/beacon-chain/powchain" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/event" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/blockchain/testing/BUILD.bazel b/beacon-chain/blockchain/testing/BUILD.bazel index 5effc8609..711418dfd 100644 --- a/beacon-chain/blockchain/testing/BUILD.bazel +++ b/beacon-chain/blockchain/testing/BUILD.bazel @@ -10,9 +10,9 @@ go_library( "//beacon-chain/core/statefeed:go_default_library", "//beacon-chain/db:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/event:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], diff --git a/beacon-chain/blockchain/testing/mock.go b/beacon-chain/blockchain/testing/mock.go index 781d1cfcb..c6d65ecfe 100644 --- a/beacon-chain/blockchain/testing/mock.go +++ b/beacon-chain/blockchain/testing/mock.go @@ -6,11 +6,11 @@ import ( "time" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/statefeed" "github.com/prysmaticlabs/prysm/beacon-chain/db" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/event" "github.com/sirupsen/logrus" ) diff --git a/beacon-chain/cache/BUILD.bazel b/beacon-chain/cache/BUILD.bazel index 1ec8954ba..f11d2b091 100644 --- a/beacon-chain/cache/BUILD.bazel +++ b/beacon-chain/cache/BUILD.bazel @@ -16,7 +16,6 @@ go_library( deps = [ "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/featureconfig:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", @@ -24,6 +23,7 @@ go_library( "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@io_k8s_client_go//tools/cache:go_default_library", ], ) @@ -46,10 +46,10 @@ go_test( deps = [ "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/featureconfig:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) diff --git a/beacon-chain/cache/attestation_data.go b/beacon-chain/cache/attestation_data.go index 8b20295b3..be98f0626 100644 --- a/beacon-chain/cache/attestation_data.go +++ b/beacon-chain/cache/attestation_data.go @@ -10,8 +10,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/featureconfig" "k8s.io/client-go/tools/cache" ) diff --git a/beacon-chain/cache/attestation_data_test.go b/beacon-chain/cache/attestation_data_test.go index ad6d84034..484c21477 100644 --- a/beacon-chain/cache/attestation_data_test.go +++ b/beacon-chain/cache/attestation_data_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/cache" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) func TestAttestationCache_RoundTrip(t *testing.T) { diff --git a/beacon-chain/cache/checkpoint_state.go b/beacon-chain/cache/checkpoint_state.go index c8dd0bf1d..cddb8f7f6 100644 --- a/beacon-chain/cache/checkpoint_state.go +++ b/beacon-chain/cache/checkpoint_state.go @@ -7,8 +7,8 @@ import ( "github.com/gogo/protobuf/proto" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" "k8s.io/client-go/tools/cache" ) diff --git a/beacon-chain/cache/checkpoint_state_test.go b/beacon-chain/cache/checkpoint_state_test.go index 725c4be9a..4eb5f4bc5 100644 --- a/beacon-chain/cache/checkpoint_state_test.go +++ b/beacon-chain/cache/checkpoint_state_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" ) diff --git a/beacon-chain/cache/depositcache/BUILD.bazel b/beacon-chain/cache/depositcache/BUILD.bazel index d10b59c5d..75639176f 100644 --- a/beacon-chain/cache/depositcache/BUILD.bazel +++ b/beacon-chain/cache/depositcache/BUILD.bazel @@ -9,10 +9,10 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache", visibility = ["//beacon-chain:__subpackages__"], deps = [ - "//proto/eth/v1alpha1:go_default_library", "//shared/hashutil:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", ], @@ -26,9 +26,9 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", ], ) diff --git a/beacon-chain/cache/depositcache/deposits_cache.go b/beacon-chain/cache/depositcache/deposits_cache.go index 77db8607c..af21c0963 100644 --- a/beacon-chain/cache/depositcache/deposits_cache.go +++ b/beacon-chain/cache/depositcache/deposits_cache.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" log "github.com/sirupsen/logrus" "go.opencensus.io/trace" ) diff --git a/beacon-chain/cache/depositcache/deposits_test.go b/beacon-chain/cache/depositcache/deposits_test.go index 9729d8d9a..a194dcb70 100644 --- a/beacon-chain/cache/depositcache/deposits_test.go +++ b/beacon-chain/cache/depositcache/deposits_test.go @@ -6,7 +6,7 @@ import ( "math/big" "testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" logTest "github.com/sirupsen/logrus/hooks/test" ) diff --git a/beacon-chain/cache/depositcache/pending_deposits.go b/beacon-chain/cache/depositcache/pending_deposits.go index 7148eab89..f8d18bccd 100644 --- a/beacon-chain/cache/depositcache/pending_deposits.go +++ b/beacon-chain/cache/depositcache/pending_deposits.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" log "github.com/sirupsen/logrus" "go.opencensus.io/trace" diff --git a/beacon-chain/cache/depositcache/pending_deposits_test.go b/beacon-chain/cache/depositcache/pending_deposits_test.go index 2ca093e92..2452763d6 100644 --- a/beacon-chain/cache/depositcache/pending_deposits_test.go +++ b/beacon-chain/cache/depositcache/pending_deposits_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ) var _ = PendingDepositsFetcher(&DepositCache{}) diff --git a/beacon-chain/core/blocks/BUILD.bazel b/beacon-chain/core/blocks/BUILD.bazel index fa7594cea..440fdf2ff 100644 --- a/beacon-chain/core/blocks/BUILD.bazel +++ b/beacon-chain/core/blocks/BUILD.bazel @@ -17,7 +17,6 @@ go_library( "//beacon-chain/core/state/stateutils:go_default_library", "//beacon-chain/core/validators:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/featureconfig:go_default_library", @@ -27,6 +26,7 @@ go_library( "//shared/trieutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", @@ -47,7 +47,6 @@ go_test( "//beacon-chain/core/state:go_default_library", "//beacon-chain/core/state/stateutils:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", @@ -55,6 +54,7 @@ go_test( "//shared/trieutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_phoreproject_bls//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/beacon-chain/core/blocks/block.go b/beacon-chain/core/blocks/block.go index a52aa724e..7c711ce94 100644 --- a/beacon-chain/core/blocks/block.go +++ b/beacon-chain/core/blocks/block.go @@ -4,7 +4,7 @@ package blocks import ( - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/blocks/block_operations.go b/beacon-chain/core/blocks/block_operations.go index ab13697d7..2139d8fac 100644 --- a/beacon-chain/core/blocks/block_operations.go +++ b/beacon-chain/core/blocks/block_operations.go @@ -10,13 +10,13 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/cache" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state/stateutils" v "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/featureconfig" diff --git a/beacon-chain/core/blocks/block_operations_test.go b/beacon-chain/core/blocks/block_operations_test.go index 3f7b3dedc..c7fe69fbc 100644 --- a/beacon-chain/core/blocks/block_operations_test.go +++ b/beacon-chain/core/blocks/block_operations_test.go @@ -13,6 +13,7 @@ import ( "github.com/gogo/protobuf/proto" blsintern "github.com/phoreproject/bls" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" @@ -20,7 +21,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/core/state" "github.com/prysmaticlabs/prysm/beacon-chain/core/state/stateutils" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/core/blocks/eth1_data_test.go b/beacon-chain/core/blocks/eth1_data_test.go index 5cb3b6f4a..412c82a1f 100644 --- a/beacon-chain/core/blocks/eth1_data_test.go +++ b/beacon-chain/core/blocks/eth1_data_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/blocks/spectest/BUILD.bazel b/beacon-chain/core/blocks/spectest/BUILD.bazel index 7ed6625a4..b2d26207f 100644 --- a/beacon-chain/core/blocks/spectest/BUILD.bazel +++ b/beacon-chain/core/blocks/spectest/BUILD.bazel @@ -36,7 +36,7 @@ go_test( "//beacon-chain/core/state:go_default_library", "//beacon-chain/core/state/stateutils:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//shared/params/spectest:go_default_library", "//shared/testutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", @@ -69,7 +69,7 @@ go_test( "//beacon-chain/core/state:go_default_library", "//beacon-chain/core/state/stateutils:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//shared/params/spectest:go_default_library", "//shared/testutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", diff --git a/beacon-chain/core/blocks/spectest/attestation_test.go b/beacon-chain/core/blocks/spectest/attestation_test.go index 847e1986b..111856b68 100644 --- a/beacon-chain/core/blocks/spectest/attestation_test.go +++ b/beacon-chain/core/blocks/spectest/attestation_test.go @@ -4,9 +4,9 @@ import ( "path" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params/spectest" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/core/blocks/spectest/attester_slashing_test.go b/beacon-chain/core/blocks/spectest/attester_slashing_test.go index 862f25acb..45d7445a0 100644 --- a/beacon-chain/core/blocks/spectest/attester_slashing_test.go +++ b/beacon-chain/core/blocks/spectest/attester_slashing_test.go @@ -4,9 +4,9 @@ import ( "path" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params/spectest" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/core/blocks/spectest/block_header_test.go b/beacon-chain/core/blocks/spectest/block_header_test.go index a746578c5..c8ae6f213 100644 --- a/beacon-chain/core/blocks/spectest/block_header_test.go +++ b/beacon-chain/core/blocks/spectest/block_header_test.go @@ -8,11 +8,11 @@ import ( "github.com/bazelbuild/rules_go/go/tools/bazel" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params/spectest" "github.com/prysmaticlabs/prysm/shared/testutil" "gopkg.in/d4l3k/messagediff.v1" diff --git a/beacon-chain/core/blocks/spectest/block_processing_test.go b/beacon-chain/core/blocks/spectest/block_processing_test.go index ea9bd84f4..45cba9342 100644 --- a/beacon-chain/core/blocks/spectest/block_processing_test.go +++ b/beacon-chain/core/blocks/spectest/block_processing_test.go @@ -10,11 +10,11 @@ import ( "github.com/bazelbuild/rules_go/go/tools/bazel" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params/spectest" "github.com/prysmaticlabs/prysm/shared/testutil" "gopkg.in/d4l3k/messagediff.v1" diff --git a/beacon-chain/core/blocks/spectest/deposit_test.go b/beacon-chain/core/blocks/spectest/deposit_test.go index 40f6e3cf5..21306ad16 100644 --- a/beacon-chain/core/blocks/spectest/deposit_test.go +++ b/beacon-chain/core/blocks/spectest/deposit_test.go @@ -4,9 +4,9 @@ import ( "path" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params/spectest" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/core/blocks/spectest/proposer_slashing_test.go b/beacon-chain/core/blocks/spectest/proposer_slashing_test.go index 1fd3a6d94..a60782490 100644 --- a/beacon-chain/core/blocks/spectest/proposer_slashing_test.go +++ b/beacon-chain/core/blocks/spectest/proposer_slashing_test.go @@ -4,9 +4,9 @@ import ( "path" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params/spectest" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/core/blocks/spectest/voluntary_exit_test.go b/beacon-chain/core/blocks/spectest/voluntary_exit_test.go index e40efa341..84d323538 100644 --- a/beacon-chain/core/blocks/spectest/voluntary_exit_test.go +++ b/beacon-chain/core/blocks/spectest/voluntary_exit_test.go @@ -4,9 +4,9 @@ import ( "path" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params/spectest" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/core/epoch/BUILD.bazel b/beacon-chain/core/epoch/BUILD.bazel index 6a20e57a0..08a648a2b 100644 --- a/beacon-chain/core/epoch/BUILD.bazel +++ b/beacon-chain/core/epoch/BUILD.bazel @@ -12,10 +12,10 @@ go_library( "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/validators:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/mathutil:go_default_library", "//shared/params:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], ) @@ -31,10 +31,10 @@ go_test( deps = [ "//beacon-chain/core/helpers:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", ], ) diff --git a/beacon-chain/core/epoch/epoch_processing.go b/beacon-chain/core/epoch/epoch_processing.go index b6d016081..bddf0d163 100644 --- a/beacon-chain/core/epoch/epoch_processing.go +++ b/beacon-chain/core/epoch/epoch_processing.go @@ -10,11 +10,11 @@ import ( "sort" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/mathutil" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/epoch/epoch_processing_test.go b/beacon-chain/core/epoch/epoch_processing_test.go index 899741cf3..afe9bb37b 100644 --- a/beacon-chain/core/epoch/epoch_processing_test.go +++ b/beacon-chain/core/epoch/epoch_processing_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/epoch/participation.go b/beacon-chain/core/epoch/participation.go index 7cd4d6428..57f4e2211 100644 --- a/beacon-chain/core/epoch/participation.go +++ b/beacon-chain/core/epoch/participation.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) // ComputeValidatorParticipation by matching validator attestations from the previous epoch, diff --git a/beacon-chain/core/epoch/participation_test.go b/beacon-chain/core/epoch/participation_test.go index 328d0c230..9d207d9ff 100644 --- a/beacon-chain/core/epoch/participation_test.go +++ b/beacon-chain/core/epoch/participation_test.go @@ -4,10 +4,10 @@ import ( "reflect" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/prysm/beacon-chain/core/epoch" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/epoch/precompute/BUILD.bazel b/beacon-chain/core/epoch/precompute/BUILD.bazel index dc5e76c11..1ff2ad379 100644 --- a/beacon-chain/core/epoch/precompute/BUILD.bazel +++ b/beacon-chain/core/epoch/precompute/BUILD.bazel @@ -15,11 +15,11 @@ go_library( deps = [ "//beacon-chain/core/helpers:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/mathutil:go_default_library", "//shared/params:go_default_library", "//shared/traceutil:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@io_opencensus_go//trace:go_default_library", ], ) @@ -39,10 +39,10 @@ go_test( "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", ], ) diff --git a/beacon-chain/core/epoch/precompute/attestation_test.go b/beacon-chain/core/epoch/precompute/attestation_test.go index 164c5c971..8f52f17f3 100644 --- a/beacon-chain/core/epoch/precompute/attestation_test.go +++ b/beacon-chain/core/epoch/precompute/attestation_test.go @@ -5,11 +5,11 @@ import ( "reflect" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/epoch/precompute" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/core/epoch/precompute/justification_finalization.go b/beacon-chain/core/epoch/precompute/justification_finalization.go index fffbdcbce..8d5fe3bd7 100644 --- a/beacon-chain/core/epoch/precompute/justification_finalization.go +++ b/beacon-chain/core/epoch/precompute/justification_finalization.go @@ -2,9 +2,9 @@ package precompute import ( "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) // ProcessJustificationAndFinalizationPreCompute processes justification and finalization during diff --git a/beacon-chain/core/epoch/precompute/justification_finalization_test.go b/beacon-chain/core/epoch/precompute/justification_finalization_test.go index bf36f9a20..79f6264d0 100644 --- a/beacon-chain/core/epoch/precompute/justification_finalization_test.go +++ b/beacon-chain/core/epoch/precompute/justification_finalization_test.go @@ -4,10 +4,10 @@ import ( "bytes" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/prysm/beacon-chain/core/epoch/precompute" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/epoch/precompute/new_test.go b/beacon-chain/core/epoch/precompute/new_test.go index 7c80da935..434ae1d2a 100644 --- a/beacon-chain/core/epoch/precompute/new_test.go +++ b/beacon-chain/core/epoch/precompute/new_test.go @@ -5,9 +5,9 @@ import ( "reflect" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/epoch/precompute" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/epoch/precompute/reward_penalty_test.go b/beacon-chain/core/epoch/precompute/reward_penalty_test.go index d442cc1f5..bac0523d4 100644 --- a/beacon-chain/core/epoch/precompute/reward_penalty_test.go +++ b/beacon-chain/core/epoch/precompute/reward_penalty_test.go @@ -4,11 +4,11 @@ import ( "context" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/prysm/beacon-chain/core/epoch" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/epoch/precompute/slashing_test.go b/beacon-chain/core/epoch/precompute/slashing_test.go index 83107367d..751ce4f14 100644 --- a/beacon-chain/core/epoch/precompute/slashing_test.go +++ b/beacon-chain/core/epoch/precompute/slashing_test.go @@ -4,10 +4,10 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/epoch/precompute" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/helpers/BUILD.bazel b/beacon-chain/core/helpers/BUILD.bazel index 57abc57f1..260ff0c96 100644 --- a/beacon-chain/core/helpers/BUILD.bazel +++ b/beacon-chain/core/helpers/BUILD.bazel @@ -23,7 +23,6 @@ go_library( deps = [ "//beacon-chain/cache:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/featureconfig:go_default_library", @@ -33,6 +32,7 @@ go_library( "//shared/sliceutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], @@ -56,13 +56,13 @@ go_test( deps = [ "//beacon-chain/core/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/featureconfig:go_default_library", "//shared/params:go_default_library", "//shared/sliceutil:go_default_library", "//shared/testutil:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], @@ -86,8 +86,8 @@ go_test( "no-cache", ], deps = [ - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", ], ) diff --git a/beacon-chain/core/helpers/attestation.go b/beacon-chain/core/helpers/attestation.go index f66a34a7b..da1999216 100644 --- a/beacon-chain/core/helpers/attestation.go +++ b/beacon-chain/core/helpers/attestation.go @@ -5,9 +5,9 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/core/helpers/attestation_aggregation_bench_test.go b/beacon-chain/core/helpers/attestation_aggregation_bench_test.go index a14811192..ef429ee63 100644 --- a/beacon-chain/core/helpers/attestation_aggregation_bench_test.go +++ b/beacon-chain/core/helpers/attestation_aggregation_bench_test.go @@ -3,8 +3,8 @@ package helpers import ( "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" ) diff --git a/beacon-chain/core/helpers/attestation_test.go b/beacon-chain/core/helpers/attestation_test.go index 08c79688c..4d59838d7 100644 --- a/beacon-chain/core/helpers/attestation_test.go +++ b/beacon-chain/core/helpers/attestation_test.go @@ -6,12 +6,12 @@ import ( "sort" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/beacon-chain/core/helpers/committee.go b/beacon-chain/core/helpers/committee.go index dc5222352..9f4b7302e 100644 --- a/beacon-chain/core/helpers/committee.go +++ b/beacon-chain/core/helpers/committee.go @@ -5,10 +5,10 @@ import ( "fmt" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/prysm/beacon-chain/cache" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/sliceutil" @@ -140,7 +140,7 @@ func ComputeCommittee( // committee = get_beacon_committee(state, data.slot, data.index) // return set(index for i, index in enumerate(committee) if bits[i]) func AttestingIndices(state *pb.BeaconState, data *ethpb.AttestationData, bf bitfield.Bitfield) ([]uint64, error) { - committee, err := BeaconCommittee(state, data.Slot, data.Index) + committee, err := BeaconCommittee(state, data.Slot, data.CommitteeIndex) if err != nil { return nil, errors.Wrap(err, "could not get committee") } @@ -243,7 +243,7 @@ func VerifyBitfieldLength(bf bitfield.Bitfield, committeeSize uint64) error { // VerifyAttestationBitfieldLengths verifies that an attestations aggregation and custody bitfields are // a valid length matching the size of the committee. func VerifyAttestationBitfieldLengths(bState *pb.BeaconState, att *ethpb.Attestation) error { - committee, err := BeaconCommittee(bState, att.Data.Slot, att.Data.Index) + committee, err := BeaconCommittee(bState, att.Data.Slot, att.Data.CommitteeIndex) if err != nil { return errors.Wrap(err, "could not retrieve beacon committees") } diff --git a/beacon-chain/core/helpers/committee_test.go b/beacon-chain/core/helpers/committee_test.go index 78cdcc6f7..07e328b80 100644 --- a/beacon-chain/core/helpers/committee_test.go +++ b/beacon-chain/core/helpers/committee_test.go @@ -8,8 +8,8 @@ import ( "github.com/prysmaticlabs/go-bitfield" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/sliceutil" @@ -295,8 +295,8 @@ func TestVerifyAttestationBitfieldLengths_OK(t *testing.T) { AggregationBits: bitfield.Bitlist{0x05}, CustodyBits: bitfield.Bitlist{0x05}, Data: ðpb.AttestationData{ - Index: 5, - Target: ðpb.Checkpoint{}, + CommitteeIndex: 5, + Target: ðpb.Checkpoint{}, }, }, stateSlot: 5, @@ -307,8 +307,8 @@ func TestVerifyAttestationBitfieldLengths_OK(t *testing.T) { AggregationBits: bitfield.Bitlist{0x06}, CustodyBits: bitfield.Bitlist{0x06}, Data: ðpb.AttestationData{ - Index: 10, - Target: ðpb.Checkpoint{}, + CommitteeIndex: 10, + Target: ðpb.Checkpoint{}, }, }, stateSlot: 10, @@ -318,8 +318,8 @@ func TestVerifyAttestationBitfieldLengths_OK(t *testing.T) { AggregationBits: bitfield.Bitlist{0x06}, CustodyBits: bitfield.Bitlist{0x06}, Data: ðpb.AttestationData{ - Index: 20, - Target: ðpb.Checkpoint{}, + CommitteeIndex: 20, + Target: ðpb.Checkpoint{}, }, }, stateSlot: 20, @@ -329,8 +329,8 @@ func TestVerifyAttestationBitfieldLengths_OK(t *testing.T) { AggregationBits: bitfield.Bitlist{0x06}, CustodyBits: bitfield.Bitlist{0x10}, Data: ðpb.AttestationData{ - Index: 20, - Target: ðpb.Checkpoint{}, + CommitteeIndex: 20, + Target: ðpb.Checkpoint{}, }, }, stateSlot: 20, @@ -342,8 +342,8 @@ func TestVerifyAttestationBitfieldLengths_OK(t *testing.T) { AggregationBits: bitfield.Bitlist{0xFF, 0xC0, 0x01}, CustodyBits: bitfield.Bitlist{0xFF, 0xC0, 0x01}, Data: ðpb.AttestationData{ - Index: 5, - Target: ðpb.Checkpoint{}, + CommitteeIndex: 5, + Target: ðpb.Checkpoint{}, }, }, stateSlot: 5, @@ -354,8 +354,8 @@ func TestVerifyAttestationBitfieldLengths_OK(t *testing.T) { AggregationBits: bitfield.Bitlist{0xFF, 0x01}, CustodyBits: bitfield.Bitlist{0xFF, 0x01}, Data: ðpb.AttestationData{ - Index: 20, - Target: ðpb.Checkpoint{}, + CommitteeIndex: 20, + Target: ðpb.Checkpoint{}, }, }, stateSlot: 20, diff --git a/beacon-chain/core/helpers/rewards_penalties_test.go b/beacon-chain/core/helpers/rewards_penalties_test.go index ed150b0fa..222c97d31 100644 --- a/beacon-chain/core/helpers/rewards_penalties_test.go +++ b/beacon-chain/core/helpers/rewards_penalties_test.go @@ -3,8 +3,8 @@ package helpers import ( "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/helpers/validators.go b/beacon-chain/core/helpers/validators.go index 22ed91045..6eecbc77f 100644 --- a/beacon-chain/core/helpers/validators.go +++ b/beacon-chain/core/helpers/validators.go @@ -2,9 +2,9 @@ package helpers import ( "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/cache" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/featureconfig" diff --git a/beacon-chain/core/helpers/validators_test.go b/beacon-chain/core/helpers/validators_test.go index f18330675..d6fa85241 100644 --- a/beacon-chain/core/helpers/validators_test.go +++ b/beacon-chain/core/helpers/validators_test.go @@ -3,8 +3,8 @@ package helpers import ( "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/state/BUILD.bazel b/beacon-chain/core/state/BUILD.bazel index 39a5dddc0..516a1e2ea 100644 --- a/beacon-chain/core/state/BUILD.bazel +++ b/beacon-chain/core/state/BUILD.bazel @@ -23,7 +23,6 @@ go_library( "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/state/interop:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/featureconfig:go_default_library", "//shared/mathutil:go_default_library", "//shared/params:go_default_library", @@ -34,6 +33,7 @@ go_library( "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@io_opencensus_go//trace:go_default_library", ], @@ -52,7 +52,6 @@ go_test( "//beacon-chain/core/blocks:go_default_library", "//beacon-chain/core/helpers:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/featureconfig:go_default_library", "//shared/hashutil:go_default_library", @@ -60,6 +59,7 @@ go_test( "//shared/testutil:go_default_library", "//shared/trieutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/beacon-chain/core/state/benchmarks/BUILD.bazel b/beacon-chain/core/state/benchmarks/BUILD.bazel index 6e74b3d52..379063d35 100644 --- a/beacon-chain/core/state/benchmarks/BUILD.bazel +++ b/beacon-chain/core/state/benchmarks/BUILD.bazel @@ -9,10 +9,10 @@ go_test( "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/featureconfig:go_default_library", "//shared/params:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@io_bazel_rules_go//go/tools/bazel:go_default_library", ], diff --git a/beacon-chain/core/state/benchmarks/benchmark_files/BUILD.bazel b/beacon-chain/core/state/benchmarks/benchmark_files/BUILD.bazel index 986c1074c..b8ad2905e 100644 --- a/beacon-chain/core/state/benchmarks/benchmark_files/BUILD.bazel +++ b/beacon-chain/core/state/benchmarks/benchmark_files/BUILD.bazel @@ -12,10 +12,10 @@ go_library( "//beacon-chain/core/state:go_default_library", "//beacon-chain/core/state/benchmarks:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/interop:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], ) diff --git a/beacon-chain/core/state/benchmarks/benchmark_files/generate_bench_files.go b/beacon-chain/core/state/benchmarks/benchmark_files/generate_bench_files.go index 5b891e229..fc4680283 100644 --- a/beacon-chain/core/state/benchmarks/benchmark_files/generate_bench_files.go +++ b/beacon-chain/core/state/benchmarks/benchmark_files/generate_bench_files.go @@ -7,12 +7,12 @@ import ( "os" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" bench "github.com/prysmaticlabs/prysm/beacon-chain/core/state/benchmarks" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/interop" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/beacon-chain/core/state/benchmarks/benchmarks_test.go b/beacon-chain/core/state/benchmarks/benchmarks_test.go index c0e3e9192..d9559fdbe 100644 --- a/beacon-chain/core/state/benchmarks/benchmarks_test.go +++ b/beacon-chain/core/state/benchmarks/benchmarks_test.go @@ -7,11 +7,11 @@ import ( "github.com/bazelbuild/rules_go/go/tools/bazel" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/state/interop/BUILD.bazel b/beacon-chain/core/state/interop/BUILD.bazel index 189fb9ed6..1eaaead12 100644 --- a/beacon-chain/core/state/interop/BUILD.bazel +++ b/beacon-chain/core/state/interop/BUILD.bazel @@ -14,8 +14,8 @@ go_library( ], deps = [ "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/featureconfig:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], diff --git a/beacon-chain/core/state/interop/write_block_to_disk.go b/beacon-chain/core/state/interop/write_block_to_disk.go index b65d18841..c71fbf415 100644 --- a/beacon-chain/core/state/interop/write_block_to_disk.go +++ b/beacon-chain/core/state/interop/write_block_to_disk.go @@ -6,8 +6,8 @@ import ( "os" "path" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/featureconfig" ) diff --git a/beacon-chain/core/state/spectest/BUILD.bazel b/beacon-chain/core/state/spectest/BUILD.bazel index 4160110d9..c0a828343 100644 --- a/beacon-chain/core/state/spectest/BUILD.bazel +++ b/beacon-chain/core/state/spectest/BUILD.bazel @@ -26,7 +26,7 @@ go_test( "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "//shared/params/spectest:go_default_library", "//shared/testutil:go_default_library", @@ -59,7 +59,7 @@ go_test( "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "//shared/params/spectest:go_default_library", "//shared/testutil:go_default_library", diff --git a/beacon-chain/core/state/state.go b/beacon-chain/core/state/state.go index b0a7b3430..ebe280455 100644 --- a/beacon-chain/core/state/state.go +++ b/beacon-chain/core/state/state.go @@ -5,10 +5,10 @@ package state import ( "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/mathutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/trieutil" diff --git a/beacon-chain/core/state/state_test.go b/beacon-chain/core/state/state_test.go index 2b7c07879..eb154b993 100644 --- a/beacon-chain/core/state/state_test.go +++ b/beacon-chain/core/state/state_test.go @@ -5,10 +5,10 @@ import ( "reflect" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/beacon-chain/core/state/stateutils/BUILD.bazel b/beacon-chain/core/state/stateutils/BUILD.bazel index 06fbcc6b9..6eb08422a 100644 --- a/beacon-chain/core/state/stateutils/BUILD.bazel +++ b/beacon-chain/core/state/stateutils/BUILD.bazel @@ -21,7 +21,7 @@ go_test( embed = [":go_default_library"], deps = [ "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) diff --git a/beacon-chain/core/state/stateutils/validator_index_map_test.go b/beacon-chain/core/state/stateutils/validator_index_map_test.go index cea753c22..8466847f7 100644 --- a/beacon-chain/core/state/stateutils/validator_index_map_test.go +++ b/beacon-chain/core/state/stateutils/validator_index_map_test.go @@ -3,9 +3,9 @@ package stateutils_test import ( "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/state/stateutils" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/beacon-chain/core/state/transition.go b/beacon-chain/core/state/transition.go index e3676c50a..3bda3c9ae 100644 --- a/beacon-chain/core/state/transition.go +++ b/beacon-chain/core/state/transition.go @@ -10,6 +10,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" e "github.com/prysmaticlabs/prysm/beacon-chain/core/epoch" @@ -17,7 +18,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state/interop" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/mathutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/core/state/transition_test.go b/beacon-chain/core/state/transition_test.go index 65908745d..cc2f3ab15 100644 --- a/beacon-chain/core/state/transition_test.go +++ b/beacon-chain/core/state/transition_test.go @@ -9,13 +9,13 @@ import ( "strings" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/core/validators/BUILD.bazel b/beacon-chain/core/validators/BUILD.bazel index 415735ffd..443012868 100644 --- a/beacon-chain/core/validators/BUILD.bazel +++ b/beacon-chain/core/validators/BUILD.bazel @@ -8,10 +8,10 @@ go_library( deps = [ "//beacon-chain/core/helpers:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/mathutil:go_default_library", "//shared/params:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) @@ -23,7 +23,7 @@ go_test( deps = [ "//beacon-chain/core/helpers:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) diff --git a/beacon-chain/core/validators/validator.go b/beacon-chain/core/validators/validator.go index aa8b2438a..754db9fa2 100644 --- a/beacon-chain/core/validators/validator.go +++ b/beacon-chain/core/validators/validator.go @@ -6,9 +6,9 @@ package validators import ( "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/mathutil" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/core/validators/validator_test.go b/beacon-chain/core/validators/validator_test.go index ead096158..9bd3ab44b 100644 --- a/beacon-chain/core/validators/validator_test.go +++ b/beacon-chain/core/validators/validator_test.go @@ -5,9 +5,9 @@ import ( "strconv" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/db/BUILD.bazel b/beacon-chain/db/BUILD.bazel index a55a9248a..51c136f9f 100644 --- a/beacon-chain/db/BUILD.bazel +++ b/beacon-chain/db/BUILD.bazel @@ -15,8 +15,8 @@ go_library( "//beacon-chain/db/filters:go_default_library", "//beacon-chain/db/kv:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], ) diff --git a/beacon-chain/db/db.go b/beacon-chain/db/db.go index 3f54b80d4..0f0c6b353 100644 --- a/beacon-chain/db/db.go +++ b/beacon-chain/db/db.go @@ -5,10 +5,10 @@ import ( "io" "github.com/ethereum/go-ethereum/common" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" "github.com/prysmaticlabs/prysm/beacon-chain/db/kv" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) // Database defines the necessary methods for Prysm's eth2 backend which may @@ -72,10 +72,10 @@ type Database interface { SaveJustifiedCheckpoint(ctx context.Context, checkpoint *ethpb.Checkpoint) error SaveFinalizedCheckpoint(ctx context.Context, checkpoint *ethpb.Checkpoint) error // Archival data handlers for storing/retrieving historical beacon node information. - ArchivedActiveValidatorChanges(ctx context.Context, epoch uint64) (*ethpb.ArchivedActiveSetChanges, error) - SaveArchivedActiveValidatorChanges(ctx context.Context, epoch uint64, changes *ethpb.ArchivedActiveSetChanges) error - ArchivedCommitteeInfo(ctx context.Context, epoch uint64) (*ethpb.ArchivedCommitteeInfo, error) - SaveArchivedCommitteeInfo(ctx context.Context, epoch uint64, info *ethpb.ArchivedCommitteeInfo) error + ArchivedActiveValidatorChanges(ctx context.Context, epoch uint64) (*pb.ArchivedActiveSetChanges, error) + SaveArchivedActiveValidatorChanges(ctx context.Context, epoch uint64, changes *pb.ArchivedActiveSetChanges) error + ArchivedCommitteeInfo(ctx context.Context, epoch uint64) (*pb.ArchivedCommitteeInfo, error) + SaveArchivedCommitteeInfo(ctx context.Context, epoch uint64, info *pb.ArchivedCommitteeInfo) error ArchivedBalances(ctx context.Context, epoch uint64) ([]uint64, error) SaveArchivedBalances(ctx context.Context, epoch uint64, balances []uint64) error ArchivedValidatorParticipation(ctx context.Context, epoch uint64) (*ethpb.ValidatorParticipation, error) diff --git a/beacon-chain/db/kv/BUILD.bazel b/beacon-chain/db/kv/BUILD.bazel index a682def19..a279157af 100644 --- a/beacon-chain/db/kv/BUILD.bazel +++ b/beacon-chain/db/kv/BUILD.bazel @@ -25,7 +25,6 @@ go_library( "//beacon-chain/db/filters:go_default_library", "//proto/beacon/db:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/sliceutil:go_default_library", "//shared/traceutil:go_default_library", @@ -36,6 +35,7 @@ go_library( "@com_github_mdlayher_prombolt//:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", @@ -62,12 +62,12 @@ go_test( deps = [ "//beacon-chain/db/filters:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], diff --git a/beacon-chain/db/kv/archive.go b/beacon-chain/db/kv/archive.go index 77e5d3ab4..ba986e775 100644 --- a/beacon-chain/db/kv/archive.go +++ b/beacon-chain/db/kv/archive.go @@ -5,32 +5,33 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "go.opencensus.io/trace" ) // ArchivedActiveValidatorChanges retrieval by epoch. -func (k *Store) ArchivedActiveValidatorChanges(ctx context.Context, epoch uint64) (*ethpb.ArchivedActiveSetChanges, error) { +func (k *Store) ArchivedActiveValidatorChanges(ctx context.Context, epoch uint64) (*pb.ArchivedActiveSetChanges, error) { ctx, span := trace.StartSpan(ctx, "BeaconDB.ArchivedActiveValidatorChanges") defer span.End() buf := uint64ToBytes(epoch) - var target *ethpb.ArchivedActiveSetChanges + var target *pb.ArchivedActiveSetChanges err := k.db.View(func(tx *bolt.Tx) error { bkt := tx.Bucket(archivedValidatorSetChangesBucket) enc := bkt.Get(buf) if enc == nil { return nil } - target = ðpb.ArchivedActiveSetChanges{} + target = &pb.ArchivedActiveSetChanges{} return proto.Unmarshal(enc, target) }) return target, err } // SaveArchivedActiveValidatorChanges by epoch. -func (k *Store) SaveArchivedActiveValidatorChanges(ctx context.Context, epoch uint64, changes *ethpb.ArchivedActiveSetChanges) error { +func (k *Store) SaveArchivedActiveValidatorChanges(ctx context.Context, epoch uint64, changes *pb.ArchivedActiveSetChanges) error { ctx, span := trace.StartSpan(ctx, "BeaconDB.SaveArchivedActiveValidatorChanges") defer span.End() buf := uint64ToBytes(epoch) @@ -45,26 +46,26 @@ func (k *Store) SaveArchivedActiveValidatorChanges(ctx context.Context, epoch ui } // ArchivedCommitteeInfo retrieval by epoch. -func (k *Store) ArchivedCommitteeInfo(ctx context.Context, epoch uint64) (*ethpb.ArchivedCommitteeInfo, error) { +func (k *Store) ArchivedCommitteeInfo(ctx context.Context, epoch uint64) (*pb.ArchivedCommitteeInfo, error) { ctx, span := trace.StartSpan(ctx, "BeaconDB.ArchivedCommitteeInfo") defer span.End() buf := uint64ToBytes(epoch) - var target *ethpb.ArchivedCommitteeInfo + var target *pb.ArchivedCommitteeInfo err := k.db.View(func(tx *bolt.Tx) error { bkt := tx.Bucket(archivedCommitteeInfoBucket) enc := bkt.Get(buf) if enc == nil { return nil } - target = ðpb.ArchivedCommitteeInfo{} + target = &pb.ArchivedCommitteeInfo{} return proto.Unmarshal(enc, target) }) return target, err } // SaveArchivedCommitteeInfo by epoch. -func (k *Store) SaveArchivedCommitteeInfo(ctx context.Context, epoch uint64, info *ethpb.ArchivedCommitteeInfo) error { +func (k *Store) SaveArchivedCommitteeInfo(ctx context.Context, epoch uint64, info *pb.ArchivedCommitteeInfo) error { ctx, span := trace.StartSpan(ctx, "BeaconDB.SaveArchivedCommitteeInfo") defer span.End() buf := uint64ToBytes(epoch) diff --git a/beacon-chain/db/kv/archive_test.go b/beacon-chain/db/kv/archive_test.go index 7c7ba5214..92ca21c66 100644 --- a/beacon-chain/db/kv/archive_test.go +++ b/beacon-chain/db/kv/archive_test.go @@ -6,7 +6,8 @@ import ( "testing" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" + pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" ) func TestStore_ArchivedActiveValidatorChanges(t *testing.T) { @@ -17,7 +18,7 @@ func TestStore_ArchivedActiveValidatorChanges(t *testing.T) { exited := []uint64{6, 7, 8} slashed := []uint64{1212} someRoot := [32]byte{1, 2, 3} - changes := ðpb.ArchivedActiveSetChanges{ + changes := &pbp2p.ArchivedActiveSetChanges{ Activated: activated, Exited: exited, Slashed: slashed, @@ -103,7 +104,7 @@ func TestStore_ArchivedCommitteeInfo(t *testing.T) { defer teardownDB(t, db) ctx := context.Background() someSeed := [32]byte{1, 2, 3} - info := ðpb.ArchivedCommitteeInfo{ + info := &pbp2p.ArchivedCommitteeInfo{ ProposerSeed: someSeed[:], AttesterSeed: someSeed[:], } diff --git a/beacon-chain/db/kv/attestations.go b/beacon-chain/db/kv/attestations.go index d04ba300d..ef059cdff 100644 --- a/beacon-chain/db/kv/attestations.go +++ b/beacon-chain/db/kv/attestations.go @@ -9,10 +9,10 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/sliceutil" "github.com/prysmaticlabs/prysm/shared/traceutil" "go.opencensus.io/trace" diff --git a/beacon-chain/db/kv/attestations_test.go b/beacon-chain/db/kv/attestations_test.go index 81d4aae92..e7df84744 100644 --- a/beacon-chain/db/kv/attestations_test.go +++ b/beacon-chain/db/kv/attestations_test.go @@ -9,10 +9,10 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) func TestStore_AttestationCRUD(t *testing.T) { diff --git a/beacon-chain/db/kv/backup_test.go b/beacon-chain/db/kv/backup_test.go index ed8678150..13482fad7 100644 --- a/beacon-chain/db/kv/backup_test.go +++ b/beacon-chain/db/kv/backup_test.go @@ -6,8 +6,8 @@ import ( "path" "testing" + eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) func TestStore_Backup(t *testing.T) { diff --git a/beacon-chain/db/kv/blocks.go b/beacon-chain/db/kv/blocks.go index 5c0646c3c..e0c997ba5 100644 --- a/beacon-chain/db/kv/blocks.go +++ b/beacon-chain/db/kv/blocks.go @@ -11,9 +11,9 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/sliceutil" "go.opencensus.io/trace" diff --git a/beacon-chain/db/kv/blocks_test.go b/beacon-chain/db/kv/blocks_test.go index d873e4dfe..1f9e26f67 100644 --- a/beacon-chain/db/kv/blocks_test.go +++ b/beacon-chain/db/kv/blocks_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) func TestStore_SaveBlock_NoDuplicates(t *testing.T) { diff --git a/beacon-chain/db/kv/checkpoint.go b/beacon-chain/db/kv/checkpoint.go index c2833df76..f4ce239c8 100644 --- a/beacon-chain/db/kv/checkpoint.go +++ b/beacon-chain/db/kv/checkpoint.go @@ -6,7 +6,7 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/traceutil" "go.opencensus.io/trace" ) diff --git a/beacon-chain/db/kv/checkpoint_test.go b/beacon-chain/db/kv/checkpoint_test.go index 5b2d3f27f..5a8615453 100644 --- a/beacon-chain/db/kv/checkpoint_test.go +++ b/beacon-chain/db/kv/checkpoint_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/beacon-chain/db/kv/finalized_block_roots.go b/beacon-chain/db/kv/finalized_block_roots.go index c98aa6f64..0f13b07eb 100644 --- a/beacon-chain/db/kv/finalized_block_roots.go +++ b/beacon-chain/db/kv/finalized_block_roots.go @@ -7,10 +7,10 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/traceutil" "go.opencensus.io/trace" diff --git a/beacon-chain/db/kv/finalized_block_roots_test.go b/beacon-chain/db/kv/finalized_block_roots_test.go index 9503bd114..dc0acbe1e 100644 --- a/beacon-chain/db/kv/finalized_block_roots_test.go +++ b/beacon-chain/db/kv/finalized_block_roots_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/db/kv/operations.go b/beacon-chain/db/kv/operations.go index 78c4a26a0..be7bef85e 100644 --- a/beacon-chain/db/kv/operations.go +++ b/beacon-chain/db/kv/operations.go @@ -5,8 +5,8 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "go.opencensus.io/trace" ) diff --git a/beacon-chain/db/kv/operations_test.go b/beacon-chain/db/kv/operations_test.go index 81eee8a86..679e74afb 100644 --- a/beacon-chain/db/kv/operations_test.go +++ b/beacon-chain/db/kv/operations_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) func TestStore_VoluntaryExits_CRUD(t *testing.T) { diff --git a/beacon-chain/db/kv/slashings.go b/beacon-chain/db/kv/slashings.go index a06d47839..b92f5c9ce 100644 --- a/beacon-chain/db/kv/slashings.go +++ b/beacon-chain/db/kv/slashings.go @@ -5,8 +5,8 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "go.opencensus.io/trace" ) diff --git a/beacon-chain/db/kv/slashings_test.go b/beacon-chain/db/kv/slashings_test.go index e4bdbe20a..6cb6222fb 100644 --- a/beacon-chain/db/kv/slashings_test.go +++ b/beacon-chain/db/kv/slashings_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) func TestStore_ProposerSlashing_CRUD(t *testing.T) { diff --git a/beacon-chain/db/kv/state.go b/beacon-chain/db/kv/state.go index 3078bbba9..a2c410c3b 100644 --- a/beacon-chain/db/kv/state.go +++ b/beacon-chain/db/kv/state.go @@ -10,8 +10,8 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "go.opencensus.io/trace" ) diff --git a/beacon-chain/db/kv/state_test.go b/beacon-chain/db/kv/state_test.go index 61d33490e..c458f89ca 100644 --- a/beacon-chain/db/kv/state_test.go +++ b/beacon-chain/db/kv/state_test.go @@ -5,9 +5,9 @@ import ( "reflect" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/beacon-chain/gateway/BUILD.bazel b/beacon-chain/gateway/BUILD.bazel index a76807bc3..00bed5df6 100644 --- a/beacon-chain/gateway/BUILD.bazel +++ b/beacon-chain/gateway/BUILD.bazel @@ -1,3 +1,4 @@ +# gazelle:ignore load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( @@ -13,8 +14,8 @@ go_library( "//beacon-chain/node:__pkg__", ], deps = [ - "//proto/eth/v1alpha1:go_grpc_gateway_library", "//shared:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_grpc_gateway_library", "@com_github_sirupsen_logrus//:go_default_library", "@grpc_ecosystem_grpc_gateway//runtime:go_default_library", "@org_golang_google_grpc//:go_default_library", diff --git a/beacon-chain/gateway/gateway.go b/beacon-chain/gateway/gateway.go index ecea1b6a6..15edb100e 100644 --- a/beacon-chain/gateway/gateway.go +++ b/beacon-chain/gateway/gateway.go @@ -8,7 +8,7 @@ import ( "time" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1_gateway" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1_gateway" "github.com/prysmaticlabs/prysm/shared" "google.golang.org/grpc" "google.golang.org/grpc/connectivity" diff --git a/beacon-chain/interop-cold-start/BUILD.bazel b/beacon-chain/interop-cold-start/BUILD.bazel index 12d0a2166..988a130f8 100644 --- a/beacon-chain/interop-cold-start/BUILD.bazel +++ b/beacon-chain/interop-cold-start/BUILD.bazel @@ -14,12 +14,12 @@ go_library( "//beacon-chain/db:go_default_library", "//beacon-chain/powchain:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared:go_default_library", "//shared/bytesutil:go_default_library", "//shared/event:go_default_library", "//shared/interop:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], diff --git a/beacon-chain/interop-cold-start/service.go b/beacon-chain/interop-cold-start/service.go index 9a6d6ac28..23868f8df 100644 --- a/beacon-chain/interop-cold-start/service.go +++ b/beacon-chain/interop-cold-start/service.go @@ -6,13 +6,13 @@ import ( "math/big" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/powchain" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/event" diff --git a/beacon-chain/operations/BUILD.bazel b/beacon-chain/operations/BUILD.bazel index 208f78237..3fe6979d5 100644 --- a/beacon-chain/operations/BUILD.bazel +++ b/beacon-chain/operations/BUILD.bazel @@ -18,7 +18,6 @@ go_library( "//beacon-chain/core/state:go_default_library", "//beacon-chain/db:go_default_library", "//proto/beacon/db:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/event:go_default_library", "//shared/hashutil:go_default_library", "//shared/messagehandler:go_default_library", @@ -27,6 +26,7 @@ go_library( "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_karlseguin_ccache//:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", @@ -52,11 +52,11 @@ go_test( "//beacon-chain/db/testing:go_default_library", "//proto/beacon/db:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", diff --git a/beacon-chain/operations/attestation.go b/beacon-chain/operations/attestation.go index 10a03e37f..ce912a967 100644 --- a/beacon-chain/operations/attestation.go +++ b/beacon-chain/operations/attestation.go @@ -7,12 +7,12 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/traceutil" "go.opencensus.io/trace" @@ -150,7 +150,7 @@ func (s *Service) AttestationsBySlotCommittee(ctx context.Context, slot uint64, atts := make([]*ethpb.Attestation, 0, len(s.attestationPool)) for _, ac := range s.attestationPool { - if ac.Data.Slot == slot && ac.Data.Index == index { + if ac.Data.Slot == slot && ac.Data.CommitteeIndex == index { atts = append(atts, ac.ToAttestations()...) } } diff --git a/beacon-chain/operations/attestation_test.go b/beacon-chain/operations/attestation_test.go index 322cbc82b..a3df88fe0 100644 --- a/beacon-chain/operations/attestation_test.go +++ b/beacon-chain/operations/attestation_test.go @@ -7,6 +7,7 @@ import ( "sync" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" @@ -15,7 +16,6 @@ import ( dbutil "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" @@ -144,7 +144,7 @@ func TestHandleAttestation_Aggregates_LargeNumValidators(t *testing.T) { } // Next up, we compute the committee for the attestation we're testing. - committee, err := helpers.BeaconCommittee(beaconState, att.Data.Slot, att.Data.Index) + committee, err := helpers.BeaconCommittee(beaconState, att.Data.Slot, att.Data.CommitteeIndex) if err != nil { t.Error(err) } @@ -224,7 +224,7 @@ func TestHandleAttestation_Skips_PreviouslyAggregatedAttestations(t *testing.T) CustodyBits: bitfield.Bitlist{0x00, 0x00, 0x00, 0x00, 0x01}, } - committee, err := helpers.BeaconCommittee(beaconState, att1.Data.Slot, att1.Data.Index) + committee, err := helpers.BeaconCommittee(beaconState, att1.Data.Slot, att1.Data.CommitteeIndex) if err != nil { t.Error(err) } diff --git a/beacon-chain/operations/block.go b/beacon-chain/operations/block.go index 7f92e96c4..28eb1dcd9 100644 --- a/beacon-chain/operations/block.go +++ b/beacon-chain/operations/block.go @@ -6,10 +6,10 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/event" "github.com/sirupsen/logrus" "go.opencensus.io/trace" @@ -42,7 +42,7 @@ func (s *Service) handleProcessedBlock(ctx context.Context, message proto.Messag "index": i, "root": fmt.Sprintf("%#x", root), "aggregation_bits": fmt.Sprintf("%08b", att.AggregationBits.Bytes()), - "committeeIndex": att.Data.Index, + "committeeIndex": att.Data.CommitteeIndex, }).Debug("block attestation") } return nil diff --git a/beacon-chain/operations/block_test.go b/beacon-chain/operations/block_test.go index 52b637cb8..075e28379 100644 --- a/beacon-chain/operations/block_test.go +++ b/beacon-chain/operations/block_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" dbutil "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) func TestReceiveBlkRemoveOps_Ok(t *testing.T) { diff --git a/beacon-chain/operations/exit.go b/beacon-chain/operations/exit.go index d851db6ea..516f864dd 100644 --- a/beacon-chain/operations/exit.go +++ b/beacon-chain/operations/exit.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" "go.opencensus.io/trace" ) diff --git a/beacon-chain/operations/exit_test.go b/beacon-chain/operations/exit_test.go index 99b3cb660..aca5dbd3d 100644 --- a/beacon-chain/operations/exit_test.go +++ b/beacon-chain/operations/exit_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" dbutil "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/testutil" logTest "github.com/sirupsen/logrus/hooks/test" ) diff --git a/beacon-chain/operations/service.go b/beacon-chain/operations/service.go index fde127c8f..b4dd40a75 100644 --- a/beacon-chain/operations/service.go +++ b/beacon-chain/operations/service.go @@ -6,9 +6,9 @@ import ( "sync" "github.com/karlseguin/ccache" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/db" dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/event" handler "github.com/prysmaticlabs/prysm/shared/messagehandler" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/operations/testing/BUILD.bazel b/beacon-chain/operations/testing/BUILD.bazel index 04ca3d222..0d3ceba33 100644 --- a/beacon-chain/operations/testing/BUILD.bazel +++ b/beacon-chain/operations/testing/BUILD.bazel @@ -7,7 +7,7 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/operations/testing", visibility = ["//beacon-chain:__subpackages__"], deps = [ - "//proto/eth/v1alpha1:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) diff --git a/beacon-chain/operations/testing/mock.go b/beacon-chain/operations/testing/mock.go index 243a9100b..31f304e11 100644 --- a/beacon-chain/operations/testing/mock.go +++ b/beacon-chain/operations/testing/mock.go @@ -4,7 +4,7 @@ import ( "context" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ) // Operations defines a mock for the operations service. diff --git a/beacon-chain/p2p/BUILD.bazel b/beacon-chain/p2p/BUILD.bazel index 35ccd8be4..1d40c981b 100644 --- a/beacon-chain/p2p/BUILD.bazel +++ b/beacon-chain/p2p/BUILD.bazel @@ -31,7 +31,6 @@ go_library( "//beacon-chain/p2p/encoder:go_default_library", "//beacon-chain/sync/peerstatus:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared:go_default_library", "//shared/hashutil:go_default_library", "//shared/iputils:go_default_library", @@ -65,6 +64,7 @@ go_library( "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", ], diff --git a/beacon-chain/p2p/gossip_topic_mappings.go b/beacon-chain/p2p/gossip_topic_mappings.go index f69f0313d..1612c547c 100644 --- a/beacon-chain/p2p/gossip_topic_mappings.go +++ b/beacon-chain/p2p/gossip_topic_mappings.go @@ -4,7 +4,7 @@ import ( "reflect" "github.com/gogo/protobuf/proto" - pb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + pb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ) // GossipTopicMappings represent the protocol ID to protobuf message type map for easy diff --git a/beacon-chain/powchain/BUILD.bazel b/beacon-chain/powchain/BUILD.bazel index a9b3a920b..d92a71805 100644 --- a/beacon-chain/powchain/BUILD.bazel +++ b/beacon-chain/powchain/BUILD.bazel @@ -17,7 +17,6 @@ go_library( "//beacon-chain/core/statefeed:go_default_library", "//beacon-chain/db:go_default_library", "//contracts/deposit-contract:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/featureconfig:go_default_library", @@ -33,6 +32,7 @@ go_library( "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_k8s_client_go//tools/cache:go_default_library", @@ -58,7 +58,6 @@ go_test( "//beacon-chain/db/kv:go_default_library", "//beacon-chain/db/testing:go_default_library", "//contracts/deposit-contract:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/event:go_default_library", @@ -68,6 +67,7 @@ go_test( "@com_github_ethereum_go_ethereum//:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//core/types:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", diff --git a/beacon-chain/powchain/deposit.go b/beacon-chain/powchain/deposit.go index d18f73729..e2e5c398b 100644 --- a/beacon-chain/powchain/deposit.go +++ b/beacon-chain/powchain/deposit.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/powchain/deposit_test.go b/beacon-chain/powchain/deposit_test.go index e069573f7..12bcffb6b 100644 --- a/beacon-chain/powchain/deposit_test.go +++ b/beacon-chain/powchain/deposit_test.go @@ -6,10 +6,10 @@ import ( "strings" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/db/kv" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/powchain/log_processing.go b/beacon-chain/powchain/log_processing.go index 2cbb8ad31..62458c4e5 100644 --- a/beacon-chain/powchain/log_processing.go +++ b/beacon-chain/powchain/log_processing.go @@ -11,11 +11,11 @@ import ( "github.com/ethereum/go-ethereum/common" gethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" "github.com/prysmaticlabs/prysm/beacon-chain/core/statefeed" contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/hashutil" diff --git a/beacon-chain/powchain/service.go b/beacon-chain/powchain/service.go index bfc36beee..b90a2ed21 100644 --- a/beacon-chain/powchain/service.go +++ b/beacon-chain/powchain/service.go @@ -19,11 +19,11 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" "github.com/prysmaticlabs/prysm/beacon-chain/core/statefeed" "github.com/prysmaticlabs/prysm/beacon-chain/db" contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/trieutil" diff --git a/beacon-chain/powchain/testing/BUILD.bazel b/beacon-chain/powchain/testing/BUILD.bazel index ac904bd13..7a9c3cee1 100644 --- a/beacon-chain/powchain/testing/BUILD.bazel +++ b/beacon-chain/powchain/testing/BUILD.bazel @@ -10,10 +10,10 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/powchain/testing", visibility = ["//beacon-chain:__subpackages__"], deps = [ - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/event:go_default_library", "//shared/trieutil:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) diff --git a/beacon-chain/powchain/testing/faulty_mock.go b/beacon-chain/powchain/testing/faulty_mock.go index 267ec2d44..475136299 100644 --- a/beacon-chain/powchain/testing/faulty_mock.go +++ b/beacon-chain/powchain/testing/faulty_mock.go @@ -6,7 +6,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/event" "github.com/prysmaticlabs/prysm/shared/trieutil" ) diff --git a/beacon-chain/powchain/testing/mock.go b/beacon-chain/powchain/testing/mock.go index 6023c941f..ed756bab4 100644 --- a/beacon-chain/powchain/testing/mock.go +++ b/beacon-chain/powchain/testing/mock.go @@ -7,7 +7,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/event" "github.com/prysmaticlabs/prysm/shared/trieutil" diff --git a/beacon-chain/rpc/BUILD.bazel b/beacon-chain/rpc/BUILD.bazel index 58cee89b8..5159d3c02 100644 --- a/beacon-chain/rpc/BUILD.bazel +++ b/beacon-chain/rpc/BUILD.bazel @@ -23,13 +23,13 @@ go_library( "//beacon-chain/sync:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "//shared/traceutil:go_default_library", "@com_github_grpc_ecosystem_go_grpc_middleware//:go_default_library", "@com_github_grpc_ecosystem_go_grpc_middleware//recovery:go_default_library", "@com_github_grpc_ecosystem_go_grpc_middleware//tracing/opentracing:go_default_library", "@com_github_grpc_ecosystem_go_grpc_prometheus//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//plugin/ocgrpc:go_default_library", "@org_golang_google_grpc//:go_default_library", diff --git a/beacon-chain/rpc/attester/BUILD.bazel b/beacon-chain/rpc/attester/BUILD.bazel index 8252f4595..78f780996 100644 --- a/beacon-chain/rpc/attester/BUILD.bazel +++ b/beacon-chain/rpc/attester/BUILD.bazel @@ -15,8 +15,8 @@ go_library( "//beacon-chain/p2p:go_default_library", "//beacon-chain/sync:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", @@ -39,10 +39,10 @@ go_test( "//beacon-chain/sync/initial-sync/testing:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/featureconfig:go_default_library", "//shared/params:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], ) diff --git a/beacon-chain/rpc/attester/server.go b/beacon-chain/rpc/attester/server.go index e1242f494..fe89c0ebd 100644 --- a/beacon-chain/rpc/attester/server.go +++ b/beacon-chain/rpc/attester/server.go @@ -4,6 +4,7 @@ import ( "context" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" "github.com/prysmaticlabs/prysm/beacon-chain/cache" @@ -14,7 +15,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/p2p" "github.com/prysmaticlabs/prysm/beacon-chain/sync" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/sirupsen/logrus" "go.opencensus.io/trace" "google.golang.org/grpc/codes" @@ -130,7 +130,7 @@ func (as *Server) RequestAttestation(ctx context.Context, req *pb.AttestationReq res = ðpb.AttestationData{ Slot: req.Slot, - Index: req.CommitteeIndex, + CommitteeIndex: req.CommitteeIndex, BeaconBlockRoot: headRoot[:], Source: headState.CurrentJustifiedCheckpoint, Target: ðpb.Checkpoint{ diff --git a/beacon-chain/rpc/attester/server_test.go b/beacon-chain/rpc/attester/server_test.go index 3c68af107..509ec81b9 100644 --- a/beacon-chain/rpc/attester/server_test.go +++ b/beacon-chain/rpc/attester/server_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/cache" @@ -17,7 +18,6 @@ import ( mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/rpc/beacon/BUILD.bazel b/beacon-chain/rpc/beacon/BUILD.bazel index 9d091d1eb..74fa04b4f 100644 --- a/beacon-chain/rpc/beacon/BUILD.bazel +++ b/beacon-chain/rpc/beacon/BUILD.bazel @@ -23,13 +23,13 @@ go_library( "//beacon-chain/operations:go_default_library", "//beacon-chain/powchain:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/hashutil:go_default_library", "//shared/pagination:go_default_library", "//shared/params:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", @@ -54,10 +54,10 @@ go_test( "//beacon-chain/db/testing:go_default_library", "//beacon-chain/operations/testing:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], diff --git a/beacon-chain/rpc/beacon/assignments.go b/beacon-chain/rpc/beacon/assignments.go index 3a6975c7b..70706f941 100644 --- a/beacon-chain/rpc/beacon/assignments.go +++ b/beacon-chain/rpc/beacon/assignments.go @@ -6,8 +6,9 @@ import ( "strconv" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/pagination" @@ -183,7 +184,7 @@ func (bs *Server) ListValidatorAssignments( func archivedValidatorCommittee( epoch uint64, validatorIndex uint64, - archivedInfo *ethpb.ArchivedCommitteeInfo, + archivedInfo *pb.ArchivedCommitteeInfo, activeIndices []uint64, archivedBalances []uint64, ) ([]uint64, uint64, uint64, uint64, error) { diff --git a/beacon-chain/rpc/beacon/assignments_test.go b/beacon-chain/rpc/beacon/assignments_test.go index 0894a4a14..cef40ad20 100644 --- a/beacon-chain/rpc/beacon/assignments_test.go +++ b/beacon-chain/rpc/beacon/assignments_test.go @@ -9,12 +9,12 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) @@ -286,7 +286,7 @@ func TestServer_ListAssignments_Pagination_DefaultPageSize_FromArchive(t *testin if err != nil { t.Fatal(err) } - if err := db.SaveArchivedCommitteeInfo(context.Background(), 0, ðpb.ArchivedCommitteeInfo{ + if err := db.SaveArchivedCommitteeInfo(context.Background(), 0, &pbp2p.ArchivedCommitteeInfo{ ProposerSeed: proposerSeed[:], AttesterSeed: attesterSeed[:], }); err != nil { diff --git a/beacon-chain/rpc/beacon/attestations.go b/beacon-chain/rpc/beacon/attestations.go index 623978565..81be98cc8 100644 --- a/beacon-chain/rpc/beacon/attestations.go +++ b/beacon-chain/rpc/beacon/attestations.go @@ -6,8 +6,8 @@ import ( "strconv" ptypes "github.com/gogo/protobuf/types" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/pagination" "github.com/prysmaticlabs/prysm/shared/params" "google.golang.org/grpc/codes" diff --git a/beacon-chain/rpc/beacon/attestations_test.go b/beacon-chain/rpc/beacon/attestations_test.go index 8b1dd48fa..1374f147f 100644 --- a/beacon-chain/rpc/beacon/attestations_test.go +++ b/beacon-chain/rpc/beacon/attestations_test.go @@ -10,12 +10,12 @@ import ( "github.com/gogo/protobuf/proto" ptypes "github.com/gogo/protobuf/types" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" mockOps "github.com/prysmaticlabs/prysm/beacon-chain/operations/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/rpc/beacon/blocks.go b/beacon-chain/rpc/beacon/blocks.go index 88f68d012..3765f943c 100644 --- a/beacon-chain/rpc/beacon/blocks.go +++ b/beacon-chain/rpc/beacon/blocks.go @@ -5,10 +5,10 @@ import ( "strconv" ptypes "github.com/gogo/protobuf/types" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/pagination" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/rpc/beacon/blocks_test.go b/beacon-chain/rpc/beacon/blocks_test.go index 825fc1a15..8530cff63 100644 --- a/beacon-chain/rpc/beacon/blocks_test.go +++ b/beacon-chain/rpc/beacon/blocks_test.go @@ -9,11 +9,11 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/rpc/beacon/committees.go b/beacon-chain/rpc/beacon/committees.go index 96ea0441c..1d09228aa 100644 --- a/beacon-chain/rpc/beacon/committees.go +++ b/beacon-chain/rpc/beacon/committees.go @@ -4,8 +4,8 @@ import ( "context" "strconv" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/pagination" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/rpc/beacon/committees_test.go b/beacon-chain/rpc/beacon/committees_test.go index 89804af7e..5b42fa2fd 100644 --- a/beacon-chain/rpc/beacon/committees_test.go +++ b/beacon-chain/rpc/beacon/committees_test.go @@ -9,12 +9,12 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/db" dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) @@ -190,7 +190,7 @@ func TestServer_ListBeaconCommittees_FromArchive(t *testing.T) { if err != nil { t.Fatal(err) } - if err := db.SaveArchivedCommitteeInfo(ctx, 0, ðpb.ArchivedCommitteeInfo{ + if err := db.SaveArchivedCommitteeInfo(ctx, 0, &pbp2p.ArchivedCommitteeInfo{ AttesterSeed: seed[:], }); err != nil { t.Fatal(err) diff --git a/beacon-chain/rpc/beacon/server.go b/beacon-chain/rpc/beacon/server.go index 9e1393734..f830ce5b1 100644 --- a/beacon-chain/rpc/beacon/server.go +++ b/beacon-chain/rpc/beacon/server.go @@ -4,13 +4,13 @@ import ( "context" "time" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" "github.com/prysmaticlabs/prysm/beacon-chain/core/statefeed" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/operations" "github.com/prysmaticlabs/prysm/beacon-chain/powchain" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) // Server defines a server implementation of the gRPC Beacon Chain service, diff --git a/beacon-chain/rpc/beacon/validators.go b/beacon-chain/rpc/beacon/validators.go index 0ae85abf9..fd198c711 100644 --- a/beacon-chain/rpc/beacon/validators.go +++ b/beacon-chain/rpc/beacon/validators.go @@ -6,10 +6,10 @@ import ( "strconv" ptypes "github.com/gogo/protobuf/types" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/epoch" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/pagination" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/rpc/beacon/validators_test.go b/beacon-chain/rpc/beacon/validators_test.go index fd4262cfd..8424dfcc5 100644 --- a/beacon-chain/rpc/beacon/validators_test.go +++ b/beacon-chain/rpc/beacon/validators_test.go @@ -10,6 +10,7 @@ import ( "github.com/gogo/protobuf/proto" ptypes "github.com/gogo/protobuf/types" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" @@ -17,7 +18,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/db" dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) @@ -924,7 +924,7 @@ func TestServer_GetValidatorActiveSetChanges_FromArchive(t *testing.T) { PublicKey: []byte(strconv.Itoa(i)), } } - archivedChanges := ðpb.ArchivedActiveSetChanges{ + archivedChanges := &pbp2p.ArchivedActiveSetChanges{ Activated: activatedIndices, Exited: exitedIndices, Slashed: slashedIndices, diff --git a/beacon-chain/rpc/node/BUILD.bazel b/beacon-chain/rpc/node/BUILD.bazel index fc28cf699..a99d52bf3 100644 --- a/beacon-chain/rpc/node/BUILD.bazel +++ b/beacon-chain/rpc/node/BUILD.bazel @@ -9,9 +9,9 @@ go_library( "//beacon-chain/blockchain:go_default_library", "//beacon-chain/db:go_default_library", "//beacon-chain/sync:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/version:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", @@ -26,10 +26,10 @@ go_test( "//beacon-chain/blockchain/testing:go_default_library", "//beacon-chain/db/testing:go_default_library", "//beacon-chain/sync/initial-sync/testing:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/version:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//reflection:go_default_library", ], diff --git a/beacon-chain/rpc/node/server.go b/beacon-chain/rpc/node/server.go index 01747014b..deab1bb71 100644 --- a/beacon-chain/rpc/node/server.go +++ b/beacon-chain/rpc/node/server.go @@ -5,10 +5,10 @@ import ( "sort" ptypes "github.com/gogo/protobuf/types" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/sync" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/version" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/beacon-chain/rpc/node/server_test.go b/beacon-chain/rpc/node/server_test.go index 3fd0cf6f6..b433f3913 100644 --- a/beacon-chain/rpc/node/server_test.go +++ b/beacon-chain/rpc/node/server_test.go @@ -8,10 +8,10 @@ import ( "github.com/ethereum/go-ethereum/common" ptypes "github.com/gogo/protobuf/types" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" dbutil "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/version" "google.golang.org/grpc" "google.golang.org/grpc/reflection" diff --git a/beacon-chain/rpc/proposer/BUILD.bazel b/beacon-chain/rpc/proposer/BUILD.bazel index 07a7cb3ad..a5c673ba8 100644 --- a/beacon-chain/rpc/proposer/BUILD.bazel +++ b/beacon-chain/rpc/proposer/BUILD.bazel @@ -18,12 +18,12 @@ go_library( "//beacon-chain/sync:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "//shared/trieutil:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", @@ -46,12 +46,12 @@ go_test( "//beacon-chain/db/testing:go_default_library", "//beacon-chain/powchain/testing:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "//shared/trieutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], ) diff --git a/beacon-chain/rpc/proposer/server.go b/beacon-chain/rpc/proposer/server.go index b289bd3ff..a338f6234 100644 --- a/beacon-chain/rpc/proposer/server.go +++ b/beacon-chain/rpc/proposer/server.go @@ -7,6 +7,7 @@ import ( "math/rand" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" @@ -20,7 +21,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/sync" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/beacon-chain/rpc/proposer/server_test.go b/beacon-chain/rpc/proposer/server_test.go index 5d780457d..cd0fabf0c 100644 --- a/beacon-chain/rpc/proposer/server_test.go +++ b/beacon-chain/rpc/proposer/server_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" @@ -16,7 +17,6 @@ import ( dbutil "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" mockPOW "github.com/prysmaticlabs/prysm/beacon-chain/powchain/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index 003fb1cd5..391972771 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -12,6 +12,7 @@ import ( recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" "github.com/prysmaticlabs/prysm/beacon-chain/cache" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" @@ -29,7 +30,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/sync" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/traceutil" "github.com/sirupsen/logrus" diff --git a/beacon-chain/rpc/testing/BUILD.bazel b/beacon-chain/rpc/testing/BUILD.bazel index c5cc8396c..4e52e5eb8 100644 --- a/beacon-chain/rpc/testing/BUILD.bazel +++ b/beacon-chain/rpc/testing/BUILD.bazel @@ -8,9 +8,9 @@ go_library( visibility = ["//beacon-chain:__subpackages__"], deps = [ "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", "@com_github_golang_mock//gomock:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@org_golang_google_grpc//metadata:go_default_library", ], ) diff --git a/beacon-chain/rpc/testing/validator_service_mock.go b/beacon-chain/rpc/testing/validator_service_mock.go index b6bfadce7..7247f7a2a 100644 --- a/beacon-chain/rpc/testing/validator_service_mock.go +++ b/beacon-chain/rpc/testing/validator_service_mock.go @@ -10,8 +10,8 @@ import ( types "github.com/gogo/protobuf/types" gomock "github.com/golang/mock/gomock" + v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" v1 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" metadata "google.golang.org/grpc/metadata" ) diff --git a/beacon-chain/rpc/validator/BUILD.bazel b/beacon-chain/rpc/validator/BUILD.bazel index 4588581e8..f23c1774f 100644 --- a/beacon-chain/rpc/validator/BUILD.bazel +++ b/beacon-chain/rpc/validator/BUILD.bazel @@ -20,11 +20,11 @@ go_library( "//beacon-chain/sync:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", "//shared/traceutil:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", "@org_golang_google_grpc//codes:go_default_library", @@ -54,7 +54,6 @@ go_test( "//beacon-chain/sync/initial-sync/testing:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/event:go_default_library", @@ -64,6 +63,7 @@ go_test( "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", "@com_github_golang_mock//gomock:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", ], diff --git a/beacon-chain/rpc/validator/assignments_test.go b/beacon-chain/rpc/validator/assignments_test.go index a4e90f5b0..1c5f118a0 100644 --- a/beacon-chain/rpc/validator/assignments_test.go +++ b/beacon-chain/rpc/validator/assignments_test.go @@ -7,6 +7,7 @@ import ( "sync" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mockChain "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" blk "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" @@ -15,7 +16,6 @@ import ( dbutil "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/beacon-chain/rpc/validator/server.go b/beacon-chain/rpc/validator/server.go index 15e47de30..f6af88c9b 100644 --- a/beacon-chain/rpc/validator/server.go +++ b/beacon-chain/rpc/validator/server.go @@ -9,6 +9,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" @@ -19,7 +20,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/sync" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/beacon-chain/rpc/validator/server_test.go b/beacon-chain/rpc/validator/server_test.go index 37ab8288f..22fb9f3da 100644 --- a/beacon-chain/rpc/validator/server_test.go +++ b/beacon-chain/rpc/validator/server_test.go @@ -13,6 +13,7 @@ import ( ptypes "github.com/gogo/protobuf/types" "github.com/golang/mock/gomock" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mockChain "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" @@ -25,7 +26,6 @@ import ( mockRPC "github.com/prysmaticlabs/prysm/beacon-chain/rpc/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/event" diff --git a/beacon-chain/rpc/validator/status_test.go b/beacon-chain/rpc/validator/status_test.go index 5b06f247e..e5e028408 100644 --- a/beacon-chain/rpc/validator/status_test.go +++ b/beacon-chain/rpc/validator/status_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mockChain "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" @@ -16,7 +17,6 @@ import ( mockPOW "github.com/prysmaticlabs/prysm/beacon-chain/powchain/testing" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/trieutil" diff --git a/beacon-chain/sync/BUILD.bazel b/beacon-chain/sync/BUILD.bazel index 67050494b..d8480e696 100644 --- a/beacon-chain/sync/BUILD.bazel +++ b/beacon-chain/sync/BUILD.bazel @@ -42,7 +42,6 @@ go_library( "//beacon-chain/p2p/encoder:go_default_library", "//beacon-chain/sync/peerstatus:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", @@ -58,6 +57,7 @@ go_library( "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", @@ -97,7 +97,6 @@ go_test( "//beacon-chain/sync/initial-sync/testing:go_default_library", "//beacon-chain/sync/peerstatus:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//proto/testing:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", @@ -107,6 +106,7 @@ go_test( "@com_github_libp2p_go_libp2p_core//:go_default_library", "@com_github_libp2p_go_libp2p_core//network:go_default_library", "@com_github_libp2p_go_libp2p_core//protocol:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", diff --git a/beacon-chain/sync/initial-sync/BUILD.bazel b/beacon-chain/sync/initial-sync/BUILD.bazel index 269931c34..b50836943 100644 --- a/beacon-chain/sync/initial-sync/BUILD.bazel +++ b/beacon-chain/sync/initial-sync/BUILD.bazel @@ -18,7 +18,6 @@ go_library( "//beacon-chain/sync:go_default_library", "//beacon-chain/sync/peerstatus:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared:go_default_library", "//shared/bytesutil:go_default_library", "//shared/featureconfig:go_default_library", @@ -28,6 +27,7 @@ go_library( "@com_github_libp2p_go_libp2p_core//peer:go_default_library", "@com_github_paulbellamy_ratecounter//:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], ) @@ -45,13 +45,13 @@ go_test( "//beacon-chain/sync:go_default_library", "//beacon-chain/sync/peerstatus:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "//shared/roughtime:go_default_library", "//shared/sliceutil:go_default_library", "@com_github_libp2p_go_libp2p_core//network:go_default_library", "@com_github_libp2p_go_libp2p_core//peer:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], diff --git a/beacon-chain/sync/initial-sync/round_robin.go b/beacon-chain/sync/initial-sync/round_robin.go index 05285a44c..860f16a34 100644 --- a/beacon-chain/sync/initial-sync/round_robin.go +++ b/beacon-chain/sync/initial-sync/round_robin.go @@ -12,11 +12,11 @@ import ( "github.com/libp2p/go-libp2p-core/peer" "github.com/paulbellamy/ratecounter" "github.com/pkg/errors" + eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" prysmsync "github.com/prysmaticlabs/prysm/beacon-chain/sync" "github.com/prysmaticlabs/prysm/beacon-chain/sync/peerstatus" p2ppb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/featureconfig" "github.com/prysmaticlabs/prysm/shared/mathutil" diff --git a/beacon-chain/sync/initial-sync/round_robin_test.go b/beacon-chain/sync/initial-sync/round_robin_test.go index f95097344..a46b3af42 100644 --- a/beacon-chain/sync/initial-sync/round_robin_test.go +++ b/beacon-chain/sync/initial-sync/round_robin_test.go @@ -12,13 +12,13 @@ import ( "github.com/prysmaticlabs/go-ssz" dbtest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" + eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" p2pt "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" "github.com/prysmaticlabs/prysm/beacon-chain/sync" "github.com/prysmaticlabs/prysm/beacon-chain/sync/peerstatus" p2ppb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/roughtime" diff --git a/beacon-chain/sync/pending_blocks_queue_test.go b/beacon-chain/sync/pending_blocks_queue_test.go index 34ab34e68..6227f60fa 100644 --- a/beacon-chain/sync/pending_blocks_queue_test.go +++ b/beacon-chain/sync/pending_blocks_queue_test.go @@ -7,13 +7,13 @@ import ( "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/protocol" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" dbtest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" "github.com/prysmaticlabs/prysm/beacon-chain/sync/peerstatus" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/sirupsen/logrus" ) diff --git a/beacon-chain/sync/rpc_beacon_blocks_by_range_test.go b/beacon-chain/sync/rpc_beacon_blocks_by_range_test.go index 2d94f3f51..74f49a2bf 100644 --- a/beacon-chain/sync/rpc_beacon_blocks_by_range_test.go +++ b/beacon-chain/sync/rpc_beacon_blocks_by_range_test.go @@ -8,10 +8,10 @@ import ( "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/protocol" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" db "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/sync/rpc_beacon_blocks_by_root_test.go b/beacon-chain/sync/rpc_beacon_blocks_by_root_test.go index 0dfb6a40c..bc2867583 100644 --- a/beacon-chain/sync/rpc_beacon_blocks_by_root_test.go +++ b/beacon-chain/sync/rpc_beacon_blocks_by_root_test.go @@ -9,12 +9,12 @@ import ( "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/protocol" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" db "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/sync/rpc_chunked_response.go b/beacon-chain/sync/rpc_chunked_response.go index 40cc42ce8..7922adb41 100644 --- a/beacon-chain/sync/rpc_chunked_response.go +++ b/beacon-chain/sync/rpc_chunked_response.go @@ -5,9 +5,9 @@ import ( "time" libp2pcore "github.com/libp2p/go-libp2p-core" + eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" "github.com/prysmaticlabs/prysm/beacon-chain/p2p/encoder" - eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) // chunkWriter writes the given message as a chunked response to the given network diff --git a/beacon-chain/sync/rpc_status_test.go b/beacon-chain/sync/rpc_status_test.go index 71d2ae28e..b9747f4a8 100644 --- a/beacon-chain/sync/rpc_status_test.go +++ b/beacon-chain/sync/rpc_status_test.go @@ -9,13 +9,13 @@ import ( "github.com/gogo/protobuf/proto" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/protocol" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" "github.com/prysmaticlabs/prysm/beacon-chain/sync/peerstatus" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/sirupsen/logrus" diff --git a/beacon-chain/sync/service.go b/beacon-chain/sync/service.go index 07d745a98..cdfe0dd1d 100644 --- a/beacon-chain/sync/service.go +++ b/beacon-chain/sync/service.go @@ -6,13 +6,13 @@ import ( "github.com/libp2p/go-libp2p-core/peer" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" "github.com/prysmaticlabs/prysm/beacon-chain/core/statefeed" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/operations" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared" ) diff --git a/beacon-chain/sync/subscriber_beacon_attestation.go b/beacon-chain/sync/subscriber_beacon_attestation.go index 2dd97acf2..1ecdbd52f 100644 --- a/beacon-chain/sync/subscriber_beacon_attestation.go +++ b/beacon-chain/sync/subscriber_beacon_attestation.go @@ -4,7 +4,7 @@ import ( "context" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ) // beaconAttestationSubscriber forwards the incoming validated attestation to the blockchain diff --git a/beacon-chain/sync/subscriber_beacon_blocks.go b/beacon-chain/sync/subscriber_beacon_blocks.go index ac8d46e84..a3e91dc92 100644 --- a/beacon-chain/sync/subscriber_beacon_blocks.go +++ b/beacon-chain/sync/subscriber_beacon_blocks.go @@ -4,10 +4,10 @@ import ( "context" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state/interop" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/beacon-chain/sync/subscriber_beacon_blocks_test.go b/beacon-chain/sync/subscriber_beacon_blocks_test.go index 84d46c7fd..f24c9a505 100644 --- a/beacon-chain/sync/subscriber_beacon_blocks_test.go +++ b/beacon-chain/sync/subscriber_beacon_blocks_test.go @@ -5,11 +5,11 @@ import ( "fmt" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" dbtest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/sirupsen/logrus" diff --git a/beacon-chain/sync/subscriber_test.go b/beacon-chain/sync/subscriber_test.go index 881ada973..fc2578796 100644 --- a/beacon-chain/sync/subscriber_test.go +++ b/beacon-chain/sync/subscriber_test.go @@ -7,10 +7,10 @@ import ( "time" "github.com/gogo/protobuf/proto" + pb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" mockChain "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/statefeed" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" - pb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/beacon-chain/sync/validate_attester_slashing.go b/beacon-chain/sync/validate_attester_slashing.go index 9c754ecbc..e20c3fe28 100644 --- a/beacon-chain/sync/validate_attester_slashing.go +++ b/beacon-chain/sync/validate_attester_slashing.go @@ -6,10 +6,10 @@ import ( "github.com/gogo/protobuf/proto" "github.com/karlseguin/ccache" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/sync/validate_attester_slashing_test.go b/beacon-chain/sync/validate_attester_slashing_test.go index ea7a28539..fbc82fec6 100644 --- a/beacon-chain/sync/validate_attester_slashing_test.go +++ b/beacon-chain/sync/validate_attester_slashing_test.go @@ -6,6 +6,7 @@ import ( "testing" "time" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" @@ -13,7 +14,6 @@ import ( p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/beacon-chain/sync/validate_beacon_attestation.go b/beacon-chain/sync/validate_beacon_attestation.go index 30671f9b9..6e8a328e0 100644 --- a/beacon-chain/sync/validate_beacon_attestation.go +++ b/beacon-chain/sync/validate_beacon_attestation.go @@ -7,9 +7,9 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/traceutil" "github.com/sirupsen/logrus" diff --git a/beacon-chain/sync/validate_beacon_attestation_test.go b/beacon-chain/sync/validate_beacon_attestation_test.go index 2efe04e95..f47b00f60 100644 --- a/beacon-chain/sync/validate_beacon_attestation_test.go +++ b/beacon-chain/sync/validate_beacon_attestation_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mockChain "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" dbtest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/beacon-chain/sync/validate_beacon_blocks.go b/beacon-chain/sync/validate_beacon_blocks.go index 4a74fba63..c8c802f2b 100644 --- a/beacon-chain/sync/validate_beacon_blocks.go +++ b/beacon-chain/sync/validate_beacon_blocks.go @@ -7,10 +7,10 @@ import ( "github.com/gogo/protobuf/proto" "github.com/karlseguin/ccache" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" ) diff --git a/beacon-chain/sync/validate_beacon_blocks_test.go b/beacon-chain/sync/validate_beacon_blocks_test.go index 520646397..0cb441ec3 100644 --- a/beacon-chain/sync/validate_beacon_blocks_test.go +++ b/beacon-chain/sync/validate_beacon_blocks_test.go @@ -6,11 +6,11 @@ import ( "testing" "time" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" dbtest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/beacon-chain/sync/validate_proposer_slashing.go b/beacon-chain/sync/validate_proposer_slashing.go index 1881fc9fc..6fe90bcb3 100644 --- a/beacon-chain/sync/validate_proposer_slashing.go +++ b/beacon-chain/sync/validate_proposer_slashing.go @@ -6,10 +6,10 @@ import ( "github.com/gogo/protobuf/proto" "github.com/karlseguin/ccache" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" ) diff --git a/beacon-chain/sync/validate_proposer_slashing_test.go b/beacon-chain/sync/validate_proposer_slashing_test.go index 5ab7a054f..b63fa4624 100644 --- a/beacon-chain/sync/validate_proposer_slashing_test.go +++ b/beacon-chain/sync/validate_proposer_slashing_test.go @@ -6,13 +6,13 @@ import ( "testing" "time" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/sync/validate_voluntary_exit.go b/beacon-chain/sync/validate_voluntary_exit.go index 11e8a948f..44553f0e3 100644 --- a/beacon-chain/sync/validate_voluntary_exit.go +++ b/beacon-chain/sync/validate_voluntary_exit.go @@ -7,10 +7,10 @@ import ( "github.com/gogo/protobuf/proto" "github.com/karlseguin/ccache" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/beacon-chain/sync/validate_voluntary_exit_test.go b/beacon-chain/sync/validate_voluntary_exit_test.go index 78713ea55..1ac55cb58 100644 --- a/beacon-chain/sync/validate_voluntary_exit_test.go +++ b/beacon-chain/sync/validate_voluntary_exit_test.go @@ -5,13 +5,13 @@ import ( "crypto/rand" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" p2ptest "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/endtoend/BUILD.bazel b/endtoend/BUILD.bazel index 63cf08aed..054b31ce2 100644 --- a/endtoend/BUILD.bazel +++ b/endtoend/BUILD.bazel @@ -24,10 +24,10 @@ go_test( ], deps = [ "//endtoend/evaluators:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@io_bazel_rules_go//go/tools/bazel:go_default_library", "@org_golang_google_grpc//:go_default_library", ], diff --git a/endtoend/endtoend_test.go b/endtoend/endtoend_test.go index 63219aec3..839993be3 100644 --- a/endtoend/endtoend_test.go +++ b/endtoend/endtoend_test.go @@ -15,7 +15,7 @@ import ( "github.com/bazelbuild/rules_go/go/tools/bazel" ptypes "github.com/gogo/protobuf/types" - eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "google.golang.org/grpc" ) diff --git a/endtoend/evaluators/BUILD.bazel b/endtoend/evaluators/BUILD.bazel index e8587e993..0290a42dd 100644 --- a/endtoend/evaluators/BUILD.bazel +++ b/endtoend/evaluators/BUILD.bazel @@ -10,9 +10,9 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/endtoend/evaluators", visibility = ["//endtoend:__subpackages__"], deps = [ - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) diff --git a/endtoend/evaluators/finality.go b/endtoend/evaluators/finality.go index 9df8a2b98..c2e4dbc9e 100644 --- a/endtoend/evaluators/finality.go +++ b/endtoend/evaluators/finality.go @@ -6,7 +6,7 @@ import ( ptypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" - eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ) // FinalizationOccurs is an evaluator to make sure finalization is performing as it should. diff --git a/endtoend/evaluators/validator.go b/endtoend/evaluators/validator.go index fe3002baf..a4d6d37ec 100644 --- a/endtoend/evaluators/validator.go +++ b/endtoend/evaluators/validator.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/pkg/errors" - eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/proto/beacon/db/BUILD.bazel b/proto/beacon/db/BUILD.bazel index c25efa7f3..f1ac6025b 100644 --- a/proto/beacon/db/BUILD.bazel +++ b/proto/beacon/db/BUILD.bazel @@ -10,7 +10,7 @@ proto_library( ], visibility = ["//visibility:public"], deps = [ - "//proto/eth/v1alpha1:v1alpha1_proto", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:proto", "@gogo_special_proto//github.com/gogo/protobuf/gogoproto", ], ) @@ -22,7 +22,7 @@ go_proto_library( proto = ":db_proto", visibility = ["//visibility:public"], deps = [ - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", ], ) @@ -33,6 +33,9 @@ go_library( embed = [":db_go_proto"], importpath = "github.com/prysmaticlabs/prysm/proto/beacon/db", visibility = ["//visibility:public"], + deps = [ + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", + ], ) go_test( @@ -41,7 +44,7 @@ go_test( srcs = ["attestation_container_helper_test.go"], deps = [ ":go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", ], diff --git a/proto/beacon/db/attestation_container.proto b/proto/beacon/db/attestation_container.proto index 116479b6c..83e7907be 100644 --- a/proto/beacon/db/attestation_container.proto +++ b/proto/beacon/db/attestation_container.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package prysm.beacon.db; -import "proto/eth/v1alpha1/attestation.proto"; +import "eth/v1alpha1/attestation.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option go_package = "github.com/prysmaticlabs/prysm/proto/beacon/db"; diff --git a/proto/beacon/db/attestation_container_helper.go b/proto/beacon/db/attestation_container_helper.go index a8ee87e0d..92ab9302f 100644 --- a/proto/beacon/db/attestation_container_helper.go +++ b/proto/beacon/db/attestation_container_helper.go @@ -1,8 +1,8 @@ package db import ( + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" ) // NewContainerFromAttestations creates a new attestation contain with signature pairs from the diff --git a/proto/beacon/db/attestation_container_helper_test.go b/proto/beacon/db/attestation_container_helper_test.go index 104a077e9..aa4897285 100644 --- a/proto/beacon/db/attestation_container_helper_test.go +++ b/proto/beacon/db/attestation_container_helper_test.go @@ -5,9 +5,9 @@ import ( "reflect" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" dbpb "github.com/prysmaticlabs/prysm/proto/beacon/db" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" ) diff --git a/proto/beacon/p2p/v1/BUILD.bazel b/proto/beacon/p2p/v1/BUILD.bazel index bc636b88b..521d237db 100644 --- a/proto/beacon/p2p/v1/BUILD.bazel +++ b/proto/beacon/p2p/v1/BUILD.bazel @@ -10,7 +10,7 @@ go_proto_library( proto = ":v1_proto", visibility = ["//visibility:public"], deps = [ - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", ], ) @@ -27,6 +27,7 @@ ssz_proto_files( srcs = [ "messages.proto", "types.proto", + "archive.proto", ], config = select({ "//conditions:default": "mainnet", @@ -40,8 +41,8 @@ proto_library( srcs = [":ssz_proto_files"], visibility = ["//visibility:public"], deps = [ - "//proto/eth/v1alpha1:v1alpha1_proto", "@com_google_protobuf//:timestamp_proto", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:proto", "@gogo_special_proto//github.com/gogo/protobuf/gogoproto", ], ) diff --git a/proto/eth/v1alpha1/archive.proto b/proto/beacon/p2p/v1/archive.proto similarity index 81% rename from proto/eth/v1alpha1/archive.proto rename to proto/beacon/p2p/v1/archive.proto index a1cda0dff..2f5132f0d 100644 --- a/proto/eth/v1alpha1/archive.proto +++ b/proto/beacon/p2p/v1/archive.proto @@ -1,11 +1,9 @@ syntax = "proto3"; -package ethereum.eth.v1alpha1; +package ethereum.beacon.p2p.v1; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "proto/eth/v1alpha1/beacon_block.proto"; - -option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth"; +import "eth/v1alpha1/beacon_block.proto"; // ArchivedActiveSetChanges represents the changes to the active validator registry // between epoch N and N-1. In particular, it keeps track of validator indices @@ -23,15 +21,15 @@ message ArchivedActiveSetChanges { // Voluntary exit objects corresponding 1-to-1 to the exited indices // list in this same data structure. - repeated VoluntaryExit voluntary_exits = 6; + repeated ethereum.eth.v1alpha1.VoluntaryExit voluntary_exits = 6; // Proposer slashing objects corresponding 1-to-1 to the slashed proposer indices // list in this same data structure. - repeated ProposerSlashing proposer_slashings = 7; + repeated ethereum.eth.v1alpha1.ProposerSlashing proposer_slashings = 7; // Attester slashing objects corresponding 1-to-1 to the slashed attester indices // list in this same data structure. - repeated AttesterSlashing attester_slashings = 8; + repeated ethereum.eth.v1alpha1.AttesterSlashing attester_slashings = 8; } // ArchivedCommitteeInfo representing the minimal data required to reconstruct diff --git a/proto/beacon/p2p/v1/types.proto b/proto/beacon/p2p/v1/types.proto index 10e350e33..77b025934 100644 --- a/proto/beacon/p2p/v1/types.proto +++ b/proto/beacon/p2p/v1/types.proto @@ -1,9 +1,9 @@ syntax = "proto3"; package ethereum.beacon.p2p.v1; -import "proto/eth/v1alpha1/attestation.proto"; -import "proto/eth/v1alpha1/beacon_block.proto"; -import "proto/eth/v1alpha1/validator.proto"; +import "eth/v1alpha1/attestation.proto"; +import "eth/v1alpha1/beacon_block.proto"; +import "eth/v1alpha1/validator.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; message BeaconState { diff --git a/proto/beacon/rpc/v1/BUILD.bazel b/proto/beacon/rpc/v1/BUILD.bazel index 86acdc053..def96fcd5 100644 --- a/proto/beacon/rpc/v1/BUILD.bazel +++ b/proto/beacon/rpc/v1/BUILD.bazel @@ -11,7 +11,7 @@ go_proto_library( visibility = ["//visibility:public"], deps = [ "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//proto/sharding/p2p/v1:go_default_library", "@go_googleapis//google/api:annotations_go_proto", "@grpc_ecosystem_grpc_gateway//protoc-gen-swagger/options:options_go_proto", @@ -29,7 +29,7 @@ go_proto_library( visibility = ["//visibility:public"], deps = [ "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//proto/sharding/p2p/v1:go_default_library", "@go_googleapis//google/api:annotations_go_proto", "@grpc_ecosystem_grpc_gateway//protoc-gen-swagger/options:options_go_proto", @@ -47,11 +47,12 @@ proto_library( name = "v1_proto", srcs = [ "services.proto", + "slasher.proto", ], visibility = ["//visibility:public"], deps = [ "//proto/beacon/p2p/v1:v1_proto", - "//proto/eth/v1alpha1:v1alpha1_proto", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:proto", "//proto/sharding/p2p/v1:v1_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:timestamp_proto", diff --git a/proto/beacon/rpc/v1/services.proto b/proto/beacon/rpc/v1/services.proto index 1847e2a9c..53fb511cb 100644 --- a/proto/beacon/rpc/v1/services.proto +++ b/proto/beacon/rpc/v1/services.proto @@ -3,8 +3,8 @@ syntax = "proto3"; package ethereum.beacon.rpc.v1; import "google/protobuf/empty.proto"; -import "proto/eth/v1alpha1/beacon_block.proto"; -import "proto/eth/v1alpha1/attestation.proto"; +import "eth/v1alpha1/beacon_block.proto"; +import "eth/v1alpha1/attestation.proto"; service AttesterService { rpc RequestAttestation(AttestationRequest) returns (ethereum.eth.v1alpha1.AttestationData); diff --git a/proto/eth/v1alpha1/slasher.proto b/proto/beacon/rpc/v1/slasher.proto similarity index 94% rename from proto/eth/v1alpha1/slasher.proto rename to proto/beacon/rpc/v1/slasher.proto index 7d517e164..f783bf3a5 100644 --- a/proto/eth/v1alpha1/slasher.proto +++ b/proto/beacon/rpc/v1/slasher.proto @@ -1,11 +1,9 @@ syntax = "proto3"; -package ethereum.eth.v1alpha1; +package ethereum.beacon.rpc.v1; import "google/protobuf/empty.proto"; -import "proto/eth/v1alpha1/beacon_block.proto"; - -option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth"; +import "eth/v1alpha1/beacon_block.proto"; // Slasher service API // @@ -35,6 +33,7 @@ message ValidatorIDToIdxAtt { // 96 bytes aggregate signature. bytes signature = 3; } + message ValidatorIDToIdxAttList { repeated ValidatorIDToIdxAtt indicesList = 1 ; } @@ -43,12 +42,15 @@ message ProposerSlashingRequest { ethereum.eth.v1alpha1.BeaconBlockHeader block_header = 1; uint64 validator_index = 2; } + message ProposerSlashingResponse { repeated ethereum.eth.v1alpha1.ProposerSlashing proposer_slashing = 1; } + message AttesterSlashingResponse { repeated ethereum.eth.v1alpha1.AttesterSlashing attester_slashing = 1; } + // In order to detect surrounded attestation we need to compare // each attestation source to those spans // see https://github.com/protolambda/eth2-surround/blob/master/README.md#min-max-surround @@ -57,6 +59,7 @@ message MinMaxEpochSpan { uint32 min_epoch_span = 1; uint32 max_epoch_span = 2; } + // Every validator will have their own spans map containing min distance from each epoch // to the closest target epoch of another attestation (surrounded) and max distance to // a target attestation (surrounding), in order to detect slashable attestation as quickly diff --git a/proto/eth/v1alpha1/BUILD.bazel b/proto/eth/v1alpha1/BUILD.bazel deleted file mode 100644 index 3e22dabb4..000000000 --- a/proto/eth/v1alpha1/BUILD.bazel +++ /dev/null @@ -1,64 +0,0 @@ -# gazelle:ignore -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") -load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") -load("//proto:ssz_proto_library.bzl", "ssz_proto_files") - -ssz_proto_files( - name = "ssz_proto_files", - srcs = [ - "archive.proto", - "attestation.proto", - "beacon_block.proto", - "beacon_chain.proto", - "node.proto", - "slasher.proto", - "validator.proto", - ], - config = select({ - "//conditions:default": "mainnet", - "//proto:ssz_mainnet": "mainnet", - "//proto:ssz_minimal": "minimal", - }), -) - -proto_library( - name = "v1alpha1_proto", - srcs = [":ssz_proto_files"], - visibility = ["//visibility:public"], - deps = [ - "@com_google_protobuf//:empty_proto", - "@com_google_protobuf//:timestamp_proto", - "@go_googleapis//google/api:annotations_proto", - "@gogo_special_proto//github.com/gogo/protobuf/gogoproto", - ], -) - -go_proto_library( - name = "go_default_library", - compiler = "//:grpc_proto_compiler", - importpath = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1", - proto = ":v1alpha1_proto", - visibility = ["//visibility:public"], - deps = [ - "@com_github_prysmaticlabs_go_bitfield//:go_default_library", - "@go_googleapis//google/api:annotations_go_proto", - ], -) - -go_proto_library( - name = "go_grpc_gateway_library", - compilers = [ - "//:grpc_nogogo_proto_compiler", - "@grpc_ecosystem_grpc_gateway//protoc-gen-grpc-gateway:go_gen_grpc_gateway", - ], - importpath = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1_gateway", - proto = ":v1alpha1_proto", - visibility = ["//visibility:public"], - deps = [ - "@com_github_gogo_protobuf//gogoproto:go_default_library", - "@com_github_golang_protobuf//descriptor:go_default_library", - "@com_github_golang_protobuf//ptypes/empty:go_default_library", - "@com_github_prysmaticlabs_go_bitfield//:go_default_library", - "@go_googleapis//google/api:annotations_go_proto", - ], -) diff --git a/proto/eth/v1alpha1/_compatibility/BUILD.bazel b/proto/eth/v1alpha1/_compatibility/BUILD.bazel deleted file mode 100644 index 6a5360f72..000000000 --- a/proto/eth/v1alpha1/_compatibility/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_test") - -go_test( - name = "go_default_test", - srcs = ["compatability_test.go"], - deps = [ - "//proto/eth/v1alpha1:go_default_library", - "@com_github_gogo_protobuf//proto:go_default_library", - "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", - ], -) diff --git a/proto/eth/v1alpha1/_compatibility/compatability_test.go b/proto/eth/v1alpha1/_compatibility/compatability_test.go deleted file mode 100644 index 0bd0cddc0..000000000 --- a/proto/eth/v1alpha1/_compatibility/compatability_test.go +++ /dev/null @@ -1,261 +0,0 @@ -package eth_test - -import ( - "fmt" - "reflect" - "testing" - - "github.com/gogo/protobuf/proto" - upstreampb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" - pb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" -) - -// Test that Prysm copied protobufs have the same wire type and tag number. -func TestProtoCompatability(t *testing.T) { - tests := []struct { - a proto.Message - b proto.Message - }{ - // attestation.proto - { - a: &pb.Attestation{}, - b: &upstreampb.Attestation{}, - }, - { - a: &pb.AttestationData{}, - b: &upstreampb.AttestationData{}, - }, - { - a: &pb.Checkpoint{}, - b: &upstreampb.Checkpoint{}, - }, - // beacon_block.proto - { - a: &pb.BeaconBlock{}, - b: &upstreampb.BeaconBlock{}, - }, - { - a: &pb.BeaconBlockBody{}, - b: &upstreampb.BeaconBlockBody{}, - }, - { - a: &pb.ProposerSlashing{}, - b: &upstreampb.ProposerSlashing{}, - }, - { - a: &pb.AttesterSlashing{}, - b: &upstreampb.AttesterSlashing{}, - }, - { - a: &pb.Deposit{}, - b: &upstreampb.Deposit{}, - }, - { - a: &pb.Deposit_Data{}, - b: &upstreampb.Deposit_Data{}, - }, - { - a: &pb.VoluntaryExit{}, - b: &upstreampb.VoluntaryExit{}, - }, - { - a: &pb.Eth1Data{}, - b: &upstreampb.Eth1Data{}, - }, - { - a: &pb.BeaconBlockHeader{}, - b: &upstreampb.BeaconBlockHeader{}, - }, - { - a: &pb.IndexedAttestation{}, - b: &upstreampb.IndexedAttestation{}, - }, - // beacon_chain.proto - { - a: &pb.ListAttestationsRequest{}, - b: &upstreampb.ListAttestationsRequest{}, - }, - { - a: &pb.ListAttestationsResponse{}, - b: &upstreampb.ListAttestationsResponse{}, - }, - { - a: &pb.ListBlocksRequest{}, - b: &upstreampb.ListBlocksRequest{}, - }, - { - a: &pb.ListBlocksResponse{}, - b: &upstreampb.ListBlocksResponse{}, - }, - { - a: &pb.ChainHead{}, - b: &upstreampb.ChainHead{}, - }, - { - a: &pb.ListValidatorBalancesRequest{}, - b: &upstreampb.ListValidatorBalancesRequest{}, - }, - { - a: &pb.ValidatorBalances{}, - b: &upstreampb.ValidatorBalances{}, - }, - { - a: &pb.ListValidatorsRequest{}, - b: &upstreampb.ListValidatorsRequest{}, - }, - { - a: &pb.Validators{}, - b: &upstreampb.Validators{}, - }, - { - a: &pb.GetValidatorActiveSetChangesRequest{}, - b: &upstreampb.GetValidatorActiveSetChangesRequest{}, - }, - { - a: &pb.ActiveSetChanges{}, - b: &upstreampb.ActiveSetChanges{}, - }, - { - a: &pb.ValidatorQueue{}, - b: &upstreampb.ValidatorQueue{}, - }, - { - a: &pb.ListValidatorAssignmentsRequest{}, - b: &upstreampb.ListValidatorAssignmentsRequest{}, - }, - { - a: &pb.ValidatorAssignments{}, - b: &upstreampb.ValidatorAssignments{}, - }, - { - a: &pb.ValidatorAssignments_CommitteeAssignment{}, - b: &upstreampb.ValidatorAssignments_CommitteeAssignment{}, - }, - { - a: &pb.GetValidatorParticipationRequest{}, - b: &upstreampb.GetValidatorParticipationRequest{}, - }, - { - a: &pb.ValidatorParticipationResponse{}, - b: &upstreampb.ValidatorParticipationResponse{}, - }, - { - a: &pb.AttestationPoolResponse{}, - b: &upstreampb.AttestationPoolResponse{}, - }, - // node.proto - { - a: &pb.SyncStatus{}, - b: &upstreampb.SyncStatus{}, - }, - { - a: &pb.Genesis{}, - b: &upstreampb.Genesis{}, - }, - { - a: &pb.Version{}, - b: &upstreampb.Version{}, - }, - { - a: &pb.ImplementedServices{}, - b: &upstreampb.ImplementedServices{}, - }, - // validator.proto - { - a: &pb.DutiesRequest{}, - b: &upstreampb.DutiesRequest{}, - }, - { - a: &pb.DutiesResponse{}, - b: &upstreampb.DutiesResponse{}, - }, - { - a: &pb.DutiesResponse_Duty{}, - b: &upstreampb.DutiesResponse_Duty{}, - }, - { - a: &pb.BlockRequest{}, - b: &upstreampb.BlockRequest{}, - }, - { - a: &pb.AttestationDataRequest{}, - b: &upstreampb.AttestationDataRequest{}, - }, - { - a: &pb.Validator{}, - b: &upstreampb.Validator{}, - }, - { - a: &pb.ValidatorParticipation{}, - b: &upstreampb.ValidatorParticipation{}, - }, - } - - for _, tt := range tests { - t.Run(fmt.Sprintf("%T", tt.a), func(t *testing.T) { - - propsA := proto.GetProperties(reflect.TypeOf(tt.a).Elem()) - propsB := proto.GetProperties(reflect.TypeOf(tt.b).Elem()) - - if propsA.Len() != propsB.Len() { - t.Fatalf( - "%T does not have same number of properties (%d) as %T (%d)", - tt.a, - propsA.Len(), - tt.b, - propsB.Len(), - ) - } - - for i, propA := range propsA.Prop { - propB := propsB.Prop[i] - - if propA.Name != propB.Name { - t.Errorf( - "%T.%s field is named differently than %T.%s", - tt.a, - propA.Name, - tt.b, - propB.Name, - ) - } - - if propA.Wire != propB.Wire { - t.Errorf( - "%T.%s has different wire (%s) than %T.%s (%s)", - tt.a, - propA.Name, - propA.Wire, - tt.b, - propB.Name, - propB.Wire, - ) - } - - if propA.WireType != propB.WireType { - t.Errorf( - "%T.%s has different wiretype (%d) than %T.%s (%d)", - tt.a, - propA.Name, - propA.WireType, - tt.b, - propB.Name, - propB.WireType, - ) - } - - if propA.Tag != propB.Tag { - t.Errorf( - "%T.%s has different tag value (%d) than %T.%s (%d)", - tt.a, - propA.Name, - propA.Tag, - tt.b, - propB.Name, - propB.Tag, - ) - } - } - }) - } -} diff --git a/proto/eth/v1alpha1/archive.pb.go b/proto/eth/v1alpha1/archive.pb.go deleted file mode 100755 index 4067734cc..000000000 --- a/proto/eth/v1alpha1/archive.pb.go +++ /dev/null @@ -1,1054 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/eth/v1alpha1/archive.proto - -package eth - -import ( - fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type ArchivedActiveSetChanges struct { - Activated []uint64 `protobuf:"varint,1,rep,packed,name=activated,proto3" json:"activated,omitempty"` - Exited []uint64 `protobuf:"varint,2,rep,packed,name=exited,proto3" json:"exited,omitempty"` - Slashed []uint64 `protobuf:"varint,4,rep,packed,name=slashed,proto3" json:"slashed,omitempty"` - VoluntaryExits []*VoluntaryExit `protobuf:"bytes,6,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty"` - ProposerSlashings []*ProposerSlashing `protobuf:"bytes,7,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty"` - AttesterSlashings []*AttesterSlashing `protobuf:"bytes,8,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ArchivedActiveSetChanges) Reset() { *m = ArchivedActiveSetChanges{} } -func (m *ArchivedActiveSetChanges) String() string { return proto.CompactTextString(m) } -func (*ArchivedActiveSetChanges) ProtoMessage() {} -func (*ArchivedActiveSetChanges) Descriptor() ([]byte, []int) { - return fileDescriptor_afd178f87193e24d, []int{0} -} -func (m *ArchivedActiveSetChanges) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArchivedActiveSetChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArchivedActiveSetChanges.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ArchivedActiveSetChanges) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArchivedActiveSetChanges.Merge(m, src) -} -func (m *ArchivedActiveSetChanges) XXX_Size() int { - return m.Size() -} -func (m *ArchivedActiveSetChanges) XXX_DiscardUnknown() { - xxx_messageInfo_ArchivedActiveSetChanges.DiscardUnknown(m) -} - -var xxx_messageInfo_ArchivedActiveSetChanges proto.InternalMessageInfo - -func (m *ArchivedActiveSetChanges) GetActivated() []uint64 { - if m != nil { - return m.Activated - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetExited() []uint64 { - if m != nil { - return m.Exited - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetSlashed() []uint64 { - if m != nil { - return m.Slashed - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetVoluntaryExits() []*VoluntaryExit { - if m != nil { - return m.VoluntaryExits - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetProposerSlashings() []*ProposerSlashing { - if m != nil { - return m.ProposerSlashings - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetAttesterSlashings() []*AttesterSlashing { - if m != nil { - return m.AttesterSlashings - } - return nil -} - -type ArchivedCommitteeInfo struct { - ProposerSeed []byte `protobuf:"bytes,1,opt,name=proposer_seed,json=proposerSeed,proto3" json:"proposer_seed,omitempty" ssz-size:"32"` - AttesterSeed []byte `protobuf:"bytes,2,opt,name=attester_seed,json=attesterSeed,proto3" json:"attester_seed,omitempty" ssz-size:"32"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ArchivedCommitteeInfo) Reset() { *m = ArchivedCommitteeInfo{} } -func (m *ArchivedCommitteeInfo) String() string { return proto.CompactTextString(m) } -func (*ArchivedCommitteeInfo) ProtoMessage() {} -func (*ArchivedCommitteeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_afd178f87193e24d, []int{1} -} -func (m *ArchivedCommitteeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArchivedCommitteeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArchivedCommitteeInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ArchivedCommitteeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArchivedCommitteeInfo.Merge(m, src) -} -func (m *ArchivedCommitteeInfo) XXX_Size() int { - return m.Size() -} -func (m *ArchivedCommitteeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ArchivedCommitteeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ArchivedCommitteeInfo proto.InternalMessageInfo - -func (m *ArchivedCommitteeInfo) GetProposerSeed() []byte { - if m != nil { - return m.ProposerSeed - } - return nil -} - -func (m *ArchivedCommitteeInfo) GetAttesterSeed() []byte { - if m != nil { - return m.AttesterSeed - } - return nil -} - -func init() { - proto.RegisterType((*ArchivedActiveSetChanges)(nil), "ethereum.eth.v1alpha1.ArchivedActiveSetChanges") - proto.RegisterType((*ArchivedCommitteeInfo)(nil), "ethereum.eth.v1alpha1.ArchivedCommitteeInfo") -} - -func init() { proto.RegisterFile("proto/eth/v1alpha1/archive.proto", fileDescriptor_afd178f87193e24d) } - -var fileDescriptor_afd178f87193e24d = []byte{ - // 407 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0xc7, 0xc9, 0xee, 0xd2, 0xd5, 0x71, 0x57, 0xd9, 0x81, 0x95, 0xb0, 0x48, 0x2d, 0x41, 0xb1, - 0x97, 0x4d, 0x68, 0x8b, 0x1e, 0xf4, 0xd4, 0x16, 0x0f, 0x1e, 0x04, 0x49, 0xa1, 0x07, 0x2f, 0x65, - 0x92, 0xbc, 0x66, 0x06, 0x93, 0x4c, 0xc8, 0xbc, 0x84, 0xb6, 0x5f, 0xc0, 0xaf, 0xe6, 0xd1, 0x4f, - 0x20, 0xd2, 0x9b, 0x57, 0x3f, 0x81, 0x64, 0x92, 0x34, 0xb5, 0xb6, 0xde, 0xf2, 0xff, 0xbf, 0xff, - 0xfb, 0xbd, 0x37, 0x93, 0x21, 0xbd, 0x34, 0x93, 0x28, 0x1d, 0x40, 0xee, 0x14, 0x03, 0x16, 0xa5, - 0x9c, 0x0d, 0x1c, 0x96, 0xf9, 0x5c, 0x14, 0x60, 0xeb, 0x12, 0xbd, 0x05, 0xe4, 0x90, 0x41, 0x1e, - 0xdb, 0x80, 0xdc, 0x6e, 0x42, 0x77, 0xf7, 0xa1, 0x40, 0x9e, 0x7b, 0xb6, 0x2f, 0x63, 0x27, 0x94, - 0xa1, 0x74, 0x74, 0xda, 0xcb, 0x97, 0x5a, 0x55, 0xd4, 0xf2, 0xab, 0xa2, 0xdc, 0xbd, 0x3c, 0x32, - 0xc7, 0x03, 0xe6, 0xcb, 0x64, 0xe1, 0x45, 0xd2, 0xff, 0x52, 0xc5, 0xac, 0x5f, 0x67, 0xc4, 0x1c, - 0x57, 0xe3, 0x83, 0xb1, 0x8f, 0xa2, 0x80, 0x19, 0xe0, 0x94, 0xb3, 0x24, 0x04, 0x45, 0x9f, 0x91, - 0x87, 0xac, 0xf4, 0x18, 0x42, 0x60, 0x1a, 0xbd, 0xf3, 0xfe, 0x85, 0xdb, 0x1a, 0xf4, 0x29, 0xe9, - 0xc0, 0x4a, 0x94, 0xa5, 0x33, 0x5d, 0xaa, 0x15, 0x35, 0xc9, 0xa5, 0x8a, 0x98, 0xe2, 0x10, 0x98, - 0x17, 0xba, 0xd0, 0x48, 0xfa, 0x91, 0x3c, 0x29, 0x64, 0x94, 0x27, 0xc8, 0xb2, 0xf5, 0xa2, 0x4c, - 0x2b, 0xb3, 0xd3, 0x3b, 0xef, 0x3f, 0x1a, 0xbe, 0xb0, 0x8f, 0x9e, 0xd9, 0x9e, 0x37, 0xe9, 0xf7, - 0x2b, 0x81, 0xee, 0xe3, 0x62, 0x5f, 0x2a, 0x3a, 0x27, 0x34, 0xcd, 0x64, 0x2a, 0x15, 0x64, 0x0b, - 0x3d, 0x42, 0x24, 0xa1, 0x32, 0x2f, 0x35, 0xf1, 0xd5, 0x09, 0xe2, 0xa7, 0xba, 0x61, 0x56, 0xe7, - 0xdd, 0x9b, 0xf4, 0xc0, 0xd1, 0x5c, 0x86, 0x08, 0x0a, 0xff, 0xe2, 0x3e, 0xf8, 0x2f, 0x77, 0x5c, - 0x37, 0xb4, 0x5c, 0x76, 0xe0, 0x28, 0xeb, 0xab, 0x41, 0x6e, 0x9b, 0xbb, 0x9e, 0xca, 0x38, 0x16, - 0x88, 0x00, 0x1f, 0x92, 0xa5, 0xa4, 0x6f, 0xc8, 0x75, 0x7b, 0x12, 0xd0, 0x97, 0x6d, 0xf4, 0xaf, - 0x26, 0x37, 0xbf, 0x7f, 0x3c, 0xbf, 0x56, 0x6a, 0x73, 0xaf, 0xc4, 0x06, 0xde, 0x5a, 0xa3, 0xa1, - 0xe5, 0x5e, 0xed, 0xd6, 0x05, 0x08, 0xca, 0xbe, 0x76, 0x53, 0xd0, 0x7f, 0xe2, 0x54, 0xdf, 0x6e, - 0x1d, 0x80, 0x60, 0x32, 0xfd, 0xb6, 0xed, 0x1a, 0xdf, 0xb7, 0x5d, 0xe3, 0xe7, 0xb6, 0x6b, 0x7c, - 0x7e, 0xbd, 0xf7, 0xb2, 0xd2, 0x6c, 0xad, 0x62, 0x86, 0xc2, 0x8f, 0x98, 0xa7, 0x2a, 0xe5, 0xfc, - 0xfb, 0x92, 0xde, 0x01, 0x72, 0xaf, 0xa3, 0xfd, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, - 0x2f, 0x56, 0xa4, 0xd2, 0x02, 0x00, 0x00, -} - -func (m *ArchivedActiveSetChanges) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ArchivedActiveSetChanges) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Activated) > 0 { - dAtA2 := make([]byte, len(m.Activated)*10) - var j1 int - for _, num := range m.Activated { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintArchive(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) - } - if len(m.Exited) > 0 { - dAtA4 := make([]byte, len(m.Exited)*10) - var j3 int - for _, num := range m.Exited { - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ - } - dAtA[i] = 0x12 - i++ - i = encodeVarintArchive(dAtA, i, uint64(j3)) - i += copy(dAtA[i:], dAtA4[:j3]) - } - if len(m.Slashed) > 0 { - dAtA6 := make([]byte, len(m.Slashed)*10) - var j5 int - for _, num := range m.Slashed { - for num >= 1<<7 { - dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - dAtA6[j5] = uint8(num) - j5++ - } - dAtA[i] = 0x22 - i++ - i = encodeVarintArchive(dAtA, i, uint64(j5)) - i += copy(dAtA[i:], dAtA6[:j5]) - } - if len(m.VoluntaryExits) > 0 { - for _, msg := range m.VoluntaryExits { - dAtA[i] = 0x32 - i++ - i = encodeVarintArchive(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ProposerSlashings) > 0 { - for _, msg := range m.ProposerSlashings { - dAtA[i] = 0x3a - i++ - i = encodeVarintArchive(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.AttesterSlashings) > 0 { - for _, msg := range m.AttesterSlashings { - dAtA[i] = 0x42 - i++ - i = encodeVarintArchive(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ArchivedCommitteeInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ArchivedCommitteeInfo) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ProposerSeed) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintArchive(dAtA, i, uint64(len(m.ProposerSeed))) - i += copy(dAtA[i:], m.ProposerSeed) - } - if len(m.AttesterSeed) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintArchive(dAtA, i, uint64(len(m.AttesterSeed))) - i += copy(dAtA[i:], m.AttesterSeed) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintArchive(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ArchivedActiveSetChanges) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Activated) > 0 { - l = 0 - for _, e := range m.Activated { - l += sovArchive(uint64(e)) - } - n += 1 + sovArchive(uint64(l)) + l - } - if len(m.Exited) > 0 { - l = 0 - for _, e := range m.Exited { - l += sovArchive(uint64(e)) - } - n += 1 + sovArchive(uint64(l)) + l - } - if len(m.Slashed) > 0 { - l = 0 - for _, e := range m.Slashed { - l += sovArchive(uint64(e)) - } - n += 1 + sovArchive(uint64(l)) + l - } - if len(m.VoluntaryExits) > 0 { - for _, e := range m.VoluntaryExits { - l = e.Size() - n += 1 + l + sovArchive(uint64(l)) - } - } - if len(m.ProposerSlashings) > 0 { - for _, e := range m.ProposerSlashings { - l = e.Size() - n += 1 + l + sovArchive(uint64(l)) - } - } - if len(m.AttesterSlashings) > 0 { - for _, e := range m.AttesterSlashings { - l = e.Size() - n += 1 + l + sovArchive(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ArchivedCommitteeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProposerSeed) - if l > 0 { - n += 1 + l + sovArchive(uint64(l)) - } - l = len(m.AttesterSeed) - if l > 0 { - n += 1 + l + sovArchive(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovArchive(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozArchive(x uint64) (n int) { - return sovArchive(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ArchivedActiveSetChanges) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ArchivedActiveSetChanges: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArchivedActiveSetChanges: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Activated = append(m.Activated, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Activated) == 0 { - m.Activated = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Activated = append(m.Activated, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Activated", wireType) - } - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exited = append(m.Exited, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Exited) == 0 { - m.Exited = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exited = append(m.Exited, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Exited", wireType) - } - case 4: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Slashed = append(m.Slashed, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Slashed) == 0 { - m.Slashed = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Slashed = append(m.Slashed, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Slashed", wireType) - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VoluntaryExits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VoluntaryExits = append(m.VoluntaryExits, &VoluntaryExit{}) - if err := m.VoluntaryExits[len(m.VoluntaryExits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerSlashings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerSlashings = append(m.ProposerSlashings, &ProposerSlashing{}) - if err := m.ProposerSlashings[len(m.ProposerSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttesterSlashings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttesterSlashings = append(m.AttesterSlashings, &AttesterSlashing{}) - if err := m.AttesterSlashings[len(m.AttesterSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipArchive(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthArchive - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthArchive - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArchivedCommitteeInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ArchivedCommitteeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArchivedCommitteeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerSeed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerSeed = append(m.ProposerSeed[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerSeed == nil { - m.ProposerSeed = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttesterSeed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttesterSeed = append(m.AttesterSeed[:0], dAtA[iNdEx:postIndex]...) - if m.AttesterSeed == nil { - m.AttesterSeed = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipArchive(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthArchive - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthArchive - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipArchive(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowArchive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowArchive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowArchive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthArchive - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthArchive - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowArchive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipArchive(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthArchive - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthArchive = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowArchive = fmt.Errorf("proto: integer overflow") -) diff --git a/proto/eth/v1alpha1/attestation.pb.go b/proto/eth/v1alpha1/attestation.pb.go deleted file mode 100755 index 008971640..000000000 --- a/proto/eth/v1alpha1/attestation.pb.go +++ /dev/null @@ -1,1117 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/eth/v1alpha1/attestation.proto - -package eth - -import ( - fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type Attestation struct { - AggregationBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3,casttype=github.com/prysmaticlabs/go-bitfield.Bitlist" json:"aggregation_bits,omitempty" ssz-max:"2048"` - Data *AttestationData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - CustodyBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,3,opt,name=custody_bits,json=custodyBits,proto3,casttype=github.com/prysmaticlabs/go-bitfield.Bitlist" json:"custody_bits,omitempty" ssz-max:"2048"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Attestation) Reset() { *m = Attestation{} } -func (m *Attestation) String() string { return proto.CompactTextString(m) } -func (*Attestation) ProtoMessage() {} -func (*Attestation) Descriptor() ([]byte, []int) { - return fileDescriptor_f8f395ba51cd84e0, []int{0} -} -func (m *Attestation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Attestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Attestation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Attestation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Attestation.Merge(m, src) -} -func (m *Attestation) XXX_Size() int { - return m.Size() -} -func (m *Attestation) XXX_DiscardUnknown() { - xxx_messageInfo_Attestation.DiscardUnknown(m) -} - -var xxx_messageInfo_Attestation proto.InternalMessageInfo - -func (m *Attestation) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitlist { - if m != nil { - return m.AggregationBits - } - return nil -} - -func (m *Attestation) GetData() *AttestationData { - if m != nil { - return m.Data - } - return nil -} - -func (m *Attestation) GetCustodyBits() github_com_prysmaticlabs_go_bitfield.Bitlist { - if m != nil { - return m.CustodyBits - } - return nil -} - -func (m *Attestation) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type AttestationData struct { - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` - BeaconBlockRoot []byte `protobuf:"bytes,3,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty" ssz-size:"32"` - Source *Checkpoint `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` - Target *Checkpoint `protobuf:"bytes,5,opt,name=target,proto3" json:"target,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttestationData) Reset() { *m = AttestationData{} } -func (m *AttestationData) String() string { return proto.CompactTextString(m) } -func (*AttestationData) ProtoMessage() {} -func (*AttestationData) Descriptor() ([]byte, []int) { - return fileDescriptor_f8f395ba51cd84e0, []int{1} -} -func (m *AttestationData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttestationData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttestationData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AttestationData) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttestationData.Merge(m, src) -} -func (m *AttestationData) XXX_Size() int { - return m.Size() -} -func (m *AttestationData) XXX_DiscardUnknown() { - xxx_messageInfo_AttestationData.DiscardUnknown(m) -} - -var xxx_messageInfo_AttestationData proto.InternalMessageInfo - -func (m *AttestationData) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -func (m *AttestationData) GetIndex() uint64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *AttestationData) GetBeaconBlockRoot() []byte { - if m != nil { - return m.BeaconBlockRoot - } - return nil -} - -func (m *AttestationData) GetSource() *Checkpoint { - if m != nil { - return m.Source - } - return nil -} - -func (m *AttestationData) GetTarget() *Checkpoint { - if m != nil { - return m.Target - } - return nil -} - -type Checkpoint struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - Root []byte `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty" ssz-size:"32"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Checkpoint) Reset() { *m = Checkpoint{} } -func (m *Checkpoint) String() string { return proto.CompactTextString(m) } -func (*Checkpoint) ProtoMessage() {} -func (*Checkpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_f8f395ba51cd84e0, []int{2} -} -func (m *Checkpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Checkpoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Checkpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Checkpoint.Merge(m, src) -} -func (m *Checkpoint) XXX_Size() int { - return m.Size() -} -func (m *Checkpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Checkpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Checkpoint proto.InternalMessageInfo - -func (m *Checkpoint) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *Checkpoint) GetRoot() []byte { - if m != nil { - return m.Root - } - return nil -} - -func init() { - proto.RegisterType((*Attestation)(nil), "ethereum.eth.v1alpha1.Attestation") - proto.RegisterType((*AttestationData)(nil), "ethereum.eth.v1alpha1.AttestationData") - proto.RegisterType((*Checkpoint)(nil), "ethereum.eth.v1alpha1.Checkpoint") -} - -func init() { - proto.RegisterFile("proto/eth/v1alpha1/attestation.proto", fileDescriptor_f8f395ba51cd84e0) -} - -var fileDescriptor_f8f395ba51cd84e0 = []byte{ - // 444 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xc1, 0x6e, 0xd3, 0x40, - 0x14, 0x94, 0x83, 0x5b, 0x89, 0x4d, 0x21, 0x74, 0x05, 0x52, 0xc4, 0x21, 0x29, 0x16, 0xa0, 0x1e, - 0x88, 0x4d, 0x53, 0x40, 0x34, 0x88, 0x03, 0x2e, 0x17, 0xae, 0x3e, 0x72, 0xa9, 0xd6, 0xce, 0xeb, - 0xee, 0xaa, 0x76, 0x9e, 0xb5, 0xfb, 0x8c, 0xda, 0x7e, 0x21, 0xc7, 0x7e, 0x41, 0x84, 0xf2, 0x05, - 0xa8, 0x47, 0x4e, 0xc8, 0xbb, 0x41, 0x89, 0x02, 0x91, 0x38, 0xf4, 0xb6, 0xb3, 0x3b, 0x33, 0x6f, - 0xe6, 0x59, 0x66, 0xcf, 0x6b, 0x83, 0x84, 0x09, 0x90, 0x4a, 0xbe, 0x1d, 0x89, 0xb2, 0x56, 0xe2, - 0x28, 0x11, 0x44, 0x60, 0x49, 0x90, 0xc6, 0x59, 0xec, 0x9e, 0xf9, 0x13, 0x20, 0x05, 0x06, 0x9a, - 0x2a, 0x06, 0x52, 0xf1, 0x1f, 0xe2, 0xd3, 0x91, 0xd4, 0xa4, 0x9a, 0x3c, 0x2e, 0xb0, 0x4a, 0x24, - 0x4a, 0x4c, 0x1c, 0x3b, 0x6f, 0xce, 0x1d, 0xf2, 0xce, 0xed, 0xc9, 0xbb, 0x44, 0x37, 0x1d, 0xd6, - 0xfd, 0xb4, 0xf2, 0xe6, 0x15, 0x7b, 0x24, 0xa4, 0x34, 0x20, 0x1d, 0x3c, 0xcb, 0x35, 0xd9, 0x7e, - 0x70, 0x10, 0x1c, 0xee, 0xa5, 0xe9, 0xed, 0x7c, 0xf8, 0xd0, 0xda, 0xeb, 0x51, 0x25, 0x2e, 0x27, - 0xd1, 0xf8, 0xf5, 0x9b, 0xf7, 0xd1, 0xaf, 0xf9, 0xf0, 0xd5, 0xda, 0xb8, 0xda, 0x5c, 0xd9, 0x4a, - 0x90, 0x2e, 0x4a, 0x91, 0xdb, 0x44, 0xe2, 0x28, 0xd7, 0x74, 0xae, 0xa1, 0x9c, 0xc6, 0xa9, 0xa6, - 0x52, 0x5b, 0xca, 0x7a, 0x6b, 0xde, 0xa9, 0x26, 0xcb, 0x27, 0x2c, 0x9c, 0x0a, 0x12, 0xfd, 0xce, - 0x41, 0x70, 0xd8, 0x1d, 0xbf, 0x8c, 0xff, 0xd9, 0x29, 0x5e, 0x0b, 0xf8, 0x59, 0x90, 0xc8, 0x9c, - 0x86, 0x03, 0xdb, 0x2b, 0x1a, 0x4b, 0x38, 0xbd, 0xf2, 0x31, 0xef, 0xdd, 0x59, 0xcc, 0xee, 0xd2, - 0xd7, 0x45, 0x4c, 0xd8, 0x7d, 0xab, 0xe5, 0x4c, 0x50, 0x63, 0xa0, 0x1f, 0xba, 0x19, 0xfb, 0xb7, - 0xf3, 0xe1, 0x83, 0x76, 0x86, 0xd5, 0xd7, 0x30, 0x89, 0x4e, 0xde, 0x45, 0xd9, 0x8a, 0x13, 0xfd, - 0x0c, 0x58, 0x6f, 0x23, 0x31, 0xe7, 0x2c, 0xb4, 0x25, 0x92, 0x5b, 0x65, 0x98, 0xb9, 0x33, 0x7f, - 0xcc, 0x76, 0xf4, 0x6c, 0x0a, 0x97, 0xae, 0x7c, 0x98, 0x79, 0xc0, 0x3f, 0xb2, 0xfd, 0x1c, 0x44, - 0xd1, 0xee, 0xbe, 0xc4, 0xe2, 0xe2, 0xcc, 0x20, 0xd2, 0xb2, 0xda, 0xc6, 0xd8, 0xe3, 0x71, 0x94, - 0xf5, 0x3c, 0x37, 0x6d, 0xa9, 0x19, 0x22, 0xf1, 0x13, 0xb6, 0x6b, 0xb1, 0x31, 0x85, 0x8f, 0xda, - 0x1d, 0x3f, 0xdb, 0xb2, 0xd2, 0x53, 0x05, 0xc5, 0x45, 0x8d, 0x7a, 0x46, 0xd9, 0x52, 0xd0, 0x4a, - 0x49, 0x18, 0x09, 0xd4, 0xdf, 0xf9, 0x6f, 0xa9, 0x17, 0x44, 0x5f, 0x18, 0x5b, 0xdd, 0xb6, 0xc5, - 0xa0, 0xc6, 0x42, 0x2d, 0xdb, 0x7a, 0xc0, 0x5f, 0xb0, 0xd0, 0x75, 0xe9, 0x6c, 0xeb, 0xe2, 0x9e, - 0xd3, 0xd3, 0xef, 0x8b, 0x41, 0x70, 0xb3, 0x18, 0x04, 0x3f, 0x16, 0x83, 0xe0, 0xeb, 0xdb, 0xad, - 0xdf, 0xcd, 0xa1, 0xe4, 0xef, 0x3f, 0xe5, 0x03, 0x90, 0xca, 0x77, 0xdd, 0xfd, 0xf1, 0xef, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xce, 0x07, 0xca, 0x37, 0x4a, 0x03, 0x00, 0x00, -} - -func (m *Attestation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Attestation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.AggregationBits) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAttestation(dAtA, i, uint64(len(m.AggregationBits))) - i += copy(dAtA[i:], m.AggregationBits) - } - if m.Data != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAttestation(dAtA, i, uint64(m.Data.Size())) - n1, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.CustodyBits) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAttestation(dAtA, i, uint64(len(m.CustodyBits))) - i += copy(dAtA[i:], m.CustodyBits) - } - if len(m.Signature) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAttestation(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AttestationData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttestationData) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Slot != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAttestation(dAtA, i, uint64(m.Slot)) - } - if m.Index != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintAttestation(dAtA, i, uint64(m.Index)) - } - if len(m.BeaconBlockRoot) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAttestation(dAtA, i, uint64(len(m.BeaconBlockRoot))) - i += copy(dAtA[i:], m.BeaconBlockRoot) - } - if m.Source != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintAttestation(dAtA, i, uint64(m.Source.Size())) - n2, err := m.Source.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Target != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintAttestation(dAtA, i, uint64(m.Target.Size())) - n3, err := m.Target.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Checkpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Checkpoint) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAttestation(dAtA, i, uint64(m.Epoch)) - } - if len(m.Root) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAttestation(dAtA, i, uint64(len(m.Root))) - i += copy(dAtA[i:], m.Root) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintAttestation(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Attestation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AggregationBits) - if l > 0 { - n += 1 + l + sovAttestation(uint64(l)) - } - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovAttestation(uint64(l)) - } - l = len(m.CustodyBits) - if l > 0 { - n += 1 + l + sovAttestation(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovAttestation(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttestationData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Slot != 0 { - n += 1 + sovAttestation(uint64(m.Slot)) - } - if m.Index != 0 { - n += 1 + sovAttestation(uint64(m.Index)) - } - l = len(m.BeaconBlockRoot) - if l > 0 { - n += 1 + l + sovAttestation(uint64(l)) - } - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovAttestation(uint64(l)) - } - if m.Target != nil { - l = m.Target.Size() - n += 1 + l + sovAttestation(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Checkpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovAttestation(uint64(m.Epoch)) - } - l = len(m.Root) - if l > 0 { - n += 1 + l + sovAttestation(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAttestation(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAttestation(x uint64) (n int) { - return sovAttestation(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Attestation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Attestation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Attestation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationBits", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAttestation - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAttestation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AggregationBits = append(m.AggregationBits[:0], dAtA[iNdEx:postIndex]...) - if m.AggregationBits == nil { - m.AggregationBits = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttestation - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttestation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &AttestationData{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustodyBits", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAttestation - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAttestation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CustodyBits = append(m.CustodyBits[:0], dAtA[iNdEx:postIndex]...) - if m.CustodyBits == nil { - m.CustodyBits = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAttestation - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAttestation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAttestation(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttestation - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttestation - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttestationData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttestationData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttestationData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) - } - m.Slot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeaconBlockRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAttestation - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAttestation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BeaconBlockRoot = append(m.BeaconBlockRoot[:0], dAtA[iNdEx:postIndex]...) - if m.BeaconBlockRoot == nil { - m.BeaconBlockRoot = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttestation - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttestation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &Checkpoint{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttestation - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttestation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Target == nil { - m.Target = &Checkpoint{} - } - if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAttestation(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttestation - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttestation - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Checkpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Checkpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Checkpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestation - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAttestation - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAttestation - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Root = append(m.Root[:0], dAtA[iNdEx:postIndex]...) - if m.Root == nil { - m.Root = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAttestation(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttestation - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttestation - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAttestation(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAttestation - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAttestation - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAttestation - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAttestation - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthAttestation - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAttestation - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAttestation(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthAttestation - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthAttestation = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAttestation = fmt.Errorf("proto: integer overflow") -) diff --git a/proto/eth/v1alpha1/attestation.proto b/proto/eth/v1alpha1/attestation.proto deleted file mode 100644 index a553b0e92..000000000 --- a/proto/eth/v1alpha1/attestation.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package ethereum.eth.v1alpha1; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth"; - -message Attestation { - // A bitfield representation of validator indices that have voted exactly - // the same vote and have been aggregated into this attestation. - // Spec type: Bitlist[N] - bytes aggregation_bits = 1 [(gogoproto.moretags) = "ssz-max:\"2048\"", (gogoproto.casttype) = "github.com/prysmaticlabs/go-bitfield.Bitlist"]; - - AttestationData data = 2; - - // Not used in phase 0. - bytes custody_bits = 3 [(gogoproto.moretags) = "ssz-max:\"2048\"", (gogoproto.casttype) = "github.com/prysmaticlabs/go-bitfield.Bitlist"]; - - // 96 byte BLS aggregate signature. - bytes signature = 4 [(gogoproto.moretags) = "ssz-size:\"96\""]; -} - -message AttestationData { - // Slot of the attestation for. - uint64 slot = 1; - - // Committee index voted this attestation. - uint64 index = 2; - - // Attestation data includes information on Casper the Friendly Finality Gadget's votes - // See: https://arxiv.org/pdf/1710.09437.pdf - - // 32 byte root of the LMD GHOST block vote. - bytes beacon_block_root = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // Source contains information relating to the recent justified epoch - // as well as the 32 byte root of the epoch boundary block at the - // source epoch. - Checkpoint source = 4; - - // Target contains information relating to the epoch the attestation - // is targeting as well as the 32 byte root of the epoch boundary - // block at the source epoch. - Checkpoint target = 5; -} - -message Checkpoint { - // A checkpoint is every epoch's first slot. The goal of Casper FFG - // is to link the check points together for justification and finalization. - - // epoch of the check point reference to. - uint64 epoch = 1; - // block root of the check point reference to. - bytes root = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; -} diff --git a/proto/eth/v1alpha1/beacon_block.pb.go b/proto/eth/v1alpha1/beacon_block.pb.go deleted file mode 100755 index 552ea64b0..000000000 --- a/proto/eth/v1alpha1/beacon_block.pb.go +++ /dev/null @@ -1,3611 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/eth/v1alpha1/beacon_block.proto - -package eth - -import ( - fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type BeaconBlock struct { - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - ParentRoot []byte `protobuf:"bytes,2,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"` - StateRoot []byte `protobuf:"bytes,3,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"` - Body *BeaconBlockBody `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeaconBlock) Reset() { *m = BeaconBlock{} } -func (m *BeaconBlock) String() string { return proto.CompactTextString(m) } -func (*BeaconBlock) ProtoMessage() {} -func (*BeaconBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{0} -} -func (m *BeaconBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeaconBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeaconBlock.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BeaconBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeaconBlock.Merge(m, src) -} -func (m *BeaconBlock) XXX_Size() int { - return m.Size() -} -func (m *BeaconBlock) XXX_DiscardUnknown() { - xxx_messageInfo_BeaconBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_BeaconBlock proto.InternalMessageInfo - -func (m *BeaconBlock) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -func (m *BeaconBlock) GetParentRoot() []byte { - if m != nil { - return m.ParentRoot - } - return nil -} - -func (m *BeaconBlock) GetStateRoot() []byte { - if m != nil { - return m.StateRoot - } - return nil -} - -func (m *BeaconBlock) GetBody() *BeaconBlockBody { - if m != nil { - return m.Body - } - return nil -} - -func (m *BeaconBlock) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type BeaconBlockBody struct { - RandaoReveal []byte `protobuf:"bytes,1,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty" ssz-size:"96"` - Eth1Data *Eth1Data `protobuf:"bytes,2,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"` - Graffiti []byte `protobuf:"bytes,3,opt,name=graffiti,proto3" json:"graffiti,omitempty" ssz-size:"32"` - ProposerSlashings []*ProposerSlashing `protobuf:"bytes,4,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty" ssz-max:"16"` - AttesterSlashings []*AttesterSlashing `protobuf:"bytes,5,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty" ssz-max:"1"` - Attestations []*Attestation `protobuf:"bytes,6,rep,name=attestations,proto3" json:"attestations,omitempty" ssz-max:"128"` - Deposits []*Deposit `protobuf:"bytes,7,rep,name=deposits,proto3" json:"deposits,omitempty" ssz-max:"16"` - VoluntaryExits []*VoluntaryExit `protobuf:"bytes,8,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty" ssz-max:"16"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeaconBlockBody) Reset() { *m = BeaconBlockBody{} } -func (m *BeaconBlockBody) String() string { return proto.CompactTextString(m) } -func (*BeaconBlockBody) ProtoMessage() {} -func (*BeaconBlockBody) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{1} -} -func (m *BeaconBlockBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeaconBlockBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeaconBlockBody.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BeaconBlockBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeaconBlockBody.Merge(m, src) -} -func (m *BeaconBlockBody) XXX_Size() int { - return m.Size() -} -func (m *BeaconBlockBody) XXX_DiscardUnknown() { - xxx_messageInfo_BeaconBlockBody.DiscardUnknown(m) -} - -var xxx_messageInfo_BeaconBlockBody proto.InternalMessageInfo - -func (m *BeaconBlockBody) GetRandaoReveal() []byte { - if m != nil { - return m.RandaoReveal - } - return nil -} - -func (m *BeaconBlockBody) GetEth1Data() *Eth1Data { - if m != nil { - return m.Eth1Data - } - return nil -} - -func (m *BeaconBlockBody) GetGraffiti() []byte { - if m != nil { - return m.Graffiti - } - return nil -} - -func (m *BeaconBlockBody) GetProposerSlashings() []*ProposerSlashing { - if m != nil { - return m.ProposerSlashings - } - return nil -} - -func (m *BeaconBlockBody) GetAttesterSlashings() []*AttesterSlashing { - if m != nil { - return m.AttesterSlashings - } - return nil -} - -func (m *BeaconBlockBody) GetAttestations() []*Attestation { - if m != nil { - return m.Attestations - } - return nil -} - -func (m *BeaconBlockBody) GetDeposits() []*Deposit { - if m != nil { - return m.Deposits - } - return nil -} - -func (m *BeaconBlockBody) GetVoluntaryExits() []*VoluntaryExit { - if m != nil { - return m.VoluntaryExits - } - return nil -} - -type ProposerSlashing struct { - ProposerIndex uint64 `protobuf:"varint,1,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty"` - Header_1 *BeaconBlockHeader `protobuf:"bytes,2,opt,name=header_1,json=header1,proto3" json:"header_1,omitempty"` - Header_2 *BeaconBlockHeader `protobuf:"bytes,3,opt,name=header_2,json=header2,proto3" json:"header_2,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProposerSlashing) Reset() { *m = ProposerSlashing{} } -func (m *ProposerSlashing) String() string { return proto.CompactTextString(m) } -func (*ProposerSlashing) ProtoMessage() {} -func (*ProposerSlashing) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{2} -} -func (m *ProposerSlashing) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposerSlashing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposerSlashing.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProposerSlashing) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposerSlashing.Merge(m, src) -} -func (m *ProposerSlashing) XXX_Size() int { - return m.Size() -} -func (m *ProposerSlashing) XXX_DiscardUnknown() { - xxx_messageInfo_ProposerSlashing.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposerSlashing proto.InternalMessageInfo - -func (m *ProposerSlashing) GetProposerIndex() uint64 { - if m != nil { - return m.ProposerIndex - } - return 0 -} - -func (m *ProposerSlashing) GetHeader_1() *BeaconBlockHeader { - if m != nil { - return m.Header_1 - } - return nil -} - -func (m *ProposerSlashing) GetHeader_2() *BeaconBlockHeader { - if m != nil { - return m.Header_2 - } - return nil -} - -type AttesterSlashing struct { - Attestation_1 *IndexedAttestation `protobuf:"bytes,1,opt,name=attestation_1,json=attestation1,proto3" json:"attestation_1,omitempty"` - Attestation_2 *IndexedAttestation `protobuf:"bytes,2,opt,name=attestation_2,json=attestation2,proto3" json:"attestation_2,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttesterSlashing) Reset() { *m = AttesterSlashing{} } -func (m *AttesterSlashing) String() string { return proto.CompactTextString(m) } -func (*AttesterSlashing) ProtoMessage() {} -func (*AttesterSlashing) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{3} -} -func (m *AttesterSlashing) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttesterSlashing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttesterSlashing.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AttesterSlashing) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttesterSlashing.Merge(m, src) -} -func (m *AttesterSlashing) XXX_Size() int { - return m.Size() -} -func (m *AttesterSlashing) XXX_DiscardUnknown() { - xxx_messageInfo_AttesterSlashing.DiscardUnknown(m) -} - -var xxx_messageInfo_AttesterSlashing proto.InternalMessageInfo - -func (m *AttesterSlashing) GetAttestation_1() *IndexedAttestation { - if m != nil { - return m.Attestation_1 - } - return nil -} - -func (m *AttesterSlashing) GetAttestation_2() *IndexedAttestation { - if m != nil { - return m.Attestation_2 - } - return nil -} - -type Deposit struct { - Proof [][]byte `protobuf:"bytes,1,rep,name=proof,proto3" json:"proof,omitempty" ssz-size:"33,32"` - Data *Deposit_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Deposit) Reset() { *m = Deposit{} } -func (m *Deposit) String() string { return proto.CompactTextString(m) } -func (*Deposit) ProtoMessage() {} -func (*Deposit) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{4} -} -func (m *Deposit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Deposit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Deposit) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deposit.Merge(m, src) -} -func (m *Deposit) XXX_Size() int { - return m.Size() -} -func (m *Deposit) XXX_DiscardUnknown() { - xxx_messageInfo_Deposit.DiscardUnknown(m) -} - -var xxx_messageInfo_Deposit proto.InternalMessageInfo - -func (m *Deposit) GetProof() [][]byte { - if m != nil { - return m.Proof - } - return nil -} - -func (m *Deposit) GetData() *Deposit_Data { - if m != nil { - return m.Data - } - return nil -} - -type Deposit_Data struct { - PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" ssz-size:"48" spec-name:"pubkey"` - WithdrawalCredentials []byte `protobuf:"bytes,2,opt,name=withdrawal_credentials,json=withdrawalCredentials,proto3" json:"withdrawal_credentials,omitempty" ssz-size:"32"` - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Deposit_Data) Reset() { *m = Deposit_Data{} } -func (m *Deposit_Data) String() string { return proto.CompactTextString(m) } -func (*Deposit_Data) ProtoMessage() {} -func (*Deposit_Data) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{4, 0} -} -func (m *Deposit_Data) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deposit_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Deposit_Data.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Deposit_Data) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deposit_Data.Merge(m, src) -} -func (m *Deposit_Data) XXX_Size() int { - return m.Size() -} -func (m *Deposit_Data) XXX_DiscardUnknown() { - xxx_messageInfo_Deposit_Data.DiscardUnknown(m) -} - -var xxx_messageInfo_Deposit_Data proto.InternalMessageInfo - -func (m *Deposit_Data) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *Deposit_Data) GetWithdrawalCredentials() []byte { - if m != nil { - return m.WithdrawalCredentials - } - return nil -} - -func (m *Deposit_Data) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *Deposit_Data) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type VoluntaryExit struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - ValidatorIndex uint64 `protobuf:"varint,2,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VoluntaryExit) Reset() { *m = VoluntaryExit{} } -func (m *VoluntaryExit) String() string { return proto.CompactTextString(m) } -func (*VoluntaryExit) ProtoMessage() {} -func (*VoluntaryExit) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{5} -} -func (m *VoluntaryExit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VoluntaryExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VoluntaryExit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VoluntaryExit) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoluntaryExit.Merge(m, src) -} -func (m *VoluntaryExit) XXX_Size() int { - return m.Size() -} -func (m *VoluntaryExit) XXX_DiscardUnknown() { - xxx_messageInfo_VoluntaryExit.DiscardUnknown(m) -} - -var xxx_messageInfo_VoluntaryExit proto.InternalMessageInfo - -func (m *VoluntaryExit) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *VoluntaryExit) GetValidatorIndex() uint64 { - if m != nil { - return m.ValidatorIndex - } - return 0 -} - -func (m *VoluntaryExit) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type Eth1Data struct { - DepositRoot []byte `protobuf:"bytes,1,opt,name=deposit_root,json=depositRoot,proto3" json:"deposit_root,omitempty" ssz-size:"32"` - DepositCount uint64 `protobuf:"varint,2,opt,name=deposit_count,json=depositCount,proto3" json:"deposit_count,omitempty"` - BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty" ssz-size:"32"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Eth1Data) Reset() { *m = Eth1Data{} } -func (m *Eth1Data) String() string { return proto.CompactTextString(m) } -func (*Eth1Data) ProtoMessage() {} -func (*Eth1Data) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{6} -} -func (m *Eth1Data) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Eth1Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Eth1Data.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Eth1Data) XXX_Merge(src proto.Message) { - xxx_messageInfo_Eth1Data.Merge(m, src) -} -func (m *Eth1Data) XXX_Size() int { - return m.Size() -} -func (m *Eth1Data) XXX_DiscardUnknown() { - xxx_messageInfo_Eth1Data.DiscardUnknown(m) -} - -var xxx_messageInfo_Eth1Data proto.InternalMessageInfo - -func (m *Eth1Data) GetDepositRoot() []byte { - if m != nil { - return m.DepositRoot - } - return nil -} - -func (m *Eth1Data) GetDepositCount() uint64 { - if m != nil { - return m.DepositCount - } - return 0 -} - -func (m *Eth1Data) GetBlockHash() []byte { - if m != nil { - return m.BlockHash - } - return nil -} - -type BeaconBlockHeader struct { - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - ParentRoot []byte `protobuf:"bytes,2,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"` - StateRoot []byte `protobuf:"bytes,3,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"` - BodyRoot []byte `protobuf:"bytes,4,opt,name=body_root,json=bodyRoot,proto3" json:"body_root,omitempty" ssz-size:"32"` - Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeaconBlockHeader) Reset() { *m = BeaconBlockHeader{} } -func (m *BeaconBlockHeader) String() string { return proto.CompactTextString(m) } -func (*BeaconBlockHeader) ProtoMessage() {} -func (*BeaconBlockHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{7} -} -func (m *BeaconBlockHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeaconBlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeaconBlockHeader.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BeaconBlockHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeaconBlockHeader.Merge(m, src) -} -func (m *BeaconBlockHeader) XXX_Size() int { - return m.Size() -} -func (m *BeaconBlockHeader) XXX_DiscardUnknown() { - xxx_messageInfo_BeaconBlockHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_BeaconBlockHeader proto.InternalMessageInfo - -func (m *BeaconBlockHeader) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -func (m *BeaconBlockHeader) GetParentRoot() []byte { - if m != nil { - return m.ParentRoot - } - return nil -} - -func (m *BeaconBlockHeader) GetStateRoot() []byte { - if m != nil { - return m.StateRoot - } - return nil -} - -func (m *BeaconBlockHeader) GetBodyRoot() []byte { - if m != nil { - return m.BodyRoot - } - return nil -} - -func (m *BeaconBlockHeader) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type IndexedAttestation struct { - CustodyBit_0Indices []uint64 `protobuf:"varint,1,rep,packed,name=custody_bit_0_indices,json=custodyBit0Indices,proto3" json:"custody_bit_0_indices,omitempty" ssz-max:"2048"` - CustodyBit_1Indices []uint64 `protobuf:"varint,2,rep,packed,name=custody_bit_1_indices,json=custodyBit1Indices,proto3" json:"custody_bit_1_indices,omitempty" ssz-max:"2048"` - Data *AttestationData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexedAttestation) Reset() { *m = IndexedAttestation{} } -func (m *IndexedAttestation) String() string { return proto.CompactTextString(m) } -func (*IndexedAttestation) ProtoMessage() {} -func (*IndexedAttestation) Descriptor() ([]byte, []int) { - return fileDescriptor_9369dd0265944233, []int{8} -} -func (m *IndexedAttestation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IndexedAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IndexedAttestation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IndexedAttestation) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexedAttestation.Merge(m, src) -} -func (m *IndexedAttestation) XXX_Size() int { - return m.Size() -} -func (m *IndexedAttestation) XXX_DiscardUnknown() { - xxx_messageInfo_IndexedAttestation.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexedAttestation proto.InternalMessageInfo - -func (m *IndexedAttestation) GetCustodyBit_0Indices() []uint64 { - if m != nil { - return m.CustodyBit_0Indices - } - return nil -} - -func (m *IndexedAttestation) GetCustodyBit_1Indices() []uint64 { - if m != nil { - return m.CustodyBit_1Indices - } - return nil -} - -func (m *IndexedAttestation) GetData() *AttestationData { - if m != nil { - return m.Data - } - return nil -} - -func (m *IndexedAttestation) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func init() { - proto.RegisterType((*BeaconBlock)(nil), "ethereum.eth.v1alpha1.BeaconBlock") - proto.RegisterType((*BeaconBlockBody)(nil), "ethereum.eth.v1alpha1.BeaconBlockBody") - proto.RegisterType((*ProposerSlashing)(nil), "ethereum.eth.v1alpha1.ProposerSlashing") - proto.RegisterType((*AttesterSlashing)(nil), "ethereum.eth.v1alpha1.AttesterSlashing") - proto.RegisterType((*Deposit)(nil), "ethereum.eth.v1alpha1.Deposit") - proto.RegisterType((*Deposit_Data)(nil), "ethereum.eth.v1alpha1.Deposit.Data") - proto.RegisterType((*VoluntaryExit)(nil), "ethereum.eth.v1alpha1.VoluntaryExit") - proto.RegisterType((*Eth1Data)(nil), "ethereum.eth.v1alpha1.Eth1Data") - proto.RegisterType((*BeaconBlockHeader)(nil), "ethereum.eth.v1alpha1.BeaconBlockHeader") - proto.RegisterType((*IndexedAttestation)(nil), "ethereum.eth.v1alpha1.IndexedAttestation") -} - -func init() { - proto.RegisterFile("proto/eth/v1alpha1/beacon_block.proto", fileDescriptor_9369dd0265944233) -} - -var fileDescriptor_9369dd0265944233 = []byte{ - // 989 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcd, 0x6e, 0xe3, 0x44, - 0x1c, 0x97, 0x5b, 0xb7, 0x4d, 0xff, 0x49, 0xfa, 0x31, 0xda, 0xae, 0xa2, 0x1e, 0x9a, 0xc8, 0xdb, - 0x65, 0x03, 0xa2, 0x49, 0xed, 0x96, 0x52, 0x02, 0x17, 0x92, 0xad, 0xd4, 0x15, 0x08, 0x21, 0x23, - 0x21, 0xc1, 0xc5, 0x1a, 0xdb, 0xd3, 0xd8, 0xaa, 0xe3, 0xb1, 0x3c, 0x93, 0x6c, 0xb3, 0x17, 0x1e, - 0x81, 0x03, 0x07, 0xde, 0x83, 0x57, 0xe0, 0xc2, 0x0d, 0x9e, 0x20, 0x42, 0x7d, 0x00, 0x0e, 0x11, - 0x0f, 0x80, 0x3c, 0xe3, 0x24, 0x4e, 0x1a, 0x87, 0xee, 0x5e, 0xf6, 0xe6, 0x8f, 0xdf, 0xc7, 0xdf, - 0xff, 0xf9, 0x7f, 0x18, 0x9e, 0x47, 0x31, 0xe5, 0xb4, 0x49, 0xb8, 0xd7, 0x1c, 0xe8, 0x38, 0x88, - 0x3c, 0xac, 0x37, 0x6d, 0x82, 0x1d, 0x1a, 0x5a, 0x76, 0x40, 0x9d, 0xdb, 0x86, 0x78, 0x8f, 0x0e, - 0x08, 0xf7, 0x48, 0x4c, 0xfa, 0xbd, 0x06, 0xe1, 0x5e, 0x63, 0x82, 0x3c, 0x3c, 0xe9, 0xfa, 0xdc, - 0xeb, 0xdb, 0x0d, 0x87, 0xf6, 0x9a, 0x5d, 0xda, 0xa5, 0x4d, 0x81, 0xb6, 0xfb, 0x37, 0xe2, 0x4e, - 0x4a, 0x27, 0x57, 0x52, 0xe5, 0xf0, 0x78, 0x89, 0x19, 0xe6, 0x9c, 0x30, 0x8e, 0xb9, 0x4f, 0x43, - 0x89, 0xd2, 0xfe, 0x55, 0xa0, 0xd8, 0x16, 0x21, 0xb4, 0x93, 0x08, 0x10, 0x02, 0x95, 0x05, 0x94, - 0x57, 0x94, 0x9a, 0x52, 0x57, 0x4d, 0x71, 0x8d, 0x0c, 0x28, 0x46, 0x38, 0x26, 0x21, 0xb7, 0x62, - 0x4a, 0x79, 0x65, 0xad, 0xa6, 0xd4, 0x4b, 0xed, 0xfd, 0xf1, 0xa8, 0x5a, 0x66, 0xec, 0xcd, 0x09, - 0xf3, 0xdf, 0x90, 0x96, 0x76, 0x66, 0x68, 0x26, 0x48, 0x94, 0x49, 0x29, 0x47, 0xa7, 0x00, 0x89, - 0x11, 0x91, 0x94, 0xf5, 0x3c, 0xca, 0xb6, 0x00, 0x09, 0x46, 0x0b, 0x54, 0x9b, 0xba, 0xc3, 0x8a, - 0x5a, 0x53, 0xea, 0x45, 0xe3, 0x83, 0xc6, 0xd2, 0x24, 0x34, 0x32, 0xb1, 0xb6, 0xa9, 0x3b, 0x34, - 0x05, 0x07, 0x35, 0x61, 0x9b, 0xf9, 0xdd, 0x10, 0xf3, 0x7e, 0x4c, 0x2a, 0x1b, 0xcb, 0xcc, 0x3e, - 0xbb, 0x48, 0xcc, 0x26, 0x18, 0xed, 0x97, 0x0d, 0xd8, 0x5d, 0x90, 0x42, 0x17, 0x50, 0x8e, 0x71, - 0xe8, 0x62, 0x6a, 0xc5, 0x64, 0x40, 0x70, 0x20, 0x72, 0xb0, 0x54, 0xa8, 0x24, 0x71, 0xa6, 0x80, - 0xa1, 0x2f, 0x60, 0x9b, 0x70, 0x4f, 0xb7, 0x5c, 0xcc, 0xb1, 0x48, 0x4e, 0xd1, 0xa8, 0xe6, 0x44, - 0x7f, 0xc5, 0x3d, 0xfd, 0x25, 0xe6, 0xd8, 0x2c, 0x90, 0xf4, 0x0a, 0x9d, 0x40, 0xa1, 0x1b, 0xe3, - 0x9b, 0x1b, 0x9f, 0xfb, 0xf9, 0x69, 0x9a, 0x42, 0x90, 0x07, 0x28, 0x8a, 0x69, 0x44, 0x19, 0x89, - 0x2d, 0x16, 0x60, 0xe6, 0xf9, 0x61, 0x97, 0x55, 0xd4, 0xda, 0x7a, 0xbd, 0x68, 0xbc, 0xc8, 0x71, - 0xfd, 0x36, 0x25, 0x7c, 0x97, 0xe2, 0xdb, 0x7b, 0xe3, 0x51, 0xb5, 0x94, 0x38, 0xf4, 0xf0, 0x5d, - 0x4b, 0xd3, 0x2f, 0x34, 0x73, 0x3f, 0x5a, 0xc0, 0x30, 0xd4, 0x05, 0x24, 0xcb, 0x65, 0xce, 0x69, - 0x63, 0xa5, 0xd3, 0x97, 0x29, 0x61, 0xea, 0xb4, 0x3b, 0x1e, 0x55, 0x8b, 0x33, 0x27, 0xcd, 0xdc, - 0xc7, 0x0b, 0x10, 0x86, 0x7e, 0x80, 0x52, 0xa6, 0x2e, 0x59, 0x65, 0x53, 0x58, 0x68, 0x2b, 0x2d, - 0x04, 0x74, 0x96, 0x29, 0xa9, 0x6e, 0x5c, 0x6a, 0xe6, 0x9c, 0x14, 0xfa, 0x1a, 0x0a, 0x2e, 0x89, - 0x28, 0xf3, 0x39, 0xab, 0x6c, 0x09, 0xd9, 0xa3, 0x1c, 0xd9, 0x97, 0x12, 0xb6, 0x24, 0x35, 0x53, - 0x05, 0x64, 0xc1, 0xee, 0x80, 0x06, 0xfd, 0x90, 0xe3, 0x78, 0x68, 0x91, 0xbb, 0x44, 0xb4, 0x20, - 0x44, 0x8f, 0x73, 0x44, 0xbf, 0x9f, 0xa0, 0xaf, 0xee, 0x96, 0x4a, 0xef, 0x0c, 0xb2, 0x00, 0xa6, - 0xfd, 0xae, 0xc0, 0xde, 0xe2, 0x61, 0xa1, 0xe7, 0xb0, 0x33, 0x3d, 0x71, 0x3f, 0x74, 0xc9, 0x5d, - 0xda, 0x9b, 0xe5, 0xc9, 0xd3, 0x57, 0xc9, 0x43, 0xd4, 0x81, 0x82, 0x47, 0xb0, 0x4b, 0x62, 0x4b, - 0x4f, 0x8b, 0xb0, 0xfe, 0xff, 0x2d, 0x74, 0x2d, 0x18, 0xe6, 0x96, 0x64, 0xea, 0x19, 0x11, 0x43, - 0x14, 0xe3, 0x3b, 0x88, 0x18, 0xda, 0x6f, 0x0a, 0xec, 0x2d, 0x16, 0x02, 0xfa, 0x06, 0xca, 0x99, - 0x93, 0xb1, 0x74, 0xf1, 0x11, 0x45, 0xe3, 0xc3, 0x1c, 0x79, 0xf1, 0x4d, 0xc4, 0xcd, 0x1c, 0xf6, - 0xdc, 0xc9, 0xea, 0x8b, 0x7a, 0x46, 0xfa, 0xcd, 0xef, 0xa8, 0x67, 0x68, 0x7f, 0xae, 0xc1, 0x56, - 0x5a, 0x03, 0xe8, 0x23, 0xd8, 0x88, 0x62, 0x4a, 0x6f, 0x2a, 0x4a, 0x6d, 0xbd, 0x5e, 0x6a, 0x3f, - 0x19, 0x8f, 0xaa, 0x7b, 0x99, 0x7e, 0x3c, 0xfb, 0x38, 0x69, 0x49, 0x09, 0x41, 0x9f, 0x82, 0x9a, - 0xe9, 0xfb, 0x67, 0xab, 0xab, 0xab, 0x21, 0x7a, 0x5f, 0x10, 0x0e, 0x47, 0x0a, 0xa8, 0x62, 0x00, - 0x74, 0x00, 0xa2, 0xbe, 0x1d, 0xf8, 0x8e, 0x75, 0x4b, 0x86, 0xe9, 0xcc, 0x39, 0x1e, 0x8f, 0xaa, - 0xb5, 0x99, 0xe5, 0xf9, 0xa5, 0x56, 0x63, 0x11, 0x71, 0x4e, 0x42, 0xdc, 0x23, 0x2d, 0x2d, 0xea, - 0xdb, 0xb7, 0x64, 0xa8, 0x99, 0xdb, 0x92, 0xf7, 0x15, 0x19, 0xa2, 0x6b, 0x78, 0xfa, 0xda, 0xe7, - 0x9e, 0x1b, 0xe3, 0xd7, 0x38, 0xb0, 0x9c, 0x98, 0xb8, 0x24, 0xe4, 0x3e, 0x0e, 0x58, 0xfe, 0xb4, - 0x3e, 0x98, 0x11, 0x3a, 0x33, 0x3c, 0x7a, 0x0a, 0x9b, 0xb8, 0x47, 0xfb, 0xa1, 0x1c, 0xda, 0xaa, - 0x99, 0xde, 0xcd, 0x8f, 0x58, 0xf5, 0x11, 0x23, 0xf6, 0x27, 0x28, 0xcf, 0xd5, 0x3f, 0x7a, 0x02, - 0x1b, 0x24, 0xa2, 0x8e, 0x97, 0xd6, 0xaf, 0xbc, 0x41, 0x2f, 0x60, 0x77, 0x80, 0x03, 0xdf, 0xc5, - 0x9c, 0x4e, 0xea, 0x7b, 0x4d, 0xbc, 0xdf, 0x99, 0x3e, 0x96, 0x05, 0x3e, 0x17, 0xc0, 0xfa, 0x23, - 0x02, 0xf8, 0x55, 0x81, 0xc2, 0x64, 0xe0, 0xa2, 0x73, 0x28, 0xa5, 0x7d, 0x2c, 0x37, 0x92, 0x92, - 0x97, 0x96, 0x62, 0x0a, 0x13, 0x3b, 0xe9, 0x19, 0x94, 0x27, 0x2c, 0x47, 0xe4, 0x44, 0x86, 0x36, - 0x91, 0xea, 0x88, 0xcc, 0x9c, 0x02, 0x88, 0xed, 0x6d, 0x79, 0x98, 0x79, 0x2b, 0x56, 0x9d, 0x00, - 0x5d, 0x63, 0xe6, 0x69, 0xff, 0x28, 0xb0, 0xff, 0xa0, 0x81, 0xde, 0xe3, 0xea, 0x6d, 0xc0, 0x76, - 0xb2, 0x46, 0x25, 0x41, 0xcd, 0x5d, 0x42, 0x09, 0x46, 0xe0, 0xdf, 0x7a, 0xdd, 0xfe, 0xbc, 0x06, - 0xe8, 0x61, 0x0b, 0xa2, 0x2b, 0x38, 0x70, 0xfa, 0x8c, 0x27, 0xd6, 0xb6, 0xcf, 0xad, 0xd3, 0xe4, - 0xfc, 0x7d, 0x87, 0x30, 0xd1, 0x78, 0x6a, 0x1b, 0x8d, 0x47, 0xd5, 0x9d, 0xe9, 0xc0, 0x34, 0x4e, - 0xcf, 0x2f, 0x35, 0x13, 0xa5, 0x84, 0xb6, 0xcf, 0x4f, 0x5f, 0x49, 0xf4, 0xa2, 0x8c, 0x3e, 0x95, - 0x59, 0x7b, 0x8c, 0x8c, 0x3e, 0x91, 0x69, 0xa5, 0xad, 0xbc, 0xbe, 0xf2, 0x07, 0x24, 0x13, 0xff, - 0xac, 0x9b, 0xdf, 0xba, 0x3b, 0xda, 0x9d, 0x3f, 0xee, 0x8f, 0x94, 0xbf, 0xee, 0x8f, 0x94, 0xbf, - 0xef, 0x8f, 0x94, 0x1f, 0x3f, 0xc9, 0xfc, 0xda, 0x45, 0xf1, 0x90, 0xf5, 0x30, 0xf7, 0x9d, 0x00, - 0xdb, 0x4c, 0xde, 0x35, 0x1f, 0xfe, 0xca, 0x7d, 0x4e, 0xb8, 0x67, 0x6f, 0x8a, 0xe7, 0x67, 0xff, - 0x05, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x25, 0x3c, 0xf0, 0x58, 0x0a, 0x00, 0x00, -} - -func (m *BeaconBlock) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeaconBlock) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Slot != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Slot)) - } - if len(m.ParentRoot) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.ParentRoot))) - i += copy(dAtA[i:], m.ParentRoot) - } - if len(m.StateRoot) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.StateRoot))) - i += copy(dAtA[i:], m.StateRoot) - } - if m.Body != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Body.Size())) - n1, err := m.Body.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.Signature) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BeaconBlockBody) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeaconBlockBody) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.RandaoReveal) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.RandaoReveal))) - i += copy(dAtA[i:], m.RandaoReveal) - } - if m.Eth1Data != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Eth1Data.Size())) - n2, err := m.Eth1Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if len(m.Graffiti) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Graffiti))) - i += copy(dAtA[i:], m.Graffiti) - } - if len(m.ProposerSlashings) > 0 { - for _, msg := range m.ProposerSlashings { - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.AttesterSlashings) > 0 { - for _, msg := range m.AttesterSlashings { - dAtA[i] = 0x2a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Attestations) > 0 { - for _, msg := range m.Attestations { - dAtA[i] = 0x32 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Deposits) > 0 { - for _, msg := range m.Deposits { - dAtA[i] = 0x3a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.VoluntaryExits) > 0 { - for _, msg := range m.VoluntaryExits { - dAtA[i] = 0x42 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ProposerSlashing) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProposerSlashing) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ProposerIndex != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.ProposerIndex)) - } - if m.Header_1 != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Header_1.Size())) - n3, err := m.Header_1.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Header_2 != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Header_2.Size())) - n4, err := m.Header_2.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AttesterSlashing) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttesterSlashing) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Attestation_1 != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Attestation_1.Size())) - n5, err := m.Attestation_1.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.Attestation_2 != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Attestation_2.Size())) - n6, err := m.Attestation_2.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Deposit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Deposit) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Proof) > 0 { - for _, b := range m.Proof { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if m.Data != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Data.Size())) - n7, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Deposit_Data) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Deposit_Data) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.PublicKey) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.PublicKey))) - i += copy(dAtA[i:], m.PublicKey) - } - if len(m.WithdrawalCredentials) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.WithdrawalCredentials))) - i += copy(dAtA[i:], m.WithdrawalCredentials) - } - if m.Amount != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Amount)) - } - if len(m.Signature) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *VoluntaryExit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VoluntaryExit) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Epoch)) - } - if m.ValidatorIndex != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.ValidatorIndex)) - } - if len(m.Signature) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Eth1Data) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Eth1Data) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DepositRoot) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.DepositRoot))) - i += copy(dAtA[i:], m.DepositRoot) - } - if m.DepositCount != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.DepositCount)) - } - if len(m.BlockHash) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.BlockHash))) - i += copy(dAtA[i:], m.BlockHash) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BeaconBlockHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeaconBlockHeader) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Slot != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Slot)) - } - if len(m.ParentRoot) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.ParentRoot))) - i += copy(dAtA[i:], m.ParentRoot) - } - if len(m.StateRoot) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.StateRoot))) - i += copy(dAtA[i:], m.StateRoot) - } - if len(m.BodyRoot) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.BodyRoot))) - i += copy(dAtA[i:], m.BodyRoot) - } - if len(m.Signature) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *IndexedAttestation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IndexedAttestation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.CustodyBit_0Indices) > 0 { - dAtA9 := make([]byte, len(m.CustodyBit_0Indices)*10) - var j8 int - for _, num := range m.CustodyBit_0Indices { - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(j8)) - i += copy(dAtA[i:], dAtA9[:j8]) - } - if len(m.CustodyBit_1Indices) > 0 { - dAtA11 := make([]byte, len(m.CustodyBit_1Indices)*10) - var j10 int - for _, num := range m.CustodyBit_1Indices { - for num >= 1<<7 { - dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j10++ - } - dAtA11[j10] = uint8(num) - j10++ - } - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(j10)) - i += copy(dAtA[i:], dAtA11[:j10]) - } - if m.Data != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(m.Data.Size())) - n12, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if len(m.Signature) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconBlock(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintBeaconBlock(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *BeaconBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Slot != 0 { - n += 1 + sovBeaconBlock(uint64(m.Slot)) - } - l = len(m.ParentRoot) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - l = len(m.StateRoot) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BeaconBlockBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RandaoReveal) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.Eth1Data != nil { - l = m.Eth1Data.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - l = len(m.Graffiti) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if len(m.ProposerSlashings) > 0 { - for _, e := range m.ProposerSlashings { - l = e.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - } - if len(m.AttesterSlashings) > 0 { - for _, e := range m.AttesterSlashings { - l = e.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - } - if len(m.Attestations) > 0 { - for _, e := range m.Attestations { - l = e.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - } - if len(m.Deposits) > 0 { - for _, e := range m.Deposits { - l = e.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - } - if len(m.VoluntaryExits) > 0 { - for _, e := range m.VoluntaryExits { - l = e.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ProposerSlashing) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposerIndex != 0 { - n += 1 + sovBeaconBlock(uint64(m.ProposerIndex)) - } - if m.Header_1 != nil { - l = m.Header_1.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.Header_2 != nil { - l = m.Header_2.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttesterSlashing) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Attestation_1 != nil { - l = m.Attestation_1.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.Attestation_2 != nil { - l = m.Attestation_2.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Deposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Proof) > 0 { - for _, b := range m.Proof { - l = len(b) - n += 1 + l + sovBeaconBlock(uint64(l)) - } - } - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Deposit_Data) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - l = len(m.WithdrawalCredentials) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovBeaconBlock(uint64(m.Amount)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *VoluntaryExit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconBlock(uint64(m.Epoch)) - } - if m.ValidatorIndex != 0 { - n += 1 + sovBeaconBlock(uint64(m.ValidatorIndex)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Eth1Data) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DepositRoot) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.DepositCount != 0 { - n += 1 + sovBeaconBlock(uint64(m.DepositCount)) - } - l = len(m.BlockHash) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BeaconBlockHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Slot != 0 { - n += 1 + sovBeaconBlock(uint64(m.Slot)) - } - l = len(m.ParentRoot) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - l = len(m.StateRoot) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - l = len(m.BodyRoot) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IndexedAttestation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.CustodyBit_0Indices) > 0 { - l = 0 - for _, e := range m.CustodyBit_0Indices { - l += sovBeaconBlock(uint64(e)) - } - n += 1 + sovBeaconBlock(uint64(l)) + l - } - if len(m.CustodyBit_1Indices) > 0 { - l = 0 - for _, e := range m.CustodyBit_1Indices { - l += sovBeaconBlock(uint64(e)) - } - n += 1 + sovBeaconBlock(uint64(l)) + l - } - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovBeaconBlock(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovBeaconBlock(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovBeaconBlock(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozBeaconBlock(x uint64) (n int) { - return sovBeaconBlock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *BeaconBlock) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BeaconBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BeaconBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) - } - m.Slot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ParentRoot = append(m.ParentRoot[:0], dAtA[iNdEx:postIndex]...) - if m.ParentRoot == nil { - m.ParentRoot = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StateRoot = append(m.StateRoot[:0], dAtA[iNdEx:postIndex]...) - if m.StateRoot == nil { - m.StateRoot = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &BeaconBlockBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BeaconBlockBody) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BeaconBlockBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BeaconBlockBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RandaoReveal", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RandaoReveal = append(m.RandaoReveal[:0], dAtA[iNdEx:postIndex]...) - if m.RandaoReveal == nil { - m.RandaoReveal = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Eth1Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Eth1Data == nil { - m.Eth1Data = &Eth1Data{} - } - if err := m.Eth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Graffiti", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Graffiti = append(m.Graffiti[:0], dAtA[iNdEx:postIndex]...) - if m.Graffiti == nil { - m.Graffiti = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerSlashings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerSlashings = append(m.ProposerSlashings, &ProposerSlashing{}) - if err := m.ProposerSlashings[len(m.ProposerSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttesterSlashings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttesterSlashings = append(m.AttesterSlashings, &AttesterSlashing{}) - if err := m.AttesterSlashings[len(m.AttesterSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attestations = append(m.Attestations, &Attestation{}) - if err := m.Attestations[len(m.Attestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Deposits = append(m.Deposits, &Deposit{}) - if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VoluntaryExits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VoluntaryExits = append(m.VoluntaryExits, &VoluntaryExit{}) - if err := m.VoluntaryExits[len(m.VoluntaryExits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposerSlashing) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProposerSlashing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposerSlashing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerIndex", wireType) - } - m.ProposerIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposerIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header_1 == nil { - m.Header_1 = &BeaconBlockHeader{} - } - if err := m.Header_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header_2 == nil { - m.Header_2 = &BeaconBlockHeader{} - } - if err := m.Header_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttesterSlashing) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttesterSlashing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttesterSlashing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attestation_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attestation_1 == nil { - m.Attestation_1 = &IndexedAttestation{} - } - if err := m.Attestation_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attestation_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attestation_2 == nil { - m.Attestation_2 = &IndexedAttestation{} - } - if err := m.Attestation_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Deposit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Deposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Proof = append(m.Proof, make([]byte, postIndex-iNdEx)) - copy(m.Proof[len(m.Proof)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &Deposit_Data{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Deposit_Data) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if m.PublicKey == nil { - m.PublicKey = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WithdrawalCredentials", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WithdrawalCredentials = append(m.WithdrawalCredentials[:0], dAtA[iNdEx:postIndex]...) - if m.WithdrawalCredentials == nil { - m.WithdrawalCredentials = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VoluntaryExit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VoluntaryExit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VoluntaryExit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) - } - m.ValidatorIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Eth1Data) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Eth1Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Eth1Data: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositRoot = append(m.DepositRoot[:0], dAtA[iNdEx:postIndex]...) - if m.DepositRoot == nil { - m.DepositRoot = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositCount", wireType) - } - m.DepositCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = append(m.BlockHash[:0], dAtA[iNdEx:postIndex]...) - if m.BlockHash == nil { - m.BlockHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BeaconBlockHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BeaconBlockHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BeaconBlockHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) - } - m.Slot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ParentRoot = append(m.ParentRoot[:0], dAtA[iNdEx:postIndex]...) - if m.ParentRoot == nil { - m.ParentRoot = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StateRoot = append(m.StateRoot[:0], dAtA[iNdEx:postIndex]...) - if m.StateRoot == nil { - m.StateRoot = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BodyRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BodyRoot = append(m.BodyRoot[:0], dAtA[iNdEx:postIndex]...) - if m.BodyRoot == nil { - m.BodyRoot = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IndexedAttestation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IndexedAttestation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IndexedAttestation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CustodyBit_0Indices = append(m.CustodyBit_0Indices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.CustodyBit_0Indices) == 0 { - m.CustodyBit_0Indices = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CustodyBit_0Indices = append(m.CustodyBit_0Indices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field CustodyBit_0Indices", wireType) - } - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CustodyBit_1Indices = append(m.CustodyBit_1Indices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.CustodyBit_1Indices) == 0 { - m.CustodyBit_1Indices = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CustodyBit_1Indices = append(m.CustodyBit_1Indices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field CustodyBit_1Indices", wireType) - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &AttestationData{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconBlock - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipBeaconBlock(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthBeaconBlock - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthBeaconBlock - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBeaconBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipBeaconBlock(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthBeaconBlock - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthBeaconBlock = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBeaconBlock = fmt.Errorf("proto: integer overflow") -) diff --git a/proto/eth/v1alpha1/beacon_block.proto b/proto/eth/v1alpha1/beacon_block.proto deleted file mode 100644 index a5e31d40e..000000000 --- a/proto/eth/v1alpha1/beacon_block.proto +++ /dev/null @@ -1,159 +0,0 @@ -syntax = "proto3"; -package ethereum.eth.v1alpha1; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "proto/eth/v1alpha1/attestation.proto"; - -option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth"; - -// The Ethereum 2.0 beacon block. -message BeaconBlock { - // Beacon chain slot that this block represents. - uint64 slot = 1; - - // 32 byte root of the parent block. - bytes parent_root = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // 32 byte root of the resulting state after processing this block. - bytes state_root = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // The block body itself. - BeaconBlockBody body = 4; - - // 96 byte BLS signature from the validator that produced this block. - bytes signature = 5 [(gogoproto.moretags) = "ssz-size:\"96\""]; -} - -// The block body of an Ethereum 2.0 beacon block. -message BeaconBlockBody { - // The validators RANDAO reveal 96 byte value. - bytes randao_reveal = 1 [(gogoproto.moretags) = "ssz-size:\"96\""]; - - // A reference to the Ethereum 1.x chain. - Eth1Data eth1_data = 2; - - // 32 byte field of arbitrary data. This field may contain any data and - // is not used for anything other than a fun message. - bytes graffiti = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // Block operations - // Refer to spec constants at https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block - - // At most MAX_PROPOSER_SLASHINGS. - repeated ProposerSlashing proposer_slashings = 4 [(gogoproto.moretags) = "ssz-max:\"16\""]; - - // At most MAX_ATTESTER_SLASHINGS. - repeated AttesterSlashing attester_slashings = 5 [(gogoproto.moretags) = "ssz-max:\"1\""]; - - // At most MAX_ATTESTATIONS. - repeated Attestation attestations = 6 [(gogoproto.moretags) = "ssz-max:\"128\""]; - - // At most MAX_DEPOSITS. - repeated Deposit deposits = 7 [(gogoproto.moretags) = "ssz-max:\"16\""]; - - // At most MAX_VOLUNTARY_EXITS. - repeated VoluntaryExit voluntary_exits = 8 [(gogoproto.moretags) = "ssz-max:\"16\""]; -} - -// Proposer slashings are proofs that a slashable offense has been committed by -// proposing two conflicting blocks from the same validator. -message ProposerSlashing { - // Validator index of the validator that proposed the two conflicting block - // headers. - uint64 proposer_index = 1; - - // First conflicting block header. - BeaconBlockHeader header_1 = 2; - - // Second conflicting block header. - BeaconBlockHeader header_2 = 3; -} - -// Attestor slashings are proofs that a slashable offense has been committed by -// attestating to two conflicting pieces of information by the same validator. -message AttesterSlashing { - // First conflicting attestation. - IndexedAttestation attestation_1 = 1; - - // Second conflicting attestation. - IndexedAttestation attestation_2 = 2; -} - -// Deposit into the Ethereum 2.0 from the Ethereum 1.x deposit contract. -message Deposit { - message Data { - // 48 byte BLS public key of the validator. - bytes public_key = 1 [(gogoproto.moretags) = "ssz-size:\"48\" spec-name:\"pubkey\""]; - - // A 32 byte hash of the withdrawal address public key. - bytes withdrawal_credentials = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // Deposit amount in gwei. - uint64 amount = 3; - - // 96 byte signature from the validators public key. - bytes signature = 4 [(gogoproto.moretags) = "ssz-size:\"96\""]; - } - // 32 byte roots in the deposit tree branch. - repeated bytes proof = 1 [(gogoproto.moretags) = "ssz-size:\"33,32\""]; - - Data data = 2; -} - -// A message that represents a validator signaling that they want to voluntarily -// withdraw from the active validator set. -message VoluntaryExit { - // The epoch on when exit request becomes valid. - uint64 epoch = 1; - - // Index of the exiting validator. - uint64 validator_index = 2; - - // Validator's 96 byte signature - bytes signature = 3 [(gogoproto.moretags) = "ssz-size:\"96\""]; -} - -// Eth1Data represents references to the Ethereum 1.x deposit contract. -message Eth1Data { - // The 32 byte deposit tree root for the last deposit included in this - // block. - bytes deposit_root = 1 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // The total number of deposits included in the beacon chain since genesis - // including the deposits in this block. - uint64 deposit_count = 2; - - // The 32 byte block hash of the Ethereum 1.x block considered for deposit - // inclusion. - bytes block_hash = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; -} - -// A beacon block header is essentially a beacon block with only a reference to -// the beacon body as a 32 byte merkle tree root. This type of message is more -// lightweight than a full beacon block. -message BeaconBlockHeader { - // Beacon chain slot that this block represents. - uint64 slot = 1; - - // 32 byte merkle tree root of the parent ssz encoded block. - bytes parent_root = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // 32 byte merkle tree root of the resulting ssz encoded state after processing this block. - bytes state_root = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // 32 byte merkle tree root of the ssz encoded block body. - bytes body_root = 4 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // 96 byte BLS signature from the validator that produced this block. - bytes signature = 5 [(gogoproto.moretags) = "ssz-size:\"96\""]; -} - -message IndexedAttestation { - repeated uint64 custody_bit_0_indices = 1 [(gogoproto.moretags) = "ssz-max:\"2048\""]; - repeated uint64 custody_bit_1_indices = 2 [(gogoproto.moretags) = "ssz-max:\"2048\""]; - - AttestationData data = 3; - - // 96 bytes aggregate signature. - bytes signature = 4 [(gogoproto.moretags) = "ssz-size:\"96\""]; -} diff --git a/proto/eth/v1alpha1/beacon_chain.pb.go b/proto/eth/v1alpha1/beacon_chain.pb.go deleted file mode 100755 index b9b34139d..000000000 --- a/proto/eth/v1alpha1/beacon_chain.pb.go +++ /dev/null @@ -1,9176 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/eth/v1alpha1/beacon_chain.proto - -package eth - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type ListAttestationsRequest struct { - // Types that are valid to be assigned to QueryFilter: - // *ListAttestationsRequest_HeadBlockRoot - // *ListAttestationsRequest_SourceEpoch - // *ListAttestationsRequest_SourceRoot - // *ListAttestationsRequest_TargetEpoch - // *ListAttestationsRequest_TargetRoot - QueryFilter isListAttestationsRequest_QueryFilter `protobuf_oneof:"query_filter"` - PageSize int32 `protobuf:"varint,6,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,7,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListAttestationsRequest) Reset() { *m = ListAttestationsRequest{} } -func (m *ListAttestationsRequest) String() string { return proto.CompactTextString(m) } -func (*ListAttestationsRequest) ProtoMessage() {} -func (*ListAttestationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{0} -} -func (m *ListAttestationsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListAttestationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListAttestationsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListAttestationsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListAttestationsRequest.Merge(m, src) -} -func (m *ListAttestationsRequest) XXX_Size() int { - return m.Size() -} -func (m *ListAttestationsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListAttestationsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListAttestationsRequest proto.InternalMessageInfo - -type isListAttestationsRequest_QueryFilter interface { - isListAttestationsRequest_QueryFilter() - MarshalTo([]byte) (int, error) - Size() int -} - -type ListAttestationsRequest_HeadBlockRoot struct { - HeadBlockRoot []byte `protobuf:"bytes,1,opt,name=head_block_root,json=headBlockRoot,proto3,oneof"` -} -type ListAttestationsRequest_SourceEpoch struct { - SourceEpoch uint64 `protobuf:"varint,2,opt,name=source_epoch,json=sourceEpoch,proto3,oneof"` -} -type ListAttestationsRequest_SourceRoot struct { - SourceRoot []byte `protobuf:"bytes,3,opt,name=source_root,json=sourceRoot,proto3,oneof"` -} -type ListAttestationsRequest_TargetEpoch struct { - TargetEpoch uint64 `protobuf:"varint,4,opt,name=target_epoch,json=targetEpoch,proto3,oneof"` -} -type ListAttestationsRequest_TargetRoot struct { - TargetRoot []byte `protobuf:"bytes,5,opt,name=target_root,json=targetRoot,proto3,oneof"` -} - -func (*ListAttestationsRequest_HeadBlockRoot) isListAttestationsRequest_QueryFilter() {} -func (*ListAttestationsRequest_SourceEpoch) isListAttestationsRequest_QueryFilter() {} -func (*ListAttestationsRequest_SourceRoot) isListAttestationsRequest_QueryFilter() {} -func (*ListAttestationsRequest_TargetEpoch) isListAttestationsRequest_QueryFilter() {} -func (*ListAttestationsRequest_TargetRoot) isListAttestationsRequest_QueryFilter() {} - -func (m *ListAttestationsRequest) GetQueryFilter() isListAttestationsRequest_QueryFilter { - if m != nil { - return m.QueryFilter - } - return nil -} - -func (m *ListAttestationsRequest) GetHeadBlockRoot() []byte { - if x, ok := m.GetQueryFilter().(*ListAttestationsRequest_HeadBlockRoot); ok { - return x.HeadBlockRoot - } - return nil -} - -func (m *ListAttestationsRequest) GetSourceEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*ListAttestationsRequest_SourceEpoch); ok { - return x.SourceEpoch - } - return 0 -} - -func (m *ListAttestationsRequest) GetSourceRoot() []byte { - if x, ok := m.GetQueryFilter().(*ListAttestationsRequest_SourceRoot); ok { - return x.SourceRoot - } - return nil -} - -func (m *ListAttestationsRequest) GetTargetEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*ListAttestationsRequest_TargetEpoch); ok { - return x.TargetEpoch - } - return 0 -} - -func (m *ListAttestationsRequest) GetTargetRoot() []byte { - if x, ok := m.GetQueryFilter().(*ListAttestationsRequest_TargetRoot); ok { - return x.TargetRoot - } - return nil -} - -func (m *ListAttestationsRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListAttestationsRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ListAttestationsRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ListAttestationsRequest_OneofMarshaler, _ListAttestationsRequest_OneofUnmarshaler, _ListAttestationsRequest_OneofSizer, []interface{}{ - (*ListAttestationsRequest_HeadBlockRoot)(nil), - (*ListAttestationsRequest_SourceEpoch)(nil), - (*ListAttestationsRequest_SourceRoot)(nil), - (*ListAttestationsRequest_TargetEpoch)(nil), - (*ListAttestationsRequest_TargetRoot)(nil), - } -} - -func _ListAttestationsRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ListAttestationsRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListAttestationsRequest_HeadBlockRoot: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.HeadBlockRoot) - case *ListAttestationsRequest_SourceEpoch: - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.SourceEpoch)) - case *ListAttestationsRequest_SourceRoot: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.SourceRoot) - case *ListAttestationsRequest_TargetEpoch: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.TargetEpoch)) - case *ListAttestationsRequest_TargetRoot: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.TargetRoot) - case nil: - default: - return fmt.Errorf("ListAttestationsRequest.QueryFilter has unexpected type %T", x) - } - return nil -} - -func _ListAttestationsRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ListAttestationsRequest) - switch tag { - case 1: // query_filter.head_block_root - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.QueryFilter = &ListAttestationsRequest_HeadBlockRoot{x} - return true, err - case 2: // query_filter.source_epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListAttestationsRequest_SourceEpoch{x} - return true, err - case 3: // query_filter.source_root - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.QueryFilter = &ListAttestationsRequest_SourceRoot{x} - return true, err - case 4: // query_filter.target_epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListAttestationsRequest_TargetEpoch{x} - return true, err - case 5: // query_filter.target_root - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.QueryFilter = &ListAttestationsRequest_TargetRoot{x} - return true, err - default: - return false, nil - } -} - -func _ListAttestationsRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ListAttestationsRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListAttestationsRequest_HeadBlockRoot: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.HeadBlockRoot))) - n += len(x.HeadBlockRoot) - case *ListAttestationsRequest_SourceEpoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.SourceEpoch)) - case *ListAttestationsRequest_SourceRoot: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.SourceRoot))) - n += len(x.SourceRoot) - case *ListAttestationsRequest_TargetEpoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.TargetEpoch)) - case *ListAttestationsRequest_TargetRoot: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.TargetRoot))) - n += len(x.TargetRoot) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type ListAttestationsResponse struct { - Attestations []*Attestation `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListAttestationsResponse) Reset() { *m = ListAttestationsResponse{} } -func (m *ListAttestationsResponse) String() string { return proto.CompactTextString(m) } -func (*ListAttestationsResponse) ProtoMessage() {} -func (*ListAttestationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{1} -} -func (m *ListAttestationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListAttestationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListAttestationsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListAttestationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListAttestationsResponse.Merge(m, src) -} -func (m *ListAttestationsResponse) XXX_Size() int { - return m.Size() -} -func (m *ListAttestationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListAttestationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListAttestationsResponse proto.InternalMessageInfo - -func (m *ListAttestationsResponse) GetAttestations() []*Attestation { - if m != nil { - return m.Attestations - } - return nil -} - -func (m *ListAttestationsResponse) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -func (m *ListAttestationsResponse) GetTotalSize() int32 { - if m != nil { - return m.TotalSize - } - return 0 -} - -type ListBlocksRequest struct { - // Types that are valid to be assigned to QueryFilter: - // *ListBlocksRequest_Root - // *ListBlocksRequest_Slot - // *ListBlocksRequest_Epoch - QueryFilter isListBlocksRequest_QueryFilter `protobuf_oneof:"query_filter"` - IncludeNoncanonical bool `protobuf:"varint,4,opt,name=include_noncanonical,json=includeNoncanonical,proto3" json:"include_noncanonical,omitempty"` - PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListBlocksRequest) Reset() { *m = ListBlocksRequest{} } -func (m *ListBlocksRequest) String() string { return proto.CompactTextString(m) } -func (*ListBlocksRequest) ProtoMessage() {} -func (*ListBlocksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{2} -} -func (m *ListBlocksRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListBlocksRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListBlocksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListBlocksRequest.Merge(m, src) -} -func (m *ListBlocksRequest) XXX_Size() int { - return m.Size() -} -func (m *ListBlocksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListBlocksRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListBlocksRequest proto.InternalMessageInfo - -type isListBlocksRequest_QueryFilter interface { - isListBlocksRequest_QueryFilter() - MarshalTo([]byte) (int, error) - Size() int -} - -type ListBlocksRequest_Root struct { - Root []byte `protobuf:"bytes,1,opt,name=root,proto3,oneof"` -} -type ListBlocksRequest_Slot struct { - Slot uint64 `protobuf:"varint,2,opt,name=slot,proto3,oneof"` -} -type ListBlocksRequest_Epoch struct { - Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3,oneof"` -} - -func (*ListBlocksRequest_Root) isListBlocksRequest_QueryFilter() {} -func (*ListBlocksRequest_Slot) isListBlocksRequest_QueryFilter() {} -func (*ListBlocksRequest_Epoch) isListBlocksRequest_QueryFilter() {} - -func (m *ListBlocksRequest) GetQueryFilter() isListBlocksRequest_QueryFilter { - if m != nil { - return m.QueryFilter - } - return nil -} - -func (m *ListBlocksRequest) GetRoot() []byte { - if x, ok := m.GetQueryFilter().(*ListBlocksRequest_Root); ok { - return x.Root - } - return nil -} - -func (m *ListBlocksRequest) GetSlot() uint64 { - if x, ok := m.GetQueryFilter().(*ListBlocksRequest_Slot); ok { - return x.Slot - } - return 0 -} - -func (m *ListBlocksRequest) GetEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*ListBlocksRequest_Epoch); ok { - return x.Epoch - } - return 0 -} - -func (m *ListBlocksRequest) GetIncludeNoncanonical() bool { - if m != nil { - return m.IncludeNoncanonical - } - return false -} - -func (m *ListBlocksRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListBlocksRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ListBlocksRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ListBlocksRequest_OneofMarshaler, _ListBlocksRequest_OneofUnmarshaler, _ListBlocksRequest_OneofSizer, []interface{}{ - (*ListBlocksRequest_Root)(nil), - (*ListBlocksRequest_Slot)(nil), - (*ListBlocksRequest_Epoch)(nil), - } -} - -func _ListBlocksRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ListBlocksRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListBlocksRequest_Root: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Root) - case *ListBlocksRequest_Slot: - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Slot)) - case *ListBlocksRequest_Epoch: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Epoch)) - case nil: - default: - return fmt.Errorf("ListBlocksRequest.QueryFilter has unexpected type %T", x) - } - return nil -} - -func _ListBlocksRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ListBlocksRequest) - switch tag { - case 1: // query_filter.root - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.QueryFilter = &ListBlocksRequest_Root{x} - return true, err - case 2: // query_filter.slot - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListBlocksRequest_Slot{x} - return true, err - case 3: // query_filter.epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListBlocksRequest_Epoch{x} - return true, err - default: - return false, nil - } -} - -func _ListBlocksRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ListBlocksRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListBlocksRequest_Root: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Root))) - n += len(x.Root) - case *ListBlocksRequest_Slot: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Slot)) - case *ListBlocksRequest_Epoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Epoch)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type ListBlocksResponse struct { - 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListBlocksResponse) Reset() { *m = ListBlocksResponse{} } -func (m *ListBlocksResponse) String() string { return proto.CompactTextString(m) } -func (*ListBlocksResponse) ProtoMessage() {} -func (*ListBlocksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{3} -} -func (m *ListBlocksResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListBlocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListBlocksResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListBlocksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListBlocksResponse.Merge(m, src) -} -func (m *ListBlocksResponse) XXX_Size() int { - return m.Size() -} -func (m *ListBlocksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListBlocksResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListBlocksResponse proto.InternalMessageInfo - -func (m *ListBlocksResponse) GetBlockContainers() []*BeaconBlockContainer { - if m != nil { - return m.BlockContainers - } - return nil -} - -func (m *ListBlocksResponse) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -func (m *ListBlocksResponse) GetTotalSize() int32 { - if m != nil { - return m.TotalSize - } - return 0 -} - -type BeaconBlockContainer struct { - Block *BeaconBlock `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` - BlockRoot []byte `protobuf:"bytes,2,opt,name=block_root,json=blockRoot,proto3" json:"block_root,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeaconBlockContainer) Reset() { *m = BeaconBlockContainer{} } -func (m *BeaconBlockContainer) String() string { return proto.CompactTextString(m) } -func (*BeaconBlockContainer) ProtoMessage() {} -func (*BeaconBlockContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{4} -} -func (m *BeaconBlockContainer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeaconBlockContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeaconBlockContainer.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BeaconBlockContainer) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeaconBlockContainer.Merge(m, src) -} -func (m *BeaconBlockContainer) XXX_Size() int { - return m.Size() -} -func (m *BeaconBlockContainer) XXX_DiscardUnknown() { - xxx_messageInfo_BeaconBlockContainer.DiscardUnknown(m) -} - -var xxx_messageInfo_BeaconBlockContainer proto.InternalMessageInfo - -func (m *BeaconBlockContainer) GetBlock() *BeaconBlock { - if m != nil { - return m.Block - } - return nil -} - -func (m *BeaconBlockContainer) GetBlockRoot() []byte { - if m != nil { - return m.BlockRoot - } - return nil -} - -type ChainHead struct { - HeadBlockRoot []byte `protobuf:"bytes,1,opt,name=head_block_root,json=headBlockRoot,proto3" json:"head_block_root,omitempty" ssz-size:"32"` - HeadBlockSlot uint64 `protobuf:"varint,2,opt,name=head_block_slot,json=headBlockSlot,proto3" json:"head_block_slot,omitempty"` - HeadBlockEpoch uint64 `protobuf:"varint,3,opt,name=head_block_epoch,json=headBlockEpoch,proto3" json:"head_block_epoch,omitempty"` - FinalizedBlockSlot uint64 `protobuf:"varint,4,opt,name=finalized_block_slot,json=finalizedBlockSlot,proto3" json:"finalized_block_slot,omitempty"` - FinalizedEpoch uint64 `protobuf:"varint,5,opt,name=finalized_epoch,json=finalizedEpoch,proto3" json:"finalized_epoch,omitempty"` - FinalizedBlockRoot []byte `protobuf:"bytes,6,opt,name=finalized_block_root,json=finalizedBlockRoot,proto3" json:"finalized_block_root,omitempty" ssz-size:"32"` - JustifiedBlockSlot uint64 `protobuf:"varint,7,opt,name=justified_block_slot,json=justifiedBlockSlot,proto3" json:"justified_block_slot,omitempty"` - JustifiedEpoch uint64 `protobuf:"varint,8,opt,name=justified_epoch,json=justifiedEpoch,proto3" json:"justified_epoch,omitempty"` - JustifiedBlockRoot []byte `protobuf:"bytes,9,opt,name=justified_block_root,json=justifiedBlockRoot,proto3" json:"justified_block_root,omitempty" ssz-size:"32"` - PreviousJustifiedSlot uint64 `protobuf:"varint,10,opt,name=previous_justified_slot,json=previousJustifiedSlot,proto3" json:"previous_justified_slot,omitempty"` - PreviousJustifiedEpoch uint64 `protobuf:"varint,11,opt,name=previous_justified_epoch,json=previousJustifiedEpoch,proto3" json:"previous_justified_epoch,omitempty"` - PreviousJustifiedBlockRoot []byte `protobuf:"bytes,12,opt,name=previous_justified_block_root,json=previousJustifiedBlockRoot,proto3" json:"previous_justified_block_root,omitempty" ssz-size:"32"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ChainHead) Reset() { *m = ChainHead{} } -func (m *ChainHead) String() string { return proto.CompactTextString(m) } -func (*ChainHead) ProtoMessage() {} -func (*ChainHead) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{5} -} -func (m *ChainHead) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainHead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainHead.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChainHead) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainHead.Merge(m, src) -} -func (m *ChainHead) XXX_Size() int { - return m.Size() -} -func (m *ChainHead) XXX_DiscardUnknown() { - xxx_messageInfo_ChainHead.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainHead proto.InternalMessageInfo - -func (m *ChainHead) GetHeadBlockRoot() []byte { - if m != nil { - return m.HeadBlockRoot - } - return nil -} - -func (m *ChainHead) GetHeadBlockSlot() uint64 { - if m != nil { - return m.HeadBlockSlot - } - return 0 -} - -func (m *ChainHead) GetHeadBlockEpoch() uint64 { - if m != nil { - return m.HeadBlockEpoch - } - return 0 -} - -func (m *ChainHead) GetFinalizedBlockSlot() uint64 { - if m != nil { - return m.FinalizedBlockSlot - } - return 0 -} - -func (m *ChainHead) GetFinalizedEpoch() uint64 { - if m != nil { - return m.FinalizedEpoch - } - return 0 -} - -func (m *ChainHead) GetFinalizedBlockRoot() []byte { - if m != nil { - return m.FinalizedBlockRoot - } - return nil -} - -func (m *ChainHead) GetJustifiedBlockSlot() uint64 { - if m != nil { - return m.JustifiedBlockSlot - } - return 0 -} - -func (m *ChainHead) GetJustifiedEpoch() uint64 { - if m != nil { - return m.JustifiedEpoch - } - return 0 -} - -func (m *ChainHead) GetJustifiedBlockRoot() []byte { - if m != nil { - return m.JustifiedBlockRoot - } - return nil -} - -func (m *ChainHead) GetPreviousJustifiedSlot() uint64 { - if m != nil { - return m.PreviousJustifiedSlot - } - return 0 -} - -func (m *ChainHead) GetPreviousJustifiedEpoch() uint64 { - if m != nil { - return m.PreviousJustifiedEpoch - } - return 0 -} - -func (m *ChainHead) GetPreviousJustifiedBlockRoot() []byte { - if m != nil { - return m.PreviousJustifiedBlockRoot - } - return nil -} - -type ListCommitteesRequest struct { - // Types that are valid to be assigned to QueryFilter: - // *ListCommitteesRequest_Epoch - // *ListCommitteesRequest_Genesis - QueryFilter isListCommitteesRequest_QueryFilter `protobuf_oneof:"query_filter"` - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListCommitteesRequest) Reset() { *m = ListCommitteesRequest{} } -func (m *ListCommitteesRequest) String() string { return proto.CompactTextString(m) } -func (*ListCommitteesRequest) ProtoMessage() {} -func (*ListCommitteesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{6} -} -func (m *ListCommitteesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListCommitteesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListCommitteesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListCommitteesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListCommitteesRequest.Merge(m, src) -} -func (m *ListCommitteesRequest) XXX_Size() int { - return m.Size() -} -func (m *ListCommitteesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListCommitteesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListCommitteesRequest proto.InternalMessageInfo - -type isListCommitteesRequest_QueryFilter interface { - isListCommitteesRequest_QueryFilter() - MarshalTo([]byte) (int, error) - Size() int -} - -type ListCommitteesRequest_Epoch struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3,oneof"` -} -type ListCommitteesRequest_Genesis struct { - Genesis bool `protobuf:"varint,2,opt,name=genesis,proto3,oneof"` -} - -func (*ListCommitteesRequest_Epoch) isListCommitteesRequest_QueryFilter() {} -func (*ListCommitteesRequest_Genesis) isListCommitteesRequest_QueryFilter() {} - -func (m *ListCommitteesRequest) GetQueryFilter() isListCommitteesRequest_QueryFilter { - if m != nil { - return m.QueryFilter - } - return nil -} - -func (m *ListCommitteesRequest) GetEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*ListCommitteesRequest_Epoch); ok { - return x.Epoch - } - return 0 -} - -func (m *ListCommitteesRequest) GetGenesis() bool { - if x, ok := m.GetQueryFilter().(*ListCommitteesRequest_Genesis); ok { - return x.Genesis - } - return false -} - -func (m *ListCommitteesRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListCommitteesRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ListCommitteesRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ListCommitteesRequest_OneofMarshaler, _ListCommitteesRequest_OneofUnmarshaler, _ListCommitteesRequest_OneofSizer, []interface{}{ - (*ListCommitteesRequest_Epoch)(nil), - (*ListCommitteesRequest_Genesis)(nil), - } -} - -func _ListCommitteesRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ListCommitteesRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListCommitteesRequest_Epoch: - _ = b.EncodeVarint(1<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Epoch)) - case *ListCommitteesRequest_Genesis: - t := uint64(0) - if x.Genesis { - t = 1 - } - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("ListCommitteesRequest.QueryFilter has unexpected type %T", x) - } - return nil -} - -func _ListCommitteesRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ListCommitteesRequest) - switch tag { - case 1: // query_filter.epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListCommitteesRequest_Epoch{x} - return true, err - case 2: // query_filter.genesis - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListCommitteesRequest_Genesis{x != 0} - return true, err - default: - return false, nil - } -} - -func _ListCommitteesRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ListCommitteesRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListCommitteesRequest_Epoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Epoch)) - case *ListCommitteesRequest_Genesis: - n += 1 // tag and wire - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type BeaconCommittees struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - Committees []*BeaconCommittees_CommitteeItem `protobuf:"bytes,2,rep,name=committees,proto3" json:"committees,omitempty"` - ActiveValidatorCount uint64 `protobuf:"varint,3,opt,name=active_validator_count,json=activeValidatorCount,proto3" json:"active_validator_count,omitempty"` - NextPageToken string `protobuf:"bytes,4,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - TotalSize int32 `protobuf:"varint,5,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeaconCommittees) Reset() { *m = BeaconCommittees{} } -func (m *BeaconCommittees) String() string { return proto.CompactTextString(m) } -func (*BeaconCommittees) ProtoMessage() {} -func (*BeaconCommittees) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{7} -} -func (m *BeaconCommittees) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeaconCommittees) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeaconCommittees.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BeaconCommittees) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeaconCommittees.Merge(m, src) -} -func (m *BeaconCommittees) XXX_Size() int { - return m.Size() -} -func (m *BeaconCommittees) XXX_DiscardUnknown() { - xxx_messageInfo_BeaconCommittees.DiscardUnknown(m) -} - -var xxx_messageInfo_BeaconCommittees proto.InternalMessageInfo - -func (m *BeaconCommittees) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *BeaconCommittees) GetCommittees() []*BeaconCommittees_CommitteeItem { - if m != nil { - return m.Committees - } - return nil -} - -func (m *BeaconCommittees) GetActiveValidatorCount() uint64 { - if m != nil { - return m.ActiveValidatorCount - } - return 0 -} - -func (m *BeaconCommittees) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -func (m *BeaconCommittees) GetTotalSize() int32 { - if m != nil { - return m.TotalSize - } - return 0 -} - -type BeaconCommittees_CommitteeItem struct { - Committee []uint64 `protobuf:"varint,1,rep,packed,name=committee,proto3" json:"committee,omitempty"` - Slot uint64 `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeaconCommittees_CommitteeItem) Reset() { *m = BeaconCommittees_CommitteeItem{} } -func (m *BeaconCommittees_CommitteeItem) String() string { return proto.CompactTextString(m) } -func (*BeaconCommittees_CommitteeItem) ProtoMessage() {} -func (*BeaconCommittees_CommitteeItem) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{7, 0} -} -func (m *BeaconCommittees_CommitteeItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeaconCommittees_CommitteeItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeaconCommittees_CommitteeItem.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BeaconCommittees_CommitteeItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeaconCommittees_CommitteeItem.Merge(m, src) -} -func (m *BeaconCommittees_CommitteeItem) XXX_Size() int { - return m.Size() -} -func (m *BeaconCommittees_CommitteeItem) XXX_DiscardUnknown() { - xxx_messageInfo_BeaconCommittees_CommitteeItem.DiscardUnknown(m) -} - -var xxx_messageInfo_BeaconCommittees_CommitteeItem proto.InternalMessageInfo - -func (m *BeaconCommittees_CommitteeItem) GetCommittee() []uint64 { - if m != nil { - return m.Committee - } - return nil -} - -func (m *BeaconCommittees_CommitteeItem) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -type ListValidatorBalancesRequest struct { - // Types that are valid to be assigned to QueryFilter: - // *ListValidatorBalancesRequest_Epoch - // *ListValidatorBalancesRequest_Genesis - QueryFilter isListValidatorBalancesRequest_QueryFilter `protobuf_oneof:"query_filter"` - PublicKeys [][]byte `protobuf:"bytes,3,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty" ssz-size:"?,48"` - Indices []uint64 `protobuf:"varint,4,rep,packed,name=indices,proto3" json:"indices,omitempty"` - PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListValidatorBalancesRequest) Reset() { *m = ListValidatorBalancesRequest{} } -func (m *ListValidatorBalancesRequest) String() string { return proto.CompactTextString(m) } -func (*ListValidatorBalancesRequest) ProtoMessage() {} -func (*ListValidatorBalancesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{8} -} -func (m *ListValidatorBalancesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListValidatorBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListValidatorBalancesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListValidatorBalancesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListValidatorBalancesRequest.Merge(m, src) -} -func (m *ListValidatorBalancesRequest) XXX_Size() int { - return m.Size() -} -func (m *ListValidatorBalancesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListValidatorBalancesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListValidatorBalancesRequest proto.InternalMessageInfo - -type isListValidatorBalancesRequest_QueryFilter interface { - isListValidatorBalancesRequest_QueryFilter() - MarshalTo([]byte) (int, error) - Size() int -} - -type ListValidatorBalancesRequest_Epoch struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3,oneof"` -} -type ListValidatorBalancesRequest_Genesis struct { - Genesis bool `protobuf:"varint,2,opt,name=genesis,proto3,oneof"` -} - -func (*ListValidatorBalancesRequest_Epoch) isListValidatorBalancesRequest_QueryFilter() {} -func (*ListValidatorBalancesRequest_Genesis) isListValidatorBalancesRequest_QueryFilter() {} - -func (m *ListValidatorBalancesRequest) GetQueryFilter() isListValidatorBalancesRequest_QueryFilter { - if m != nil { - return m.QueryFilter - } - return nil -} - -func (m *ListValidatorBalancesRequest) GetEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*ListValidatorBalancesRequest_Epoch); ok { - return x.Epoch - } - return 0 -} - -func (m *ListValidatorBalancesRequest) GetGenesis() bool { - if x, ok := m.GetQueryFilter().(*ListValidatorBalancesRequest_Genesis); ok { - return x.Genesis - } - return false -} - -func (m *ListValidatorBalancesRequest) GetPublicKeys() [][]byte { - if m != nil { - return m.PublicKeys - } - return nil -} - -func (m *ListValidatorBalancesRequest) GetIndices() []uint64 { - if m != nil { - return m.Indices - } - return nil -} - -func (m *ListValidatorBalancesRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListValidatorBalancesRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ListValidatorBalancesRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ListValidatorBalancesRequest_OneofMarshaler, _ListValidatorBalancesRequest_OneofUnmarshaler, _ListValidatorBalancesRequest_OneofSizer, []interface{}{ - (*ListValidatorBalancesRequest_Epoch)(nil), - (*ListValidatorBalancesRequest_Genesis)(nil), - } -} - -func _ListValidatorBalancesRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ListValidatorBalancesRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListValidatorBalancesRequest_Epoch: - _ = b.EncodeVarint(1<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Epoch)) - case *ListValidatorBalancesRequest_Genesis: - t := uint64(0) - if x.Genesis { - t = 1 - } - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("ListValidatorBalancesRequest.QueryFilter has unexpected type %T", x) - } - return nil -} - -func _ListValidatorBalancesRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ListValidatorBalancesRequest) - switch tag { - case 1: // query_filter.epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListValidatorBalancesRequest_Epoch{x} - return true, err - case 2: // query_filter.genesis - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListValidatorBalancesRequest_Genesis{x != 0} - return true, err - default: - return false, nil - } -} - -func _ListValidatorBalancesRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ListValidatorBalancesRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListValidatorBalancesRequest_Epoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Epoch)) - case *ListValidatorBalancesRequest_Genesis: - n += 1 // tag and wire - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type ValidatorBalances struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - Balances []*ValidatorBalances_Balance `protobuf:"bytes,2,rep,name=balances,proto3" json:"balances,omitempty"` - NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - TotalSize int32 `protobuf:"varint,4,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorBalances) Reset() { *m = ValidatorBalances{} } -func (m *ValidatorBalances) String() string { return proto.CompactTextString(m) } -func (*ValidatorBalances) ProtoMessage() {} -func (*ValidatorBalances) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{9} -} -func (m *ValidatorBalances) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorBalances.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorBalances) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorBalances.Merge(m, src) -} -func (m *ValidatorBalances) XXX_Size() int { - return m.Size() -} -func (m *ValidatorBalances) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorBalances.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorBalances proto.InternalMessageInfo - -func (m *ValidatorBalances) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *ValidatorBalances) GetBalances() []*ValidatorBalances_Balance { - if m != nil { - return m.Balances - } - return nil -} - -func (m *ValidatorBalances) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -func (m *ValidatorBalances) GetTotalSize() int32 { - if m != nil { - return m.TotalSize - } - return 0 -} - -type ValidatorBalances_Balance struct { - PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" ssz-size:"48"` - Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` - Balance uint64 `protobuf:"varint,3,opt,name=balance,proto3" json:"balance,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorBalances_Balance) Reset() { *m = ValidatorBalances_Balance{} } -func (m *ValidatorBalances_Balance) String() string { return proto.CompactTextString(m) } -func (*ValidatorBalances_Balance) ProtoMessage() {} -func (*ValidatorBalances_Balance) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{9, 0} -} -func (m *ValidatorBalances_Balance) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorBalances_Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorBalances_Balance.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorBalances_Balance) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorBalances_Balance.Merge(m, src) -} -func (m *ValidatorBalances_Balance) XXX_Size() int { - return m.Size() -} -func (m *ValidatorBalances_Balance) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorBalances_Balance.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorBalances_Balance proto.InternalMessageInfo - -func (m *ValidatorBalances_Balance) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *ValidatorBalances_Balance) GetIndex() uint64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *ValidatorBalances_Balance) GetBalance() uint64 { - if m != nil { - return m.Balance - } - return 0 -} - -type ListValidatorsRequest struct { - // Types that are valid to be assigned to QueryFilter: - // *ListValidatorsRequest_Epoch - // *ListValidatorsRequest_Genesis - QueryFilter isListValidatorsRequest_QueryFilter `protobuf_oneof:"query_filter"` - Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` - PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListValidatorsRequest) Reset() { *m = ListValidatorsRequest{} } -func (m *ListValidatorsRequest) String() string { return proto.CompactTextString(m) } -func (*ListValidatorsRequest) ProtoMessage() {} -func (*ListValidatorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{10} -} -func (m *ListValidatorsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListValidatorsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListValidatorsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListValidatorsRequest.Merge(m, src) -} -func (m *ListValidatorsRequest) XXX_Size() int { - return m.Size() -} -func (m *ListValidatorsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListValidatorsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListValidatorsRequest proto.InternalMessageInfo - -type isListValidatorsRequest_QueryFilter interface { - isListValidatorsRequest_QueryFilter() - MarshalTo([]byte) (int, error) - Size() int -} - -type ListValidatorsRequest_Epoch struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3,oneof"` -} -type ListValidatorsRequest_Genesis struct { - Genesis bool `protobuf:"varint,2,opt,name=genesis,proto3,oneof"` -} - -func (*ListValidatorsRequest_Epoch) isListValidatorsRequest_QueryFilter() {} -func (*ListValidatorsRequest_Genesis) isListValidatorsRequest_QueryFilter() {} - -func (m *ListValidatorsRequest) GetQueryFilter() isListValidatorsRequest_QueryFilter { - if m != nil { - return m.QueryFilter - } - return nil -} - -func (m *ListValidatorsRequest) GetEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*ListValidatorsRequest_Epoch); ok { - return x.Epoch - } - return 0 -} - -func (m *ListValidatorsRequest) GetGenesis() bool { - if x, ok := m.GetQueryFilter().(*ListValidatorsRequest_Genesis); ok { - return x.Genesis - } - return false -} - -func (m *ListValidatorsRequest) GetActive() bool { - if m != nil { - return m.Active - } - return false -} - -func (m *ListValidatorsRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListValidatorsRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ListValidatorsRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ListValidatorsRequest_OneofMarshaler, _ListValidatorsRequest_OneofUnmarshaler, _ListValidatorsRequest_OneofSizer, []interface{}{ - (*ListValidatorsRequest_Epoch)(nil), - (*ListValidatorsRequest_Genesis)(nil), - } -} - -func _ListValidatorsRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ListValidatorsRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListValidatorsRequest_Epoch: - _ = b.EncodeVarint(1<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Epoch)) - case *ListValidatorsRequest_Genesis: - t := uint64(0) - if x.Genesis { - t = 1 - } - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("ListValidatorsRequest.QueryFilter has unexpected type %T", x) - } - return nil -} - -func _ListValidatorsRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ListValidatorsRequest) - switch tag { - case 1: // query_filter.epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListValidatorsRequest_Epoch{x} - return true, err - case 2: // query_filter.genesis - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListValidatorsRequest_Genesis{x != 0} - return true, err - default: - return false, nil - } -} - -func _ListValidatorsRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ListValidatorsRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListValidatorsRequest_Epoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Epoch)) - case *ListValidatorsRequest_Genesis: - n += 1 // tag and wire - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Validators struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` - NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - TotalSize int32 `protobuf:"varint,4,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Validators) Reset() { *m = Validators{} } -func (m *Validators) String() string { return proto.CompactTextString(m) } -func (*Validators) ProtoMessage() {} -func (*Validators) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{11} -} -func (m *Validators) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validators) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Validators.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Validators) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validators.Merge(m, src) -} -func (m *Validators) XXX_Size() int { - return m.Size() -} -func (m *Validators) XXX_DiscardUnknown() { - xxx_messageInfo_Validators.DiscardUnknown(m) -} - -var xxx_messageInfo_Validators proto.InternalMessageInfo - -func (m *Validators) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *Validators) GetValidators() []*Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *Validators) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -func (m *Validators) GetTotalSize() int32 { - if m != nil { - return m.TotalSize - } - return 0 -} - -type GetValidatorActiveSetChangesRequest struct { - // Types that are valid to be assigned to QueryFilter: - // *GetValidatorActiveSetChangesRequest_Epoch - // *GetValidatorActiveSetChangesRequest_Genesis - QueryFilter isGetValidatorActiveSetChangesRequest_QueryFilter `protobuf_oneof:"query_filter"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetValidatorActiveSetChangesRequest) Reset() { *m = GetValidatorActiveSetChangesRequest{} } -func (m *GetValidatorActiveSetChangesRequest) String() string { return proto.CompactTextString(m) } -func (*GetValidatorActiveSetChangesRequest) ProtoMessage() {} -func (*GetValidatorActiveSetChangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{12} -} -func (m *GetValidatorActiveSetChangesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetValidatorActiveSetChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetValidatorActiveSetChangesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetValidatorActiveSetChangesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetValidatorActiveSetChangesRequest.Merge(m, src) -} -func (m *GetValidatorActiveSetChangesRequest) XXX_Size() int { - return m.Size() -} -func (m *GetValidatorActiveSetChangesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetValidatorActiveSetChangesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetValidatorActiveSetChangesRequest proto.InternalMessageInfo - -type isGetValidatorActiveSetChangesRequest_QueryFilter interface { - isGetValidatorActiveSetChangesRequest_QueryFilter() - MarshalTo([]byte) (int, error) - Size() int -} - -type GetValidatorActiveSetChangesRequest_Epoch struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3,oneof"` -} -type GetValidatorActiveSetChangesRequest_Genesis struct { - Genesis bool `protobuf:"varint,2,opt,name=genesis,proto3,oneof"` -} - -func (*GetValidatorActiveSetChangesRequest_Epoch) isGetValidatorActiveSetChangesRequest_QueryFilter() { -} -func (*GetValidatorActiveSetChangesRequest_Genesis) isGetValidatorActiveSetChangesRequest_QueryFilter() { -} - -func (m *GetValidatorActiveSetChangesRequest) GetQueryFilter() isGetValidatorActiveSetChangesRequest_QueryFilter { - if m != nil { - return m.QueryFilter - } - return nil -} - -func (m *GetValidatorActiveSetChangesRequest) GetEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*GetValidatorActiveSetChangesRequest_Epoch); ok { - return x.Epoch - } - return 0 -} - -func (m *GetValidatorActiveSetChangesRequest) GetGenesis() bool { - if x, ok := m.GetQueryFilter().(*GetValidatorActiveSetChangesRequest_Genesis); ok { - return x.Genesis - } - return false -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*GetValidatorActiveSetChangesRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _GetValidatorActiveSetChangesRequest_OneofMarshaler, _GetValidatorActiveSetChangesRequest_OneofUnmarshaler, _GetValidatorActiveSetChangesRequest_OneofSizer, []interface{}{ - (*GetValidatorActiveSetChangesRequest_Epoch)(nil), - (*GetValidatorActiveSetChangesRequest_Genesis)(nil), - } -} - -func _GetValidatorActiveSetChangesRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*GetValidatorActiveSetChangesRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *GetValidatorActiveSetChangesRequest_Epoch: - _ = b.EncodeVarint(1<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Epoch)) - case *GetValidatorActiveSetChangesRequest_Genesis: - t := uint64(0) - if x.Genesis { - t = 1 - } - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("GetValidatorActiveSetChangesRequest.QueryFilter has unexpected type %T", x) - } - return nil -} - -func _GetValidatorActiveSetChangesRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*GetValidatorActiveSetChangesRequest) - switch tag { - case 1: // query_filter.epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &GetValidatorActiveSetChangesRequest_Epoch{x} - return true, err - case 2: // query_filter.genesis - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &GetValidatorActiveSetChangesRequest_Genesis{x != 0} - return true, err - default: - return false, nil - } -} - -func _GetValidatorActiveSetChangesRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*GetValidatorActiveSetChangesRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *GetValidatorActiveSetChangesRequest_Epoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Epoch)) - case *GetValidatorActiveSetChangesRequest_Genesis: - n += 1 // tag and wire - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type ActiveSetChanges struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - ActivatedPublicKeys [][]byte `protobuf:"bytes,2,rep,name=activated_public_keys,json=activatedPublicKeys,proto3" json:"activated_public_keys,omitempty" ssz-size:"?,48"` - ExitedPublicKeys [][]byte `protobuf:"bytes,3,rep,name=exited_public_keys,json=exitedPublicKeys,proto3" json:"exited_public_keys,omitempty" ssz-size:"?,48"` - SlashedPublicKeys [][]byte `protobuf:"bytes,4,rep,name=slashed_public_keys,json=slashedPublicKeys,proto3" json:"slashed_public_keys,omitempty" ssz-size:"?,48"` - EjectedPublicKeys [][]byte `protobuf:"bytes,5,rep,name=ejected_public_keys,json=ejectedPublicKeys,proto3" json:"ejected_public_keys,omitempty" ssz-size:"?,48"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ActiveSetChanges) Reset() { *m = ActiveSetChanges{} } -func (m *ActiveSetChanges) String() string { return proto.CompactTextString(m) } -func (*ActiveSetChanges) ProtoMessage() {} -func (*ActiveSetChanges) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{13} -} -func (m *ActiveSetChanges) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActiveSetChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActiveSetChanges.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ActiveSetChanges) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActiveSetChanges.Merge(m, src) -} -func (m *ActiveSetChanges) XXX_Size() int { - return m.Size() -} -func (m *ActiveSetChanges) XXX_DiscardUnknown() { - xxx_messageInfo_ActiveSetChanges.DiscardUnknown(m) -} - -var xxx_messageInfo_ActiveSetChanges proto.InternalMessageInfo - -func (m *ActiveSetChanges) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *ActiveSetChanges) GetActivatedPublicKeys() [][]byte { - if m != nil { - return m.ActivatedPublicKeys - } - return nil -} - -func (m *ActiveSetChanges) GetExitedPublicKeys() [][]byte { - if m != nil { - return m.ExitedPublicKeys - } - return nil -} - -func (m *ActiveSetChanges) GetSlashedPublicKeys() [][]byte { - if m != nil { - return m.SlashedPublicKeys - } - return nil -} - -func (m *ActiveSetChanges) GetEjectedPublicKeys() [][]byte { - if m != nil { - return m.EjectedPublicKeys - } - return nil -} - -type ValidatorQueue struct { - ChurnLimit uint64 `protobuf:"varint,1,opt,name=churn_limit,json=churnLimit,proto3" json:"churn_limit,omitempty"` - ActivationPublicKeys [][]byte `protobuf:"bytes,2,rep,name=activation_public_keys,json=activationPublicKeys,proto3" json:"activation_public_keys,omitempty" ssz-size:"?,48"` - ExitPublicKeys [][]byte `protobuf:"bytes,3,rep,name=exit_public_keys,json=exitPublicKeys,proto3" json:"exit_public_keys,omitempty" ssz-size:"?,48"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorQueue) Reset() { *m = ValidatorQueue{} } -func (m *ValidatorQueue) String() string { return proto.CompactTextString(m) } -func (*ValidatorQueue) ProtoMessage() {} -func (*ValidatorQueue) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{14} -} -func (m *ValidatorQueue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorQueue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorQueue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorQueue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorQueue.Merge(m, src) -} -func (m *ValidatorQueue) XXX_Size() int { - return m.Size() -} -func (m *ValidatorQueue) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorQueue.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorQueue proto.InternalMessageInfo - -func (m *ValidatorQueue) GetChurnLimit() uint64 { - if m != nil { - return m.ChurnLimit - } - return 0 -} - -func (m *ValidatorQueue) GetActivationPublicKeys() [][]byte { - if m != nil { - return m.ActivationPublicKeys - } - return nil -} - -func (m *ValidatorQueue) GetExitPublicKeys() [][]byte { - if m != nil { - return m.ExitPublicKeys - } - return nil -} - -type ListValidatorAssignmentsRequest struct { - // Types that are valid to be assigned to QueryFilter: - // *ListValidatorAssignmentsRequest_Epoch - // *ListValidatorAssignmentsRequest_Genesis - QueryFilter isListValidatorAssignmentsRequest_QueryFilter `protobuf_oneof:"query_filter"` - PublicKeys [][]byte `protobuf:"bytes,3,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty" ssz-size:"?,48"` - Indices []uint64 `protobuf:"varint,4,rep,packed,name=indices,proto3" json:"indices,omitempty"` - PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListValidatorAssignmentsRequest) Reset() { *m = ListValidatorAssignmentsRequest{} } -func (m *ListValidatorAssignmentsRequest) String() string { return proto.CompactTextString(m) } -func (*ListValidatorAssignmentsRequest) ProtoMessage() {} -func (*ListValidatorAssignmentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{15} -} -func (m *ListValidatorAssignmentsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListValidatorAssignmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListValidatorAssignmentsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListValidatorAssignmentsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListValidatorAssignmentsRequest.Merge(m, src) -} -func (m *ListValidatorAssignmentsRequest) XXX_Size() int { - return m.Size() -} -func (m *ListValidatorAssignmentsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListValidatorAssignmentsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListValidatorAssignmentsRequest proto.InternalMessageInfo - -type isListValidatorAssignmentsRequest_QueryFilter interface { - isListValidatorAssignmentsRequest_QueryFilter() - MarshalTo([]byte) (int, error) - Size() int -} - -type ListValidatorAssignmentsRequest_Epoch struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3,oneof"` -} -type ListValidatorAssignmentsRequest_Genesis struct { - Genesis bool `protobuf:"varint,2,opt,name=genesis,proto3,oneof"` -} - -func (*ListValidatorAssignmentsRequest_Epoch) isListValidatorAssignmentsRequest_QueryFilter() {} -func (*ListValidatorAssignmentsRequest_Genesis) isListValidatorAssignmentsRequest_QueryFilter() {} - -func (m *ListValidatorAssignmentsRequest) GetQueryFilter() isListValidatorAssignmentsRequest_QueryFilter { - if m != nil { - return m.QueryFilter - } - return nil -} - -func (m *ListValidatorAssignmentsRequest) GetEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*ListValidatorAssignmentsRequest_Epoch); ok { - return x.Epoch - } - return 0 -} - -func (m *ListValidatorAssignmentsRequest) GetGenesis() bool { - if x, ok := m.GetQueryFilter().(*ListValidatorAssignmentsRequest_Genesis); ok { - return x.Genesis - } - return false -} - -func (m *ListValidatorAssignmentsRequest) GetPublicKeys() [][]byte { - if m != nil { - return m.PublicKeys - } - return nil -} - -func (m *ListValidatorAssignmentsRequest) GetIndices() []uint64 { - if m != nil { - return m.Indices - } - return nil -} - -func (m *ListValidatorAssignmentsRequest) GetPageSize() int32 { - if m != nil { - return m.PageSize - } - return 0 -} - -func (m *ListValidatorAssignmentsRequest) GetPageToken() string { - if m != nil { - return m.PageToken - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ListValidatorAssignmentsRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ListValidatorAssignmentsRequest_OneofMarshaler, _ListValidatorAssignmentsRequest_OneofUnmarshaler, _ListValidatorAssignmentsRequest_OneofSizer, []interface{}{ - (*ListValidatorAssignmentsRequest_Epoch)(nil), - (*ListValidatorAssignmentsRequest_Genesis)(nil), - } -} - -func _ListValidatorAssignmentsRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ListValidatorAssignmentsRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListValidatorAssignmentsRequest_Epoch: - _ = b.EncodeVarint(1<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Epoch)) - case *ListValidatorAssignmentsRequest_Genesis: - t := uint64(0) - if x.Genesis { - t = 1 - } - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("ListValidatorAssignmentsRequest.QueryFilter has unexpected type %T", x) - } - return nil -} - -func _ListValidatorAssignmentsRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ListValidatorAssignmentsRequest) - switch tag { - case 1: // query_filter.epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListValidatorAssignmentsRequest_Epoch{x} - return true, err - case 2: // query_filter.genesis - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &ListValidatorAssignmentsRequest_Genesis{x != 0} - return true, err - default: - return false, nil - } -} - -func _ListValidatorAssignmentsRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ListValidatorAssignmentsRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *ListValidatorAssignmentsRequest_Epoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Epoch)) - case *ListValidatorAssignmentsRequest_Genesis: - n += 1 // tag and wire - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type ValidatorAssignments struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - Assignments []*ValidatorAssignments_CommitteeAssignment `protobuf:"bytes,2,rep,name=assignments,proto3" json:"assignments,omitempty"` - NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - TotalSize int32 `protobuf:"varint,4,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorAssignments) Reset() { *m = ValidatorAssignments{} } -func (m *ValidatorAssignments) String() string { return proto.CompactTextString(m) } -func (*ValidatorAssignments) ProtoMessage() {} -func (*ValidatorAssignments) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{16} -} -func (m *ValidatorAssignments) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorAssignments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorAssignments.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorAssignments) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorAssignments.Merge(m, src) -} -func (m *ValidatorAssignments) XXX_Size() int { - return m.Size() -} -func (m *ValidatorAssignments) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorAssignments.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorAssignments proto.InternalMessageInfo - -func (m *ValidatorAssignments) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *ValidatorAssignments) GetAssignments() []*ValidatorAssignments_CommitteeAssignment { - if m != nil { - return m.Assignments - } - return nil -} - -func (m *ValidatorAssignments) GetNextPageToken() string { - if m != nil { - return m.NextPageToken - } - return "" -} - -func (m *ValidatorAssignments) GetTotalSize() int32 { - if m != nil { - return m.TotalSize - } - return 0 -} - -type ValidatorAssignments_CommitteeAssignment struct { - BeaconCommittees []uint64 `protobuf:"varint,1,rep,packed,name=beacon_committees,json=beaconCommittees,proto3" json:"beacon_committees,omitempty"` - CommitteeIndex uint64 `protobuf:"varint,2,opt,name=committee_index,json=committeeIndex,proto3" json:"committee_index,omitempty"` - AttesterSlot uint64 `protobuf:"varint,3,opt,name=attester_slot,json=attesterSlot,proto3" json:"attester_slot,omitempty"` - ProposerSlot uint64 `protobuf:"varint,4,opt,name=proposer_slot,json=proposerSlot,proto3" json:"proposer_slot,omitempty"` - PublicKey []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" ssz-size:"48"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorAssignments_CommitteeAssignment) Reset() { - *m = ValidatorAssignments_CommitteeAssignment{} -} -func (m *ValidatorAssignments_CommitteeAssignment) String() string { return proto.CompactTextString(m) } -func (*ValidatorAssignments_CommitteeAssignment) ProtoMessage() {} -func (*ValidatorAssignments_CommitteeAssignment) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{16, 0} -} -func (m *ValidatorAssignments_CommitteeAssignment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorAssignments_CommitteeAssignment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorAssignments_CommitteeAssignment.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorAssignments_CommitteeAssignment) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorAssignments_CommitteeAssignment.Merge(m, src) -} -func (m *ValidatorAssignments_CommitteeAssignment) XXX_Size() int { - return m.Size() -} -func (m *ValidatorAssignments_CommitteeAssignment) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorAssignments_CommitteeAssignment.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorAssignments_CommitteeAssignment proto.InternalMessageInfo - -func (m *ValidatorAssignments_CommitteeAssignment) GetBeaconCommittees() []uint64 { - if m != nil { - return m.BeaconCommittees - } - return nil -} - -func (m *ValidatorAssignments_CommitteeAssignment) GetCommitteeIndex() uint64 { - if m != nil { - return m.CommitteeIndex - } - return 0 -} - -func (m *ValidatorAssignments_CommitteeAssignment) GetAttesterSlot() uint64 { - if m != nil { - return m.AttesterSlot - } - return 0 -} - -func (m *ValidatorAssignments_CommitteeAssignment) GetProposerSlot() uint64 { - if m != nil { - return m.ProposerSlot - } - return 0 -} - -func (m *ValidatorAssignments_CommitteeAssignment) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -type GetValidatorParticipationRequest struct { - // Types that are valid to be assigned to QueryFilter: - // *GetValidatorParticipationRequest_Epoch - // *GetValidatorParticipationRequest_Genesis - QueryFilter isGetValidatorParticipationRequest_QueryFilter `protobuf_oneof:"query_filter"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetValidatorParticipationRequest) Reset() { *m = GetValidatorParticipationRequest{} } -func (m *GetValidatorParticipationRequest) String() string { return proto.CompactTextString(m) } -func (*GetValidatorParticipationRequest) ProtoMessage() {} -func (*GetValidatorParticipationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{17} -} -func (m *GetValidatorParticipationRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetValidatorParticipationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetValidatorParticipationRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetValidatorParticipationRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetValidatorParticipationRequest.Merge(m, src) -} -func (m *GetValidatorParticipationRequest) XXX_Size() int { - return m.Size() -} -func (m *GetValidatorParticipationRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetValidatorParticipationRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetValidatorParticipationRequest proto.InternalMessageInfo - -type isGetValidatorParticipationRequest_QueryFilter interface { - isGetValidatorParticipationRequest_QueryFilter() - MarshalTo([]byte) (int, error) - Size() int -} - -type GetValidatorParticipationRequest_Epoch struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3,oneof"` -} -type GetValidatorParticipationRequest_Genesis struct { - Genesis bool `protobuf:"varint,2,opt,name=genesis,proto3,oneof"` -} - -func (*GetValidatorParticipationRequest_Epoch) isGetValidatorParticipationRequest_QueryFilter() {} -func (*GetValidatorParticipationRequest_Genesis) isGetValidatorParticipationRequest_QueryFilter() {} - -func (m *GetValidatorParticipationRequest) GetQueryFilter() isGetValidatorParticipationRequest_QueryFilter { - if m != nil { - return m.QueryFilter - } - return nil -} - -func (m *GetValidatorParticipationRequest) GetEpoch() uint64 { - if x, ok := m.GetQueryFilter().(*GetValidatorParticipationRequest_Epoch); ok { - return x.Epoch - } - return 0 -} - -func (m *GetValidatorParticipationRequest) GetGenesis() bool { - if x, ok := m.GetQueryFilter().(*GetValidatorParticipationRequest_Genesis); ok { - return x.Genesis - } - return false -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*GetValidatorParticipationRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _GetValidatorParticipationRequest_OneofMarshaler, _GetValidatorParticipationRequest_OneofUnmarshaler, _GetValidatorParticipationRequest_OneofSizer, []interface{}{ - (*GetValidatorParticipationRequest_Epoch)(nil), - (*GetValidatorParticipationRequest_Genesis)(nil), - } -} - -func _GetValidatorParticipationRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*GetValidatorParticipationRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *GetValidatorParticipationRequest_Epoch: - _ = b.EncodeVarint(1<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Epoch)) - case *GetValidatorParticipationRequest_Genesis: - t := uint64(0) - if x.Genesis { - t = 1 - } - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("GetValidatorParticipationRequest.QueryFilter has unexpected type %T", x) - } - return nil -} - -func _GetValidatorParticipationRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*GetValidatorParticipationRequest) - switch tag { - case 1: // query_filter.epoch - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &GetValidatorParticipationRequest_Epoch{x} - return true, err - case 2: // query_filter.genesis - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.QueryFilter = &GetValidatorParticipationRequest_Genesis{x != 0} - return true, err - default: - return false, nil - } -} - -func _GetValidatorParticipationRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*GetValidatorParticipationRequest) - // query_filter - switch x := m.QueryFilter.(type) { - case *GetValidatorParticipationRequest_Epoch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Epoch)) - case *GetValidatorParticipationRequest_Genesis: - n += 1 // tag and wire - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type ValidatorParticipationResponse struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - Finalized bool `protobuf:"varint,2,opt,name=finalized,proto3" json:"finalized,omitempty"` - Participation *ValidatorParticipation `protobuf:"bytes,3,opt,name=participation,proto3" json:"participation,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorParticipationResponse) Reset() { *m = ValidatorParticipationResponse{} } -func (m *ValidatorParticipationResponse) String() string { return proto.CompactTextString(m) } -func (*ValidatorParticipationResponse) ProtoMessage() {} -func (*ValidatorParticipationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{18} -} -func (m *ValidatorParticipationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorParticipationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorParticipationResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorParticipationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorParticipationResponse.Merge(m, src) -} -func (m *ValidatorParticipationResponse) XXX_Size() int { - return m.Size() -} -func (m *ValidatorParticipationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorParticipationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorParticipationResponse proto.InternalMessageInfo - -func (m *ValidatorParticipationResponse) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *ValidatorParticipationResponse) GetFinalized() bool { - if m != nil { - return m.Finalized - } - return false -} - -func (m *ValidatorParticipationResponse) GetParticipation() *ValidatorParticipation { - if m != nil { - return m.Participation - } - return nil -} - -type AttestationPoolResponse struct { - Attestations []*Attestation `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttestationPoolResponse) Reset() { *m = AttestationPoolResponse{} } -func (m *AttestationPoolResponse) String() string { return proto.CompactTextString(m) } -func (*AttestationPoolResponse) ProtoMessage() {} -func (*AttestationPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_678c88b69c3c78d4, []int{19} -} -func (m *AttestationPoolResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttestationPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttestationPoolResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AttestationPoolResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttestationPoolResponse.Merge(m, src) -} -func (m *AttestationPoolResponse) XXX_Size() int { - return m.Size() -} -func (m *AttestationPoolResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AttestationPoolResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AttestationPoolResponse proto.InternalMessageInfo - -func (m *AttestationPoolResponse) GetAttestations() []*Attestation { - if m != nil { - return m.Attestations - } - return nil -} - -func init() { - proto.RegisterType((*ListAttestationsRequest)(nil), "ethereum.eth.v1alpha1.ListAttestationsRequest") - proto.RegisterType((*ListAttestationsResponse)(nil), "ethereum.eth.v1alpha1.ListAttestationsResponse") - proto.RegisterType((*ListBlocksRequest)(nil), "ethereum.eth.v1alpha1.ListBlocksRequest") - proto.RegisterType((*ListBlocksResponse)(nil), "ethereum.eth.v1alpha1.ListBlocksResponse") - proto.RegisterType((*BeaconBlockContainer)(nil), "ethereum.eth.v1alpha1.BeaconBlockContainer") - proto.RegisterType((*ChainHead)(nil), "ethereum.eth.v1alpha1.ChainHead") - proto.RegisterType((*ListCommitteesRequest)(nil), "ethereum.eth.v1alpha1.ListCommitteesRequest") - proto.RegisterType((*BeaconCommittees)(nil), "ethereum.eth.v1alpha1.BeaconCommittees") - proto.RegisterType((*BeaconCommittees_CommitteeItem)(nil), "ethereum.eth.v1alpha1.BeaconCommittees.CommitteeItem") - proto.RegisterType((*ListValidatorBalancesRequest)(nil), "ethereum.eth.v1alpha1.ListValidatorBalancesRequest") - proto.RegisterType((*ValidatorBalances)(nil), "ethereum.eth.v1alpha1.ValidatorBalances") - proto.RegisterType((*ValidatorBalances_Balance)(nil), "ethereum.eth.v1alpha1.ValidatorBalances.Balance") - proto.RegisterType((*ListValidatorsRequest)(nil), "ethereum.eth.v1alpha1.ListValidatorsRequest") - proto.RegisterType((*Validators)(nil), "ethereum.eth.v1alpha1.Validators") - proto.RegisterType((*GetValidatorActiveSetChangesRequest)(nil), "ethereum.eth.v1alpha1.GetValidatorActiveSetChangesRequest") - proto.RegisterType((*ActiveSetChanges)(nil), "ethereum.eth.v1alpha1.ActiveSetChanges") - proto.RegisterType((*ValidatorQueue)(nil), "ethereum.eth.v1alpha1.ValidatorQueue") - proto.RegisterType((*ListValidatorAssignmentsRequest)(nil), "ethereum.eth.v1alpha1.ListValidatorAssignmentsRequest") - proto.RegisterType((*ValidatorAssignments)(nil), "ethereum.eth.v1alpha1.ValidatorAssignments") - proto.RegisterType((*ValidatorAssignments_CommitteeAssignment)(nil), "ethereum.eth.v1alpha1.ValidatorAssignments.CommitteeAssignment") - proto.RegisterType((*GetValidatorParticipationRequest)(nil), "ethereum.eth.v1alpha1.GetValidatorParticipationRequest") - proto.RegisterType((*ValidatorParticipationResponse)(nil), "ethereum.eth.v1alpha1.ValidatorParticipationResponse") - proto.RegisterType((*AttestationPoolResponse)(nil), "ethereum.eth.v1alpha1.AttestationPoolResponse") -} - -func init() { - proto.RegisterFile("proto/eth/v1alpha1/beacon_chain.proto", fileDescriptor_678c88b69c3c78d4) -} - -var fileDescriptor_678c88b69c3c78d4 = []byte{ - // 1845 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcb, 0x6f, 0x23, 0x49, - 0x19, 0x9f, 0xf6, 0x23, 0x89, 0x3f, 0xdb, 0x79, 0x54, 0x3c, 0x19, 0xe3, 0xc9, 0x24, 0x9e, 0xce, - 0x6e, 0xc6, 0xa3, 0x99, 0xb1, 0x93, 0xcc, 0xcc, 0x32, 0x2c, 0x42, 0x4b, 0x6c, 0x2d, 0x93, 0x81, - 0x11, 0x0a, 0x9d, 0x5d, 0x0e, 0x5c, 0xac, 0x76, 0xa7, 0x62, 0xd7, 0xa6, 0xdd, 0xd5, 0xe3, 0x2e, - 0x47, 0x93, 0x1c, 0x41, 0x42, 0xe2, 0x8c, 0x04, 0x07, 0x24, 0x1e, 0xc7, 0x15, 0x42, 0x48, 0x1c, - 0xb8, 0xac, 0x04, 0x1c, 0x39, 0x22, 0x21, 0x71, 0x5c, 0xa1, 0x11, 0x12, 0x37, 0x24, 0xf6, 0x2f, - 0x40, 0x5d, 0x55, 0xfd, 0x74, 0xb7, 0xed, 0xd5, 0xe4, 0xc4, 0xcd, 0xfd, 0xd5, 0x57, 0xbf, 0xfa, - 0xd5, 0xf7, 0xaa, 0xaf, 0xca, 0xf0, 0xae, 0x3d, 0xa2, 0x8c, 0xb6, 0x30, 0x1b, 0xb4, 0x2e, 0xf6, - 0x75, 0xd3, 0x1e, 0xe8, 0xfb, 0xad, 0x1e, 0xd6, 0x0d, 0x6a, 0x75, 0x8d, 0x81, 0x4e, 0xac, 0x26, - 0x1f, 0x47, 0x37, 0x31, 0x1b, 0xe0, 0x11, 0x1e, 0x0f, 0x9b, 0x98, 0x0d, 0x9a, 0x9e, 0x66, 0xed, - 0x51, 0x9f, 0xb0, 0xc1, 0xb8, 0xd7, 0x34, 0xe8, 0xb0, 0xd5, 0xa7, 0x7d, 0xda, 0xe2, 0xda, 0xbd, - 0xf1, 0x19, 0xff, 0x12, 0xd0, 0xee, 0x2f, 0x81, 0x52, 0xdb, 0xec, 0x53, 0xda, 0x37, 0x71, 0x4b, - 0xb7, 0x49, 0x4b, 0xb7, 0x2c, 0xca, 0x74, 0x46, 0xa8, 0xe5, 0xc8, 0xd1, 0xdb, 0x72, 0xd4, 0xc7, - 0xc0, 0x43, 0x9b, 0x5d, 0xca, 0xc1, 0x77, 0x12, 0x78, 0xea, 0x8c, 0x61, 0x47, 0x60, 0x48, 0xad, - 0x29, 0xbb, 0xe9, 0x99, 0xd4, 0x38, 0x97, 0x6a, 0x6a, 0x82, 0xda, 0x85, 0x6e, 0x92, 0x53, 0x9d, - 0xd1, 0x91, 0xd0, 0x51, 0x7f, 0x95, 0x81, 0x5b, 0x2f, 0x89, 0xc3, 0x0e, 0x83, 0x45, 0x1c, 0x0d, - 0xbf, 0x1a, 0x63, 0x87, 0xa1, 0x06, 0xac, 0x0c, 0xb0, 0x7e, 0x2a, 0x30, 0xbb, 0x23, 0x4a, 0x59, - 0x55, 0xa9, 0x2b, 0x8d, 0xd2, 0xd1, 0x0d, 0xad, 0xec, 0x0e, 0xb4, 0x5d, 0xb9, 0x46, 0x29, 0x43, - 0x3b, 0x50, 0x72, 0xe8, 0x78, 0x64, 0xe0, 0x2e, 0xb6, 0xa9, 0x31, 0xa8, 0x66, 0xea, 0x4a, 0x23, - 0x77, 0x74, 0x43, 0x2b, 0x0a, 0xe9, 0x87, 0xae, 0x10, 0xdd, 0x05, 0xf9, 0x29, 0xa0, 0xb2, 0x12, - 0x0a, 0x84, 0xd0, 0xc3, 0x61, 0xfa, 0xa8, 0x8f, 0x99, 0xc4, 0xc9, 0x79, 0x38, 0x42, 0xea, 0xe3, - 0x48, 0x25, 0x8e, 0x93, 0xf7, 0x70, 0x84, 0x90, 0xe3, 0xdc, 0x86, 0x82, 0xad, 0xf7, 0x71, 0xd7, - 0x21, 0x57, 0xb8, 0xba, 0x50, 0x57, 0x1a, 0x79, 0x6d, 0xc9, 0x15, 0x9c, 0x90, 0x2b, 0x8c, 0xee, - 0x00, 0xf0, 0x41, 0x46, 0xcf, 0xb1, 0x55, 0x5d, 0xac, 0x2b, 0x8d, 0x82, 0xc6, 0xd5, 0x3f, 0x72, - 0x05, 0xed, 0x65, 0x28, 0xbd, 0x1a, 0xe3, 0xd1, 0x65, 0xf7, 0x8c, 0x98, 0x0c, 0x8f, 0xd4, 0x4f, - 0x15, 0xa8, 0x4e, 0x5a, 0xc8, 0xb1, 0xa9, 0xe5, 0x60, 0xf4, 0x2d, 0x28, 0x85, 0xdc, 0xe3, 0x54, - 0x95, 0x7a, 0xb6, 0x51, 0x3c, 0x50, 0x9b, 0x89, 0x71, 0xd4, 0x0c, 0x41, 0x68, 0x91, 0x79, 0x68, - 0x17, 0x56, 0x2c, 0xfc, 0x9a, 0x75, 0x43, 0xc4, 0x32, 0x9c, 0x58, 0xd9, 0x15, 0x1f, 0x7b, 0xe4, - 0x5c, 0xee, 0x8c, 0x32, 0xdd, 0x14, 0x3b, 0xcb, 0xf2, 0x9d, 0x15, 0xb8, 0xc4, 0xdd, 0x9a, 0xfa, - 0x0f, 0x05, 0xd6, 0x5c, 0xae, 0xdc, 0x33, 0xbe, 0x1f, 0x2b, 0x90, 0x8b, 0x38, 0x8f, 0x7f, 0xb9, - 0x52, 0xc7, 0xa4, 0xcc, 0xf7, 0x15, 0xff, 0x42, 0x1b, 0x90, 0x17, 0xa6, 0xcf, 0x4a, 0xb1, 0xf8, - 0x44, 0xfb, 0x50, 0x21, 0x96, 0x61, 0x8e, 0x4f, 0x71, 0xd7, 0xa2, 0x96, 0xa1, 0x5b, 0xd4, 0x22, - 0x86, 0x6e, 0x72, 0x0f, 0x2d, 0x69, 0xeb, 0x72, 0xec, 0xbb, 0xa1, 0xa1, 0xa8, 0x13, 0xf2, 0x53, - 0x9d, 0xb0, 0x30, 0xcb, 0x09, 0x7f, 0x50, 0x00, 0x85, 0x37, 0x26, 0xcd, 0xff, 0x31, 0xac, 0xf0, - 0xe0, 0xec, 0x50, 0x8b, 0xe9, 0xc4, 0xc2, 0x23, 0xcf, 0x03, 0x0f, 0x52, 0x3c, 0xd0, 0xe6, 0x59, - 0xd2, 0x8e, 0xcc, 0xd1, 0xe2, 0x18, 0xd7, 0xe5, 0x0d, 0x0a, 0x95, 0xa4, 0xf5, 0xd0, 0x33, 0xc8, - 0xf3, 0x15, 0xb9, 0x43, 0xd2, 0xa3, 0x25, 0x34, 0x57, 0x13, 0x13, 0xdc, 0x05, 0x43, 0xc9, 0xe8, - 0x72, 0x2a, 0x69, 0x85, 0x9e, 0x97, 0x86, 0xea, 0xaf, 0xf3, 0x50, 0xe8, 0xb8, 0xe5, 0xec, 0x08, - 0xeb, 0xa7, 0xe8, 0x6b, 0x29, 0xe9, 0xdb, 0x5e, 0xfb, 0xe2, 0xf3, 0xed, 0xb2, 0xe3, 0x5c, 0x3d, - 0x72, 0x69, 0xbf, 0xaf, 0x3e, 0x3e, 0x50, 0xe3, 0xf9, 0xbc, 0x1b, 0x99, 0x1a, 0x84, 0x49, 0x48, - 0xef, 0xc4, 0x8d, 0x96, 0x06, 0xac, 0x86, 0xf4, 0x42, 0x81, 0xa3, 0x2d, 0xfb, 0x8a, 0x22, 0x69, - 0xf7, 0xa0, 0x72, 0x46, 0x2c, 0xdd, 0x24, 0x57, 0x38, 0x02, 0xcb, 0x33, 0x5c, 0x43, 0xfe, 0x58, - 0x80, 0x7d, 0x0f, 0x56, 0x82, 0x19, 0x02, 0x3a, 0x2f, 0xa0, 0x7d, 0xb1, 0x80, 0xee, 0x4c, 0x42, - 0xf3, 0xcd, 0x2e, 0xa4, 0x6d, 0x36, 0xb6, 0x1a, 0xdf, 0xf1, 0x1e, 0x54, 0x3e, 0x19, 0x3b, 0x8c, - 0x9c, 0x91, 0x28, 0xbf, 0x45, 0xc1, 0xcf, 0x1f, 0x8b, 0xf0, 0x0b, 0x66, 0x08, 0x7e, 0x4b, 0x82, - 0x9f, 0x2f, 0xf6, 0xf9, 0xc5, 0xa1, 0x39, 0xbf, 0x42, 0x2a, 0xbf, 0xe8, 0x6a, 0x9c, 0xdf, 0x7b, - 0x70, 0xcb, 0x1e, 0xe1, 0x0b, 0x42, 0xc7, 0x4e, 0x37, 0x40, 0xe3, 0x14, 0x81, 0xaf, 0x7a, 0xd3, - 0x1b, 0xfe, 0xb6, 0x37, 0xca, 0x59, 0x3e, 0x83, 0x6a, 0xc2, 0x3c, 0x41, 0xb7, 0xc8, 0x27, 0x6e, - 0x4c, 0x4c, 0x14, 0xb4, 0x3f, 0x82, 0x3b, 0x09, 0x33, 0x43, 0xfc, 0x4b, 0x69, 0xfc, 0x6b, 0x13, - 0x88, 0xfe, 0x3e, 0xd4, 0x9f, 0x2b, 0x70, 0xd3, 0x4d, 0xe4, 0x0e, 0x1d, 0x0e, 0x09, 0x63, 0x18, - 0xfb, 0x55, 0xca, 0xaf, 0x3c, 0x4a, 0xb4, 0xf2, 0xd4, 0x60, 0xb1, 0x8f, 0x2d, 0xec, 0x10, 0x87, - 0xc7, 0xe0, 0xd2, 0xd1, 0x0d, 0xcd, 0x13, 0x44, 0x4b, 0x4c, 0x76, 0x6a, 0x89, 0xc9, 0xcd, 0x2a, - 0x31, 0x7f, 0xce, 0xc0, 0xaa, 0x48, 0xb9, 0x80, 0x1b, 0xaa, 0x44, 0x48, 0x79, 0x94, 0x3e, 0x06, - 0x30, 0x7c, 0x9d, 0x6a, 0x86, 0x57, 0x9c, 0xa7, 0x53, 0xb3, 0x38, 0x80, 0x6c, 0xfa, 0x3f, 0x5f, - 0x30, 0x3c, 0xd4, 0x42, 0x40, 0xe8, 0x09, 0x6c, 0xe8, 0x06, 0x23, 0x17, 0xb8, 0xeb, 0x9f, 0xd2, - 0x5d, 0x83, 0x8e, 0x2d, 0x26, 0x73, 0xaa, 0x22, 0x46, 0xbf, 0xef, 0x0d, 0x76, 0xdc, 0xb1, 0xa4, - 0x62, 0x95, 0x9b, 0x5d, 0xac, 0xf2, 0xb1, 0x62, 0x55, 0x3b, 0x84, 0x72, 0x84, 0x19, 0xda, 0x84, - 0x82, 0xcf, 0x8d, 0x57, 0xd5, 0x9c, 0x16, 0x08, 0x10, 0x0a, 0x9f, 0x1e, 0xe2, 0xec, 0x50, 0xff, - 0xa3, 0xc0, 0xa6, 0xeb, 0x5b, 0x9f, 0x60, 0x5b, 0x37, 0x75, 0xcb, 0x78, 0x3b, 0x17, 0x3f, 0x81, - 0xa2, 0x3d, 0xee, 0x99, 0xc4, 0xe8, 0x9e, 0xe3, 0x4b, 0xa7, 0x9a, 0xad, 0x67, 0x1b, 0xa5, 0xf6, - 0xfa, 0x17, 0x9f, 0x6f, 0xaf, 0x04, 0x41, 0xf7, 0xc1, 0xc3, 0x27, 0xcf, 0x54, 0x0d, 0x84, 0xde, - 0x77, 0xf0, 0xa5, 0x83, 0xaa, 0xb0, 0x48, 0xac, 0x53, 0x62, 0x60, 0xa7, 0x9a, 0xe3, 0xd4, 0xbd, - 0xcf, 0x6b, 0x3d, 0x95, 0x7e, 0x9b, 0x81, 0xb5, 0x89, 0xcd, 0xa6, 0xc4, 0xcc, 0x4b, 0x58, 0xea, - 0x49, 0x0d, 0x19, 0x31, 0x7b, 0x29, 0x11, 0x33, 0x81, 0xd8, 0x94, 0x3f, 0x34, 0x1f, 0x21, 0xc9, - 0xe9, 0xd9, 0xd9, 0x4e, 0xcf, 0xc5, 0x9d, 0x7e, 0x0e, 0x8b, 0x12, 0x1b, 0xed, 0x01, 0x04, 0x76, - 0x4e, 0x3e, 0x28, 0x5c, 0x23, 0x17, 0x7c, 0x23, 0xbb, 0xfb, 0x24, 0xd6, 0x29, 0x7e, 0x2d, 0x63, - 0x40, 0x7c, 0xb8, 0x96, 0x97, 0x2c, 0x65, 0xd4, 0x7a, 0x9f, 0xea, 0xef, 0x65, 0xea, 0xfb, 0xfb, - 0x7b, 0xab, 0xb8, 0xd8, 0x80, 0x05, 0x91, 0x0e, 0x7c, 0x99, 0x25, 0x4d, 0x7e, 0x45, 0xfd, 0x9b, - 0x9b, 0xea, 0xdf, 0xfc, 0x4c, 0xff, 0x2a, 0x00, 0x01, 0xdb, 0x14, 0xc7, 0x7e, 0x13, 0xc0, 0x4f, - 0x57, 0xcf, 0xb5, 0xf5, 0x59, 0xae, 0xd5, 0x42, 0x73, 0xae, 0xc9, 0x99, 0x2a, 0x81, 0x9d, 0xe7, - 0x38, 0xb0, 0xee, 0x21, 0xb7, 0xc7, 0x09, 0x66, 0x9d, 0x81, 0x6e, 0xf5, 0xdf, 0x2a, 0x09, 0x27, - 0x0c, 0xf3, 0xa7, 0x0c, 0xac, 0xc6, 0xf1, 0x53, 0xcc, 0xf3, 0x1c, 0x6e, 0x72, 0xcf, 0xe8, 0x0c, - 0x9f, 0x76, 0xc3, 0x99, 0x9c, 0x49, 0xcf, 0xe4, 0x75, 0x7f, 0xc6, 0x71, 0x90, 0xd2, 0x87, 0x80, - 0xf0, 0x6b, 0x12, 0x47, 0x99, 0x52, 0x0f, 0x56, 0x85, 0x7a, 0x08, 0xa2, 0x03, 0xeb, 0x8e, 0xa9, - 0x3b, 0x83, 0x18, 0x46, 0x2e, 0x1d, 0x63, 0x4d, 0xea, 0x47, 0x41, 0xf0, 0x27, 0xd8, 0x88, 0x13, - 0xc9, 0x4f, 0x01, 0x91, 0xfa, 0x01, 0x88, 0xfa, 0x99, 0x02, 0xcb, 0xbe, 0xa7, 0xbe, 0x37, 0xc6, - 0x63, 0x8c, 0xb6, 0xa1, 0x68, 0x0c, 0xc6, 0x23, 0xab, 0x6b, 0x92, 0x21, 0x61, 0xd2, 0x88, 0xc0, - 0x45, 0x2f, 0x5d, 0x09, 0x7a, 0x21, 0x8f, 0x07, 0x7e, 0x65, 0x98, 0xd7, 0x94, 0x95, 0x60, 0x4a, - 0x68, 0x0f, 0xdf, 0x00, 0x6e, 0x9c, 0x79, 0x2d, 0xb9, 0xec, 0x2a, 0x87, 0xd8, 0xff, 0x57, 0x81, - 0xed, 0x48, 0x26, 0x1f, 0x3a, 0x0e, 0xe9, 0x5b, 0x43, 0x6c, 0xb1, 0xff, 0xdb, 0x5a, 0xff, 0x97, - 0x2c, 0x54, 0x92, 0xf6, 0x9b, 0x12, 0xf6, 0x3a, 0x14, 0xf5, 0x40, 0x49, 0x96, 0x85, 0x0f, 0x66, - 0x95, 0x85, 0x10, 0x6e, 0xd0, 0x27, 0x04, 0x42, 0x2d, 0x8c, 0x79, 0x5d, 0x67, 0xc0, 0xbf, 0x15, - 0x58, 0x4f, 0x58, 0x0b, 0x3d, 0x80, 0x35, 0xef, 0x85, 0x24, 0xe8, 0x75, 0x44, 0x1f, 0xb0, 0xda, - 0x8b, 0xf7, 0x49, 0xf7, 0x60, 0xc5, 0xd7, 0xea, 0x86, 0x4f, 0x85, 0x65, 0x5f, 0xfc, 0x82, 0x1f, - 0x0f, 0x3b, 0x50, 0x16, 0x17, 0x5f, 0x3c, 0x12, 0xdd, 0xab, 0x38, 0x24, 0x4a, 0x9e, 0x90, 0x37, - 0xad, 0x3b, 0x50, 0xb6, 0x47, 0xd4, 0xa6, 0x8e, 0xa7, 0x24, 0x6e, 0x09, 0x25, 0x4f, 0xc8, 0x95, - 0xa2, 0x07, 0x56, 0x7e, 0xf6, 0x81, 0xa5, 0x9e, 0x41, 0x3d, 0x5c, 0x20, 0x8f, 0xf5, 0x11, 0x23, - 0x06, 0xb1, 0xc5, 0x7d, 0xfc, 0x1a, 0xab, 0xe3, 0xa7, 0x0a, 0x6c, 0xa5, 0xad, 0x22, 0x2f, 0xae, - 0xc9, 0x41, 0xb3, 0x09, 0x05, 0xff, 0x6a, 0x22, 0x96, 0xd1, 0x02, 0x01, 0x3a, 0x81, 0xb2, 0x1d, - 0x06, 0xe3, 0xa6, 0x2b, 0x1e, 0x3c, 0x9a, 0x15, 0x54, 0x51, 0x06, 0x51, 0x0c, 0x55, 0x87, 0x5b, - 0xa1, 0x57, 0x89, 0x63, 0x4a, 0xcd, 0xeb, 0x7e, 0xdb, 0x38, 0xf8, 0x45, 0x19, 0x8a, 0xb2, 0x0b, - 0x76, 0xef, 0xa6, 0xe8, 0x97, 0x0a, 0xac, 0xc6, 0x1f, 0x54, 0x50, 0x33, 0x05, 0x36, 0xe5, 0x6d, - 0xaa, 0xd6, 0x9a, 0x5b, 0x5f, 0xec, 0x46, 0xbd, 0xff, 0xc3, 0xbf, 0xff, 0xeb, 0xa7, 0x99, 0x1d, - 0x74, 0x37, 0xe9, 0xd9, 0xac, 0x15, 0x79, 0x8c, 0xf9, 0x89, 0x02, 0x2b, 0x31, 0xa3, 0xa0, 0x8d, - 0xa6, 0x78, 0xb6, 0x6b, 0x7a, 0xcf, 0x76, 0xcd, 0x0f, 0x87, 0x36, 0xbb, 0xac, 0x35, 0x67, 0x9b, - 0x23, 0x6c, 0x54, 0xb5, 0xc9, 0x69, 0x34, 0xd0, 0xee, 0x4c, 0x1a, 0x2d, 0xdb, 0x5d, 0xf7, 0xc7, - 0x0a, 0x40, 0xf0, 0xf0, 0x81, 0x1a, 0x53, 0xb6, 0x1d, 0x79, 0xf4, 0xa9, 0xdd, 0x9f, 0x43, 0x53, - 0x72, 0xda, 0xe1, 0x9c, 0xee, 0xa0, 0xdb, 0x89, 0x9c, 0x7a, 0x62, 0x65, 0x1b, 0x4a, 0xcf, 0xf9, - 0x59, 0x2f, 0x5f, 0x17, 0xd2, 0x0c, 0x92, 0xd6, 0xfa, 0xf8, 0x33, 0xd5, 0x5d, 0xbe, 0x5c, 0x1d, - 0x6d, 0x25, 0x2e, 0xc7, 0x9f, 0x63, 0x07, 0xee, 0x0a, 0x3f, 0x53, 0xa0, 0xc2, 0xd9, 0xc6, 0x8b, - 0xcd, 0xc3, 0x29, 0x5b, 0x9b, 0xb8, 0x57, 0xd6, 0xee, 0xcd, 0x79, 0x31, 0x53, 0xef, 0x71, 0x5e, - 0x77, 0xd1, 0x76, 0x32, 0xaf, 0x60, 0xfd, 0xdf, 0xc4, 0x1b, 0x59, 0xbf, 0xf5, 0x7f, 0x3c, 0x85, - 0x59, 0xda, 0xad, 0xa8, 0xd6, 0x98, 0xf7, 0x1e, 0x90, 0x16, 0xc3, 0x41, 0x2b, 0xd9, 0xf2, 0x2f, - 0x08, 0x3f, 0x52, 0x60, 0x39, 0xda, 0x6c, 0x4f, 0x35, 0xdb, 0x44, 0x4f, 0x5e, 0xbb, 0x3b, 0x8b, - 0x95, 0xa3, 0xd6, 0x39, 0x9d, 0x1a, 0xaa, 0xa6, 0xd1, 0x41, 0x7f, 0x54, 0x60, 0x73, 0x5a, 0x4f, - 0x8a, 0xde, 0x4f, 0x59, 0x65, 0x8e, 0x46, 0x36, 0xd5, 0xb1, 0x71, 0x7d, 0x75, 0x9f, 0xf3, 0x7c, - 0x80, 0xee, 0xa7, 0x9a, 0x4d, 0xdc, 0x1d, 0x1c, 0xcc, 0x0c, 0xc9, 0xeb, 0x0a, 0xd6, 0xc2, 0x14, - 0x44, 0x87, 0x96, 0x16, 0xf2, 0xef, 0xce, 0x32, 0x15, 0x9f, 0x9e, 0x16, 0xf7, 0x21, 0x1a, 0xaf, - 0xf8, 0x32, 0xbf, 0x93, 0x0f, 0xce, 0x89, 0xdd, 0xc6, 0x7b, 0xf3, 0x38, 0x71, 0xb2, 0x1d, 0xab, - 0x3d, 0xf8, 0x12, 0xad, 0x87, 0xfa, 0x90, 0x33, 0xdd, 0x45, 0xef, 0xa4, 0x1b, 0x2c, 0x44, 0xe9, - 0x33, 0x05, 0xbe, 0x92, 0x7a, 0xae, 0xa2, 0xaf, 0xce, 0xe1, 0xe1, 0xa4, 0x93, 0xb8, 0xf6, 0xf4, - 0xcb, 0x9d, 0x6b, 0x33, 0x0a, 0x6c, 0x88, 0x7b, 0xe4, 0x00, 0x6c, 0x77, 0xfe, 0xfa, 0x66, 0x4b, - 0xf9, 0xdb, 0x9b, 0x2d, 0xe5, 0x9f, 0x6f, 0xb6, 0x94, 0x1f, 0x3c, 0x0d, 0xfd, 0xd3, 0x63, 0x8f, - 0x2e, 0x9d, 0xa1, 0xce, 0x88, 0x61, 0xea, 0x3d, 0x47, 0x7c, 0xb5, 0x26, 0xff, 0x51, 0xf9, 0x3a, - 0x66, 0x83, 0xde, 0x02, 0x97, 0x3f, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xd0, 0xf9, - 0xa2, 0x67, 0x1a, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// 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 { - ListAttestations(ctx context.Context, in *ListAttestationsRequest, opts ...grpc.CallOption) (*ListAttestationsResponse, error) - AttestationPool(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*AttestationPoolResponse, error) - ListBlocks(ctx context.Context, in *ListBlocksRequest, opts ...grpc.CallOption) (*ListBlocksResponse, error) - GetChainHead(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ChainHead, error) - ListBeaconCommittees(ctx context.Context, in *ListCommitteesRequest, opts ...grpc.CallOption) (*BeaconCommittees, error) - ListValidatorBalances(ctx context.Context, in *ListValidatorBalancesRequest, opts ...grpc.CallOption) (*ValidatorBalances, error) - ListValidators(ctx context.Context, in *ListValidatorsRequest, opts ...grpc.CallOption) (*Validators, error) - GetValidatorActiveSetChanges(ctx context.Context, in *GetValidatorActiveSetChangesRequest, opts ...grpc.CallOption) (*ActiveSetChanges, error) - GetValidatorQueue(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ValidatorQueue, error) - ListValidatorAssignments(ctx context.Context, in *ListValidatorAssignmentsRequest, opts ...grpc.CallOption) (*ValidatorAssignments, error) - GetValidatorParticipation(ctx context.Context, in *GetValidatorParticipationRequest, opts ...grpc.CallOption) (*ValidatorParticipationResponse, error) -} - -type beaconChainClient struct { - cc *grpc.ClientConn -} - -func NewBeaconChainClient(cc *grpc.ClientConn) BeaconChainClient { - return &beaconChainClient{cc} -} - -func (c *beaconChainClient) ListAttestations(ctx context.Context, in *ListAttestationsRequest, opts ...grpc.CallOption) (*ListAttestationsResponse, error) { - out := new(ListAttestationsResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/ListAttestations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) AttestationPool(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*AttestationPoolResponse, error) { - out := new(AttestationPoolResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/AttestationPool", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) ListBlocks(ctx context.Context, in *ListBlocksRequest, opts ...grpc.CallOption) (*ListBlocksResponse, error) { - out := new(ListBlocksResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/ListBlocks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) GetChainHead(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ChainHead, error) { - out := new(ChainHead) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/GetChainHead", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) ListBeaconCommittees(ctx context.Context, in *ListCommitteesRequest, opts ...grpc.CallOption) (*BeaconCommittees, error) { - out := new(BeaconCommittees) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/ListBeaconCommittees", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) ListValidatorBalances(ctx context.Context, in *ListValidatorBalancesRequest, opts ...grpc.CallOption) (*ValidatorBalances, error) { - out := new(ValidatorBalances) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/ListValidatorBalances", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) ListValidators(ctx context.Context, in *ListValidatorsRequest, opts ...grpc.CallOption) (*Validators, error) { - out := new(Validators) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/ListValidators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) GetValidatorActiveSetChanges(ctx context.Context, in *GetValidatorActiveSetChangesRequest, opts ...grpc.CallOption) (*ActiveSetChanges, error) { - out := new(ActiveSetChanges) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/GetValidatorActiveSetChanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) GetValidatorQueue(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ValidatorQueue, error) { - out := new(ValidatorQueue) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/GetValidatorQueue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) ListValidatorAssignments(ctx context.Context, in *ListValidatorAssignmentsRequest, opts ...grpc.CallOption) (*ValidatorAssignments, error) { - out := new(ValidatorAssignments) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/ListValidatorAssignments", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) GetValidatorParticipation(ctx context.Context, in *GetValidatorParticipationRequest, opts ...grpc.CallOption) (*ValidatorParticipationResponse, error) { - out := new(ValidatorParticipationResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconChain/GetValidatorParticipation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BeaconChainServer is the server API for BeaconChain service. -type BeaconChainServer interface { - ListAttestations(context.Context, *ListAttestationsRequest) (*ListAttestationsResponse, error) - AttestationPool(context.Context, *types.Empty) (*AttestationPoolResponse, error) - ListBlocks(context.Context, *ListBlocksRequest) (*ListBlocksResponse, error) - GetChainHead(context.Context, *types.Empty) (*ChainHead, error) - ListBeaconCommittees(context.Context, *ListCommitteesRequest) (*BeaconCommittees, error) - ListValidatorBalances(context.Context, *ListValidatorBalancesRequest) (*ValidatorBalances, error) - ListValidators(context.Context, *ListValidatorsRequest) (*Validators, error) - GetValidatorActiveSetChanges(context.Context, *GetValidatorActiveSetChangesRequest) (*ActiveSetChanges, error) - GetValidatorQueue(context.Context, *types.Empty) (*ValidatorQueue, error) - ListValidatorAssignments(context.Context, *ListValidatorAssignmentsRequest) (*ValidatorAssignments, error) - GetValidatorParticipation(context.Context, *GetValidatorParticipationRequest) (*ValidatorParticipationResponse, error) -} - -func RegisterBeaconChainServer(s *grpc.Server, srv BeaconChainServer) { - s.RegisterService(&_BeaconChain_serviceDesc, srv) -} - -func _BeaconChain_ListAttestations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAttestationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).ListAttestations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/ListAttestations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).ListAttestations(ctx, req.(*ListAttestationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_AttestationPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).AttestationPool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/AttestationPool", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).AttestationPool(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_ListBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(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.eth.v1alpha1.BeaconChain/ListBlocks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).ListBlocks(ctx, req.(*ListBlocksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_GetChainHead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).GetChainHead(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/GetChainHead", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).GetChainHead(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_ListBeaconCommittees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListCommitteesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).ListBeaconCommittees(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/ListBeaconCommittees", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).ListBeaconCommittees(ctx, req.(*ListCommitteesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_ListValidatorBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListValidatorBalancesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).ListValidatorBalances(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/ListValidatorBalances", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).ListValidatorBalances(ctx, req.(*ListValidatorBalancesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_ListValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListValidatorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).ListValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/ListValidators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).ListValidators(ctx, req.(*ListValidatorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_GetValidatorActiveSetChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorActiveSetChangesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).GetValidatorActiveSetChanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/GetValidatorActiveSetChanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).GetValidatorActiveSetChanges(ctx, req.(*GetValidatorActiveSetChangesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_GetValidatorQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).GetValidatorQueue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/GetValidatorQueue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).GetValidatorQueue(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_ListValidatorAssignments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListValidatorAssignmentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).ListValidatorAssignments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/ListValidatorAssignments", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).ListValidatorAssignments(ctx, req.(*ListValidatorAssignmentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_GetValidatorParticipation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorParticipationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).GetValidatorParticipation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconChain/GetValidatorParticipation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).GetValidatorParticipation(ctx, req.(*GetValidatorParticipationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _BeaconChain_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ethereum.eth.v1alpha1.BeaconChain", - HandlerType: (*BeaconChainServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListAttestations", - Handler: _BeaconChain_ListAttestations_Handler, - }, - { - MethodName: "AttestationPool", - Handler: _BeaconChain_AttestationPool_Handler, - }, - { - MethodName: "ListBlocks", - Handler: _BeaconChain_ListBlocks_Handler, - }, - { - MethodName: "GetChainHead", - Handler: _BeaconChain_GetChainHead_Handler, - }, - { - MethodName: "ListBeaconCommittees", - Handler: _BeaconChain_ListBeaconCommittees_Handler, - }, - { - MethodName: "ListValidatorBalances", - Handler: _BeaconChain_ListValidatorBalances_Handler, - }, - { - MethodName: "ListValidators", - Handler: _BeaconChain_ListValidators_Handler, - }, - { - MethodName: "GetValidatorActiveSetChanges", - Handler: _BeaconChain_GetValidatorActiveSetChanges_Handler, - }, - { - MethodName: "GetValidatorQueue", - Handler: _BeaconChain_GetValidatorQueue_Handler, - }, - { - MethodName: "ListValidatorAssignments", - Handler: _BeaconChain_ListValidatorAssignments_Handler, - }, - { - MethodName: "GetValidatorParticipation", - Handler: _BeaconChain_GetValidatorParticipation_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/eth/v1alpha1/beacon_chain.proto", -} - -func (m *ListAttestationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListAttestationsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.QueryFilter != nil { - nn1, err := m.QueryFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.PageSize != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.PageSize)) - } - if len(m.PageToken) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PageToken))) - i += copy(dAtA[i:], m.PageToken) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListAttestationsRequest_HeadBlockRoot) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.HeadBlockRoot != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.HeadBlockRoot))) - i += copy(dAtA[i:], m.HeadBlockRoot) - } - return i, nil -} -func (m *ListAttestationsRequest_SourceEpoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.SourceEpoch)) - return i, nil -} -func (m *ListAttestationsRequest_SourceRoot) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.SourceRoot != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.SourceRoot))) - i += copy(dAtA[i:], m.SourceRoot) - } - return i, nil -} -func (m *ListAttestationsRequest_TargetEpoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x20 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.TargetEpoch)) - return i, nil -} -func (m *ListAttestationsRequest_TargetRoot) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TargetRoot != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.TargetRoot))) - i += copy(dAtA[i:], m.TargetRoot) - } - return i, nil -} -func (m *ListAttestationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListAttestationsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Attestations) > 0 { - for _, msg := range m.Attestations { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NextPageToken) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.NextPageToken))) - i += copy(dAtA[i:], m.NextPageToken) - } - if m.TotalSize != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListBlocksRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListBlocksRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.QueryFilter != nil { - nn2, err := m.QueryFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn2 - } - if m.IncludeNoncanonical { - dAtA[i] = 0x20 - i++ - if m.IncludeNoncanonical { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.PageSize != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.PageSize)) - } - if len(m.PageToken) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PageToken))) - i += copy(dAtA[i:], m.PageToken) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListBlocksRequest_Root) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Root != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.Root))) - i += copy(dAtA[i:], m.Root) - } - return i, nil -} -func (m *ListBlocksRequest_Slot) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Slot)) - return i, nil -} -func (m *ListBlocksRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - return i, nil -} -func (m *ListBlocksResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListBlocksResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.BlockContainers) > 0 { - for _, msg := range m.BlockContainers { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NextPageToken) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.NextPageToken))) - i += copy(dAtA[i:], m.NextPageToken) - } - if m.TotalSize != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BeaconBlockContainer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeaconBlockContainer) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Block != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Block.Size())) - n3, err := m.Block.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.BlockRoot) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.BlockRoot))) - i += copy(dAtA[i:], m.BlockRoot) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ChainHead) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChainHead) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.HeadBlockRoot) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.HeadBlockRoot))) - i += copy(dAtA[i:], m.HeadBlockRoot) - } - if m.HeadBlockSlot != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.HeadBlockSlot)) - } - if m.HeadBlockEpoch != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.HeadBlockEpoch)) - } - if m.FinalizedBlockSlot != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.FinalizedBlockSlot)) - } - if m.FinalizedEpoch != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.FinalizedEpoch)) - } - if len(m.FinalizedBlockRoot) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.FinalizedBlockRoot))) - i += copy(dAtA[i:], m.FinalizedBlockRoot) - } - if m.JustifiedBlockSlot != 0 { - dAtA[i] = 0x38 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.JustifiedBlockSlot)) - } - if m.JustifiedEpoch != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.JustifiedEpoch)) - } - if len(m.JustifiedBlockRoot) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.JustifiedBlockRoot))) - i += copy(dAtA[i:], m.JustifiedBlockRoot) - } - if m.PreviousJustifiedSlot != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.PreviousJustifiedSlot)) - } - if m.PreviousJustifiedEpoch != 0 { - dAtA[i] = 0x58 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.PreviousJustifiedEpoch)) - } - if len(m.PreviousJustifiedBlockRoot) > 0 { - dAtA[i] = 0x62 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PreviousJustifiedBlockRoot))) - i += copy(dAtA[i:], m.PreviousJustifiedBlockRoot) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListCommitteesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListCommitteesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.QueryFilter != nil { - nn4, err := m.QueryFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.PageSize != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.PageSize)) - } - if len(m.PageToken) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PageToken))) - i += copy(dAtA[i:], m.PageToken) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListCommitteesRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - return i, nil -} -func (m *ListCommitteesRequest_Genesis) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - if m.Genesis { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} -func (m *BeaconCommittees) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeaconCommittees) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - } - if len(m.Committees) > 0 { - for _, msg := range m.Committees { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.ActiveValidatorCount != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.ActiveValidatorCount)) - } - if len(m.NextPageToken) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.NextPageToken))) - i += copy(dAtA[i:], m.NextPageToken) - } - if m.TotalSize != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BeaconCommittees_CommitteeItem) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeaconCommittees_CommitteeItem) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Committee) > 0 { - dAtA6 := make([]byte, len(m.Committee)*10) - var j5 int - for _, num := range m.Committee { - for num >= 1<<7 { - dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - dAtA6[j5] = uint8(num) - j5++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(j5)) - i += copy(dAtA[i:], dAtA6[:j5]) - } - if m.Slot != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Slot)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListValidatorBalancesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListValidatorBalancesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.QueryFilter != nil { - nn7, err := m.QueryFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn7 - } - if len(m.PublicKeys) > 0 { - for _, b := range m.PublicKeys { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if len(m.Indices) > 0 { - dAtA9 := make([]byte, len(m.Indices)*10) - var j8 int - for _, num := range m.Indices { - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(j8)) - i += copy(dAtA[i:], dAtA9[:j8]) - } - if m.PageSize != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.PageSize)) - } - if len(m.PageToken) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PageToken))) - i += copy(dAtA[i:], m.PageToken) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListValidatorBalancesRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - return i, nil -} -func (m *ListValidatorBalancesRequest_Genesis) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - if m.Genesis { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} -func (m *ValidatorBalances) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorBalances) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - } - if len(m.Balances) > 0 { - for _, msg := range m.Balances { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NextPageToken) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.NextPageToken))) - i += copy(dAtA[i:], m.NextPageToken) - } - if m.TotalSize != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ValidatorBalances_Balance) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorBalances_Balance) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.PublicKey) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PublicKey))) - i += copy(dAtA[i:], m.PublicKey) - } - if m.Index != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Index)) - } - if m.Balance != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Balance)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListValidatorsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.QueryFilter != nil { - nn10, err := m.QueryFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn10 - } - if m.Active { - dAtA[i] = 0x18 - i++ - if m.Active { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.PageSize != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.PageSize)) - } - if len(m.PageToken) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PageToken))) - i += copy(dAtA[i:], m.PageToken) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListValidatorsRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - return i, nil -} -func (m *ListValidatorsRequest_Genesis) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - if m.Genesis { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} -func (m *Validators) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Validators) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - } - if len(m.Validators) > 0 { - for _, msg := range m.Validators { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NextPageToken) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.NextPageToken))) - i += copy(dAtA[i:], m.NextPageToken) - } - if m.TotalSize != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GetValidatorActiveSetChangesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetValidatorActiveSetChangesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.QueryFilter != nil { - nn11, err := m.QueryFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn11 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GetValidatorActiveSetChangesRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - return i, nil -} -func (m *GetValidatorActiveSetChangesRequest_Genesis) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - if m.Genesis { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} -func (m *ActiveSetChanges) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActiveSetChanges) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - } - if len(m.ActivatedPublicKeys) > 0 { - for _, b := range m.ActivatedPublicKeys { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if len(m.ExitedPublicKeys) > 0 { - for _, b := range m.ExitedPublicKeys { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if len(m.SlashedPublicKeys) > 0 { - for _, b := range m.SlashedPublicKeys { - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if len(m.EjectedPublicKeys) > 0 { - for _, b := range m.EjectedPublicKeys { - dAtA[i] = 0x2a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ValidatorQueue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorQueue) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ChurnLimit != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.ChurnLimit)) - } - if len(m.ActivationPublicKeys) > 0 { - for _, b := range m.ActivationPublicKeys { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if len(m.ExitPublicKeys) > 0 { - for _, b := range m.ExitPublicKeys { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListValidatorAssignmentsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListValidatorAssignmentsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.QueryFilter != nil { - nn12, err := m.QueryFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn12 - } - if len(m.PublicKeys) > 0 { - for _, b := range m.PublicKeys { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if len(m.Indices) > 0 { - dAtA14 := make([]byte, len(m.Indices)*10) - var j13 int - for _, num := range m.Indices { - for num >= 1<<7 { - dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j13++ - } - dAtA14[j13] = uint8(num) - j13++ - } - dAtA[i] = 0x22 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(j13)) - i += copy(dAtA[i:], dAtA14[:j13]) - } - if m.PageSize != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.PageSize)) - } - if len(m.PageToken) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PageToken))) - i += copy(dAtA[i:], m.PageToken) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListValidatorAssignmentsRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - return i, nil -} -func (m *ListValidatorAssignmentsRequest_Genesis) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - if m.Genesis { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} -func (m *ValidatorAssignments) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorAssignments) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - } - if len(m.Assignments) > 0 { - for _, msg := range m.Assignments { - dAtA[i] = 0x12 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NextPageToken) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.NextPageToken))) - i += copy(dAtA[i:], m.NextPageToken) - } - if m.TotalSize != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ValidatorAssignments_CommitteeAssignment) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorAssignments_CommitteeAssignment) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.BeaconCommittees) > 0 { - dAtA16 := make([]byte, len(m.BeaconCommittees)*10) - var j15 int - for _, num := range m.BeaconCommittees { - for num >= 1<<7 { - dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j15++ - } - dAtA16[j15] = uint8(num) - j15++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(j15)) - i += copy(dAtA[i:], dAtA16[:j15]) - } - if m.CommitteeIndex != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.CommitteeIndex)) - } - if m.AttesterSlot != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.AttesterSlot)) - } - if m.ProposerSlot != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.ProposerSlot)) - } - if len(m.PublicKey) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(len(m.PublicKey))) - i += copy(dAtA[i:], m.PublicKey) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GetValidatorParticipationRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetValidatorParticipationRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.QueryFilter != nil { - nn17, err := m.QueryFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn17 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GetValidatorParticipationRequest_Epoch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - return i, nil -} -func (m *GetValidatorParticipationRequest_Genesis) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - if m.Genesis { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} -func (m *ValidatorParticipationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorParticipationResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Epoch)) - } - if m.Finalized { - dAtA[i] = 0x10 - i++ - if m.Finalized { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Participation != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(m.Participation.Size())) - n18, err := m.Participation.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AttestationPoolResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttestationPoolResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Attestations) > 0 { - for _, msg := range m.Attestations { - dAtA[i] = 0xa - i++ - i = encodeVarintBeaconChain(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintBeaconChain(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ListAttestationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryFilter != nil { - n += m.QueryFilter.Size() - } - if m.PageSize != 0 { - n += 1 + sovBeaconChain(uint64(m.PageSize)) - } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListAttestationsRequest_HeadBlockRoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HeadBlockRoot != nil { - l = len(m.HeadBlockRoot) - n += 1 + l + sovBeaconChain(uint64(l)) - } - return n -} -func (m *ListAttestationsRequest_SourceEpoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.SourceEpoch)) - return n -} -func (m *ListAttestationsRequest_SourceRoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SourceRoot != nil { - l = len(m.SourceRoot) - n += 1 + l + sovBeaconChain(uint64(l)) - } - return n -} -func (m *ListAttestationsRequest_TargetEpoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.TargetEpoch)) - return n -} -func (m *ListAttestationsRequest_TargetRoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TargetRoot != nil { - l = len(m.TargetRoot) - n += 1 + l + sovBeaconChain(uint64(l)) - } - return n -} -func (m *ListAttestationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attestations) > 0 { - for _, e := range m.Attestations { - l = e.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.TotalSize != 0 { - n += 1 + sovBeaconChain(uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListBlocksRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryFilter != nil { - n += m.QueryFilter.Size() - } - if m.IncludeNoncanonical { - n += 2 - } - if m.PageSize != 0 { - n += 1 + sovBeaconChain(uint64(m.PageSize)) - } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListBlocksRequest_Root) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Root != nil { - l = len(m.Root) - n += 1 + l + sovBeaconChain(uint64(l)) - } - return n -} -func (m *ListBlocksRequest_Slot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.Slot)) - return n -} -func (m *ListBlocksRequest_Epoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.Epoch)) - return n -} -func (m *ListBlocksResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.BlockContainers) > 0 { - for _, e := range m.BlockContainers { - l = e.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.TotalSize != 0 { - n += 1 + sovBeaconChain(uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BeaconBlockContainer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - l = len(m.BlockRoot) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChainHead) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HeadBlockRoot) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.HeadBlockSlot != 0 { - n += 1 + sovBeaconChain(uint64(m.HeadBlockSlot)) - } - if m.HeadBlockEpoch != 0 { - n += 1 + sovBeaconChain(uint64(m.HeadBlockEpoch)) - } - if m.FinalizedBlockSlot != 0 { - n += 1 + sovBeaconChain(uint64(m.FinalizedBlockSlot)) - } - if m.FinalizedEpoch != 0 { - n += 1 + sovBeaconChain(uint64(m.FinalizedEpoch)) - } - l = len(m.FinalizedBlockRoot) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.JustifiedBlockSlot != 0 { - n += 1 + sovBeaconChain(uint64(m.JustifiedBlockSlot)) - } - if m.JustifiedEpoch != 0 { - n += 1 + sovBeaconChain(uint64(m.JustifiedEpoch)) - } - l = len(m.JustifiedBlockRoot) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.PreviousJustifiedSlot != 0 { - n += 1 + sovBeaconChain(uint64(m.PreviousJustifiedSlot)) - } - if m.PreviousJustifiedEpoch != 0 { - n += 1 + sovBeaconChain(uint64(m.PreviousJustifiedEpoch)) - } - l = len(m.PreviousJustifiedBlockRoot) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListCommitteesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryFilter != nil { - n += m.QueryFilter.Size() - } - if m.PageSize != 0 { - n += 1 + sovBeaconChain(uint64(m.PageSize)) - } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListCommitteesRequest_Epoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.Epoch)) - return n -} -func (m *ListCommitteesRequest_Genesis) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *BeaconCommittees) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconChain(uint64(m.Epoch)) - } - if len(m.Committees) > 0 { - for _, e := range m.Committees { - l = e.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if m.ActiveValidatorCount != 0 { - n += 1 + sovBeaconChain(uint64(m.ActiveValidatorCount)) - } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.TotalSize != 0 { - n += 1 + sovBeaconChain(uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BeaconCommittees_CommitteeItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Committee) > 0 { - l = 0 - for _, e := range m.Committee { - l += sovBeaconChain(uint64(e)) - } - n += 1 + sovBeaconChain(uint64(l)) + l - } - if m.Slot != 0 { - n += 1 + sovBeaconChain(uint64(m.Slot)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListValidatorBalancesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryFilter != nil { - n += m.QueryFilter.Size() - } - if len(m.PublicKeys) > 0 { - for _, b := range m.PublicKeys { - l = len(b) - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if len(m.Indices) > 0 { - l = 0 - for _, e := range m.Indices { - l += sovBeaconChain(uint64(e)) - } - n += 1 + sovBeaconChain(uint64(l)) + l - } - if m.PageSize != 0 { - n += 1 + sovBeaconChain(uint64(m.PageSize)) - } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListValidatorBalancesRequest_Epoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.Epoch)) - return n -} -func (m *ListValidatorBalancesRequest_Genesis) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *ValidatorBalances) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconChain(uint64(m.Epoch)) - } - if len(m.Balances) > 0 { - for _, e := range m.Balances { - l = e.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.TotalSize != 0 { - n += 1 + sovBeaconChain(uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ValidatorBalances_Balance) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.Index != 0 { - n += 1 + sovBeaconChain(uint64(m.Index)) - } - if m.Balance != 0 { - n += 1 + sovBeaconChain(uint64(m.Balance)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListValidatorsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryFilter != nil { - n += m.QueryFilter.Size() - } - if m.Active { - n += 2 - } - if m.PageSize != 0 { - n += 1 + sovBeaconChain(uint64(m.PageSize)) - } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListValidatorsRequest_Epoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.Epoch)) - return n -} -func (m *ListValidatorsRequest_Genesis) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *Validators) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconChain(uint64(m.Epoch)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.TotalSize != 0 { - n += 1 + sovBeaconChain(uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetValidatorActiveSetChangesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryFilter != nil { - n += m.QueryFilter.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetValidatorActiveSetChangesRequest_Epoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.Epoch)) - return n -} -func (m *GetValidatorActiveSetChangesRequest_Genesis) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *ActiveSetChanges) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconChain(uint64(m.Epoch)) - } - if len(m.ActivatedPublicKeys) > 0 { - for _, b := range m.ActivatedPublicKeys { - l = len(b) - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if len(m.ExitedPublicKeys) > 0 { - for _, b := range m.ExitedPublicKeys { - l = len(b) - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if len(m.SlashedPublicKeys) > 0 { - for _, b := range m.SlashedPublicKeys { - l = len(b) - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if len(m.EjectedPublicKeys) > 0 { - for _, b := range m.EjectedPublicKeys { - l = len(b) - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ValidatorQueue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChurnLimit != 0 { - n += 1 + sovBeaconChain(uint64(m.ChurnLimit)) - } - if len(m.ActivationPublicKeys) > 0 { - for _, b := range m.ActivationPublicKeys { - l = len(b) - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if len(m.ExitPublicKeys) > 0 { - for _, b := range m.ExitPublicKeys { - l = len(b) - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListValidatorAssignmentsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryFilter != nil { - n += m.QueryFilter.Size() - } - if len(m.PublicKeys) > 0 { - for _, b := range m.PublicKeys { - l = len(b) - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if len(m.Indices) > 0 { - l = 0 - for _, e := range m.Indices { - l += sovBeaconChain(uint64(e)) - } - n += 1 + sovBeaconChain(uint64(l)) + l - } - if m.PageSize != 0 { - n += 1 + sovBeaconChain(uint64(m.PageSize)) - } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListValidatorAssignmentsRequest_Epoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.Epoch)) - return n -} -func (m *ListValidatorAssignmentsRequest_Genesis) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *ValidatorAssignments) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconChain(uint64(m.Epoch)) - } - if len(m.Assignments) > 0 { - for _, e := range m.Assignments { - l = e.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.TotalSize != 0 { - n += 1 + sovBeaconChain(uint64(m.TotalSize)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ValidatorAssignments_CommitteeAssignment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.BeaconCommittees) > 0 { - l = 0 - for _, e := range m.BeaconCommittees { - l += sovBeaconChain(uint64(e)) - } - n += 1 + sovBeaconChain(uint64(l)) + l - } - if m.CommitteeIndex != 0 { - n += 1 + sovBeaconChain(uint64(m.CommitteeIndex)) - } - if m.AttesterSlot != 0 { - n += 1 + sovBeaconChain(uint64(m.AttesterSlot)) - } - if m.ProposerSlot != 0 { - n += 1 + sovBeaconChain(uint64(m.ProposerSlot)) - } - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetValidatorParticipationRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryFilter != nil { - n += m.QueryFilter.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetValidatorParticipationRequest_Epoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBeaconChain(uint64(m.Epoch)) - return n -} -func (m *GetValidatorParticipationRequest_Genesis) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *ValidatorParticipationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovBeaconChain(uint64(m.Epoch)) - } - if m.Finalized { - n += 2 - } - if m.Participation != nil { - l = m.Participation.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttestationPoolResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attestations) > 0 { - for _, e := range m.Attestations { - l = e.Size() - n += 1 + l + sovBeaconChain(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovBeaconChain(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozBeaconChain(x uint64) (n int) { - return sovBeaconChain(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListAttestationsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListAttestationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListAttestationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadBlockRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.QueryFilter = &ListAttestationsRequest_HeadBlockRoot{v} - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceEpoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &ListAttestationsRequest_SourceEpoch{v} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.QueryFilter = &ListAttestationsRequest_SourceRoot{v} - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetEpoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &ListAttestationsRequest_TargetEpoch{v} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.QueryFilter = &ListAttestationsRequest_TargetRoot{v} - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListAttestationsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListAttestationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListAttestationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attestations = append(m.Attestations, &Attestation{}) - if err := m.Attestations[len(m.Attestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSize", wireType) - } - m.TotalSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListBlocksRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListBlocksRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListBlocksRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.QueryFilter = &ListBlocksRequest_Root{v} - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &ListBlocksRequest_Slot{v} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &ListBlocksRequest_Epoch{v} - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeNoncanonical", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeNoncanonical = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListBlocksResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListBlocksResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListBlocksResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockContainers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockContainers = append(m.BlockContainers, &BeaconBlockContainer{}) - if err := m.BlockContainers[len(m.BlockContainers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSize", wireType) - } - m.TotalSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BeaconBlockContainer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BeaconBlockContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BeaconBlockContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &BeaconBlock{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockRoot = append(m.BlockRoot[:0], dAtA[iNdEx:postIndex]...) - if m.BlockRoot == nil { - m.BlockRoot = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChainHead) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChainHead: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChainHead: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadBlockRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeadBlockRoot = append(m.HeadBlockRoot[:0], dAtA[iNdEx:postIndex]...) - if m.HeadBlockRoot == nil { - m.HeadBlockRoot = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadBlockSlot", wireType) - } - m.HeadBlockSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeadBlockSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadBlockEpoch", wireType) - } - m.HeadBlockEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeadBlockEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FinalizedBlockSlot", wireType) - } - m.FinalizedBlockSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FinalizedBlockSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FinalizedEpoch", wireType) - } - m.FinalizedEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FinalizedEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FinalizedBlockRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FinalizedBlockRoot = append(m.FinalizedBlockRoot[:0], dAtA[iNdEx:postIndex]...) - if m.FinalizedBlockRoot == nil { - m.FinalizedBlockRoot = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field JustifiedBlockSlot", wireType) - } - m.JustifiedBlockSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.JustifiedBlockSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field JustifiedEpoch", wireType) - } - m.JustifiedEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.JustifiedEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JustifiedBlockRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JustifiedBlockRoot = append(m.JustifiedBlockRoot[:0], dAtA[iNdEx:postIndex]...) - if m.JustifiedBlockRoot == nil { - m.JustifiedBlockRoot = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousJustifiedSlot", wireType) - } - m.PreviousJustifiedSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PreviousJustifiedSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousJustifiedEpoch", wireType) - } - m.PreviousJustifiedEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PreviousJustifiedEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousJustifiedBlockRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreviousJustifiedBlockRoot = append(m.PreviousJustifiedBlockRoot[:0], dAtA[iNdEx:postIndex]...) - if m.PreviousJustifiedBlockRoot == nil { - m.PreviousJustifiedBlockRoot = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListCommitteesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListCommitteesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListCommitteesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &ListCommitteesRequest_Epoch{v} - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.QueryFilter = &ListCommitteesRequest_Genesis{b} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BeaconCommittees) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BeaconCommittees: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BeaconCommittees: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Committees", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Committees = append(m.Committees, &BeaconCommittees_CommitteeItem{}) - if err := m.Committees[len(m.Committees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveValidatorCount", wireType) - } - m.ActiveValidatorCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActiveValidatorCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSize", wireType) - } - m.TotalSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BeaconCommittees_CommitteeItem) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommitteeItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitteeItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Committee = append(m.Committee, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Committee) == 0 { - m.Committee = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Committee = append(m.Committee, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Committee", wireType) - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) - } - m.Slot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListValidatorBalancesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListValidatorBalancesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListValidatorBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &ListValidatorBalancesRequest_Epoch{v} - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.QueryFilter = &ListValidatorBalancesRequest_Genesis{b} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeys = append(m.PublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.PublicKeys[len(m.PublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Indices = append(m.Indices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Indices) == 0 { - m.Indices = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Indices = append(m.Indices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Indices", wireType) - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorBalances) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorBalances: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorBalances: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balances = append(m.Balances, &ValidatorBalances_Balance{}) - if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSize", wireType) - } - m.TotalSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorBalances_Balance) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Balance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if m.PublicKey == nil { - m.PublicKey = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - m.Balance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Balance |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListValidatorsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListValidatorsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &ListValidatorsRequest_Epoch{v} - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.QueryFilter = &ListValidatorsRequest_Genesis{b} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Active = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Validators) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Validators: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validators: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSize", wireType) - } - m.TotalSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetValidatorActiveSetChangesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetValidatorActiveSetChangesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetValidatorActiveSetChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &GetValidatorActiveSetChangesRequest_Epoch{v} - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.QueryFilter = &GetValidatorActiveSetChangesRequest_Genesis{b} - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActiveSetChanges) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActiveSetChanges: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActiveSetChanges: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActivatedPublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActivatedPublicKeys = append(m.ActivatedPublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.ActivatedPublicKeys[len(m.ActivatedPublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExitedPublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExitedPublicKeys = append(m.ExitedPublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.ExitedPublicKeys[len(m.ExitedPublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashedPublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SlashedPublicKeys = append(m.SlashedPublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.SlashedPublicKeys[len(m.SlashedPublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EjectedPublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EjectedPublicKeys = append(m.EjectedPublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.EjectedPublicKeys[len(m.EjectedPublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorQueue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorQueue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorQueue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChurnLimit", wireType) - } - m.ChurnLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChurnLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActivationPublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActivationPublicKeys = append(m.ActivationPublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.ActivationPublicKeys[len(m.ActivationPublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExitPublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExitPublicKeys = append(m.ExitPublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.ExitPublicKeys[len(m.ExitPublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListValidatorAssignmentsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListValidatorAssignmentsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListValidatorAssignmentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &ListValidatorAssignmentsRequest_Epoch{v} - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.QueryFilter = &ListValidatorAssignmentsRequest_Genesis{b} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeys = append(m.PublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.PublicKeys[len(m.PublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Indices = append(m.Indices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Indices) == 0 { - m.Indices = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Indices = append(m.Indices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Indices", wireType) - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorAssignments) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorAssignments: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorAssignments: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assignments", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Assignments = append(m.Assignments, &ValidatorAssignments_CommitteeAssignment{}) - if err := m.Assignments[len(m.Assignments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSize", wireType) - } - m.TotalSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorAssignments_CommitteeAssignment) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommitteeAssignment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitteeAssignment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BeaconCommittees = append(m.BeaconCommittees, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.BeaconCommittees) == 0 { - m.BeaconCommittees = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BeaconCommittees = append(m.BeaconCommittees, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BeaconCommittees", wireType) - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitteeIndex", wireType) - } - m.CommitteeIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CommitteeIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AttesterSlot", wireType) - } - m.AttesterSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AttesterSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerSlot", wireType) - } - m.ProposerSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposerSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if m.PublicKey == nil { - m.PublicKey = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetValidatorParticipationRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetValidatorParticipationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetValidatorParticipationRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryFilter = &GetValidatorParticipationRequest_Epoch{v} - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.QueryFilter = &GetValidatorParticipationRequest_Genesis{b} - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorParticipationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorParticipationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorParticipationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Finalized", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Finalized = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Participation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Participation == nil { - m.Participation = &ValidatorParticipation{} - } - if err := m.Participation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttestationPoolResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttestationPoolResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttestationPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBeaconChain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBeaconChain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attestations = append(m.Attestations, &Attestation{}) - if err := m.Attestations[len(m.Attestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBeaconChain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBeaconChain - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipBeaconChain(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthBeaconChain - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthBeaconChain - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBeaconChain - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipBeaconChain(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthBeaconChain - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthBeaconChain = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBeaconChain = fmt.Errorf("proto: integer overflow") -) diff --git a/proto/eth/v1alpha1/beacon_chain.proto b/proto/eth/v1alpha1/beacon_chain.proto deleted file mode 100644 index b0cb65e4c..000000000 --- a/proto/eth/v1alpha1/beacon_chain.proto +++ /dev/null @@ -1,534 +0,0 @@ -syntax = "proto3"; - -package ethereum.eth.v1alpha1; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; - -import "proto/eth/v1alpha1/attestation.proto"; -import "proto/eth/v1alpha1/beacon_block.proto"; -import "proto/eth/v1alpha1/validator.proto"; - -option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth"; - -// Beacon chain API -// -// The beacon chain API can be used to access data relevant to the Ethereum 2.0 -// phase 0 beacon chain. -service BeaconChain { - // TODO(preston): Batch requests? - - // Retrieve attestations by block root, slot, or epoch. - // Attestations are sorted by slot by default. - // - // The server may return an empty list when no attestations match the given - // filter criteria. This RPC should not return NOT_FOUND. Only one filter - // criteria should be used. - rpc ListAttestations(ListAttestationsRequest) returns (ListAttestationsResponse) { - option (google.api.http) = { - get: "/eth/v1alpha1/beacon/attestations" - }; - } - - // Retrieve attestations from pool. - // - // The server returns a list of attestations that have been seen but not - // yet processed. Pool attestations eventually expire as the slot - // advances, so an attestation missing from this request does not imply - // that it was included in a block. The attestation may have expired. - // Refer to the ethereum 2.0 specification for more details on how - // attestations are processed and when they are no longer valid. - // https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#attestations - rpc AttestationPool(google.protobuf.Empty) returns (AttestationPoolResponse) { - option (google.api.http) = { - get: "/eth/v1alpha1/beacon/attestations/pool" - }; - } - - // 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. - rpc ListBlocks(ListBlocksRequest) returns (ListBlocksResponse) { - option (google.api.http) = { - get: "/eth/v1alpha1/beacon/blocks" - }; - } - - // Retrieve information about the head of the beacon chain from the view of - // the beacon chain node. - // - // This includes the head block slot and root as well as information about - // the most recent finalized and justified slots. - rpc GetChainHead(google.protobuf.Empty) returns (ChainHead) { - option (google.api.http) = { - get: "/eth/v1alpha1/beacon/chainhead" - }; - } - - // Retrieve the beacon chain committees for a given epoch. - // - // If no filter criteria is specified, the response returns - // all beacon committees for the current epoch. The results are paginated by default. - rpc ListBeaconCommittees(ListCommitteesRequest) returns (BeaconCommittees) { - option (google.api.http) = { - get: "/eth/v1alpha1/beacon/committees" - }; - } - - // Retrieve validator balances for a given set of public keys at a specific - // epoch in time. - rpc ListValidatorBalances(ListValidatorBalancesRequest) returns (ValidatorBalances) { - option (google.api.http) = { - get: "/eth/v1alpha1/validators/balances" - }; - } - - // Retrieve the current validator registry. - // - // The request may include an optional historical epoch to retrieve a - // specific validator set in time. It can also specify fetching - // only active validators. - rpc ListValidators(ListValidatorsRequest) returns (Validators) { - option (google.api.http) = { - get: "/eth/v1alpha1/validators" - }; - } - - // Retrieve the active set changes for a given epoch. - // - // This data includes any activations, voluntary exits, and involuntary - // ejections. - rpc GetValidatorActiveSetChanges(GetValidatorActiveSetChangesRequest) returns (ActiveSetChanges) { - option (google.api.http) = { - get: "/eth/v1alpha1/validators/activesetchanges" - }; - } - - // Retrieve the current validator queue information. - rpc GetValidatorQueue(google.protobuf.Empty) returns (ValidatorQueue) { - option (google.api.http) = { - get: "/eth/v1alpha1/validators/queue" - }; - } - - // Retrieve the validator assignments for a given epoch. - // - // This request may specify optional validator indices or public keys to - // filter validator assignments. - rpc ListValidatorAssignments(ListValidatorAssignmentsRequest) returns (ValidatorAssignments) { - option (google.api.http) = { - get: "/eth/v1alpha1/validators/assignments" - }; - } - - // Retrieve the validator participation information for a given epoch. - // - // This method returns information about the global participation of - // validator attestations. - rpc GetValidatorParticipation(GetValidatorParticipationRequest) returns (ValidatorParticipationResponse) { - option (google.api.http) = { - get: "/eth/v1alpha1/validators/participation" - }; - } -} - -// Request for attestations. -message ListAttestationsRequest { - // TODO(preston): Test oneof with gRPC gateway. - - oneof query_filter { - // Filter attestations by a specific block root. - bytes head_block_root = 1; - - // Filter attestations by source epoch. - uint64 source_epoch = 2; - - // Filter attestations by target root. - bytes source_root = 3; - - // Filter attestations by target epoch. - uint64 target_epoch = 4; - - // Filter attestations by target root. - bytes target_root = 5; - } - - // The maximum number of Attestations to return in the response. - // This field is optional. - int32 page_size = 6; - - // A pagination token returned from a previous call to `ListAttestations` - // that indicates where this listing should continue from. - // This field is optional. - string page_token = 7; -} - -message ListAttestationsResponse { - repeated Attestation attestations = 1; - - // A pagination token returned from a previous call to `ListAttestations` - // that indicates from where listing should continue. - // This field is optional. - string next_page_token = 2; - - // Total count of Attestations matching the request filter. - int32 total_size = 3; -} - -message ListBlocksRequest { - oneof query_filter { - // Block root filter to return a single block. - bytes root = 1; - - // Slot to lookup a block. If the slot is not yet finalized, this - // criteria may yield multiple valid blocks if the node has seen blocks - // from another fork. - uint64 slot = 2; - - // Epoch to lookup blocks. This method may return multiple blocks for a - // slot if the epoch has not been finalized and the node has seen blocks - // from another fork. - uint64 epoch = 3; - } - - // Optional criteria to include any non-canonical blocks matching the - // request. - bool include_noncanonical = 4; - - // The maximum number of Blocks to return in the response. - // This field is optional. - int32 page_size = 5; - - // A pagination token returned from a previous call to `ListBlocks` - // that indicates where this listing should continue from. - // This field is optional. - string page_token = 6; -} - -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 { - BeaconBlock block = 1; - // 32 byte merkle tree root of contained beacon block. - bytes block_root = 2; -} - -message ChainHead { - // 32 byte merkle tree root of the canonical head block in the beacon node. - bytes head_block_root = 1 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // Slot of the head block. - uint64 head_block_slot = 2; - - // Epoch of the head block. - uint64 head_block_epoch = 3; - - // Most recent slot that contains the finalized block. - uint64 finalized_block_slot = 4; - - // Epoch of the finalized block. - uint64 finalized_epoch = 5; - - // Most recent 32 byte finalized block root. - bytes finalized_block_root = 6 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // Most recent slot that contains the justified block. - uint64 justified_block_slot = 7; - - // Epoch of the justified block. - uint64 justified_epoch = 8; - - // Most recent 32 byte justified block root. - bytes justified_block_root = 9 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // Most recent slot that contains the previous justified block. - uint64 previous_justified_slot = 10; - - // Epoch of the previous justified block. - uint64 previous_justified_epoch = 11; - - // Previous 32 byte justified block root. - bytes previous_justified_block_root = 12 [(gogoproto.moretags) = "ssz-size:\"32\""]; -} - -message ListCommitteesRequest { - oneof query_filter { - // Optional criteria to retrieve data at a specific epoch. - uint64 epoch = 1; - - // Optional criteria to retrieve genesis data. - bool genesis = 2; - } - - // The maximum number of results to return in the response. - // This field is optional. - int32 page_size = 3; - - // A pagination token returned from a previous call - // that indicates where this listing should continue from. - // This field is optional. - string page_token = 4; -} - -message BeaconCommittees { - message CommitteeItem { - // A committee of validator indices that need to attest to beacon blocks. - repeated uint64 committee = 1; - - // The slot at which the committee is assigned to. - uint64 slot = 2; - } - // The epoch for which the committees in the response belong to. - uint64 epoch = 1; - - // A list of committees of validators for given epoch. - repeated CommitteeItem committees = 2; - - // The number of active validators at the given epoch. - uint64 active_validator_count = 3; - - // A pagination token returned from a previous call - // that indicates from where the listing should continue. - string next_page_token = 4; - - // Total count of committees matching the request filter. - int32 total_size = 5; -} - -message ListValidatorBalancesRequest { - oneof query_filter { - // Optional criteria to retrieve balances at a specific epoch. - uint64 epoch = 1; - - // Optional criteria to retrieve the genesis list of balances. - bool genesis = 2; - } - // Validator 48 byte BLS public keys to filter validators for the given - // epoch. - repeated bytes public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; - - // Validator indices to filter for the given epoch. - repeated uint64 indices = 4; - - // The maximum number of items to return in the response. - // This field is optional. - int32 page_size = 5; - - // A pagination token returned from a previous call - // that indicates where this listing should continue from. - // This field is optional. - string page_token = 6; -} - -message ValidatorBalances { - // Epoch which the state was considered to determine the validator balances. - uint64 epoch = 1; - - message Balance { - // Validator's 48 byte BLS public key. - bytes public_key = 1 [(gogoproto.moretags) = "ssz-size:\"48\""]; - - // Validator's index in the validator set. - uint64 index = 2; - - // Validator's balance in gwei. - uint64 balance = 3; - } - - repeated Balance balances = 2; - - // A pagination token returned from a previous call - // that indicates from where listing should continue. - string next_page_token = 3; - - // Total count of results matching the request filter. - int32 total_size = 4; -} - -message ListValidatorsRequest { - oneof query_filter { - // Optional criteria to retrieve validators at a specific epoch. - // Omitting this field or setting it to zero will retrieve a response - // with the current active validator set. - uint64 epoch = 1; - - // Optional criteria to retrieve the genesis set of validators. - bool genesis = 2; - } - - // Specify whether or not you want to retrieve only active validators. - bool active = 3; - - // The maximum number of results to return in the response. - // This field is optional. - int32 page_size = 4; - - // A pagination token returned from a previous call - // that indicates where this listing should continue from. - // This field is optional. - string page_token = 5; -} - -message Validators { - // Epoch which the state was considered to determine the active validator - // set. This field is not optional. Zero value epoch indicates the validator - // set is from the Ethereum 2.0 genesis set. - uint64 epoch = 1; - - repeated Validator validators = 2; - - // A pagination token returned from a previous call - // that indicates from where listing should continue. - // This field is optional. - string next_page_token = 3; - - // Total count of Validators matching the request filter. - int32 total_size = 4; -} - - -message GetValidatorActiveSetChangesRequest { - oneof query_filter { - // Optional criteria to retrieve balances at a specific epoch. - uint64 epoch = 1; - - // Optional criteria to retrieve the genesis list of balances. - bool genesis = 2; - } -} - -message ActiveSetChanges { - // Epoch which the state was considered to determine the active validator - // set. - uint64 epoch = 1; - - // 48 byte validator public keys that have been activated in this epoch. - repeated bytes activated_public_keys = 2 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; - - // 48 byte validator public keys that have been voluntarily exited in this epoch. - repeated bytes exited_public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; - - // 48 byte validator public keys that have been slashed in this epoch. - repeated bytes slashed_public_keys = 4 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; - - // 48 byte validator public keys that have been involuntarily ejected in this epoch. - repeated bytes ejected_public_keys = 5 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; -} - -message ValidatorQueue { - // The amount of ether in gwei allowed to enter or exit the active - // validator set. - uint64 churn_limit = 1; - - // Ordered list of 48 byte public keys awaiting activation. 0th index is the - // next key to be processed. - repeated bytes activation_public_keys = 2 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; - - // Ordered list of public keys awaiting exit. 0th index is the next key to - // be processed. - repeated bytes exit_public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; -} - -message ListValidatorAssignmentsRequest { - oneof query_filter { - // Epoch to validator assignments for. - uint64 epoch = 1; - - // Whether or not to query for the genesis information. - bool genesis = 2; - } - // 48 byte validator public keys to filter assignments for the given epoch. - repeated bytes public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; - - // Validator indicies to filter assignments for the given epoch. - repeated uint64 indices = 4; - - // The maximum number of results to return in the response. - // This field is optional. - int32 page_size = 5; - - // A pagination token returned from a previous call - // that indicates where this listing should continue from. - // This field is optional. - string page_token = 6; -} - -message ValidatorAssignments { - message CommitteeAssignment { - // Beacon committees is responsible for crosslinking committee data back to the beacon chain, - // they also attest and produce beacon chain blocks. This is a list of validator indices that - // are in the same committee as requested validator, everyone in the committee is assigned to the - // same slot and same committee. - repeated uint64 beacon_committees = 1; - - // The committee index of which the validator must perform the attestation - // or block proposal. - uint64 committee_index = 2; - - // Beacon chain slot in which the validator must perform its assigned - // duty as an attester. - uint64 attester_slot = 3; - - // Beacon chain slot in which the validator must perform its assigned - // duty as an attester. - uint64 proposer_slot = 4; - - // 48 byte BLS public key - bytes public_key = 5 [(gogoproto.moretags) = "ssz-size:\"48\""]; - } - - // The epoch for which this set of validator assignments is valid. - uint64 epoch = 1; - - repeated CommitteeAssignment assignments = 2; - - // A pagination token returned from a previous call - // that indicates where this listing should continue from. - // This field is optional. - string next_page_token = 3; - - // Total count of results matching the request filter. - int32 total_size = 4; -} - -message GetValidatorParticipationRequest { - oneof query_filter { - // Epoch to request participation information. - uint64 epoch = 1; - - // Whether or not to query for the genesis information. - bool genesis = 2; - } -} - -message ValidatorParticipationResponse { - // Epoch which this message is applicable. - uint64 epoch = 1; - - // Whether or not epoch has been finalized. - bool finalized = 2; - - // The actual participation metrics. - ValidatorParticipation participation = 3; -} - -message AttestationPoolResponse { - repeated Attestation attestations = 1; -} - diff --git a/proto/eth/v1alpha1/node.pb.go b/proto/eth/v1alpha1/node.pb.go deleted file mode 100755 index 647805e30..000000000 --- a/proto/eth/v1alpha1/node.pb.go +++ /dev/null @@ -1,1189 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/eth/v1alpha1/node.proto - -package eth - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type SyncStatus struct { - Syncing bool `protobuf:"varint,1,opt,name=syncing,proto3" json:"syncing,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SyncStatus) Reset() { *m = SyncStatus{} } -func (m *SyncStatus) String() string { return proto.CompactTextString(m) } -func (*SyncStatus) ProtoMessage() {} -func (*SyncStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_98054421e2cad574, []int{0} -} -func (m *SyncStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SyncStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SyncStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SyncStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncStatus.Merge(m, src) -} -func (m *SyncStatus) XXX_Size() int { - return m.Size() -} -func (m *SyncStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SyncStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_SyncStatus proto.InternalMessageInfo - -func (m *SyncStatus) GetSyncing() bool { - if m != nil { - return m.Syncing - } - return false -} - -type Genesis struct { - GenesisTime *types.Timestamp `protobuf:"bytes,1,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - DepositContractAddress []byte `protobuf:"bytes,2,opt,name=deposit_contract_address,json=depositContractAddress,proto3" json:"deposit_contract_address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Genesis) Reset() { *m = Genesis{} } -func (m *Genesis) String() string { return proto.CompactTextString(m) } -func (*Genesis) ProtoMessage() {} -func (*Genesis) Descriptor() ([]byte, []int) { - return fileDescriptor_98054421e2cad574, []int{1} -} -func (m *Genesis) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Genesis) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Genesis.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Genesis) XXX_Merge(src proto.Message) { - xxx_messageInfo_Genesis.Merge(m, src) -} -func (m *Genesis) XXX_Size() int { - return m.Size() -} -func (m *Genesis) XXX_DiscardUnknown() { - xxx_messageInfo_Genesis.DiscardUnknown(m) -} - -var xxx_messageInfo_Genesis proto.InternalMessageInfo - -func (m *Genesis) GetGenesisTime() *types.Timestamp { - if m != nil { - return m.GenesisTime - } - return nil -} - -func (m *Genesis) GetDepositContractAddress() []byte { - if m != nil { - return m.DepositContractAddress - } - return nil -} - -type Version struct { - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Metadata string `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { - return fileDescriptor_98054421e2cad574, []int{2} -} -func (m *Version) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Version.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Version) XXX_Merge(src proto.Message) { - xxx_messageInfo_Version.Merge(m, src) -} -func (m *Version) XXX_Size() int { - return m.Size() -} -func (m *Version) XXX_DiscardUnknown() { - xxx_messageInfo_Version.DiscardUnknown(m) -} - -var xxx_messageInfo_Version proto.InternalMessageInfo - -func (m *Version) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *Version) GetMetadata() string { - if m != nil { - return m.Metadata - } - return "" -} - -type ImplementedServices struct { - Services []string `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ImplementedServices) Reset() { *m = ImplementedServices{} } -func (m *ImplementedServices) String() string { return proto.CompactTextString(m) } -func (*ImplementedServices) ProtoMessage() {} -func (*ImplementedServices) Descriptor() ([]byte, []int) { - return fileDescriptor_98054421e2cad574, []int{3} -} -func (m *ImplementedServices) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImplementedServices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImplementedServices.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ImplementedServices) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImplementedServices.Merge(m, src) -} -func (m *ImplementedServices) XXX_Size() int { - return m.Size() -} -func (m *ImplementedServices) XXX_DiscardUnknown() { - xxx_messageInfo_ImplementedServices.DiscardUnknown(m) -} - -var xxx_messageInfo_ImplementedServices proto.InternalMessageInfo - -func (m *ImplementedServices) GetServices() []string { - if m != nil { - return m.Services - } - return nil -} - -func init() { - proto.RegisterType((*SyncStatus)(nil), "ethereum.eth.v1alpha1.SyncStatus") - proto.RegisterType((*Genesis)(nil), "ethereum.eth.v1alpha1.Genesis") - proto.RegisterType((*Version)(nil), "ethereum.eth.v1alpha1.Version") - proto.RegisterType((*ImplementedServices)(nil), "ethereum.eth.v1alpha1.ImplementedServices") -} - -func init() { proto.RegisterFile("proto/eth/v1alpha1/node.proto", fileDescriptor_98054421e2cad574) } - -var fileDescriptor_98054421e2cad574 = []byte{ - // 462 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x41, 0x8b, 0x13, 0x31, - 0x14, 0xc7, 0xc9, 0xae, 0xd8, 0xdd, 0xec, 0x7a, 0x89, 0xb8, 0x0e, 0xb3, 0xbb, 0xb5, 0x8e, 0x20, - 0x8b, 0x87, 0x84, 0xae, 0x08, 0x82, 0x88, 0xe8, 0x22, 0x45, 0x10, 0x0f, 0x53, 0xf1, 0xe0, 0xa5, - 0xa4, 0x33, 0xcf, 0x99, 0x40, 0x93, 0x0c, 0x93, 0xd7, 0x42, 0xaf, 0xfd, 0x0a, 0x7e, 0x29, 0x6f, - 0x0a, 0x7e, 0x01, 0x29, 0x7e, 0x10, 0x99, 0x99, 0x44, 0xc5, 0xb6, 0x0b, 0xde, 0xf2, 0xf2, 0x7f, - 0xff, 0xf7, 0x4b, 0xff, 0xaf, 0x43, 0xcf, 0xab, 0xda, 0xa2, 0x15, 0x80, 0xa5, 0x58, 0x0c, 0xe5, - 0xac, 0x2a, 0xe5, 0x50, 0x18, 0x9b, 0x03, 0x6f, 0xef, 0xd9, 0x1d, 0xc0, 0x12, 0x6a, 0x98, 0x6b, - 0x0e, 0x58, 0xf2, 0xd0, 0x11, 0x9f, 0x15, 0xd6, 0x16, 0x33, 0x10, 0xb2, 0x52, 0x42, 0x1a, 0x63, - 0x51, 0xa2, 0xb2, 0xc6, 0x75, 0xa6, 0xf8, 0xd4, 0xab, 0x6d, 0x35, 0x9d, 0x7f, 0x12, 0xa0, 0x2b, - 0x5c, 0x7a, 0xf1, 0xde, 0xbf, 0x22, 0x2a, 0x0d, 0x0e, 0xa5, 0xae, 0xba, 0x86, 0xe4, 0x21, 0xa5, - 0xe3, 0xa5, 0xc9, 0xc6, 0x28, 0x71, 0xee, 0x58, 0x44, 0x7b, 0x6e, 0x69, 0x32, 0x65, 0x8a, 0x88, - 0x0c, 0xc8, 0xc5, 0x41, 0x1a, 0xca, 0x64, 0x45, 0x68, 0x6f, 0x04, 0x06, 0x9c, 0x72, 0xec, 0x39, - 0x3d, 0x2e, 0xba, 0xe3, 0xa4, 0x19, 0xd7, 0xb6, 0x1e, 0x5d, 0xc6, 0xbc, 0x63, 0xf1, 0xc0, 0xe2, - 0xef, 0x03, 0x2b, 0x3d, 0xf2, 0xfd, 0xcd, 0x0d, 0x7b, 0x4a, 0xa3, 0x1c, 0x2a, 0xeb, 0x14, 0x4e, - 0x32, 0x6b, 0xb0, 0x96, 0x19, 0x4e, 0x64, 0x9e, 0xd7, 0xe0, 0x5c, 0xb4, 0x37, 0x20, 0x17, 0xc7, - 0xe9, 0x89, 0xd7, 0xaf, 0xbc, 0xfc, 0xb2, 0x53, 0x93, 0x17, 0xb4, 0xf7, 0x01, 0x6a, 0xa7, 0xac, - 0x69, 0x5e, 0xba, 0xe8, 0x8e, 0x2d, 0xfe, 0x30, 0x0d, 0x25, 0x8b, 0xe9, 0x81, 0x06, 0x94, 0xb9, - 0x44, 0xd9, 0x8e, 0x3b, 0x4c, 0x7f, 0xd7, 0xc9, 0x90, 0xde, 0x7e, 0xa3, 0xab, 0x19, 0x68, 0x30, - 0x08, 0xf9, 0x18, 0xea, 0x85, 0xca, 0xc0, 0x35, 0x16, 0xe7, 0xcf, 0x11, 0x19, 0xec, 0x37, 0x96, - 0x50, 0x5f, 0x7e, 0xdd, 0xa7, 0x37, 0xde, 0xd9, 0x1c, 0x98, 0xa1, 0xb7, 0x46, 0x80, 0x7f, 0x85, - 0x75, 0xb2, 0xf1, 0x83, 0x5f, 0x37, 0xc9, 0xc7, 0xf7, 0xf9, 0xd6, 0x35, 0xf2, 0x3f, 0xd6, 0x24, - 0x59, 0x7d, 0xff, 0xf9, 0x79, 0xef, 0x8c, 0xc5, 0x9b, 0x7f, 0x05, 0xe1, 0x13, 0x67, 0x25, 0xa5, - 0x23, 0xc0, 0x90, 0xf9, 0x2e, 0x58, 0x7f, 0x07, 0xcc, 0xfb, 0xae, 0x25, 0xf9, 0xa5, 0x78, 0x52, - 0x48, 0xf6, 0x7f, 0x49, 0xde, 0x77, 0x2d, 0x29, 0xec, 0x66, 0x45, 0xe8, 0xdd, 0xb7, 0xca, 0xe1, - 0xb6, 0x25, 0xec, 0xe2, 0x3e, 0xda, 0xc1, 0xdd, 0x32, 0x23, 0x79, 0xd0, 0xbe, 0xe1, 0x9c, 0x9d, - 0x6e, 0xcb, 0xd5, 0x37, 0xbd, 0xba, 0xfa, 0xb2, 0xee, 0x93, 0x6f, 0xeb, 0x3e, 0xf9, 0xb1, 0xee, - 0x93, 0x8f, 0x4f, 0x0a, 0x85, 0xe5, 0x7c, 0xca, 0x33, 0xab, 0x45, 0x55, 0x2f, 0x9d, 0x96, 0xa8, - 0xb2, 0x99, 0x9c, 0xba, 0xae, 0x12, 0x9b, 0x5f, 0xec, 0x33, 0xc0, 0x72, 0x7a, 0xb3, 0xbd, 0x7f, - 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x53, 0xd1, 0xfd, 0x57, 0xd2, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// NodeClient is the client API for Node service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NodeClient interface { - GetSyncStatus(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SyncStatus, error) - GetGenesis(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Genesis, error) - GetVersion(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Version, error) - ListImplementedServices(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ImplementedServices, error) -} - -type nodeClient struct { - cc *grpc.ClientConn -} - -func NewNodeClient(cc *grpc.ClientConn) NodeClient { - return &nodeClient{cc} -} - -func (c *nodeClient) GetSyncStatus(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SyncStatus, error) { - out := new(SyncStatus) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.Node/GetSyncStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeClient) GetGenesis(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Genesis, error) { - out := new(Genesis) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.Node/GetGenesis", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeClient) GetVersion(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Version, error) { - out := new(Version) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.Node/GetVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeClient) ListImplementedServices(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ImplementedServices, error) { - out := new(ImplementedServices) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.Node/ListImplementedServices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NodeServer is the server API for Node service. -type NodeServer interface { - GetSyncStatus(context.Context, *types.Empty) (*SyncStatus, error) - GetGenesis(context.Context, *types.Empty) (*Genesis, error) - GetVersion(context.Context, *types.Empty) (*Version, error) - ListImplementedServices(context.Context, *types.Empty) (*ImplementedServices, error) -} - -func RegisterNodeServer(s *grpc.Server, srv NodeServer) { - s.RegisterService(&_Node_serviceDesc, srv) -} - -func _Node_GetSyncStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServer).GetSyncStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.Node/GetSyncStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).GetSyncStatus(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Node_GetGenesis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServer).GetGenesis(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.Node/GetGenesis", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).GetGenesis(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Node_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServer).GetVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.Node/GetVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).GetVersion(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Node_ListImplementedServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServer).ListImplementedServices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.Node/ListImplementedServices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServer).ListImplementedServices(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _Node_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ethereum.eth.v1alpha1.Node", - HandlerType: (*NodeServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetSyncStatus", - Handler: _Node_GetSyncStatus_Handler, - }, - { - MethodName: "GetGenesis", - Handler: _Node_GetGenesis_Handler, - }, - { - MethodName: "GetVersion", - Handler: _Node_GetVersion_Handler, - }, - { - MethodName: "ListImplementedServices", - Handler: _Node_ListImplementedServices_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/eth/v1alpha1/node.proto", -} - -func (m *SyncStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SyncStatus) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Syncing { - dAtA[i] = 0x8 - i++ - if m.Syncing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Genesis) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Genesis) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.GenesisTime != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintNode(dAtA, i, uint64(m.GenesisTime.Size())) - n1, err := m.GenesisTime.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.DepositContractAddress) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintNode(dAtA, i, uint64(len(m.DepositContractAddress))) - i += copy(dAtA[i:], m.DepositContractAddress) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Version) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Version) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Version) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNode(dAtA, i, uint64(len(m.Version))) - i += copy(dAtA[i:], m.Version) - } - if len(m.Metadata) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintNode(dAtA, i, uint64(len(m.Metadata))) - i += copy(dAtA[i:], m.Metadata) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ImplementedServices) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImplementedServices) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Services) > 0 { - for _, s := range m.Services { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintNode(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *SyncStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Syncing { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Genesis) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GenesisTime != nil { - l = m.GenesisTime.Size() - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.DepositContractAddress) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Version) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovNode(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ImplementedServices) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Services) > 0 { - for _, s := range m.Services { - l = len(s) - n += 1 + l + sovNode(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovNode(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozNode(x uint64) (n int) { - return sovNode(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SyncStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SyncStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SyncStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Syncing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Syncing = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Genesis) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Genesis: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Genesis: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GenesisTime == nil { - m.GenesisTime = &types.Timestamp{} - } - if err := m.GenesisTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositContractAddress = append(m.DepositContractAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DepositContractAddress == nil { - m.DepositContractAddress = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Version) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Version: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImplementedServices) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImplementedServices: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImplementedServices: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Services = append(m.Services, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipNode(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthNode - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthNode - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipNode(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthNode - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNode = fmt.Errorf("proto: integer overflow") -) diff --git a/proto/eth/v1alpha1/node.proto b/proto/eth/v1alpha1/node.proto deleted file mode 100644 index 017e28591..000000000 --- a/proto/eth/v1alpha1/node.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; - -package ethereum.eth.v1alpha1; - -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth"; - -// Node service API -// -// Node service provides general information about the node itself, the services -// it supports, chain information and node version. -service Node { - // Retrieve the current network sync status of the node. - rpc GetSyncStatus(google.protobuf.Empty) returns (SyncStatus) { - option (google.api.http) = { - get: "/eth/v1alpha1/node/syncing" - }; - } - - // Retrieve information about the genesis of Ethereum 2.0. - rpc GetGenesis(google.protobuf.Empty) returns (Genesis) { - option (google.api.http) = { - get: "/eth/v1alpha1/node/genesis" - }; - } - - // Retrieve information about the running Ethereum 2.0 node. - rpc GetVersion(google.protobuf.Empty) returns (Version) { - option (google.api.http) = { - get: "/eth/v1alpha1/node/version" - }; - } - - // Retrieve the list of services implemented and enabled by this node. - // - // Any service not present in this list may return UNIMPLEMENTED or - // PERMISSION_DENIED. The server may also support fetching services by grpc - // reflection. - rpc ListImplementedServices(google.protobuf.Empty) returns (ImplementedServices) { - option (google.api.http) = { - get: "/eth/v1alpha1/node/services" - }; - } -} - -// Information about the current network sync status of the node. -message SyncStatus { - // Whether or not the node is currently syncing. - bool syncing = 1; -} - -// Information about the genesis of Ethereum 2.0. -message Genesis { - // UTC time specified in the chain start event in the deposit contract. - google.protobuf.Timestamp genesis_time = 1; - - // Address of the deposit contract in the Ethereum 1 chain. - bytes deposit_contract_address = 2; -} - -// Information about the node version. -message Version { - // A string that uniquely identifies the node and its version. - string version = 1; - - // Additional metadata that the node would like to provide. This field may - // be used to list any meaningful data to the client. - string metadata = 2; -} - -message ImplementedServices { - repeated string services = 1; -} \ No newline at end of file diff --git a/proto/eth/v1alpha1/slasher.pb.go b/proto/eth/v1alpha1/slasher.pb.go deleted file mode 100755 index d185fe887..000000000 --- a/proto/eth/v1alpha1/slasher.pb.go +++ /dev/null @@ -1,2042 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/eth/v1alpha1/slasher.proto - -package eth - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type ValidatorIDToIdxAtt struct { - Indices []uint64 `protobuf:"varint,1,rep,packed,name=indices,proto3" json:"indices,omitempty"` - DataRoot []byte `protobuf:"bytes,2,opt,name=data_root,json=dataRoot,proto3" json:"data_root,omitempty"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorIDToIdxAtt) Reset() { *m = ValidatorIDToIdxAtt{} } -func (m *ValidatorIDToIdxAtt) String() string { return proto.CompactTextString(m) } -func (*ValidatorIDToIdxAtt) ProtoMessage() {} -func (*ValidatorIDToIdxAtt) Descriptor() ([]byte, []int) { - return fileDescriptor_c3db2cc39857595b, []int{0} -} -func (m *ValidatorIDToIdxAtt) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorIDToIdxAtt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorIDToIdxAtt.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorIDToIdxAtt) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorIDToIdxAtt.Merge(m, src) -} -func (m *ValidatorIDToIdxAtt) XXX_Size() int { - return m.Size() -} -func (m *ValidatorIDToIdxAtt) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorIDToIdxAtt.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorIDToIdxAtt proto.InternalMessageInfo - -func (m *ValidatorIDToIdxAtt) GetIndices() []uint64 { - if m != nil { - return m.Indices - } - return nil -} - -func (m *ValidatorIDToIdxAtt) GetDataRoot() []byte { - if m != nil { - return m.DataRoot - } - return nil -} - -func (m *ValidatorIDToIdxAtt) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type ValidatorIDToIdxAttList struct { - IndicesList []*ValidatorIDToIdxAtt `protobuf:"bytes,1,rep,name=indicesList,proto3" json:"indicesList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorIDToIdxAttList) Reset() { *m = ValidatorIDToIdxAttList{} } -func (m *ValidatorIDToIdxAttList) String() string { return proto.CompactTextString(m) } -func (*ValidatorIDToIdxAttList) ProtoMessage() {} -func (*ValidatorIDToIdxAttList) Descriptor() ([]byte, []int) { - return fileDescriptor_c3db2cc39857595b, []int{1} -} -func (m *ValidatorIDToIdxAttList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorIDToIdxAttList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorIDToIdxAttList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorIDToIdxAttList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorIDToIdxAttList.Merge(m, src) -} -func (m *ValidatorIDToIdxAttList) XXX_Size() int { - return m.Size() -} -func (m *ValidatorIDToIdxAttList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorIDToIdxAttList.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorIDToIdxAttList proto.InternalMessageInfo - -func (m *ValidatorIDToIdxAttList) GetIndicesList() []*ValidatorIDToIdxAtt { - if m != nil { - return m.IndicesList - } - return nil -} - -type ProposerSlashingRequest struct { - BlockHeader *BeaconBlockHeader `protobuf:"bytes,1,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"` - ValidatorIndex uint64 `protobuf:"varint,2,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProposerSlashingRequest) Reset() { *m = ProposerSlashingRequest{} } -func (m *ProposerSlashingRequest) String() string { return proto.CompactTextString(m) } -func (*ProposerSlashingRequest) ProtoMessage() {} -func (*ProposerSlashingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c3db2cc39857595b, []int{2} -} -func (m *ProposerSlashingRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposerSlashingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposerSlashingRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProposerSlashingRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposerSlashingRequest.Merge(m, src) -} -func (m *ProposerSlashingRequest) XXX_Size() int { - return m.Size() -} -func (m *ProposerSlashingRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ProposerSlashingRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposerSlashingRequest proto.InternalMessageInfo - -func (m *ProposerSlashingRequest) GetBlockHeader() *BeaconBlockHeader { - if m != nil { - return m.BlockHeader - } - return nil -} - -func (m *ProposerSlashingRequest) GetValidatorIndex() uint64 { - if m != nil { - return m.ValidatorIndex - } - return 0 -} - -type ProposerSlashingResponse struct { - ProposerSlashing []*ProposerSlashing `protobuf:"bytes,1,rep,name=proposer_slashing,json=proposerSlashing,proto3" json:"proposer_slashing,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProposerSlashingResponse) Reset() { *m = ProposerSlashingResponse{} } -func (m *ProposerSlashingResponse) String() string { return proto.CompactTextString(m) } -func (*ProposerSlashingResponse) ProtoMessage() {} -func (*ProposerSlashingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c3db2cc39857595b, []int{3} -} -func (m *ProposerSlashingResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposerSlashingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposerSlashingResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProposerSlashingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposerSlashingResponse.Merge(m, src) -} -func (m *ProposerSlashingResponse) XXX_Size() int { - return m.Size() -} -func (m *ProposerSlashingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ProposerSlashingResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposerSlashingResponse proto.InternalMessageInfo - -func (m *ProposerSlashingResponse) GetProposerSlashing() []*ProposerSlashing { - if m != nil { - return m.ProposerSlashing - } - return nil -} - -type AttesterSlashingResponse struct { - AttesterSlashing []*AttesterSlashing `protobuf:"bytes,1,rep,name=attester_slashing,json=attesterSlashing,proto3" json:"attester_slashing,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttesterSlashingResponse) Reset() { *m = AttesterSlashingResponse{} } -func (m *AttesterSlashingResponse) String() string { return proto.CompactTextString(m) } -func (*AttesterSlashingResponse) ProtoMessage() {} -func (*AttesterSlashingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c3db2cc39857595b, []int{4} -} -func (m *AttesterSlashingResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttesterSlashingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttesterSlashingResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AttesterSlashingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttesterSlashingResponse.Merge(m, src) -} -func (m *AttesterSlashingResponse) XXX_Size() int { - return m.Size() -} -func (m *AttesterSlashingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AttesterSlashingResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AttesterSlashingResponse proto.InternalMessageInfo - -func (m *AttesterSlashingResponse) GetAttesterSlashing() []*AttesterSlashing { - if m != nil { - return m.AttesterSlashing - } - return nil -} - -type MinMaxEpochSpan struct { - MinEpochSpan uint32 `protobuf:"varint,1,opt,name=min_epoch_span,json=minEpochSpan,proto3" json:"min_epoch_span,omitempty"` - MaxEpochSpan uint32 `protobuf:"varint,2,opt,name=max_epoch_span,json=maxEpochSpan,proto3" json:"max_epoch_span,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MinMaxEpochSpan) Reset() { *m = MinMaxEpochSpan{} } -func (m *MinMaxEpochSpan) String() string { return proto.CompactTextString(m) } -func (*MinMaxEpochSpan) ProtoMessage() {} -func (*MinMaxEpochSpan) Descriptor() ([]byte, []int) { - return fileDescriptor_c3db2cc39857595b, []int{5} -} -func (m *MinMaxEpochSpan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MinMaxEpochSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MinMaxEpochSpan.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MinMaxEpochSpan) XXX_Merge(src proto.Message) { - xxx_messageInfo_MinMaxEpochSpan.Merge(m, src) -} -func (m *MinMaxEpochSpan) XXX_Size() int { - return m.Size() -} -func (m *MinMaxEpochSpan) XXX_DiscardUnknown() { - xxx_messageInfo_MinMaxEpochSpan.DiscardUnknown(m) -} - -var xxx_messageInfo_MinMaxEpochSpan proto.InternalMessageInfo - -func (m *MinMaxEpochSpan) GetMinEpochSpan() uint32 { - if m != nil { - return m.MinEpochSpan - } - return 0 -} - -func (m *MinMaxEpochSpan) GetMaxEpochSpan() uint32 { - if m != nil { - return m.MaxEpochSpan - } - return 0 -} - -type EpochSpanMap struct { - EpochSpanMap map[uint64]*MinMaxEpochSpan `protobuf:"bytes,1,rep,name=epoch_span_map,json=epochSpanMap,proto3" json:"epoch_span_map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EpochSpanMap) Reset() { *m = EpochSpanMap{} } -func (m *EpochSpanMap) String() string { return proto.CompactTextString(m) } -func (*EpochSpanMap) ProtoMessage() {} -func (*EpochSpanMap) Descriptor() ([]byte, []int) { - return fileDescriptor_c3db2cc39857595b, []int{6} -} -func (m *EpochSpanMap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EpochSpanMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EpochSpanMap.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EpochSpanMap) XXX_Merge(src proto.Message) { - xxx_messageInfo_EpochSpanMap.Merge(m, src) -} -func (m *EpochSpanMap) XXX_Size() int { - return m.Size() -} -func (m *EpochSpanMap) XXX_DiscardUnknown() { - xxx_messageInfo_EpochSpanMap.DiscardUnknown(m) -} - -var xxx_messageInfo_EpochSpanMap proto.InternalMessageInfo - -func (m *EpochSpanMap) GetEpochSpanMap() map[uint64]*MinMaxEpochSpan { - if m != nil { - return m.EpochSpanMap - } - return nil -} - -func init() { - proto.RegisterType((*ValidatorIDToIdxAtt)(nil), "ethereum.eth.v1alpha1.ValidatorIDToIdxAtt") - proto.RegisterType((*ValidatorIDToIdxAttList)(nil), "ethereum.eth.v1alpha1.ValidatorIDToIdxAttList") - proto.RegisterType((*ProposerSlashingRequest)(nil), "ethereum.eth.v1alpha1.ProposerSlashingRequest") - proto.RegisterType((*ProposerSlashingResponse)(nil), "ethereum.eth.v1alpha1.ProposerSlashingResponse") - proto.RegisterType((*AttesterSlashingResponse)(nil), "ethereum.eth.v1alpha1.AttesterSlashingResponse") - proto.RegisterType((*MinMaxEpochSpan)(nil), "ethereum.eth.v1alpha1.MinMaxEpochSpan") - proto.RegisterType((*EpochSpanMap)(nil), "ethereum.eth.v1alpha1.EpochSpanMap") - proto.RegisterMapType((map[uint64]*MinMaxEpochSpan)(nil), "ethereum.eth.v1alpha1.EpochSpanMap.EpochSpanMapEntry") -} - -func init() { proto.RegisterFile("proto/eth/v1alpha1/slasher.proto", fileDescriptor_c3db2cc39857595b) } - -var fileDescriptor_c3db2cc39857595b = []byte{ - // 631 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xd1, 0x6e, 0xd3, 0x30, - 0x14, 0x95, 0xd7, 0xc1, 0x98, 0x5b, 0xb6, 0xce, 0x68, 0x5b, 0xd5, 0xa1, 0xa9, 0xaa, 0x80, 0x15, - 0x1e, 0x92, 0xad, 0x68, 0x12, 0x02, 0x5e, 0x36, 0x98, 0x44, 0xc5, 0x26, 0xa1, 0x6c, 0x02, 0x69, - 0x08, 0x45, 0x4e, 0x73, 0x49, 0xcc, 0x12, 0xdb, 0xc4, 0xee, 0xd4, 0x7e, 0x05, 0xdf, 0xc1, 0x9f, - 0xf0, 0xc8, 0x03, 0x1f, 0x80, 0xf6, 0x25, 0x28, 0x4e, 0xba, 0x65, 0x6d, 0x23, 0x95, 0xb7, 0xdc, - 0x73, 0xcf, 0xbd, 0xc7, 0xf7, 0xe4, 0xda, 0xb8, 0x25, 0x13, 0xa1, 0x85, 0x0d, 0x3a, 0xb4, 0x2f, - 0xf7, 0x68, 0x24, 0x43, 0xba, 0x67, 0xab, 0x88, 0xaa, 0x10, 0x12, 0xcb, 0xa4, 0xc8, 0x3a, 0xe8, - 0x10, 0x12, 0x18, 0xc4, 0x16, 0xe8, 0xd0, 0x1a, 0x93, 0x9a, 0x5b, 0x81, 0x10, 0x41, 0x04, 0xb6, - 0x21, 0x79, 0x83, 0xaf, 0x36, 0xc4, 0x52, 0x8f, 0xb2, 0x9a, 0xe6, 0xe3, 0x19, 0x5d, 0x3d, 0xa0, - 0x7d, 0xc1, 0x5d, 0x2f, 0x12, 0xfd, 0x8b, 0x8c, 0xd6, 0xfe, 0x86, 0x1f, 0x7c, 0xa4, 0x11, 0xf3, - 0xa9, 0x16, 0x49, 0xef, 0xed, 0x99, 0xe8, 0xf9, 0xc3, 0x03, 0xad, 0x49, 0x03, 0x2f, 0x31, 0xee, - 0xb3, 0x3e, 0xa8, 0x06, 0x6a, 0x55, 0x3a, 0x8b, 0xce, 0x38, 0x24, 0x5b, 0x78, 0xd9, 0xa7, 0x9a, - 0xba, 0x89, 0x10, 0xba, 0xb1, 0xd0, 0x42, 0x9d, 0x9a, 0x73, 0x2f, 0x05, 0x1c, 0x21, 0x34, 0x79, - 0x88, 0x97, 0x15, 0x0b, 0x38, 0xd5, 0x83, 0x04, 0x1a, 0x15, 0x93, 0xbc, 0x01, 0xda, 0x01, 0xde, - 0x9c, 0xa1, 0x75, 0xcc, 0x94, 0x26, 0xc7, 0xb8, 0x9a, 0x0b, 0xa4, 0xa1, 0xd1, 0xac, 0x76, 0x9f, - 0x59, 0x33, 0xe7, 0xb6, 0x66, 0x34, 0x71, 0x8a, 0xe5, 0xed, 0x1f, 0x08, 0x6f, 0x7e, 0x48, 0x84, - 0x14, 0x0a, 0x92, 0xd3, 0xd4, 0x49, 0xc6, 0x03, 0x07, 0xbe, 0x0f, 0x40, 0x69, 0xf2, 0x1e, 0xd7, - 0xcc, 0xfc, 0x6e, 0x08, 0xd4, 0x87, 0xa4, 0x81, 0x5a, 0xa8, 0x53, 0xed, 0x76, 0x4a, 0xa4, 0x0e, - 0x8d, 0x63, 0x87, 0x69, 0xc1, 0x3b, 0xc3, 0x77, 0xaa, 0xde, 0x4d, 0x40, 0x76, 0xf0, 0xea, 0xe5, - 0xf8, 0x30, 0x2e, 0xe3, 0x3e, 0x0c, 0x8d, 0x25, 0x8b, 0xce, 0xca, 0x35, 0xdc, 0x4b, 0xd1, 0xb6, - 0xc4, 0x8d, 0xe9, 0x03, 0x29, 0x29, 0xb8, 0x02, 0x72, 0x86, 0xd7, 0x64, 0x9e, 0x73, 0x55, 0x9e, - 0xcc, 0x1d, 0xd8, 0x29, 0x39, 0xd6, 0x54, 0xaf, 0xba, 0x9c, 0x40, 0x52, 0xc5, 0x03, 0xad, 0x41, - 0xe9, 0xd9, 0x8a, 0x34, 0xcf, 0xcd, 0xab, 0x38, 0xd5, 0xab, 0x4e, 0x27, 0x90, 0xf6, 0x17, 0xbc, - 0x7a, 0xc2, 0xf8, 0x09, 0x1d, 0x1e, 0x49, 0xd1, 0x0f, 0x4f, 0x25, 0xe5, 0xe4, 0x11, 0x5e, 0x89, - 0x19, 0x77, 0x21, 0x05, 0x5c, 0x25, 0x29, 0x37, 0x76, 0xdf, 0x77, 0x6a, 0x31, 0xe3, 0xb7, 0x59, - 0x74, 0x58, 0x64, 0x2d, 0xe4, 0xac, 0x42, 0xaf, 0xf6, 0x1f, 0x84, 0x6b, 0xd7, 0xd1, 0x09, 0x95, - 0xe4, 0x33, 0x5e, 0xb9, 0x29, 0x71, 0x63, 0x2a, 0xf3, 0x11, 0xf6, 0x4b, 0x46, 0x28, 0x16, 0xdf, - 0x0a, 0x8e, 0xb8, 0x4e, 0x46, 0x4e, 0x0d, 0x0a, 0x50, 0x33, 0xc0, 0x6b, 0x53, 0x14, 0x52, 0xc7, - 0x95, 0x0b, 0x18, 0x99, 0x19, 0x16, 0x9d, 0xf4, 0x93, 0xbc, 0xc6, 0x77, 0x2e, 0x69, 0x34, 0x00, - 0x73, 0xe2, 0x6a, 0xf7, 0x49, 0x89, 0xf4, 0x84, 0x2f, 0x4e, 0x56, 0xf4, 0x72, 0xe1, 0x05, 0xea, - 0xfe, 0xac, 0xe0, 0xa5, 0xd3, 0xec, 0xb6, 0x13, 0x8d, 0x37, 0x7a, 0xca, 0x04, 0xd4, 0x8b, 0x20, - 0xb3, 0x9c, 0x6a, 0x26, 0x38, 0x79, 0x5a, 0xd2, 0xd8, 0x6c, 0x17, 0xf8, 0x05, 0x6a, 0xd3, 0x9e, - 0xf7, 0x0f, 0x8e, 0xb7, 0x41, 0xe1, 0x7a, 0x41, 0xd5, 0xec, 0x3a, 0xb1, 0xe6, 0x5d, 0xbc, 0xec, - 0x56, 0x95, 0x8a, 0x96, 0x2e, 0xfd, 0x27, 0x4c, 0xae, 0x25, 0x33, 0x12, 0x8d, 0x14, 0xd9, 0xb0, - 0xb2, 0x27, 0xcd, 0x1a, 0x3f, 0x69, 0xd6, 0x51, 0xfa, 0xa4, 0x35, 0xe7, 0xbd, 0x07, 0xbb, 0x88, - 0x9c, 0xe3, 0xf5, 0x59, 0x0e, 0xfe, 0x7f, 0xef, 0x49, 0xbf, 0x76, 0xd1, 0xe1, 0x9b, 0x5f, 0x57, - 0xdb, 0xe8, 0xf7, 0xd5, 0x36, 0xfa, 0x7b, 0xb5, 0x8d, 0xce, 0xf7, 0x03, 0xa6, 0xc3, 0x81, 0x67, - 0xf5, 0x45, 0x6c, 0xcb, 0x64, 0xa4, 0x62, 0xaa, 0x59, 0x3f, 0xa2, 0x9e, 0xca, 0x22, 0x7b, 0xfa, - 0x01, 0x7e, 0x05, 0x3a, 0xf4, 0xee, 0x1a, 0xfc, 0xf9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfd, - 0xa1, 0x96, 0x59, 0xf7, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// SlasherClient is the client API for Slasher service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SlasherClient interface { - IsSlashableAttestation(ctx context.Context, in *IndexedAttestation, opts ...grpc.CallOption) (*AttesterSlashingResponse, error) - IsSlashableBlock(ctx context.Context, in *ProposerSlashingRequest, opts ...grpc.CallOption) (*ProposerSlashingResponse, error) - SlashableProposals(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Slasher_SlashableProposalsClient, error) - SlashableAttestations(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Slasher_SlashableAttestationsClient, error) -} - -type slasherClient struct { - cc *grpc.ClientConn -} - -func NewSlasherClient(cc *grpc.ClientConn) SlasherClient { - return &slasherClient{cc} -} - -func (c *slasherClient) IsSlashableAttestation(ctx context.Context, in *IndexedAttestation, opts ...grpc.CallOption) (*AttesterSlashingResponse, error) { - out := new(AttesterSlashingResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.Slasher/IsSlashableAttestation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slasherClient) IsSlashableBlock(ctx context.Context, in *ProposerSlashingRequest, opts ...grpc.CallOption) (*ProposerSlashingResponse, error) { - out := new(ProposerSlashingResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.Slasher/IsSlashableBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slasherClient) SlashableProposals(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Slasher_SlashableProposalsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Slasher_serviceDesc.Streams[0], "/ethereum.eth.v1alpha1.Slasher/SlashableProposals", opts...) - if err != nil { - return nil, err - } - x := &slasherSlashableProposalsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Slasher_SlashableProposalsClient interface { - Recv() (*ProposerSlashing, error) - grpc.ClientStream -} - -type slasherSlashableProposalsClient struct { - grpc.ClientStream -} - -func (x *slasherSlashableProposalsClient) Recv() (*ProposerSlashing, error) { - m := new(ProposerSlashing) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *slasherClient) SlashableAttestations(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Slasher_SlashableAttestationsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Slasher_serviceDesc.Streams[1], "/ethereum.eth.v1alpha1.Slasher/SlashableAttestations", opts...) - if err != nil { - return nil, err - } - x := &slasherSlashableAttestationsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Slasher_SlashableAttestationsClient interface { - Recv() (*AttesterSlashing, error) - grpc.ClientStream -} - -type slasherSlashableAttestationsClient struct { - grpc.ClientStream -} - -func (x *slasherSlashableAttestationsClient) Recv() (*AttesterSlashing, error) { - m := new(AttesterSlashing) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// SlasherServer is the server API for Slasher service. -type SlasherServer interface { - IsSlashableAttestation(context.Context, *IndexedAttestation) (*AttesterSlashingResponse, error) - IsSlashableBlock(context.Context, *ProposerSlashingRequest) (*ProposerSlashingResponse, error) - SlashableProposals(*types.Empty, Slasher_SlashableProposalsServer) error - SlashableAttestations(*types.Empty, Slasher_SlashableAttestationsServer) error -} - -func RegisterSlasherServer(s *grpc.Server, srv SlasherServer) { - s.RegisterService(&_Slasher_serviceDesc, srv) -} - -func _Slasher_IsSlashableAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IndexedAttestation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlasherServer).IsSlashableAttestation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.Slasher/IsSlashableAttestation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlasherServer).IsSlashableAttestation(ctx, req.(*IndexedAttestation)) - } - return interceptor(ctx, in, info, handler) -} - -func _Slasher_IsSlashableBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ProposerSlashingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlasherServer).IsSlashableBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.Slasher/IsSlashableBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlasherServer).IsSlashableBlock(ctx, req.(*ProposerSlashingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Slasher_SlashableProposals_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(types.Empty) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(SlasherServer).SlashableProposals(m, &slasherSlashableProposalsServer{stream}) -} - -type Slasher_SlashableProposalsServer interface { - Send(*ProposerSlashing) error - grpc.ServerStream -} - -type slasherSlashableProposalsServer struct { - grpc.ServerStream -} - -func (x *slasherSlashableProposalsServer) Send(m *ProposerSlashing) error { - return x.ServerStream.SendMsg(m) -} - -func _Slasher_SlashableAttestations_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(types.Empty) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(SlasherServer).SlashableAttestations(m, &slasherSlashableAttestationsServer{stream}) -} - -type Slasher_SlashableAttestationsServer interface { - Send(*AttesterSlashing) error - grpc.ServerStream -} - -type slasherSlashableAttestationsServer struct { - grpc.ServerStream -} - -func (x *slasherSlashableAttestationsServer) Send(m *AttesterSlashing) error { - return x.ServerStream.SendMsg(m) -} - -var _Slasher_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ethereum.eth.v1alpha1.Slasher", - HandlerType: (*SlasherServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "IsSlashableAttestation", - Handler: _Slasher_IsSlashableAttestation_Handler, - }, - { - MethodName: "IsSlashableBlock", - Handler: _Slasher_IsSlashableBlock_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "SlashableProposals", - Handler: _Slasher_SlashableProposals_Handler, - ServerStreams: true, - }, - { - StreamName: "SlashableAttestations", - Handler: _Slasher_SlashableAttestations_Handler, - ServerStreams: true, - }, - }, - Metadata: "proto/eth/v1alpha1/slasher.proto", -} - -func (m *ValidatorIDToIdxAtt) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorIDToIdxAtt) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Indices) > 0 { - dAtA2 := make([]byte, len(m.Indices)*10) - var j1 int - for _, num := range m.Indices { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintSlasher(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) - } - if len(m.DataRoot) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintSlasher(dAtA, i, uint64(len(m.DataRoot))) - i += copy(dAtA[i:], m.DataRoot) - } - if len(m.Signature) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintSlasher(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ValidatorIDToIdxAttList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorIDToIdxAttList) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.IndicesList) > 0 { - for _, msg := range m.IndicesList { - dAtA[i] = 0xa - i++ - i = encodeVarintSlasher(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ProposerSlashingRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProposerSlashingRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.BlockHeader != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintSlasher(dAtA, i, uint64(m.BlockHeader.Size())) - n3, err := m.BlockHeader.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.ValidatorIndex != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintSlasher(dAtA, i, uint64(m.ValidatorIndex)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ProposerSlashingResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProposerSlashingResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ProposerSlashing) > 0 { - for _, msg := range m.ProposerSlashing { - dAtA[i] = 0xa - i++ - i = encodeVarintSlasher(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AttesterSlashingResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttesterSlashingResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.AttesterSlashing) > 0 { - for _, msg := range m.AttesterSlashing { - dAtA[i] = 0xa - i++ - i = encodeVarintSlasher(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *MinMaxEpochSpan) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MinMaxEpochSpan) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.MinEpochSpan != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintSlasher(dAtA, i, uint64(m.MinEpochSpan)) - } - if m.MaxEpochSpan != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintSlasher(dAtA, i, uint64(m.MaxEpochSpan)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *EpochSpanMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EpochSpanMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.EpochSpanMap) > 0 { - for k, _ := range m.EpochSpanMap { - dAtA[i] = 0xa - i++ - v := m.EpochSpanMap[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovSlasher(uint64(msgSize)) - } - mapSize := 1 + sovSlasher(uint64(k)) + msgSize - i = encodeVarintSlasher(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintSlasher(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintSlasher(dAtA, i, uint64(v.Size())) - n4, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintSlasher(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ValidatorIDToIdxAtt) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Indices) > 0 { - l = 0 - for _, e := range m.Indices { - l += sovSlasher(uint64(e)) - } - n += 1 + sovSlasher(uint64(l)) + l - } - l = len(m.DataRoot) - if l > 0 { - n += 1 + l + sovSlasher(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovSlasher(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ValidatorIDToIdxAttList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.IndicesList) > 0 { - for _, e := range m.IndicesList { - l = e.Size() - n += 1 + l + sovSlasher(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ProposerSlashingRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeader != nil { - l = m.BlockHeader.Size() - n += 1 + l + sovSlasher(uint64(l)) - } - if m.ValidatorIndex != 0 { - n += 1 + sovSlasher(uint64(m.ValidatorIndex)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ProposerSlashingResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ProposerSlashing) > 0 { - for _, e := range m.ProposerSlashing { - l = e.Size() - n += 1 + l + sovSlasher(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttesterSlashingResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AttesterSlashing) > 0 { - for _, e := range m.AttesterSlashing { - l = e.Size() - n += 1 + l + sovSlasher(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MinMaxEpochSpan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MinEpochSpan != 0 { - n += 1 + sovSlasher(uint64(m.MinEpochSpan)) - } - if m.MaxEpochSpan != 0 { - n += 1 + sovSlasher(uint64(m.MaxEpochSpan)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *EpochSpanMap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.EpochSpanMap) > 0 { - for k, v := range m.EpochSpanMap { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovSlasher(uint64(l)) - } - mapEntrySize := 1 + sovSlasher(uint64(k)) + l - n += mapEntrySize + 1 + sovSlasher(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovSlasher(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozSlasher(x uint64) (n int) { - return sovSlasher(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ValidatorIDToIdxAtt) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorIDToIdxAtt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorIDToIdxAtt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Indices = append(m.Indices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthSlasher - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthSlasher - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Indices) == 0 { - m.Indices = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Indices = append(m.Indices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Indices", wireType) - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSlasher - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSlasher - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataRoot = append(m.DataRoot[:0], dAtA[iNdEx:postIndex]...) - if m.DataRoot == nil { - m.DataRoot = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSlasher - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSlasher - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSlasher(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorIDToIdxAttList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorIDToIdxAttList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorIDToIdxAttList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IndicesList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSlasher - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSlasher - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IndicesList = append(m.IndicesList, &ValidatorIDToIdxAtt{}) - if err := m.IndicesList[len(m.IndicesList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSlasher(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposerSlashingRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProposerSlashingRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposerSlashingRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSlasher - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSlasher - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockHeader == nil { - m.BlockHeader = &BeaconBlockHeader{} - } - if err := m.BlockHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) - } - m.ValidatorIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSlasher(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposerSlashingResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProposerSlashingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposerSlashingResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerSlashing", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSlasher - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSlasher - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerSlashing = append(m.ProposerSlashing, &ProposerSlashing{}) - if err := m.ProposerSlashing[len(m.ProposerSlashing)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSlasher(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttesterSlashingResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttesterSlashingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttesterSlashingResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttesterSlashing", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSlasher - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSlasher - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttesterSlashing = append(m.AttesterSlashing, &AttesterSlashing{}) - if err := m.AttesterSlashing[len(m.AttesterSlashing)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSlasher(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MinMaxEpochSpan) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MinMaxEpochSpan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MinMaxEpochSpan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinEpochSpan", wireType) - } - m.MinEpochSpan = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinEpochSpan |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxEpochSpan", wireType) - } - m.MaxEpochSpan = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxEpochSpan |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSlasher(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EpochSpanMap) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EpochSpanMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EpochSpanMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochSpanMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSlasher - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSlasher - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EpochSpanMap == nil { - m.EpochSpanMap = make(map[uint64]*MinMaxEpochSpan) - } - var mapkey uint64 - var mapvalue *MinMaxEpochSpan - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSlasher - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthSlasher - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthSlasher - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &MinMaxEpochSpan{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipSlasher(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.EpochSpanMap[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSlasher(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSlasher - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSlasher(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSlasher - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSlasher - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSlasher - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSlasher - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthSlasher - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSlasher - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipSlasher(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthSlasher - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthSlasher = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSlasher = fmt.Errorf("proto: integer overflow") -) diff --git a/proto/eth/v1alpha1/validator.pb.go b/proto/eth/v1alpha1/validator.pb.go deleted file mode 100755 index 4fb145895..000000000 --- a/proto/eth/v1alpha1/validator.pb.go +++ /dev/null @@ -1,2256 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/eth/v1alpha1/validator.proto - -package eth - -import ( - context "context" - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type DutiesRequest struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - PublicKeys [][]byte `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty" ssz-size:"?,48"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DutiesRequest) Reset() { *m = DutiesRequest{} } -func (m *DutiesRequest) String() string { return proto.CompactTextString(m) } -func (*DutiesRequest) ProtoMessage() {} -func (*DutiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86a2b3961d336368, []int{0} -} -func (m *DutiesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DutiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DutiesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DutiesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DutiesRequest.Merge(m, src) -} -func (m *DutiesRequest) XXX_Size() int { - return m.Size() -} -func (m *DutiesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DutiesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DutiesRequest proto.InternalMessageInfo - -func (m *DutiesRequest) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *DutiesRequest) GetPublicKeys() [][]byte { - if m != nil { - return m.PublicKeys - } - return nil -} - -type DutiesResponse struct { - Duties []*DutiesResponse_Duty `protobuf:"bytes,1,rep,name=duties,proto3" json:"duties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DutiesResponse) Reset() { *m = DutiesResponse{} } -func (m *DutiesResponse) String() string { return proto.CompactTextString(m) } -func (*DutiesResponse) ProtoMessage() {} -func (*DutiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86a2b3961d336368, []int{1} -} -func (m *DutiesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DutiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DutiesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DutiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DutiesResponse.Merge(m, src) -} -func (m *DutiesResponse) XXX_Size() int { - return m.Size() -} -func (m *DutiesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DutiesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DutiesResponse proto.InternalMessageInfo - -func (m *DutiesResponse) GetDuties() []*DutiesResponse_Duty { - if m != nil { - return m.Duties - } - return nil -} - -type DutiesResponse_Duty struct { - PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" ssz-size:"48"` - AttestationSlot uint64 `protobuf:"varint,2,opt,name=attestation_slot,json=attestationSlot,proto3" json:"attestation_slot,omitempty"` - AttestationShard uint64 `protobuf:"varint,3,opt,name=attestation_shard,json=attestationShard,proto3" json:"attestation_shard,omitempty"` - BlockProposalSlot uint64 `protobuf:"varint,4,opt,name=block_proposal_slot,json=blockProposalSlot,proto3" json:"block_proposal_slot,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DutiesResponse_Duty) Reset() { *m = DutiesResponse_Duty{} } -func (m *DutiesResponse_Duty) String() string { return proto.CompactTextString(m) } -func (*DutiesResponse_Duty) ProtoMessage() {} -func (*DutiesResponse_Duty) Descriptor() ([]byte, []int) { - return fileDescriptor_86a2b3961d336368, []int{1, 0} -} -func (m *DutiesResponse_Duty) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DutiesResponse_Duty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DutiesResponse_Duty.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DutiesResponse_Duty) XXX_Merge(src proto.Message) { - xxx_messageInfo_DutiesResponse_Duty.Merge(m, src) -} -func (m *DutiesResponse_Duty) XXX_Size() int { - return m.Size() -} -func (m *DutiesResponse_Duty) XXX_DiscardUnknown() { - xxx_messageInfo_DutiesResponse_Duty.DiscardUnknown(m) -} - -var xxx_messageInfo_DutiesResponse_Duty proto.InternalMessageInfo - -func (m *DutiesResponse_Duty) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *DutiesResponse_Duty) GetAttestationSlot() uint64 { - if m != nil { - return m.AttestationSlot - } - return 0 -} - -func (m *DutiesResponse_Duty) GetAttestationShard() uint64 { - if m != nil { - return m.AttestationShard - } - return 0 -} - -func (m *DutiesResponse_Duty) GetBlockProposalSlot() uint64 { - if m != nil { - return m.BlockProposalSlot - } - return 0 -} - -type BlockRequest struct { - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - RandaoReveal []byte `protobuf:"bytes,2,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty" ssz-size:"48"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlockRequest) Reset() { *m = BlockRequest{} } -func (m *BlockRequest) String() string { return proto.CompactTextString(m) } -func (*BlockRequest) ProtoMessage() {} -func (*BlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86a2b3961d336368, []int{2} -} -func (m *BlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockRequest.Merge(m, src) -} -func (m *BlockRequest) XXX_Size() int { - return m.Size() -} -func (m *BlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockRequest proto.InternalMessageInfo - -func (m *BlockRequest) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -func (m *BlockRequest) GetRandaoReveal() []byte { - if m != nil { - return m.RandaoReveal - } - return nil -} - -type AttestationDataRequest struct { - ProofOfCustodyBit []byte `protobuf:"bytes,1,opt,name=proof_of_custody_bit,json=proofOfCustodyBit,proto3" json:"proof_of_custody_bit,omitempty"` - Slot uint64 `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty"` - Shard uint64 `protobuf:"varint,3,opt,name=shard,proto3" json:"shard,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttestationDataRequest) Reset() { *m = AttestationDataRequest{} } -func (m *AttestationDataRequest) String() string { return proto.CompactTextString(m) } -func (*AttestationDataRequest) ProtoMessage() {} -func (*AttestationDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86a2b3961d336368, []int{3} -} -func (m *AttestationDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttestationDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttestationDataRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AttestationDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttestationDataRequest.Merge(m, src) -} -func (m *AttestationDataRequest) XXX_Size() int { - return m.Size() -} -func (m *AttestationDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AttestationDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AttestationDataRequest proto.InternalMessageInfo - -func (m *AttestationDataRequest) GetProofOfCustodyBit() []byte { - if m != nil { - return m.ProofOfCustodyBit - } - return nil -} - -func (m *AttestationDataRequest) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -func (m *AttestationDataRequest) GetShard() uint64 { - if m != nil { - return m.Shard - } - return 0 -} - -type Validator struct { - PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" ssz-size:"48" spec-name:"pubkey"` - WithdrawalCredentials []byte `protobuf:"bytes,2,opt,name=withdrawal_credentials,json=withdrawalCredentials,proto3" json:"withdrawal_credentials,omitempty" ssz-size:"32"` - EffectiveBalance uint64 `protobuf:"varint,3,opt,name=effective_balance,json=effectiveBalance,proto3" json:"effective_balance,omitempty"` - Slashed bool `protobuf:"varint,4,opt,name=slashed,proto3" json:"slashed,omitempty"` - ActivationEligibilityEpoch uint64 `protobuf:"varint,5,opt,name=activation_eligibility_epoch,json=activationEligibilityEpoch,proto3" json:"activation_eligibility_epoch,omitempty"` - ActivationEpoch uint64 `protobuf:"varint,6,opt,name=activation_epoch,json=activationEpoch,proto3" json:"activation_epoch,omitempty"` - ExitEpoch uint64 `protobuf:"varint,7,opt,name=exit_epoch,json=exitEpoch,proto3" json:"exit_epoch,omitempty"` - WithdrawableEpoch uint64 `protobuf:"varint,8,opt,name=withdrawable_epoch,json=withdrawableEpoch,proto3" json:"withdrawable_epoch,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Validator) Reset() { *m = Validator{} } -func (m *Validator) String() string { return proto.CompactTextString(m) } -func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_86a2b3961d336368, []int{4} -} -func (m *Validator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Validator.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Validator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validator.Merge(m, src) -} -func (m *Validator) XXX_Size() int { - return m.Size() -} -func (m *Validator) XXX_DiscardUnknown() { - xxx_messageInfo_Validator.DiscardUnknown(m) -} - -var xxx_messageInfo_Validator proto.InternalMessageInfo - -func (m *Validator) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *Validator) GetWithdrawalCredentials() []byte { - if m != nil { - return m.WithdrawalCredentials - } - return nil -} - -func (m *Validator) GetEffectiveBalance() uint64 { - if m != nil { - return m.EffectiveBalance - } - return 0 -} - -func (m *Validator) GetSlashed() bool { - if m != nil { - return m.Slashed - } - return false -} - -func (m *Validator) GetActivationEligibilityEpoch() uint64 { - if m != nil { - return m.ActivationEligibilityEpoch - } - return 0 -} - -func (m *Validator) GetActivationEpoch() uint64 { - if m != nil { - return m.ActivationEpoch - } - return 0 -} - -func (m *Validator) GetExitEpoch() uint64 { - if m != nil { - return m.ExitEpoch - } - return 0 -} - -func (m *Validator) GetWithdrawableEpoch() uint64 { - if m != nil { - return m.WithdrawableEpoch - } - return 0 -} - -type ValidatorParticipation struct { - GlobalParticipationRate float32 `protobuf:"fixed32,1,opt,name=global_participation_rate,json=globalParticipationRate,proto3" json:"global_participation_rate,omitempty"` - VotedEther uint64 `protobuf:"varint,2,opt,name=voted_ether,json=votedEther,proto3" json:"voted_ether,omitempty"` - EligibleEther uint64 `protobuf:"varint,3,opt,name=eligible_ether,json=eligibleEther,proto3" json:"eligible_ether,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorParticipation) Reset() { *m = ValidatorParticipation{} } -func (m *ValidatorParticipation) String() string { return proto.CompactTextString(m) } -func (*ValidatorParticipation) ProtoMessage() {} -func (*ValidatorParticipation) Descriptor() ([]byte, []int) { - return fileDescriptor_86a2b3961d336368, []int{5} -} -func (m *ValidatorParticipation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorParticipation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorParticipation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorParticipation) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorParticipation.Merge(m, src) -} -func (m *ValidatorParticipation) XXX_Size() int { - return m.Size() -} -func (m *ValidatorParticipation) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorParticipation.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorParticipation proto.InternalMessageInfo - -func (m *ValidatorParticipation) GetGlobalParticipationRate() float32 { - if m != nil { - return m.GlobalParticipationRate - } - return 0 -} - -func (m *ValidatorParticipation) GetVotedEther() uint64 { - if m != nil { - return m.VotedEther - } - return 0 -} - -func (m *ValidatorParticipation) GetEligibleEther() uint64 { - if m != nil { - return m.EligibleEther - } - return 0 -} - -func init() { - proto.RegisterType((*DutiesRequest)(nil), "ethereum.eth.v1alpha1.DutiesRequest") - proto.RegisterType((*DutiesResponse)(nil), "ethereum.eth.v1alpha1.DutiesResponse") - proto.RegisterType((*DutiesResponse_Duty)(nil), "ethereum.eth.v1alpha1.DutiesResponse.Duty") - proto.RegisterType((*BlockRequest)(nil), "ethereum.eth.v1alpha1.BlockRequest") - proto.RegisterType((*AttestationDataRequest)(nil), "ethereum.eth.v1alpha1.AttestationDataRequest") - proto.RegisterType((*Validator)(nil), "ethereum.eth.v1alpha1.Validator") - proto.RegisterType((*ValidatorParticipation)(nil), "ethereum.eth.v1alpha1.ValidatorParticipation") -} - -func init() { proto.RegisterFile("proto/eth/v1alpha1/validator.proto", fileDescriptor_86a2b3961d336368) } - -var fileDescriptor_86a2b3961d336368 = []byte{ - // 934 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xdf, 0x6e, 0x1b, 0xc5, - 0x17, 0xd6, 0x3a, 0x7f, 0x9a, 0x4c, 0x9c, 0xf6, 0x97, 0x49, 0x9a, 0x9f, 0x31, 0x6d, 0x62, 0x6d, - 0x63, 0x14, 0x28, 0xde, 0xa5, 0x69, 0x41, 0x28, 0x5c, 0x00, 0x4e, 0xa3, 0x20, 0x21, 0x41, 0xb5, - 0x95, 0xb8, 0x28, 0x17, 0xab, 0xd9, 0xdd, 0x63, 0xef, 0x28, 0x63, 0xcf, 0x76, 0x67, 0xec, 0xe2, - 0x48, 0x48, 0x88, 0x57, 0x00, 0x89, 0x9b, 0xf2, 0x2e, 0x5c, 0x72, 0x89, 0xc4, 0x7d, 0x84, 0x22, - 0x9e, 0x20, 0x4f, 0x80, 0xf6, 0xcc, 0xae, 0x77, 0x0d, 0xb6, 0x9a, 0xbb, 0x9d, 0x73, 0xbe, 0x73, - 0xbe, 0x6f, 0xcf, 0x39, 0x73, 0x86, 0xd8, 0x49, 0x2a, 0xb5, 0x74, 0x41, 0xc7, 0xee, 0xf8, 0x11, - 0x13, 0x49, 0xcc, 0x1e, 0xb9, 0x63, 0x26, 0x78, 0xc4, 0xb4, 0x4c, 0x1d, 0x74, 0xd2, 0xbb, 0xa0, - 0x63, 0x48, 0x61, 0x34, 0x70, 0x40, 0xc7, 0x4e, 0x01, 0x6b, 0x76, 0xfa, 0x5c, 0xc7, 0xa3, 0xc0, - 0x09, 0xe5, 0xc0, 0xed, 0xcb, 0xbe, 0x74, 0x11, 0x1d, 0x8c, 0x7a, 0x78, 0x32, 0x79, 0xb3, 0x2f, - 0x93, 0xa5, 0x79, 0xaf, 0x2f, 0x65, 0x5f, 0x80, 0xcb, 0x12, 0xee, 0xb2, 0xe1, 0x50, 0x6a, 0xa6, - 0xb9, 0x1c, 0xaa, 0xdc, 0xfb, 0x76, 0xee, 0x9d, 0xe6, 0x80, 0x41, 0xa2, 0x27, 0xb9, 0xb3, 0x3d, - 0x47, 0x64, 0x00, 0x2c, 0x94, 0x43, 0x3f, 0x10, 0x32, 0x3c, 0xcf, 0x61, 0x07, 0x73, 0x60, 0x4c, - 0x6b, 0x50, 0x86, 0xca, 0xa0, 0xec, 0x6f, 0xc9, 0xe6, 0xd3, 0x91, 0xe6, 0xa0, 0x3c, 0x78, 0x39, - 0x02, 0xa5, 0xe9, 0x0e, 0x59, 0x81, 0x44, 0x86, 0x71, 0xc3, 0x6a, 0x59, 0x87, 0xcb, 0x9e, 0x39, - 0xd0, 0x27, 0x64, 0x23, 0x19, 0x05, 0x82, 0x87, 0xfe, 0x39, 0x4c, 0x54, 0xa3, 0xd6, 0x5a, 0x3a, - 0xac, 0x77, 0xb7, 0xaf, 0x2f, 0xf7, 0xef, 0x28, 0x75, 0xd1, 0x51, 0xfc, 0x02, 0x8e, 0xed, 0x4f, - 0xdf, 0x7f, 0xf2, 0xb1, 0xed, 0x11, 0x83, 0xfb, 0x12, 0x26, 0xca, 0xfe, 0xa5, 0x46, 0x6e, 0x17, - 0xd9, 0x55, 0x22, 0x87, 0x0a, 0x68, 0x97, 0xac, 0x46, 0x68, 0x69, 0x58, 0xad, 0xa5, 0xc3, 0x8d, - 0xa3, 0xf7, 0x9c, 0xb9, 0xe5, 0x74, 0x66, 0xc3, 0xb2, 0xe3, 0xc4, 0xcb, 0x23, 0x9b, 0xbf, 0x59, - 0x64, 0x39, 0x33, 0xd0, 0x0f, 0x08, 0x29, 0x55, 0xa1, 0xe0, 0x7a, 0x77, 0xeb, 0xfa, 0x72, 0x7f, - 0xb3, 0x14, 0x95, 0x49, 0x5a, 0x9f, 0x4a, 0xa2, 0xef, 0x92, 0xff, 0x55, 0x6a, 0xe0, 0x2b, 0x21, - 0x75, 0xa3, 0x86, 0x3f, 0x7a, 0xa7, 0x62, 0x7f, 0x2e, 0xa4, 0xa6, 0x0f, 0xc9, 0xd6, 0x0c, 0x34, - 0x66, 0x69, 0xd4, 0x58, 0x42, 0x6c, 0x35, 0xc7, 0xf3, 0xcc, 0x4e, 0x1d, 0xb2, 0x8d, 0xb5, 0xf7, - 0x93, 0x54, 0x26, 0x52, 0x31, 0x61, 0x52, 0x2f, 0x23, 0x7c, 0x0b, 0x5d, 0xcf, 0x72, 0x4f, 0x96, - 0xdc, 0x7e, 0x41, 0xea, 0xdd, 0xcc, 0x58, 0x54, 0x9d, 0x92, 0x65, 0x0c, 0x30, 0x45, 0xc7, 0x6f, - 0xfa, 0x11, 0xd9, 0x4c, 0xd9, 0x30, 0x62, 0xd2, 0x4f, 0x61, 0x0c, 0x4c, 0xa0, 0xd0, 0xb9, 0x3f, - 0x58, 0x37, 0x38, 0x0f, 0x61, 0xb6, 0x22, 0xbb, 0x9f, 0x97, 0xfa, 0x9e, 0x32, 0xcd, 0x0a, 0x16, - 0x97, 0xec, 0x24, 0xa9, 0x94, 0x3d, 0x5f, 0xf6, 0xfc, 0x70, 0xa4, 0xb4, 0x8c, 0x26, 0x7e, 0xc0, - 0x0d, 0x6b, 0xdd, 0xdb, 0x42, 0xdf, 0xd7, 0xbd, 0x13, 0xe3, 0xe9, 0xf2, 0x52, 0x56, 0xad, 0x22, - 0x6b, 0x87, 0xac, 0x54, 0x6b, 0x61, 0x0e, 0xf6, 0xeb, 0x25, 0xb2, 0xfe, 0x4d, 0x71, 0x53, 0xe8, - 0xc9, 0x9c, 0xc6, 0x1c, 0x5c, 0x5f, 0xee, 0xb7, 0x66, 0x74, 0xb7, 0x54, 0x02, 0x61, 0x67, 0xc8, - 0x06, 0x70, 0x6c, 0x27, 0xa3, 0xe0, 0x1c, 0x26, 0x33, 0xbd, 0xfa, 0x82, 0xec, 0xbe, 0xe2, 0x3a, - 0x8e, 0x52, 0xf6, 0x8a, 0x09, 0x3f, 0x4c, 0x21, 0x82, 0xa1, 0xe6, 0x4c, 0xa8, 0xf9, 0x85, 0x78, - 0x7c, 0x64, 0x7b, 0x77, 0xcb, 0x80, 0x93, 0x12, 0x9f, 0xb5, 0x12, 0x7a, 0x3d, 0x08, 0x35, 0x1f, - 0x83, 0x1f, 0x30, 0xc1, 0x86, 0x21, 0x14, 0xad, 0x9c, 0x3a, 0xba, 0xc6, 0x4e, 0x1b, 0xe4, 0x96, - 0x12, 0x4c, 0xc5, 0x10, 0x61, 0xfb, 0xd6, 0xbc, 0xe2, 0x48, 0x3f, 0x23, 0xf7, 0x58, 0x06, 0x35, - 0x03, 0x01, 0x82, 0xf7, 0x79, 0xc0, 0x05, 0xd7, 0x13, 0xdf, 0xdc, 0x98, 0x15, 0xcc, 0xd8, 0x2c, - 0x31, 0xa7, 0x25, 0xe4, 0x14, 0xaf, 0x51, 0x36, 0x7e, 0x95, 0x0c, 0x18, 0xb5, 0x9a, 0x8f, 0x5f, - 0x19, 0x85, 0xd0, 0xfb, 0x84, 0xc0, 0x77, 0x5c, 0xe7, 0xa0, 0x5b, 0x08, 0x5a, 0xcf, 0x2c, 0xc6, - 0xdd, 0x21, 0x74, 0xfa, 0xaf, 0x81, 0x80, 0x1c, 0xb6, 0x66, 0xe6, 0xad, 0xea, 0x41, 0xb8, 0xfd, - 0xda, 0x22, 0xbb, 0xd3, 0xf6, 0x3c, 0x63, 0xa9, 0xe6, 0x21, 0x4f, 0x90, 0x8d, 0x1e, 0x93, 0xb7, - 0xfa, 0x42, 0x06, 0x4c, 0xf8, 0x49, 0xd5, 0xee, 0xa7, 0x4c, 0x03, 0xb6, 0xae, 0xe6, 0xfd, 0xdf, - 0x00, 0x66, 0xe2, 0x3c, 0xa6, 0x81, 0xee, 0x93, 0x8d, 0xb1, 0xd4, 0x10, 0xf9, 0x78, 0x89, 0xf3, - 0x31, 0x21, 0x68, 0x3a, 0xcd, 0x2c, 0xb4, 0x4d, 0x6e, 0x9b, 0x3a, 0x65, 0x12, 0x11, 0x63, 0xca, - 0xbe, 0x59, 0x58, 0x11, 0x76, 0xf4, 0xeb, 0x0a, 0xd9, 0xee, 0xe2, 0x0a, 0xfb, 0x4a, 0x46, 0x50, - 0xce, 0xd1, 0x0f, 0x16, 0x59, 0x3f, 0x03, 0x6d, 0x96, 0x01, 0x3d, 0x78, 0xc3, 0xae, 0xc0, 0x21, - 0x6f, 0xb6, 0x6f, 0xb4, 0x51, 0xec, 0x77, 0x7e, 0xfc, 0xf3, 0xef, 0x9f, 0x6a, 0x2d, 0xba, 0xb7, - 0x60, 0xdb, 0xbb, 0x66, 0xd9, 0xd0, 0x0b, 0xb2, 0x76, 0x06, 0x1a, 0x2f, 0x2b, 0x7d, 0xb0, 0x20, - 0x75, 0xf5, 0x2a, 0x37, 0xed, 0x45, 0x20, 0xfc, 0x3f, 0x84, 0xda, 0x6d, 0x24, 0xdf, 0xa7, 0xf7, - 0x17, 0x91, 0xe3, 0xc6, 0xa0, 0x2f, 0x49, 0xdd, 0x6c, 0x0d, 0x30, 0xfc, 0x37, 0x48, 0xdd, 0xdc, - 0x75, 0xcc, 0xdb, 0xe1, 0x14, 0x6f, 0x87, 0x73, 0x9a, 0xbd, 0x1d, 0x05, 0xa5, 0xfd, 0x06, 0xca, - 0x9f, 0x2d, 0x42, 0xcf, 0x40, 0xff, 0x6b, 0x81, 0xd0, 0xce, 0x02, 0xe6, 0xf9, 0x8b, 0x66, 0x61, - 0x0d, 0x2a, 0x70, 0xfb, 0x21, 0x0a, 0x6a, 0xd3, 0x07, 0x8b, 0x04, 0x55, 0x96, 0x2c, 0xfd, 0x9e, - 0xd0, 0xbc, 0x12, 0x95, 0x14, 0xf4, 0x06, 0x34, 0x0b, 0xeb, 0x91, 0xd3, 0xdb, 0x37, 0xa1, 0xef, - 0x9e, 0xfc, 0x7e, 0xb5, 0x67, 0xfd, 0x71, 0xb5, 0x67, 0xfd, 0x75, 0xb5, 0x67, 0xbd, 0xf8, 0xb0, - 0xf2, 0xd4, 0x27, 0xe9, 0x44, 0x0d, 0x98, 0xe6, 0xa1, 0x60, 0x81, 0x32, 0x27, 0xf7, 0xbf, 0x0f, - 0xef, 0x27, 0xa0, 0xe3, 0x60, 0x15, 0xed, 0x8f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xcf, - 0xae, 0x14, 0x65, 0x08, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// BeaconNodeValidatorClient is the client API for BeaconNodeValidator service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type BeaconNodeValidatorClient interface { - GetDuties(ctx context.Context, in *DutiesRequest, opts ...grpc.CallOption) (*DutiesResponse, error) - GetBlock(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BeaconBlock, error) - ProposeBlock(ctx context.Context, in *BeaconBlock, opts ...grpc.CallOption) (*types.Empty, error) - GetAttestationData(ctx context.Context, in *AttestationDataRequest, opts ...grpc.CallOption) (*Attestation, error) - ProposeAttestation(ctx context.Context, in *Attestation, opts ...grpc.CallOption) (*types.Empty, error) -} - -type beaconNodeValidatorClient struct { - cc *grpc.ClientConn -} - -func NewBeaconNodeValidatorClient(cc *grpc.ClientConn) BeaconNodeValidatorClient { - return &beaconNodeValidatorClient{cc} -} - -func (c *beaconNodeValidatorClient) GetDuties(ctx context.Context, in *DutiesRequest, opts ...grpc.CallOption) (*DutiesResponse, error) { - out := new(DutiesResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetDuties", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconNodeValidatorClient) GetBlock(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BeaconBlock, error) { - out := new(BeaconBlock) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconNodeValidatorClient) ProposeBlock(ctx context.Context, in *BeaconBlock, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/ProposeBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconNodeValidatorClient) GetAttestationData(ctx context.Context, in *AttestationDataRequest, opts ...grpc.CallOption) (*Attestation, error) { - out := new(Attestation) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetAttestationData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconNodeValidatorClient) ProposeAttestation(ctx context.Context, in *Attestation, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/ProposeAttestation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BeaconNodeValidatorServer is the server API for BeaconNodeValidator service. -type BeaconNodeValidatorServer interface { - GetDuties(context.Context, *DutiesRequest) (*DutiesResponse, error) - GetBlock(context.Context, *BlockRequest) (*BeaconBlock, error) - ProposeBlock(context.Context, *BeaconBlock) (*types.Empty, error) - GetAttestationData(context.Context, *AttestationDataRequest) (*Attestation, error) - ProposeAttestation(context.Context, *Attestation) (*types.Empty, error) -} - -func RegisterBeaconNodeValidatorServer(s *grpc.Server, srv BeaconNodeValidatorServer) { - s.RegisterService(&_BeaconNodeValidator_serviceDesc, srv) -} - -func _BeaconNodeValidator_GetDuties_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DutiesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconNodeValidatorServer).GetDuties(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetDuties", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconNodeValidatorServer).GetDuties(ctx, req.(*DutiesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconNodeValidator_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconNodeValidatorServer).GetBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconNodeValidatorServer).GetBlock(ctx, req.(*BlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconNodeValidator_ProposeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BeaconBlock) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconNodeValidatorServer).ProposeBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/ProposeBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconNodeValidatorServer).ProposeBlock(ctx, req.(*BeaconBlock)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconNodeValidator_GetAttestationData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AttestationDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconNodeValidatorServer).GetAttestationData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetAttestationData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconNodeValidatorServer).GetAttestationData(ctx, req.(*AttestationDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconNodeValidator_ProposeAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Attestation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconNodeValidatorServer).ProposeAttestation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/ProposeAttestation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconNodeValidatorServer).ProposeAttestation(ctx, req.(*Attestation)) - } - return interceptor(ctx, in, info, handler) -} - -var _BeaconNodeValidator_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ethereum.eth.v1alpha1.BeaconNodeValidator", - HandlerType: (*BeaconNodeValidatorServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetDuties", - Handler: _BeaconNodeValidator_GetDuties_Handler, - }, - { - MethodName: "GetBlock", - Handler: _BeaconNodeValidator_GetBlock_Handler, - }, - { - MethodName: "ProposeBlock", - Handler: _BeaconNodeValidator_ProposeBlock_Handler, - }, - { - MethodName: "GetAttestationData", - Handler: _BeaconNodeValidator_GetAttestationData_Handler, - }, - { - MethodName: "ProposeAttestation", - Handler: _BeaconNodeValidator_ProposeAttestation_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/eth/v1alpha1/validator.proto", -} - -func (m *DutiesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DutiesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Epoch != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.Epoch)) - } - if len(m.PublicKeys) > 0 { - for _, b := range m.PublicKeys { - dAtA[i] = 0x12 - i++ - i = encodeVarintValidator(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DutiesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DutiesResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Duties) > 0 { - for _, msg := range m.Duties { - dAtA[i] = 0xa - i++ - i = encodeVarintValidator(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DutiesResponse_Duty) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DutiesResponse_Duty) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.PublicKey) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintValidator(dAtA, i, uint64(len(m.PublicKey))) - i += copy(dAtA[i:], m.PublicKey) - } - if m.AttestationSlot != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.AttestationSlot)) - } - if m.AttestationShard != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.AttestationShard)) - } - if m.BlockProposalSlot != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.BlockProposalSlot)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BlockRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Slot != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.Slot)) - } - if len(m.RandaoReveal) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintValidator(dAtA, i, uint64(len(m.RandaoReveal))) - i += copy(dAtA[i:], m.RandaoReveal) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AttestationDataRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttestationDataRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ProofOfCustodyBit) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintValidator(dAtA, i, uint64(len(m.ProofOfCustodyBit))) - i += copy(dAtA[i:], m.ProofOfCustodyBit) - } - if m.Slot != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.Slot)) - } - if m.Shard != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.Shard)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Validator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Validator) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.PublicKey) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintValidator(dAtA, i, uint64(len(m.PublicKey))) - i += copy(dAtA[i:], m.PublicKey) - } - if len(m.WithdrawalCredentials) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintValidator(dAtA, i, uint64(len(m.WithdrawalCredentials))) - i += copy(dAtA[i:], m.WithdrawalCredentials) - } - if m.EffectiveBalance != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.EffectiveBalance)) - } - if m.Slashed { - dAtA[i] = 0x20 - i++ - if m.Slashed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.ActivationEligibilityEpoch != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.ActivationEligibilityEpoch)) - } - if m.ActivationEpoch != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.ActivationEpoch)) - } - if m.ExitEpoch != 0 { - dAtA[i] = 0x38 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.ExitEpoch)) - } - if m.WithdrawableEpoch != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.WithdrawableEpoch)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ValidatorParticipation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorParticipation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.GlobalParticipationRate != 0 { - dAtA[i] = 0xd - i++ - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.GlobalParticipationRate)))) - i += 4 - } - if m.VotedEther != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.VotedEther)) - } - if m.EligibleEther != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintValidator(dAtA, i, uint64(m.EligibleEther)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *DutiesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovValidator(uint64(m.Epoch)) - } - if len(m.PublicKeys) > 0 { - for _, b := range m.PublicKeys { - l = len(b) - n += 1 + l + sovValidator(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DutiesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Duties) > 0 { - for _, e := range m.Duties { - l = e.Size() - n += 1 + l + sovValidator(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DutiesResponse_Duty) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } - if m.AttestationSlot != 0 { - n += 1 + sovValidator(uint64(m.AttestationSlot)) - } - if m.AttestationShard != 0 { - n += 1 + sovValidator(uint64(m.AttestationShard)) - } - if m.BlockProposalSlot != 0 { - n += 1 + sovValidator(uint64(m.BlockProposalSlot)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Slot != 0 { - n += 1 + sovValidator(uint64(m.Slot)) - } - l = len(m.RandaoReveal) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttestationDataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProofOfCustodyBit) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } - if m.Slot != 0 { - n += 1 + sovValidator(uint64(m.Slot)) - } - if m.Shard != 0 { - n += 1 + sovValidator(uint64(m.Shard)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Validator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } - l = len(m.WithdrawalCredentials) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } - if m.EffectiveBalance != 0 { - n += 1 + sovValidator(uint64(m.EffectiveBalance)) - } - if m.Slashed { - n += 2 - } - if m.ActivationEligibilityEpoch != 0 { - n += 1 + sovValidator(uint64(m.ActivationEligibilityEpoch)) - } - if m.ActivationEpoch != 0 { - n += 1 + sovValidator(uint64(m.ActivationEpoch)) - } - if m.ExitEpoch != 0 { - n += 1 + sovValidator(uint64(m.ExitEpoch)) - } - if m.WithdrawableEpoch != 0 { - n += 1 + sovValidator(uint64(m.WithdrawableEpoch)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ValidatorParticipation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GlobalParticipationRate != 0 { - n += 5 - } - if m.VotedEther != 0 { - n += 1 + sovValidator(uint64(m.VotedEther)) - } - if m.EligibleEther != 0 { - n += 1 + sovValidator(uint64(m.EligibleEther)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovValidator(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozValidator(x uint64) (n int) { - return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *DutiesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DutiesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DutiesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeys = append(m.PublicKeys, make([]byte, postIndex-iNdEx)) - copy(m.PublicKeys[len(m.PublicKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DutiesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DutiesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DutiesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duties", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Duties = append(m.Duties, &DutiesResponse_Duty{}) - if err := m.Duties[len(m.Duties)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DutiesResponse_Duty) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Duty: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Duty: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if m.PublicKey == nil { - m.PublicKey = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AttestationSlot", wireType) - } - m.AttestationSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AttestationSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AttestationShard", wireType) - } - m.AttestationShard = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AttestationShard |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockProposalSlot", wireType) - } - m.BlockProposalSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockProposalSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) - } - m.Slot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RandaoReveal", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RandaoReveal = append(m.RandaoReveal[:0], dAtA[iNdEx:postIndex]...) - if m.RandaoReveal == nil { - m.RandaoReveal = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttestationDataRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttestationDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttestationDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofOfCustodyBit", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofOfCustodyBit = append(m.ProofOfCustodyBit[:0], dAtA[iNdEx:postIndex]...) - if m.ProofOfCustodyBit == nil { - m.ProofOfCustodyBit = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) - } - m.Slot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Shard", wireType) - } - m.Shard = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Shard |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Validator) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if m.PublicKey == nil { - m.PublicKey = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WithdrawalCredentials", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WithdrawalCredentials = append(m.WithdrawalCredentials[:0], dAtA[iNdEx:postIndex]...) - if m.WithdrawalCredentials == nil { - m.WithdrawalCredentials = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EffectiveBalance", wireType) - } - m.EffectiveBalance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EffectiveBalance |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slashed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Slashed = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActivationEligibilityEpoch", wireType) - } - m.ActivationEligibilityEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActivationEligibilityEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActivationEpoch", wireType) - } - m.ActivationEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActivationEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExitEpoch", wireType) - } - m.ExitEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExitEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithdrawableEpoch", wireType) - } - m.WithdrawableEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WithdrawableEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorParticipation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorParticipation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorParticipation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalParticipationRate", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.GlobalParticipationRate = float32(math.Float32frombits(v)) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VotedEther", wireType) - } - m.VotedEther = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VotedEther |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EligibleEther", wireType) - } - m.EligibleEther = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EligibleEther |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipValidator(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthValidator - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthValidator - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipValidator(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthValidator - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthValidator = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowValidator = fmt.Errorf("proto: integer overflow") -) diff --git a/proto/eth/v1alpha1/validator.proto b/proto/eth/v1alpha1/validator.proto deleted file mode 100644 index 8d3ee22da..000000000 --- a/proto/eth/v1alpha1/validator.proto +++ /dev/null @@ -1,161 +0,0 @@ -syntax = "proto3"; -package ethereum.eth.v1alpha1; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; -import "proto/eth/v1alpha1/beacon_block.proto"; -import "proto/eth/v1alpha1/attestation.proto"; - -option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth"; - -// Beacon node validator API -// -// The beacon node validator API enables a validator to connect -// and perform its obligations on the Ethereum 2.0 phase 0 beacon chain. -service BeaconNodeValidator { - // Retrieves validator duties for the requested validators. - // - // The duties consist of: - // Proposer - the validator that creates a beacon chain block. - // Attester — a validator that is part of a committee that needs to sign off on a beacon chain - // block while simultaneously creating a cross link to a recent shard block on a particular shard chain. - // The server returns a list of duties which are the actions should be performed by validators for a given epoch. - // Validator duties should be polled every epoch, but due to chain reorg of >MIN_SEED_LOOKAHEAD could occur, - // the validator duties could chain. For complete safety, it is recommended to poll at every slot to ensure - // validator is fully aware of any sudden chain reorg. - rpc GetDuties(DutiesRequest) returns (DutiesResponse) { - option (google.api.http) = { - get: "/eth/v1alpha1/validator/duties" - }; - } - - // Retrieves the latest valid beacon block to be proposed on the beacon chain. - // - // The server returns a new beacon block, without proposer signature, that can be - // proposed on the beacon chain. The block should be filled with all the necessary - // data for proposer to sign. - rpc GetBlock(BlockRequest) returns (BeaconBlock) { - option (google.api.http) = { - get: "/eth/v1alpha1/validator/block" - }; - } - - // Sends the newly signed beacon block to beacon node. - // - // The validator sends the newly signed beacon block to the beacon node so the beacon block can - // be included in the beacon chain. The beacon node is expected to validate and process the - // beacon block into its state. - rpc ProposeBlock(BeaconBlock) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/eth/v1alpha1/validator/block" - }; - } - - // Retrieves the latest valid attestation to a block on the beacon chain. - // - // The server returns the latest valid attestation which represents the correct vote - // for the head of the beacon chain. - rpc GetAttestationData(AttestationDataRequest) returns (Attestation) { - option (google.api.http) = { - get: "/eth/v1alpha1/validator/attestation" - }; - } - - // Sends the newly signed attestation to beacon node. - // - // The validator sends the newly signed attestation to the beacon node for the attestation to - // be included in the beacon chain. The beacon node is expected to validate and aggregate the - // attestations into the state. - rpc ProposeAttestation(Attestation) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/eth/v1alpha1/validator/attestation" - }; - } -} - -message DutiesRequest { - // Epoch at which validators should perform their duties. - uint64 epoch = 1; - // Array of byte encoded BLS public keys. - repeated bytes public_keys = 2 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; -} - -message DutiesResponse { - repeated Duty duties = 1; - message Duty { - // 48 byte BLS public key for the validator who's assigned to perform the following duty. - bytes public_key = 1 [(gogoproto.moretags) = "ssz-size:\"48\""]; - // Slot at which a validator must attest. - uint64 attestation_slot = 2; - // Shard at which a validator must attest. - uint64 attestation_shard = 3; - // Slot at which a validator must propose on beacon chain, - // when returns 0, the block production is not required, meaning - // the validator did not get assigned to be a proposer for the - // input epoch. - uint64 block_proposal_slot = 4; - } -} - -message BlockRequest { - // Slot for which the block should be proposed. - uint64 slot = 1; - // Validator's 32 byte randao reveal secret of the current epoch. - bytes randao_reveal = 2 [(gogoproto.moretags) = "ssz-size:\"48\""]; -} - -message AttestationDataRequest { - // The proof of custody bit is a byte with a single bit set as reported - // by the requesting validator. To be used for proof of custody game in phase 1. - bytes proof_of_custody_bit = 1; - // Slot for which the attestation should be proposed. - uint64 slot = 2; - // Shard for which the attestation is to be proposed. - uint64 shard = 3; -} - -// An Ethereum 2.0 validator. -message Validator { - // 48 byte BLS public key used for the validator's activities. - bytes public_key = 1 [(gogoproto.moretags) = "ssz-size:\"48\" spec-name:\"pubkey\""]; - - // 32 byte hash of the withdrawal destination public key. - bytes withdrawal_credentials = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; - - // The validators current effective balance in gwei. - uint64 effective_balance = 3; - - // Whether or not the validator has been slashed. - bool slashed = 4; - - // Epoch when the validator became eligible for activation. This field may - // be zero if the validator was present in the Ethereum 2.0 genesis. - uint64 activation_eligibility_epoch = 5; - - // Epoch when the validator was activated. This field may be zero if the - // validator was present in the Ethereum 2.0 genesis. - uint64 activation_epoch = 6; - - // Epoch when the validator was exited. This field may be zero if the - // validator has not exited. - uint64 exit_epoch = 7; - - // Epoch when the validator is eligible to withdraw their funds. This field - // may be zero if the validator has not exited. - uint64 withdrawable_epoch = 8; -} - -// ValidatorParticipation stores participation metrics during a given epoch. -message ValidatorParticipation { - // Percentage of validator participation in the given epoch. This field - // contains a value between 0 and 1. - float global_participation_rate = 1; - - // The total amount of ether, in gwei, that has been used in voting. - uint64 voted_ether = 2; - - // The total amount of ether, in gwei, that is eligible for voting. - uint64 eligible_ether = 3; -} - diff --git a/proto/testing/BUILD.bazel b/proto/testing/BUILD.bazel index 38162535d..a8bd3bb3e 100644 --- a/proto/testing/BUILD.bazel +++ b/proto/testing/BUILD.bazel @@ -46,7 +46,7 @@ go_test( tags = ["spectest"], deps = [ "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params/spectest:go_default_library", "//shared/testutil:go_default_library", @@ -75,7 +75,7 @@ go_test( ], deps = [ "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params/spectest:go_default_library", "//shared/testutil:go_default_library", @@ -99,7 +99,7 @@ go_test( tags = ["spectest"], deps = [ "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params/spectest:go_default_library", "//shared/testutil:go_default_library", diff --git a/proto/testing/ssz_regression_test.go b/proto/testing/ssz_regression_test.go index 0d50835da..d6e66d443 100644 --- a/proto/testing/ssz_regression_test.go +++ b/proto/testing/ssz_regression_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" sszspectest "github.com/prysmaticlabs/go-ssz/spectests" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/proto/testing/ssz_static_test.go b/proto/testing/ssz_static_test.go index aece4ca08..1123cde66 100644 --- a/proto/testing/ssz_static_test.go +++ b/proto/testing/ssz_static_test.go @@ -7,9 +7,9 @@ import ( "path" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params/spectest" "github.com/prysmaticlabs/prysm/shared/testutil" ) diff --git a/proto/testing/tags_test.go b/proto/testing/tags_test.go index 74619caa3..b89a0d1cc 100644 --- a/proto/testing/tags_test.go +++ b/proto/testing/tags_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - pb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + pb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ) func TestSSZTagSize(t *testing.T) { diff --git a/shared/interop/BUILD.bazel b/shared/interop/BUILD.bazel index e30be4bcd..1ce437bc1 100644 --- a/shared/interop/BUILD.bazel +++ b/shared/interop/BUILD.bazel @@ -11,7 +11,6 @@ go_library( deps = [ "//beacon-chain/core/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/hashutil:go_default_library", "//shared/mputil:go_default_library", @@ -19,6 +18,7 @@ go_library( "//shared/roughtime:go_default_library", "//shared/trieutil:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], ) @@ -35,11 +35,11 @@ go_test( embed = [":go_default_library"], deps = [ "//beacon-chain/core/state:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "//shared/trieutil:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", "@com_github_go_yaml_yaml//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@io_bazel_rules_go//go/tools/bazel:go_default_library", ], ) diff --git a/shared/interop/generate_genesis_state.go b/shared/interop/generate_genesis_state.go index c2e199969..bc51bdf30 100644 --- a/shared/interop/generate_genesis_state.go +++ b/shared/interop/generate_genesis_state.go @@ -4,10 +4,10 @@ import ( "sync" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/mputil" diff --git a/shared/interop/generate_genesis_state_test.go b/shared/interop/generate_genesis_state_test.go index 20ef50f7e..f853fec0e 100644 --- a/shared/interop/generate_genesis_state_test.go +++ b/shared/interop/generate_genesis_state_test.go @@ -3,8 +3,8 @@ package interop_test import ( "testing" + eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" - eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/interop" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/trieutil" diff --git a/shared/keystore/BUILD.bazel b/shared/keystore/BUILD.bazel index eda285695..970508a2e 100644 --- a/shared/keystore/BUILD.bazel +++ b/shared/keystore/BUILD.bazel @@ -12,13 +12,13 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/shared/keystore", visibility = ["//visibility:public"], deps = [ - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "@com_github_minio_sha256_simd//:go_default_library", "@com_github_pborman_uuid//:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@org_golang_x_crypto//pbkdf2:go_default_library", "@org_golang_x_crypto//scrypt:go_default_library", diff --git a/shared/keystore/deposit_input.go b/shared/keystore/deposit_input.go index 40015d5de..3217edfbc 100644 --- a/shared/keystore/deposit_input.go +++ b/shared/keystore/deposit_input.go @@ -1,8 +1,8 @@ package keystore import ( + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/shared/messagehandler/BUILD.bazel b/shared/messagehandler/BUILD.bazel index fc479dfce..789a174a8 100644 --- a/shared/messagehandler/BUILD.bazel +++ b/shared/messagehandler/BUILD.bazel @@ -18,9 +18,9 @@ go_test( srcs = ["messagehandler_test.go"], embed = [":go_default_library"], deps = [ - "//proto/eth/v1alpha1:go_default_library", "//shared/testutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", ], ) diff --git a/shared/messagehandler/messagehandler_test.go b/shared/messagehandler/messagehandler_test.go index c9dbb7935..4d5a2c66d 100644 --- a/shared/messagehandler/messagehandler_test.go +++ b/shared/messagehandler/messagehandler_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/messagehandler" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/shared/testutil/BUILD.bazel b/shared/testutil/BUILD.bazel index fe1ad62c5..0fdb9fade 100644 --- a/shared/testutil/BUILD.bazel +++ b/shared/testutil/BUILD.bazel @@ -22,7 +22,6 @@ go_library( "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bls:go_default_library", "//shared/hashutil:go_default_library", "//shared/interop:go_default_library", @@ -33,6 +32,7 @@ go_library( "@com_github_golang_protobuf//proto:go_default_library", "@com_github_json_iterator_go//:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", @@ -54,10 +54,10 @@ go_test( "//beacon-chain/core/state:go_default_library", "//beacon-chain/core/state/stateutils:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//proto/testing:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], ) diff --git a/shared/testutil/block.go b/shared/testutil/block.go index 344f7f255..0a28347aa 100644 --- a/shared/testutil/block.go +++ b/shared/testutil/block.go @@ -7,13 +7,13 @@ import ( "testing" "github.com/golang/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/params" ) @@ -215,8 +215,8 @@ func generateAttesterSlashings( aggregationBits.SetBitAt(randIndex, true) att1 := ðpb.Attestation{ Data: ðpb.AttestationData{ - Slot: bState.Slot, - Index: committeeIndex, + Slot: bState.Slot, + CommitteeIndex: committeeIndex, Target: ðpb.Checkpoint{ Epoch: currentEpoch, Root: params.BeaconConfig().ZeroHash[:], @@ -241,8 +241,8 @@ func generateAttesterSlashings( att2 := ðpb.Attestation{ Data: ðpb.AttestationData{ - Slot: bState.Slot, - Index: committeeIndex, + Slot: bState.Slot, + CommitteeIndex: committeeIndex, Target: ðpb.Checkpoint{ Epoch: currentEpoch, Root: params.BeaconConfig().ZeroHash[:], @@ -368,7 +368,7 @@ func GenerateAttestations( attData := ðpb.AttestationData{ Slot: slot, - Index: c, + CommitteeIndex: c, BeaconBlockRoot: headRoot, Source: bState.CurrentJustifiedCheckpoint, Target: ðpb.Checkpoint{ diff --git a/shared/testutil/helpers.go b/shared/testutil/helpers.go index 0ea57de57..eb81ae91e 100644 --- a/shared/testutil/helpers.go +++ b/shared/testutil/helpers.go @@ -6,10 +6,10 @@ import ( "testing" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/interop" diff --git a/shared/testutil/helpers_test.go b/shared/testutil/helpers_test.go index cf9284a4e..1da849fab 100644 --- a/shared/testutil/helpers_test.go +++ b/shared/testutil/helpers_test.go @@ -5,10 +5,10 @@ import ( "encoding/binary" "testing" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/shared/testutil/spectest.go b/shared/testutil/spectest.go index 9e5c0f296..7613459fc 100644 --- a/shared/testutil/spectest.go +++ b/shared/testutil/spectest.go @@ -10,10 +10,10 @@ import ( "github.com/bazelbuild/rules_go/go/tools/bazel" "github.com/gogo/protobuf/proto" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "gopkg.in/d4l3k/messagediff.v1" ) diff --git a/shared/trieutil/BUILD.bazel b/shared/trieutil/BUILD.bazel index 27eda4694..f33ef2c70 100644 --- a/shared/trieutil/BUILD.bazel +++ b/shared/trieutil/BUILD.bazel @@ -26,10 +26,10 @@ go_test( embed = [":go_default_library"], deps = [ "//contracts/deposit-contract:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "@com_github_ethereum_go_ethereum//accounts/abi/bind:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], ) diff --git a/shared/trieutil/sparse_merkle_test.go b/shared/trieutil/sparse_merkle_test.go index 60f31088a..e38768303 100644 --- a/shared/trieutil/sparse_merkle_test.go +++ b/shared/trieutil/sparse_merkle_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/ethereum/go-ethereum/accounts/abi/bind" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/slasher/db/BUILD.bazel b/slasher/db/BUILD.bazel index b9e9f97e1..83a02b06a 100644 --- a/slasher/db/BUILD.bazel +++ b/slasher/db/BUILD.bazel @@ -14,12 +14,13 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/slasher/db", visibility = ["//slasher:__subpackages__"], deps = [ - "//proto/eth/v1alpha1:go_default_library", + "//proto/beacon/rpc/v1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", "@com_github_boltdb_bolt//:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], @@ -36,7 +37,8 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//proto/eth/v1alpha1:go_default_library", + "//proto/beacon/rpc/v1:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) diff --git a/slasher/db/block_header.go b/slasher/db/block_header.go index 3f7d975a0..e2430c318 100644 --- a/slasher/db/block_header.go +++ b/slasher/db/block_header.go @@ -6,7 +6,7 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/slasher/db/block_header_test.go b/slasher/db/block_header_test.go index 9a3edea3b..05323ac34 100644 --- a/slasher/db/block_header_test.go +++ b/slasher/db/block_header_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ) func TestNilDBHistoryBlkHdr(t *testing.T) { diff --git a/slasher/db/indexed_attestations.go b/slasher/db/indexed_attestations.go index f4ee14e27..b939c03a3 100644 --- a/slasher/db/indexed_attestations.go +++ b/slasher/db/indexed_attestations.go @@ -8,8 +8,9 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" ) @@ -23,8 +24,8 @@ func createIndexedAttestation(enc []byte) (*ethpb.IndexedAttestation, error) { return protoIdxAtt, nil } -func createValidatorIDsToIndexedAttestationList(enc []byte) (*ethpb.ValidatorIDToIdxAttList, error) { - protoIdxAtt := ðpb.ValidatorIDToIdxAttList{} +func createValidatorIDsToIndexedAttestationList(enc []byte) (*pb.ValidatorIDToIdxAttList, error) { + protoIdxAtt := &pb.ValidatorIDToIdxAttList{} err := proto.Unmarshal(enc, protoIdxAtt) if err != nil { return nil, errors.Wrap(err, "failed to unmarshal encoding") @@ -157,7 +158,7 @@ func createIndexedAttestationIndicesFromData(idxAttestation *ethpb.IndexedAttest if err != nil { return errors.Wrap(err, "failed to hash indexed attestation data.") } - protoIdxAtt := ðpb.ValidatorIDToIdxAtt{ + protoIdxAtt := &pb.ValidatorIDToIdxAtt{ Signature: idxAttestation.Signature, Indices: indices, DataRoot: dataRoot[:], @@ -202,7 +203,7 @@ func (db *Store) DeleteIndexedAttestation(idxAttestation *ethpb.IndexedAttestati func removeIndexedAttestationIndicesFromData(idxAttestation *ethpb.IndexedAttestation, tx *bolt.Tx) error { indices := append(idxAttestation.CustodyBit_0Indices, idxAttestation.CustodyBit_1Indices...) dataRoot, err := ssz.HashTreeRoot(idxAttestation.Data) - protoIdxAtt := ðpb.ValidatorIDToIdxAtt{ + protoIdxAtt := &pb.ValidatorIDToIdxAtt{ Signature: idxAttestation.Signature, Indices: indices, DataRoot: dataRoot[:], diff --git a/slasher/db/indexed_attestations_test.go b/slasher/db/indexed_attestations_test.go index 11165bab3..aa03451ed 100644 --- a/slasher/db/indexed_attestations_test.go +++ b/slasher/db/indexed_attestations_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" ) type testStruct struct { diff --git a/slasher/db/min_max_span.go b/slasher/db/min_max_span.go index b41123c74..15a31a970 100644 --- a/slasher/db/min_max_span.go +++ b/slasher/db/min_max_span.go @@ -4,7 +4,7 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/shared/bytesutil" ) diff --git a/slasher/db/min_max_span_test.go b/slasher/db/min_max_span_test.go index b753c39a4..ab296b025 100644 --- a/slasher/db/min_max_span_test.go +++ b/slasher/db/min_max_span_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" ) type spanMapTestStruct struct { diff --git a/slasher/rpc/BUILD.bazel b/slasher/rpc/BUILD.bazel index 5dc44dde3..f9945b0af 100644 --- a/slasher/rpc/BUILD.bazel +++ b/slasher/rpc/BUILD.bazel @@ -10,12 +10,13 @@ go_library( visibility = ["//visibility:public"], deps = [ "//beacon-chain/core/helpers:go_default_library", - "//proto/eth/v1alpha1:go_default_library", + "//proto/beacon/rpc/v1:go_default_library", "//shared/params:go_default_library", "//slasher/db:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", @@ -30,10 +31,11 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//proto/eth/v1alpha1:go_default_library", + "//proto/beacon/rpc/v1:go_default_library", "//shared/params:go_default_library", "//slasher/db:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", ], ) diff --git a/slasher/rpc/detect_update_min_max_span.go b/slasher/rpc/detect_update_min_max_span.go index e6857b0c0..23f6259a3 100644 --- a/slasher/rpc/detect_update_min_max_span.go +++ b/slasher/rpc/detect_update_min_max_span.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/pkg/errors" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/slasher/rpc/detect_update_min_max_span_test.go b/slasher/rpc/detect_update_min_max_span_test.go index e8054be3a..ceb702f56 100644 --- a/slasher/rpc/detect_update_min_max_span_test.go +++ b/slasher/rpc/detect_update_min_max_span_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/slasher/db" ) diff --git a/slasher/rpc/server.go b/slasher/rpc/server.go index 86019ceab..ed5709a38 100644 --- a/slasher/rpc/server.go +++ b/slasher/rpc/server.go @@ -6,9 +6,10 @@ import ( "github.com/gogo/protobuf/proto" "github.com/gogo/protobuf/types" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + slashpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/slasher/db" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -23,7 +24,7 @@ type Server struct { // IsSlashableAttestation returns an attester slashing if the attestation submitted // is a slashable vote. -func (ss *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.IndexedAttestation) (*ethpb.AttesterSlashingResponse, error) { +func (ss *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.IndexedAttestation) (*slashpb.AttesterSlashingResponse, error) { //TODO(#3133): add signature validation if err := ss.SlasherDB.SaveIndexedAttestation(req); err != nil { return nil, err @@ -34,7 +35,7 @@ func (ss *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.Indexed if err != nil { return nil, err } - atsSlashinngRes := ðpb.AttesterSlashingResponse{} + atsSlashinngRes := &slashpb.AttesterSlashingResponse{} for _, idx := range indices { atts, err := ss.SlasherDB.DoubleVotes(tEpoch, idx, root[:], req) if err != nil { @@ -62,14 +63,14 @@ func (ss *Server) IsSlashableAttestation(ctx context.Context, req *ethpb.Indexed // IsSlashableBlock returns a proposer slashing if the block header submitted is // a slashable proposal. -func (ss *Server) IsSlashableBlock(ctx context.Context, psr *ethpb.ProposerSlashingRequest) (*ethpb.ProposerSlashingResponse, error) { +func (ss *Server) IsSlashableBlock(ctx context.Context, psr *slashpb.ProposerSlashingRequest) (*slashpb.ProposerSlashingResponse, error) { //TODO(#3133): add signature validation epoch := helpers.SlotToEpoch(psr.BlockHeader.Slot) blockHeaders, err := ss.SlasherDB.BlockHeader(epoch, psr.ValidatorIndex) if err != nil { return nil, errors.Wrap(err, "slasher service error while trying to retrieve blocks") } - pSlashingsResponse := ðpb.ProposerSlashingResponse{} + pSlashingsResponse := &slashpb.ProposerSlashingResponse{} presentInDb := false for _, bh := range blockHeaders { if proto.Equal(bh, psr.BlockHeader) { @@ -88,13 +89,13 @@ func (ss *Server) IsSlashableBlock(ctx context.Context, psr *ethpb.ProposerSlash } // SlashableProposals is a subscription to receive all slashable proposer slashing events found by the watchtower. -func (ss *Server) SlashableProposals(req *types.Empty, server ethpb.Slasher_SlashableProposalsServer) error { +func (ss *Server) SlashableProposals(req *types.Empty, server slashpb.Slasher_SlashableProposalsServer) error { //TODO(3133): implement stream provider for newly discovered listening to slashable proposals. return status.Error(codes.Unimplemented, "not implemented") } // SlashableAttestations is a subscription to receive all slashable attester slashing events found by the watchtower. -func (ss *Server) SlashableAttestations(req *types.Empty, server ethpb.Slasher_SlashableAttestationsServer) error { +func (ss *Server) SlashableAttestations(req *types.Empty, server slashpb.Slasher_SlashableAttestationsServer) error { //TODO(3133): implement stream provider for newly discovered listening to slashable attestation. return status.Error(codes.Unimplemented, "not implemented") } diff --git a/slasher/rpc/server_test.go b/slasher/rpc/server_test.go index 6065fb952..3de682df7 100644 --- a/slasher/rpc/server_test.go +++ b/slasher/rpc/server_test.go @@ -5,7 +5,8 @@ import ( "testing" "github.com/gogo/protobuf/proto" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" + slashpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/slasher/db" ) @@ -17,14 +18,14 @@ func TestServer_IsSlashableBlock(t *testing.T) { slasherServer := &Server{ SlasherDB: dbs, } - psr := ðpb.ProposerSlashingRequest{ + psr := &slashpb.ProposerSlashingRequest{ BlockHeader: ðpb.BeaconBlockHeader{ Slot: 1, StateRoot: []byte("A"), }, ValidatorIndex: 1, } - psr2 := ðpb.ProposerSlashingRequest{ + psr2 := &slashpb.ProposerSlashingRequest{ BlockHeader: ðpb.BeaconBlockHeader{ Slot: 1, StateRoot: []byte("B"), @@ -62,14 +63,14 @@ func TestServer_IsNotSlashableBlock(t *testing.T) { slasherServer := &Server{ SlasherDB: dbs, } - psr := ðpb.ProposerSlashingRequest{ + psr := &slashpb.ProposerSlashingRequest{ BlockHeader: ðpb.BeaconBlockHeader{ Slot: 1, StateRoot: []byte("A"), }, ValidatorIndex: 1, } - psr2 := ðpb.ProposerSlashingRequest{ + psr2 := &slashpb.ProposerSlashingRequest{ BlockHeader: ðpb.BeaconBlockHeader{ Slot: 65, StateRoot: []byte("B"), @@ -100,7 +101,7 @@ func TestServer_DoubleBlock(t *testing.T) { ctx: ctx, SlasherDB: dbs, } - psr := ðpb.ProposerSlashingRequest{ + psr := &slashpb.ProposerSlashingRequest{ BlockHeader: ðpb.BeaconBlockHeader{ Slot: 1, StateRoot: []byte("A"), @@ -130,14 +131,14 @@ func TestServer_SameSlotSlashable(t *testing.T) { ctx: ctx, SlasherDB: dbs, } - psr := ðpb.ProposerSlashingRequest{ + psr := &slashpb.ProposerSlashingRequest{ BlockHeader: ðpb.BeaconBlockHeader{ Slot: 1, StateRoot: []byte("A"), }, ValidatorIndex: 1, } - psr2 := ðpb.ProposerSlashingRequest{ + psr2 := &slashpb.ProposerSlashingRequest{ BlockHeader: ðpb.BeaconBlockHeader{ Slot: 1, StateRoot: []byte("B"), @@ -181,7 +182,7 @@ func TestServer_SlashDoubleAttestation(t *testing.T) { Signature: []byte("sig2"), Data: ðpb.AttestationData{ Slot: 3*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block1"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -193,7 +194,7 @@ func TestServer_SlashDoubleAttestation(t *testing.T) { Signature: []byte("sig1"), Data: ðpb.AttestationData{ Slot: 3*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block2"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -235,7 +236,7 @@ func TestServer_SlashTripleAttestation(t *testing.T) { Signature: []byte("sig1"), Data: ðpb.AttestationData{ Slot: 3*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block1"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -247,7 +248,7 @@ func TestServer_SlashTripleAttestation(t *testing.T) { Signature: []byte("sig2"), Data: ðpb.AttestationData{ Slot: 3*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block2"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -259,7 +260,7 @@ func TestServer_SlashTripleAttestation(t *testing.T) { Signature: []byte("sig3"), Data: ðpb.AttestationData{ Slot: 3*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block3"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -312,7 +313,7 @@ func TestServer_DontSlashSameAttestation(t *testing.T) { Signature: []byte("sig1"), Data: ðpb.AttestationData{ Slot: 3*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block1"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -346,7 +347,7 @@ func TestServer_DontSlashDifferentTargetAttestation(t *testing.T) { Signature: []byte("sig2"), Data: ðpb.AttestationData{ Slot: 3*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block1"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -358,7 +359,7 @@ func TestServer_DontSlashDifferentTargetAttestation(t *testing.T) { Signature: []byte("sig1"), Data: ðpb.AttestationData{ Slot: 4*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block2"), Source: ðpb.Checkpoint{Epoch: 3}, Target: ðpb.Checkpoint{Epoch: 4}, @@ -388,7 +389,7 @@ func TestServer_DontSlashSameAttestationData(t *testing.T) { } ad := ðpb.AttestationData{ Slot: 3*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block1"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -433,7 +434,7 @@ func TestServer_SlashSurroundedAttestation(t *testing.T) { Signature: []byte("sig2"), Data: ðpb.AttestationData{ Slot: 4*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block1"), Source: ðpb.Checkpoint{Epoch: 1}, Target: ðpb.Checkpoint{Epoch: 4}, @@ -445,7 +446,7 @@ func TestServer_SlashSurroundedAttestation(t *testing.T) { Signature: []byte("sig1"), Data: ðpb.AttestationData{ Slot: 4*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block2"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -486,7 +487,7 @@ func TestServer_SlashSurroundAttestation(t *testing.T) { Signature: []byte("sig2"), Data: ðpb.AttestationData{ Slot: 4*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block1"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 3}, @@ -498,7 +499,7 @@ func TestServer_SlashSurroundAttestation(t *testing.T) { Signature: []byte("sig1"), Data: ðpb.AttestationData{ Slot: 4*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block2"), Source: ðpb.Checkpoint{Epoch: 1}, Target: ðpb.Checkpoint{Epoch: 4}, @@ -539,7 +540,7 @@ func TestServer_DontSlashValidAttestations(t *testing.T) { Signature: []byte("sig2"), Data: ðpb.AttestationData{ Slot: 5*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block1"), Source: ðpb.Checkpoint{Epoch: 2}, Target: ðpb.Checkpoint{Epoch: 4}, @@ -551,7 +552,7 @@ func TestServer_DontSlashValidAttestations(t *testing.T) { Signature: []byte("sig1"), Data: ðpb.AttestationData{ Slot: 5*params.BeaconConfig().SlotsPerEpoch + 1, - Index: 0, + CommitteeIndex: 0, BeaconBlockRoot: []byte("block2"), Source: ðpb.Checkpoint{Epoch: 3}, Target: ðpb.Checkpoint{Epoch: 5}, diff --git a/slasher/service/BUILD.bazel b/slasher/service/BUILD.bazel index 7a731e5f4..8cdde0cd0 100644 --- a/slasher/service/BUILD.bazel +++ b/slasher/service/BUILD.bazel @@ -6,7 +6,7 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/slasher/service", visibility = ["//visibility:public"], deps = [ - "//proto/eth/v1alpha1:go_default_library", + "//proto/beacon/rpc/v1:go_default_library", "//shared/cmd:go_default_library", "//shared/debug:go_default_library", "//shared/version:go_default_library", diff --git a/slasher/service/service.go b/slasher/service/service.go index ceb441d93..f068c271b 100644 --- a/slasher/service/service.go +++ b/slasher/service/service.go @@ -23,7 +23,7 @@ import ( middleware "github.com/grpc-ecosystem/go-grpc-middleware" recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + slashpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/slasher/db" "github.com/sirupsen/logrus" "google.golang.org/grpc" @@ -150,7 +150,7 @@ func (s *Service) startSlasher() { SlasherDB: s.slasherDb, } - ethpb.RegisterSlasherServer(s.grpcServer, &slasherServer) + slashpb.RegisterSlasherServer(s.grpcServer, &slasherServer) // Register reflection service on gRPC server. reflection.Register(s.grpcServer) diff --git a/third_party/com_github_prysmaticlabs_ethereumapis-tags.patch b/third_party/com_github_prysmaticlabs_ethereumapis-tags.patch new file mode 100644 index 000000000..f1580f48d --- /dev/null +++ b/third_party/com_github_prysmaticlabs_ethereumapis-tags.patch @@ -0,0 +1,435 @@ +diff -ur --exclude=.git a/eth/v1alpha1/BUILD.bazel b/eth/v1alpha1/BUILD.bazel +--- a/eth/v1alpha1/BUILD.bazel 2019-11-25 22:56:20.000000000 -0600 ++++ b/eth/v1alpha1/BUILD.bazel 2019-11-26 21:14:05.000000000 -0600 +@@ -20,6 +20,7 @@ + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:timestamp_proto", + "@go_googleapis//google/api:annotations_proto", ++ "@gogo_special_proto//github.com/gogo/protobuf/gogoproto", + ], + ) + +@@ -46,12 +47,32 @@ + + go_proto_library( + name = "go_proto", +- compilers = ["@io_bazel_rules_go//proto:go_grpc"], ++ compilers = ["@prysm//:grpc_proto_compiler"], + importpath = "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1", + proto = ":proto", + visibility = ["//visibility:public"], + deps = [ + "@grpc_ecosystem_grpc_gateway//protoc-gen-swagger/options:options_go_proto", ++ "@com_github_prysmaticlabs_go_bitfield//:go_default_library", ++ "@go_googleapis//google/api:annotations_go_proto", ++ ], ++) ++ ++go_proto_library( ++ name = "go_grpc_gateway_library", ++ compilers = [ ++ "@prysm//:grpc_nogogo_proto_compiler", ++ "@grpc_ecosystem_grpc_gateway//protoc-gen-grpc-gateway:go_gen_grpc_gateway", ++ ], ++ importpath = "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1_gateway", ++ proto = ":proto", ++ visibility = ["//visibility:public"], ++ deps = [ ++ "@grpc_ecosystem_grpc_gateway//protoc-gen-swagger/options:options_go_proto", ++ "@com_github_gogo_protobuf//gogoproto:go_default_library", ++ "@com_github_golang_protobuf//descriptor:go_default_library", ++ "@com_github_golang_protobuf//ptypes/empty:go_default_library", ++ "@com_github_prysmaticlabs_go_bitfield//:go_default_library", + "@go_googleapis//google/api:annotations_go_proto", + ], + ) +@@ -74,4 +95,4 @@ + visibility = ["//visibility:public"], + single_output = True, + json_names_for_fields = True, +-) ++) +\ No newline at end of file +diff -ur --exclude=.git a/eth/v1alpha1/attestation.proto b/eth/v1alpha1/attestation.proto +--- a/eth/v1alpha1/attestation.proto 2019-11-26 11:48:31.000000000 -0600 ++++ b/eth/v1alpha1/attestation.proto 2019-11-26 21:31:42.000000000 -0600 +@@ -15,6 +15,8 @@ + + package ethereum.eth.v1alpha1; + ++import "github.com/gogo/protobuf/gogoproto/gogo.proto"; ++ + option csharp_namespace = "Ethereum.Eth.v1alpha1"; + option go_package = "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1;eth"; + option java_multiple_files = true; +@@ -25,17 +27,17 @@ + message Attestation { + // A bitfield representation of validator indices that have voted exactly + // the same vote and have been aggregated into this attestation. +- bytes aggregation_bits = 1; ++ bytes aggregation_bits = 1 [(gogoproto.moretags) = "ssz-max:\"2048\"", (gogoproto.casttype) = "github.com/prysmaticlabs/go-bitfield.Bitlist"]; + + AttestationData data = 2; + + // Custody bits is used for proof of custody game to ensure validator has + // legitimately downloaded and verified shard data. + // Not used in phase 0. +- bytes custody_bits = 3; ++ bytes custody_bits = 3 [(gogoproto.moretags) = "ssz-max:\"2048\"", (gogoproto.casttype) = "github.com/prysmaticlabs/go-bitfield.Bitlist"]; + + // 96 byte BLS aggregate signature. +- bytes signature = 4; ++ bytes signature = 4 [(gogoproto.moretags) = "ssz-size:\"96\""]; + } + + message AttestationData { +@@ -46,10 +48,10 @@ + uint64 slot = 1; + + // The committee index that submitted this attestation. +- uint64 index = 2; ++ uint64 committee_index = 2; + + // 32 byte root of the LMD GHOST block vote. +- bytes beacon_block_root = 3; ++ bytes beacon_block_root = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // the most recent justified checkpoint in the beacon state + Checkpoint source = 4; +@@ -84,5 +86,5 @@ + // epoch of the check point reference to. + uint64 epoch = 1; + // block root of the check point reference to. +- bytes root = 2; ++ bytes root = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; + } +diff -ur --exclude=.git a/eth/v1alpha1/beacon_block.proto b/eth/v1alpha1/beacon_block.proto +--- a/eth/v1alpha1/beacon_block.proto 2019-11-25 22:56:20.000000000 -0600 ++++ b/eth/v1alpha1/beacon_block.proto 2019-11-25 23:03:10.000000000 -0600 +@@ -15,6 +15,7 @@ + + package ethereum.eth.v1alpha1; + ++import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + import "eth/v1alpha1/attestation.proto"; + + option csharp_namespace = "Ethereum.Eth.v1alpha1"; +@@ -30,47 +31,47 @@ + uint64 slot = 1; + + // 32 byte root of the parent block. +- bytes parent_root = 2; ++ bytes parent_root = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // 32 byte root of the resulting state after processing this block. +- bytes state_root = 3; ++ bytes state_root = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // The block body itself. + BeaconBlockBody body = 4; + + // 96 byte BLS signature from the validator that produced this block. +- bytes signature = 5; ++ bytes signature = 5 [(gogoproto.moretags) = "ssz-size:\"96\""]; + } + + // The block body of an Ethereum 2.0 beacon block. + message BeaconBlockBody { + // The validators RANDAO reveal 96 byte value. +- bytes randao_reveal = 1; ++ bytes randao_reveal = 1 [(gogoproto.moretags) = "ssz-size:\"96\""]; + + // A reference to the Ethereum 1.x chain. + Eth1Data eth1_data = 2; + + // 32 byte field of arbitrary data. This field may contain any data and + // is not used for anything other than a fun message. +- bytes graffiti = 3; ++ bytes graffiti = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // Block operations + // Refer to spec constants at https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block + + // At most MAX_PROPOSER_SLASHINGS. +- repeated ProposerSlashing proposer_slashings = 4; ++ repeated ProposerSlashing proposer_slashings = 4 [(gogoproto.moretags) = "ssz-max:\"16\""]; + + // At most MAX_ATTESTER_SLASHINGS. +- repeated AttesterSlashing attester_slashings = 5; ++ repeated AttesterSlashing attester_slashings = 5 [(gogoproto.moretags) = "ssz-max:\"1\""]; + + // At most MAX_ATTESTATIONS. +- repeated Attestation attestations = 6; ++ repeated Attestation attestations = 6 [(gogoproto.moretags) = "ssz-max:\"128\""]; + + // At most MAX_DEPOSITS. +- repeated Deposit deposits = 7; ++ repeated Deposit deposits = 7 [(gogoproto.moretags) = "ssz-max:\"16\""]; + + // At most MAX_VOLUNTARY_EXITS. +- repeated VoluntaryExit voluntary_exits = 8; ++ repeated VoluntaryExit voluntary_exits = 8 [(gogoproto.moretags) = "ssz-max:\"16\""]; + } + + // Proposer slashings are proofs that a slashable offense has been committed by +@@ -101,20 +102,20 @@ + message Deposit { + message Data { + // 48 byte BLS public key of the validator. +- bytes public_key = 1; ++ bytes public_key = 1 [(gogoproto.moretags) = "ssz-size:\"48\" spec-name:\"pubkey\""]; + + // A 32 byte hash of the withdrawal address public key. +- bytes withdrawal_credentials = 2; ++ bytes withdrawal_credentials = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // Deposit amount in gwei. + uint64 amount = 3; + + // 96 byte signature from the validators public key. +- bytes signature = 4; ++ bytes signature = 4 [(gogoproto.moretags) = "ssz-size:\"96\""]; + } + + // 32 byte roots in the deposit tree branch. +- repeated bytes proof = 1; ++ repeated bytes proof = 1 [(gogoproto.moretags) = "ssz-size:\"33,32\""]; + + Data data = 2; + } +@@ -129,14 +130,14 @@ + uint64 validator_index = 2; + + // Validator's 96 byte signature +- bytes signature = 3; ++ bytes signature = 3 [(gogoproto.moretags) = "ssz-size:\"96\""]; + } + + // Eth1Data represents references to the Ethereum 1.x deposit contract. + message Eth1Data { + // The 32 byte deposit tree root for the last deposit included in this + // block. +- bytes deposit_root = 1; ++ bytes deposit_root = 1 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // The total number of deposits included in the beacon chain since genesis + // including the deposits in this block. +@@ -144,7 +145,7 @@ + + // The 32 byte block hash of the Ethereum 1.x block considered for deposit + // inclusion. +- bytes block_hash = 3; ++ bytes block_hash = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; + } + + // A beacon block header is essentially a beacon block with only a reference to +@@ -155,24 +156,24 @@ + uint64 slot = 1; + + // 32 byte merkle tree root of the parent ssz encoded block. +- bytes parent_root = 2; ++ bytes parent_root = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // 32 byte merkle tree root of the resulting ssz encoded state after processing this block. +- bytes state_root = 3; ++ bytes state_root = 3 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // 32 byte merkle tree root of the ssz encoded block body. +- bytes body_root = 4; ++ bytes body_root = 4 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // 96 byte BLS signature from the validator that produced this block. +- bytes signature = 5; ++ bytes signature = 5 [(gogoproto.moretags) = "ssz-size:\"96\""]; + } + + message IndexedAttestation { +- repeated uint64 custody_bit_0_indices = 1; +- repeated uint64 custody_bit_1_indices = 2; ++ repeated uint64 custody_bit_0_indices = 1 [(gogoproto.moretags) = "ssz-max:\"2048\""]; ++ repeated uint64 custody_bit_1_indices = 2 [(gogoproto.moretags) = "ssz-max:\"2048\""]; + + AttestationData data = 3; + + // 96 bytes aggregate signature. +- bytes signature = 4; ++ bytes signature = 4 [(gogoproto.moretags) = "ssz-size:\"96\""]; + } +diff -ur --exclude=.git a/eth/v1alpha1/beacon_chain.proto b/eth/v1alpha1/beacon_chain.proto +--- a/eth/v1alpha1/beacon_chain.proto 2019-11-25 22:56:20.000000000 -0600 ++++ b/eth/v1alpha1/beacon_chain.proto 2019-11-26 12:33:36.000000000 -0600 +@@ -15,6 +15,7 @@ + + package ethereum.eth.v1alpha1; + ++import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + import "google/api/annotations.proto"; + import "google/protobuf/empty.proto"; + +@@ -144,7 +145,7 @@ + // + // This method returns information about the global participation of + // validator attestations. +- rpc GetValidatorParticipation(GetValidatorParticipationRequest) returns (ValidatorParticipation) { ++ rpc GetValidatorParticipation(GetValidatorParticipationRequest) returns (ValidatorParticipationResponse) { + option (google.api.http) = { + get: "/eth/v1alpha1/validators/participation" + }; +@@ -247,7 +248,7 @@ + // Information about the head of the beacon chain. + message ChainHead { + // 32 byte merkle tree root of the canonical head block in the beacon node. +- bytes head_block_root = 1; ++ bytes head_block_root = 1 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // Slot of the head block. + uint64 head_block_slot = 2; +@@ -262,7 +263,7 @@ + uint64 finalized_epoch = 5; + + // Most recent 32 byte finalized block root. +- bytes finalized_block_root = 6; ++ bytes finalized_block_root = 6 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // Most recent slot that contains the justified block. + uint64 justified_block_slot = 7; +@@ -271,7 +272,7 @@ + uint64 justified_epoch = 8; + + // Most recent 32 byte justified block root. +- bytes justified_block_root = 9; ++ bytes justified_block_root = 9 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // Most recent slot that contains the previous justified block. + uint64 previous_justified_slot = 10; +@@ -280,7 +281,7 @@ + uint64 previous_justified_epoch = 11; + + // Previous 32 byte justified block root. +- bytes previous_justified_block_root = 12; ++ bytes previous_justified_block_root = 12 [(gogoproto.moretags) = "ssz-size:\"32\""]; + } + + message ListCommitteesRequest { +@@ -338,7 +339,7 @@ + + // Validator 48 byte BLS public keys to filter validators for the given + // epoch. +- repeated bytes public_keys = 3; ++ repeated bytes public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + + // Validator indices to filter validators for the given epoch. + repeated uint64 indices = 4; +@@ -359,7 +360,7 @@ + + message Balance { + // Validator's 48 byte BLS public key. +- bytes public_key = 1; ++ bytes public_key = 1 [(gogoproto.moretags) = "ssz-size:\"48\""]; + + // Validator's index in the validator set. + uint64 index = 2; +@@ -435,17 +436,17 @@ + uint64 epoch = 1; + + // 48 byte validator public keys that have been activated in this epoch. +- repeated bytes activated_public_keys = 2; ++ repeated bytes activated_public_keys = 2 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + + // 48 byte validator public keys that have been voluntarily exited in this + // epoch. +- repeated bytes exited_public_keys = 3; ++ repeated bytes exited_public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + + // 48 byte validator public keys that have been slashed in this epoch. +- repeated bytes slashed_public_keys = 4; ++ repeated bytes slashed_public_keys = 4 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + + // 48 byte validator public keys that have been involuntarily ejected in this epoch. +- repeated bytes ejected_public_keys = 5; ++ repeated bytes ejected_public_keys = 5 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + } + + message ValidatorQueue { +@@ -455,11 +456,11 @@ + + // Ordered list of 48 byte public keys awaiting activation. 0th index is the + // next key to be processed. +- repeated bytes activation_public_keys = 2; ++ repeated bytes activation_public_keys = 2 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + + // Ordered list of public keys awaiting exit. 0th index is the next key to + // be processed. +- repeated bytes exit_public_keys = 3; ++ repeated bytes exit_public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + } + + message ListValidatorAssignmentsRequest { +@@ -471,7 +472,7 @@ + bool genesis = 2; + } + // 48 byte validator public keys to filter assignments for the given epoch. +- repeated bytes public_keys = 3; ++ repeated bytes public_keys = 3 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + + // Validator indicies to filter assignments for the given epoch. + repeated uint64 indices = 4; +@@ -506,7 +507,7 @@ + uint64 proposer_slot = 4; + + // 48 byte BLS public key. +- bytes public_key = 5; ++ bytes public_key = 5 [(gogoproto.moretags) = "ssz-size:\"48\""]; + } + + // The epoch for which this set of validator assignments is valid. +diff -ur --exclude=.git a/eth/v1alpha1/validator.proto b/eth/v1alpha1/validator.proto +--- a/eth/v1alpha1/validator.proto 2019-11-25 22:56:20.000000000 -0600 ++++ b/eth/v1alpha1/validator.proto 2019-11-26 11:39:16.000000000 -0600 +@@ -15,6 +15,7 @@ + + package ethereum.eth.v1alpha1; + ++import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + import "google/api/annotations.proto"; + import "google/protobuf/empty.proto"; + import "eth/v1alpha1/beacon_block.proto"; +@@ -96,14 +97,14 @@ + // Epoch at which validators should perform their duties. + uint64 epoch = 1; + // Array of byte encoded BLS public keys. +- repeated bytes public_keys = 2; ++ repeated bytes public_keys = 2 [(gogoproto.moretags) = "ssz-size:\"?,48\""]; + } + + message DutiesResponse { + repeated Duty duties = 1; + message Duty { + // 48 byte BLS public key for the validator who's assigned to perform the following duty. +- bytes public_key = 1; ++ bytes public_key = 1 [(gogoproto.moretags) = "ssz-size:\"48\""]; + // Slot at which a validator must attest. + uint64 attestation_slot = 2; + // Shard at which a validator must attest. +@@ -120,7 +121,7 @@ + // Slot for which the block should be proposed. + uint64 slot = 1; + // Validator's 32 byte randao reveal secret of the current epoch. +- bytes randao_reveal = 2; ++ bytes randao_reveal = 2 [(gogoproto.moretags) = "ssz-size:\"48\""]; + } + + message AttestationDataRequest { +@@ -137,10 +138,10 @@ + // An Ethereum 2.0 validator. + message Validator { + // 48 byte BLS public key used for the validator's activities. +- bytes public_key = 1; ++ bytes public_key = 1 [(gogoproto.moretags) = "ssz-size:\"48\" spec-name:\"pubkey\""]; + + // 32 byte hash of the withdrawal destination public key. +- bytes withdrawal_credentials = 2; ++ bytes withdrawal_credentials = 2 [(gogoproto.moretags) = "ssz-size:\"32\""]; + + // The validators current effective balance in gwei. + uint64 effective_balance = 3; diff --git a/tools/forkchecker/BUILD.bazel b/tools/forkchecker/BUILD.bazel index 90259ca15..733e6204d 100644 --- a/tools/forkchecker/BUILD.bazel +++ b/tools/forkchecker/BUILD.bazel @@ -6,9 +6,9 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/tools/forkchecker", visibility = ["//visibility:private"], deps = [ - "//proto/eth/v1alpha1:go_default_library", "//shared/params:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@org_golang_google_grpc//:go_default_library", ], diff --git a/tools/forkchecker/forkchecker.go b/tools/forkchecker/forkchecker.go index 5b1dcb3ee..2c2023ccf 100644 --- a/tools/forkchecker/forkchecker.go +++ b/tools/forkchecker/forkchecker.go @@ -17,7 +17,7 @@ import ( "time" ptypes "github.com/gogo/protobuf/types" - pb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + pb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/sirupsen/logrus" "google.golang.org/grpc" diff --git a/validator/client/BUILD.bazel b/validator/client/BUILD.bazel index 6755b85e3..05f5bfd00 100644 --- a/validator/client/BUILD.bazel +++ b/validator/client/BUILD.bazel @@ -17,7 +17,6 @@ go_library( "//beacon-chain/core/helpers:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", "//shared/hashutil:go_default_library", "//shared/keystore:go_default_library", @@ -29,6 +28,7 @@ go_library( "@com_github_grpc_ecosystem_go_grpc_middleware//tracing/opentracing:go_default_library", "@com_github_grpc_ecosystem_go_grpc_prometheus//:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", @@ -57,7 +57,6 @@ go_test( deps = [ "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "//shared:go_default_library", "//shared/bls:go_default_library", "//shared/keystore:go_default_library", @@ -68,6 +67,7 @@ go_test( "//validator/internal:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", "@com_github_golang_mock//gomock:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/validator/client/service.go b/validator/client/service.go index 600828929..7b5c7a458 100644 --- a/validator/client/service.go +++ b/validator/client/service.go @@ -8,8 +8,8 @@ import ( grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/keystore" "github.com/sirupsen/logrus" diff --git a/validator/client/validator.go b/validator/client/validator.go index 4193f31db..c4b987bcf 100644 --- a/validator/client/validator.go +++ b/validator/client/validator.go @@ -10,9 +10,9 @@ import ( ptypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/keystore" diff --git a/validator/client/validator_attest.go b/validator/client/validator_attest.go index df52449a1..5cf167383 100644 --- a/validator/client/validator_attest.go +++ b/validator/client/validator_attest.go @@ -7,11 +7,11 @@ import ( "fmt" "time" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/roughtime" @@ -57,7 +57,7 @@ func (v *validator) SubmitAttestation(ctx context.Context, slot uint64, pubKey [ return } log = log.WithField("slot", data.Slot) - log = log.WithField("committeeIndex", data.Index) + log = log.WithField("committeeIndex", data.CommitteeIndex) sig, err := v.signAtt(ctx, pubKey, data) if err != nil { @@ -87,7 +87,7 @@ func (v *validator) SubmitAttestation(ctx context.Context, slot uint64, pubKey [ span.AddAttributes( trace.Int64Attribute("slot", int64(slot)), trace.StringAttribute("attestationHash", fmt.Sprintf("%#x", attResp.Root)), - trace.Int64Attribute("committeeIndex", int64(data.Index)), + trace.Int64Attribute("committeeIndex", int64(data.CommitteeIndex)), trace.StringAttribute("blockRoot", fmt.Sprintf("%#x", data.BeaconBlockRoot)), trace.Int64Attribute("justifiedEpoch", int64(data.Source.Epoch)), trace.Int64Attribute("targetEpoch", int64(data.Target.Epoch)), diff --git a/validator/client/validator_attest_test.go b/validator/client/validator_attest_test.go index 6aee0d2c5..0d2ed7cc4 100644 --- a/validator/client/validator_attest_test.go +++ b/validator/client/validator_attest_test.go @@ -9,11 +9,11 @@ import ( "time" "github.com/golang/mock/gomock" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/go-ssz" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/roughtime" "github.com/prysmaticlabs/prysm/shared/testutil" diff --git a/validator/client/validator_propose.go b/validator/client/validator_propose.go index bbd24ca45..2084c660b 100644 --- a/validator/client/validator_propose.go +++ b/validator/client/validator_propose.go @@ -7,9 +7,9 @@ import ( "fmt" "github.com/pkg/errors" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" "github.com/prysmaticlabs/go-ssz" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/sirupsen/logrus" diff --git a/validator/client/validator_propose_test.go b/validator/client/validator_propose_test.go index e2c0ec5f1..3736254c2 100644 --- a/validator/client/validator_propose_test.go +++ b/validator/client/validator_propose_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/golang/mock/gomock" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/validator/internal" logTest "github.com/sirupsen/logrus/hooks/test" diff --git a/validator/client/validator_test.go b/validator/client/validator_test.go index ed8164dae..47442c614 100644 --- a/validator/client/validator_test.go +++ b/validator/client/validator_test.go @@ -11,8 +11,8 @@ import ( ptypes "github.com/gogo/protobuf/types" "github.com/golang/mock/gomock" + ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/keystore" "github.com/prysmaticlabs/prysm/shared/params" diff --git a/validator/internal/BUILD.bazel b/validator/internal/BUILD.bazel index 93229fb17..08aa0e1ea 100644 --- a/validator/internal/BUILD.bazel +++ b/validator/internal/BUILD.bazel @@ -14,9 +14,9 @@ go_library( visibility = ["//validator:__subpackages__"], deps = [ "//proto/beacon/rpc/v1:go_default_library", - "//proto/eth/v1alpha1:go_default_library", "@com_github_gogo_protobuf//types:go_default_library", "@com_github_golang_mock//gomock:go_default_library", + "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//metadata:go_default_library", ], diff --git a/validator/internal/attester_service_mock.go b/validator/internal/attester_service_mock.go index b0b92d61f..9fc582d9c 100644 --- a/validator/internal/attester_service_mock.go +++ b/validator/internal/attester_service_mock.go @@ -9,8 +9,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" + v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" v1 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" grpc "google.golang.org/grpc" ) diff --git a/validator/internal/node_mock.go b/validator/internal/node_mock.go index 210ab4964..e22790f44 100644 --- a/validator/internal/node_mock.go +++ b/validator/internal/node_mock.go @@ -10,7 +10,7 @@ import ( types "github.com/gogo/protobuf/types" gomock "github.com/golang/mock/gomock" - v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" + v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" grpc "google.golang.org/grpc" ) diff --git a/validator/internal/proposer_service_mock.go b/validator/internal/proposer_service_mock.go index 40ced19df..35e4718b2 100644 --- a/validator/internal/proposer_service_mock.go +++ b/validator/internal/proposer_service_mock.go @@ -9,8 +9,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" + v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" v1 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" grpc "google.golang.org/grpc" ) diff --git a/validator/internal/validator_service_mock.go b/validator/internal/validator_service_mock.go index 439f73d23..e17e81854 100644 --- a/validator/internal/validator_service_mock.go +++ b/validator/internal/validator_service_mock.go @@ -10,8 +10,8 @@ import ( types "github.com/gogo/protobuf/types" gomock "github.com/golang/mock/gomock" + v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" v1 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" - v1alpha1 "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" grpc "google.golang.org/grpc" metadata "google.golang.org/grpc/metadata" )