diff --git a/BUILD.bazel b/BUILD.bazel index 0d2bc3fc1..2029110a7 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -13,6 +13,20 @@ gazelle( prefix = prefix, ) +# Protobuf compiler (non-gRPC) +alias( + name = "proto_compiler", + actual = "@io_bazel_rules_go//proto:gogofast_proto", + visibility = ["//proto:__subpackages__"], +) + +# Protobuf compiler (gRPC) +alias( + name = "grpc_proto_compiler", + actual = "@io_bazel_rules_go//proto:gogofast_grpc", + visibility = ["//proto:__subpackages__"], +) + gometalinter( name = "gometalinter", config = "//:.gometalinter.json", diff --git a/beacon-chain/attestation/BUILD.bazel b/beacon-chain/attestation/BUILD.bazel index 813156422..109a1e2ab 100644 --- a/beacon-chain/attestation/BUILD.bazel +++ b/beacon-chain/attestation/BUILD.bazel @@ -10,7 +10,7 @@ go_library( "//proto/beacon/p2p/v1:go_default_library", "//shared/event:go_default_library", "//shared/hashutil:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], ) diff --git a/beacon-chain/attestation/service.go b/beacon-chain/attestation/service.go index 9f596e612..37859c3dc 100644 --- a/beacon-chain/attestation/service.go +++ b/beacon-chain/attestation/service.go @@ -4,7 +4,7 @@ package attestation import ( "context" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" "github.com/prysmaticlabs/prysm/beacon-chain/db" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "github.com/prysmaticlabs/prysm/shared/event" diff --git a/beacon-chain/core/blocks/BUILD.bazel b/beacon-chain/core/blocks/BUILD.bazel index a65c37ff3..4de77d831 100644 --- a/beacon-chain/core/blocks/BUILD.bazel +++ b/beacon-chain/core/blocks/BUILD.bazel @@ -19,8 +19,8 @@ go_library( "//shared/slices:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//core/types:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", - "@com_github_golang_protobuf//ptypes:go_default_library_gen", + "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//types:go_default_library", ], ) @@ -39,7 +39,7 @@ go_test( "//shared/params:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//core/types:go_default_library", - "@com_github_golang_protobuf//ptypes:go_default_library_gen", + "@com_github_gogo_protobuf//types: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 24982b071..42b4c42df 100644 --- a/beacon-chain/core/blocks/block.go +++ b/beacon-chain/core/blocks/block.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/golang/protobuf/ptypes" + ptypes "github.com/gogo/protobuf/types" "github.com/prysmaticlabs/prysm/beacon-chain/utils" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "github.com/prysmaticlabs/prysm/shared/hashutil" diff --git a/beacon-chain/core/blocks/block_operations.go b/beacon-chain/core/blocks/block_operations.go index 3537e35e8..cd2aeea0e 100644 --- a/beacon-chain/core/blocks/block_operations.go +++ b/beacon-chain/core/blocks/block_operations.go @@ -6,7 +6,7 @@ import ( "fmt" "reflect" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" "github.com/prysmaticlabs/prysm/beacon-chain/core/types" v "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" diff --git a/beacon-chain/core/blocks/block_test.go b/beacon-chain/core/blocks/block_test.go index a533a74be..c7cc93eb6 100644 --- a/beacon-chain/core/blocks/block_test.go +++ b/beacon-chain/core/blocks/block_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/golang/protobuf/ptypes" + ptypes "github.com/gogo/protobuf/types" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "github.com/prysmaticlabs/prysm/shared/params" ) @@ -48,8 +48,8 @@ func TestGenesisBlock(t *testing.T) { gt1 := b1.GetTimestamp() gt2 := b2.GetTimestamp() - t1, _ := ptypes.Timestamp(gt1) - t2, _ := ptypes.Timestamp(gt2) + t1, _ := ptypes.TimestampFromProto(gt1) + t2, _ := ptypes.TimestampFromProto(gt2) if t1 != t2 { t.Error("different timestamp") } diff --git a/beacon-chain/db/BUILD.bazel b/beacon-chain/db/BUILD.bazel index 898cb7ca6..8595b0f1a 100644 --- a/beacon-chain/db/BUILD.bazel +++ b/beacon-chain/db/BUILD.bazel @@ -23,7 +23,7 @@ go_library( "//shared/bytes:go_default_library", "@com_github_boltdb_bolt//:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", - "@com_github_golang_protobuf//ptypes:go_default_library_gen", + "@com_github_gogo_protobuf//types:go_default_library", ], ) diff --git a/beacon-chain/db/block.go b/beacon-chain/db/block.go index 21934688b..9befa00e6 100644 --- a/beacon-chain/db/block.go +++ b/beacon-chain/db/block.go @@ -7,7 +7,7 @@ import ( "github.com/boltdb/bolt" "github.com/gogo/protobuf/proto" - "github.com/golang/protobuf/ptypes" + ptypes "github.com/gogo/protobuf/types" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/types" @@ -184,7 +184,7 @@ func (db *BeaconDB) GetGenesisTime() (time.Time, error) { return time.Time{}, fmt.Errorf("genesis block not found: %v", err) } - genesisTime, err := ptypes.Timestamp(genesis.GetTimestamp()) + genesisTime, err := ptypes.TimestampFromProto(genesis.GetTimestamp()) if err != nil { return time.Time{}, fmt.Errorf("could not get genesis timestamp: %v", err) } diff --git a/beacon-chain/node/BUILD.bazel b/beacon-chain/node/BUILD.bazel index 37221a98b..d61a19188 100644 --- a/beacon-chain/node/BUILD.bazel +++ b/beacon-chain/node/BUILD.bazel @@ -30,7 +30,7 @@ go_library( "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//ethclient:go_default_library", "@com_github_ethereum_go_ethereum//rpc:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli//:go_default_library", ], diff --git a/beacon-chain/node/p2p_config.go b/beacon-chain/node/p2p_config.go index cd8a6aabe..0e8d83d42 100644 --- a/beacon-chain/node/p2p_config.go +++ b/beacon-chain/node/p2p_config.go @@ -1,7 +1,7 @@ package node import ( - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/p2p" diff --git a/beacon-chain/rpc/BUILD.bazel b/beacon-chain/rpc/BUILD.bazel index d25eff706..016028548 100644 --- a/beacon-chain/rpc/BUILD.bazel +++ b/beacon-chain/rpc/BUILD.bazel @@ -17,8 +17,8 @@ go_library( "//shared/params:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//types:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", - "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//credentials:go_default_library", ], @@ -37,10 +37,9 @@ go_test( "//shared/event:go_default_library", "//shared/testutil:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", + "@com_github_gogo_protobuf//types:go_default_library", "@com_github_golang_mock//gomock:go_default_library", - "@com_github_golang_protobuf//ptypes:go_default_library_gen", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", - "@io_bazel_rules_go//proto/wkt:empty_go_proto", ], ) diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index a0bd8ecaa..73f4c7b51 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -11,7 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/gogo/protobuf/proto" - "github.com/golang/protobuf/ptypes/empty" + ptypes "github.com/gogo/protobuf/types" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/types" v "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" @@ -150,7 +150,7 @@ func (s *Service) Stop() error { // CanonicalHead of the current beacon chain. This method is requested on-demand // by a validator when it is their time to propose or attest. -func (s *Service) CanonicalHead(ctx context.Context, req *empty.Empty) (*pbp2p.BeaconBlock, error) { +func (s *Service) CanonicalHead(ctx context.Context, req *ptypes.Empty) (*pbp2p.BeaconBlock, error) { block, err := s.beaconDB.GetChainHead() if err != nil { return nil, fmt.Errorf("could not get canonical head block: %v", err) @@ -264,7 +264,7 @@ func (s *Service) AttestHead(ctx context.Context, req *pb.AttestRequest) (*pb.At } // LatestAttestation streams the latest processed attestations to the rpc clients. -func (s *Service) LatestAttestation(req *empty.Empty, stream pb.BeaconService_LatestAttestationServer) error { +func (s *Service) LatestAttestation(req *ptypes.Empty, stream pb.BeaconService_LatestAttestationServer) error { sub := s.attestationService.IncomingAttestationFeed().Subscribe(s.incomingAttestation) defer sub.Unsubscribe() for { diff --git a/beacon-chain/rpc/service_test.go b/beacon-chain/rpc/service_test.go index 40a4ee651..b9f4967f8 100644 --- a/beacon-chain/rpc/service_test.go +++ b/beacon-chain/rpc/service_test.go @@ -8,9 +8,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + ptypes "github.com/gogo/protobuf/types" "github.com/golang/mock/gomock" - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/empty" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/types" "github.com/prysmaticlabs/prysm/beacon-chain/internal" @@ -229,7 +228,7 @@ func TestLatestAttestationContextClosed(t *testing.T) { defer ctrl.Finish() mockStream := internal.NewMockBeaconService_LatestAttestationServer(ctrl) go func(tt *testing.T) { - if err := rpcService.LatestAttestation(&empty.Empty{}, mockStream); err != nil { + if err := rpcService.LatestAttestation(&ptypes.Empty{}, mockStream); err != nil { tt.Errorf("Could not call RPC method: %v", err) } <-exitRoutine @@ -256,7 +255,7 @@ func TestLatestAttestationFaulty(t *testing.T) { mockStream.EXPECT().Send(attestation).Return(errors.New("something wrong")) // Tests a faulty stream. go func(tt *testing.T) { - if err := rpcService.LatestAttestation(&empty.Empty{}, mockStream); err.Error() != "something wrong" { + if err := rpcService.LatestAttestation(&ptypes.Empty{}, mockStream); err.Error() != "something wrong" { tt.Errorf("Faulty stream should throw correct error, wanted 'something wrong', got %v", err) } <-exitRoutine @@ -284,7 +283,7 @@ func TestLatestAttestation(t *testing.T) { mockStream.EXPECT().Send(attestation).Return(nil) // Tests a good stream. go func(tt *testing.T) { - if err := rpcService.LatestAttestation(&empty.Empty{}, mockStream); err != nil { + if err := rpcService.LatestAttestation(&ptypes.Empty{}, mockStream); err != nil { tt.Errorf("Could not call RPC method: %v", err) } <-exitRoutine diff --git a/beacon-chain/simulator/BUILD.bazel b/beacon-chain/simulator/BUILD.bazel index f7c63581f..34d1115d1 100644 --- a/beacon-chain/simulator/BUILD.bazel +++ b/beacon-chain/simulator/BUILD.bazel @@ -16,8 +16,8 @@ go_library( "//shared/params:go_default_library", "//shared/slotticker:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", - "@com_github_golang_protobuf//ptypes:go_default_library_gen", + "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//types:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], ) @@ -34,7 +34,7 @@ go_test( "//shared/p2p:go_default_library", "//shared/testutil:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", ], diff --git a/beacon-chain/simulator/service.go b/beacon-chain/simulator/service.go index d9e6a5f1c..546d5bc03 100644 --- a/beacon-chain/simulator/service.go +++ b/beacon-chain/simulator/service.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/ethereum/go-ethereum/common" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" + "github.com/gogo/protobuf/proto" + ptypes "github.com/gogo/protobuf/types" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" v "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" "github.com/prysmaticlabs/prysm/beacon-chain/db" diff --git a/beacon-chain/simulator/service_test.go b/beacon-chain/simulator/service_test.go index 826eaf4d2..f445c72eb 100644 --- a/beacon-chain/simulator/service_test.go +++ b/beacon-chain/simulator/service_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/internal" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" diff --git a/beacon-chain/sync/BUILD.bazel b/beacon-chain/sync/BUILD.bazel index 571ca7606..3a23853a5 100644 --- a/beacon-chain/sync/BUILD.bazel +++ b/beacon-chain/sync/BUILD.bazel @@ -18,7 +18,7 @@ go_library( "//proto/beacon/p2p/v1:go_default_library", "//shared/event:go_default_library", "//shared/p2p:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_opencensus_go//trace:go_default_library", ], @@ -40,7 +40,7 @@ go_test( "//shared/hashutil:go_default_library", "//shared/p2p:go_default_library", "//shared/testutil:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto: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 2940eeeb6..20e4990d1 100644 --- a/beacon-chain/sync/initial-sync/BUILD.bazel +++ b/beacon-chain/sync/initial-sync/BUILD.bazel @@ -13,7 +13,7 @@ go_library( "//shared/event:go_default_library", "//shared/p2p:go_default_library", "//shared/params:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], ) @@ -30,7 +30,7 @@ go_test( "//shared/event:go_default_library", "//shared/p2p:go_default_library", "//shared/testutil:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", ], ) diff --git a/beacon-chain/sync/initial-sync/service.go b/beacon-chain/sync/initial-sync/service.go index ac53cd8c7..2639a821e 100644 --- a/beacon-chain/sync/initial-sync/service.go +++ b/beacon-chain/sync/initial-sync/service.go @@ -16,7 +16,7 @@ import ( "fmt" "time" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/types" "github.com/prysmaticlabs/prysm/beacon-chain/db" diff --git a/beacon-chain/sync/initial-sync/service_test.go b/beacon-chain/sync/initial-sync/service_test.go index 9980c66bc..6a5073b4a 100644 --- a/beacon-chain/sync/initial-sync/service_test.go +++ b/beacon-chain/sync/initial-sync/service_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/types" "github.com/prysmaticlabs/prysm/beacon-chain/internal" diff --git a/beacon-chain/sync/regular_sync.go b/beacon-chain/sync/regular_sync.go index 254e13096..d6c8d4f2d 100644 --- a/beacon-chain/sync/regular_sync.go +++ b/beacon-chain/sync/regular_sync.go @@ -5,7 +5,7 @@ import ( "context" "fmt" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" att "github.com/prysmaticlabs/prysm/beacon-chain/core/attestations" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" v "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" diff --git a/beacon-chain/sync/regular_sync_test.go b/beacon-chain/sync/regular_sync_test.go index 35808d0c8..ba207349b 100644 --- a/beacon-chain/sync/regular_sync_test.go +++ b/beacon-chain/sync/regular_sync_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "testing" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/internal" diff --git a/beacon-chain/utils/BUILD.bazel b/beacon-chain/utils/BUILD.bazel index fe213fea2..8e38a1d7c 100644 --- a/beacon-chain/utils/BUILD.bazel +++ b/beacon-chain/utils/BUILD.bazel @@ -16,7 +16,7 @@ go_library( "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", - "@com_github_golang_protobuf//jsonpb:go_default_library_gen", + "@com_github_gogo_protobuf//jsonpb:go_default_library", "@com_github_urfave_cli//:go_default_library", ], ) diff --git a/beacon-chain/utils/genesis_json.go b/beacon-chain/utils/genesis_json.go index 8b5d296a2..6698a30c0 100644 --- a/beacon-chain/utils/genesis_json.go +++ b/beacon-chain/utils/genesis_json.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/golang/protobuf/jsonpb" + "github.com/gogo/protobuf/jsonpb" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" ) diff --git a/proto/beacon/p2p/v1/BUILD.bazel b/proto/beacon/p2p/v1/BUILD.bazel index 0d827961b..d44788572 100644 --- a/proto/beacon/p2p/v1/BUILD.bazel +++ b/proto/beacon/p2p/v1/BUILD.bazel @@ -10,6 +10,7 @@ go_proto_library( deps = [ "//proto/common:common_go_proto", ], + compiler = "//:proto_compiler", ) go_library( diff --git a/proto/beacon/p2p/v1/messages.pb.go b/proto/beacon/p2p/v1/messages.pb.go index 82e438c5c..bec124656 100755 --- a/proto/beacon/p2p/v1/messages.pb.go +++ b/proto/beacon/p2p/v1/messages.pb.go @@ -1,12 +1,14 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/beacon/p2p/v1/messages.proto package ethereum_beacon_p2p_v1 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -16,7 +18,7 @@ var _ = math.Inf // 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.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Topic int32 @@ -62,7 +64,7 @@ func (x Topic) String() string { return proto.EnumName(Topic_name, int32(x)) } func (Topic) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{0} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{0} } type BeaconBlockAnnounce struct { @@ -77,19 +79,28 @@ func (m *BeaconBlockAnnounce) Reset() { *m = BeaconBlockAnnounce{} } func (m *BeaconBlockAnnounce) String() string { return proto.CompactTextString(m) } func (*BeaconBlockAnnounce) ProtoMessage() {} func (*BeaconBlockAnnounce) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{0} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{0} } func (m *BeaconBlockAnnounce) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconBlockAnnounce.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconBlockAnnounce) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconBlockAnnounce.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BeaconBlockAnnounce.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 (dst *BeaconBlockAnnounce) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconBlockAnnounce.Merge(dst, src) } func (m *BeaconBlockAnnounce) XXX_Size() int { - return xxx_messageInfo_BeaconBlockAnnounce.Size(m) + return m.Size() } func (m *BeaconBlockAnnounce) XXX_DiscardUnknown() { xxx_messageInfo_BeaconBlockAnnounce.DiscardUnknown(m) @@ -122,19 +133,28 @@ func (m *BeaconBlockRequest) Reset() { *m = BeaconBlockRequest{} } func (m *BeaconBlockRequest) String() string { return proto.CompactTextString(m) } func (*BeaconBlockRequest) ProtoMessage() {} func (*BeaconBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{1} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{1} } func (m *BeaconBlockRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconBlockRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconBlockRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BeaconBlockRequest.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 (dst *BeaconBlockRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconBlockRequest.Merge(dst, src) } func (m *BeaconBlockRequest) XXX_Size() int { - return xxx_messageInfo_BeaconBlockRequest.Size(m) + return m.Size() } func (m *BeaconBlockRequest) XXX_DiscardUnknown() { xxx_messageInfo_BeaconBlockRequest.DiscardUnknown(m) @@ -160,19 +180,28 @@ func (m *BeaconBlockRequestBySlotNumber) Reset() { *m = BeaconBlockReque func (m *BeaconBlockRequestBySlotNumber) String() string { return proto.CompactTextString(m) } func (*BeaconBlockRequestBySlotNumber) ProtoMessage() {} func (*BeaconBlockRequestBySlotNumber) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{2} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{2} } func (m *BeaconBlockRequestBySlotNumber) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconBlockRequestBySlotNumber.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconBlockRequestBySlotNumber) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconBlockRequestBySlotNumber.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BeaconBlockRequestBySlotNumber.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 (dst *BeaconBlockRequestBySlotNumber) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconBlockRequestBySlotNumber.Merge(dst, src) } func (m *BeaconBlockRequestBySlotNumber) XXX_Size() int { - return xxx_messageInfo_BeaconBlockRequestBySlotNumber.Size(m) + return m.Size() } func (m *BeaconBlockRequestBySlotNumber) XXX_DiscardUnknown() { xxx_messageInfo_BeaconBlockRequestBySlotNumber.DiscardUnknown(m) @@ -188,8 +217,8 @@ func (m *BeaconBlockRequestBySlotNumber) GetSlotNumber() uint64 { } type BeaconBlockResponse struct { - Block *BeaconBlock `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` - Attestation *Attestation `protobuf:"bytes,2,opt,name=attestation,proto3" json:"attestation,omitempty"` + Block *BeaconBlock `protobuf:"bytes,1,opt,name=block" json:"block,omitempty"` + Attestation *Attestation `protobuf:"bytes,2,opt,name=attestation" json:"attestation,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -199,19 +228,28 @@ func (m *BeaconBlockResponse) Reset() { *m = BeaconBlockResponse{} } func (m *BeaconBlockResponse) String() string { return proto.CompactTextString(m) } func (*BeaconBlockResponse) ProtoMessage() {} func (*BeaconBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{3} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{3} } func (m *BeaconBlockResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconBlockResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconBlockResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BeaconBlockResponse.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 (dst *BeaconBlockResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconBlockResponse.Merge(dst, src) } func (m *BeaconBlockResponse) XXX_Size() int { - return xxx_messageInfo_BeaconBlockResponse.Size(m) + return m.Size() } func (m *BeaconBlockResponse) XXX_DiscardUnknown() { xxx_messageInfo_BeaconBlockResponse.DiscardUnknown(m) @@ -243,19 +281,28 @@ func (m *ChainHeadRequest) Reset() { *m = ChainHeadRequest{} } func (m *ChainHeadRequest) String() string { return proto.CompactTextString(m) } func (*ChainHeadRequest) ProtoMessage() {} func (*ChainHeadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{4} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{4} } func (m *ChainHeadRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChainHeadRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ChainHeadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChainHeadRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ChainHeadRequest.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 (dst *ChainHeadRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ChainHeadRequest.Merge(dst, src) } func (m *ChainHeadRequest) XXX_Size() int { - return xxx_messageInfo_ChainHeadRequest.Size(m) + return m.Size() } func (m *ChainHeadRequest) XXX_DiscardUnknown() { xxx_messageInfo_ChainHeadRequest.DiscardUnknown(m) @@ -266,7 +313,7 @@ var xxx_messageInfo_ChainHeadRequest proto.InternalMessageInfo type ChainHeadResponse struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Slot uint64 `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty"` - Block *BeaconBlock `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"` + Block *BeaconBlock `protobuf:"bytes,3,opt,name=block" json:"block,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -276,19 +323,28 @@ func (m *ChainHeadResponse) Reset() { *m = ChainHeadResponse{} } func (m *ChainHeadResponse) String() string { return proto.CompactTextString(m) } func (*ChainHeadResponse) ProtoMessage() {} func (*ChainHeadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{5} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{5} } func (m *ChainHeadResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChainHeadResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ChainHeadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChainHeadResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ChainHeadResponse.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 (dst *ChainHeadResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ChainHeadResponse.Merge(dst, src) } func (m *ChainHeadResponse) XXX_Size() int { - return xxx_messageInfo_ChainHeadResponse.Size(m) + return m.Size() } func (m *ChainHeadResponse) XXX_DiscardUnknown() { xxx_messageInfo_ChainHeadResponse.DiscardUnknown(m) @@ -328,19 +384,28 @@ func (m *BeaconStateHashAnnounce) Reset() { *m = BeaconStateHashAnnounce func (m *BeaconStateHashAnnounce) String() string { return proto.CompactTextString(m) } func (*BeaconStateHashAnnounce) ProtoMessage() {} func (*BeaconStateHashAnnounce) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{6} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{6} } func (m *BeaconStateHashAnnounce) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconStateHashAnnounce.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconStateHashAnnounce) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconStateHashAnnounce.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BeaconStateHashAnnounce.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 (dst *BeaconStateHashAnnounce) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconStateHashAnnounce.Merge(dst, src) } func (m *BeaconStateHashAnnounce) XXX_Size() int { - return xxx_messageInfo_BeaconStateHashAnnounce.Size(m) + return m.Size() } func (m *BeaconStateHashAnnounce) XXX_DiscardUnknown() { xxx_messageInfo_BeaconStateHashAnnounce.DiscardUnknown(m) @@ -366,19 +431,28 @@ func (m *BeaconStateRequest) Reset() { *m = BeaconStateRequest{} } func (m *BeaconStateRequest) String() string { return proto.CompactTextString(m) } func (*BeaconStateRequest) ProtoMessage() {} func (*BeaconStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{7} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{7} } func (m *BeaconStateRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconStateRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconStateRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BeaconStateRequest.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 (dst *BeaconStateRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconStateRequest.Merge(dst, src) } func (m *BeaconStateRequest) XXX_Size() int { - return xxx_messageInfo_BeaconStateRequest.Size(m) + return m.Size() } func (m *BeaconStateRequest) XXX_DiscardUnknown() { xxx_messageInfo_BeaconStateRequest.DiscardUnknown(m) @@ -394,7 +468,7 @@ func (m *BeaconStateRequest) GetHash() []byte { } type BeaconStateResponse struct { - BeaconState *BeaconState `protobuf:"bytes,1,opt,name=beacon_state,json=beaconState,proto3" json:"beacon_state,omitempty"` + BeaconState *BeaconState `protobuf:"bytes,1,opt,name=beacon_state,json=beaconState" json:"beacon_state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -404,19 +478,28 @@ func (m *BeaconStateResponse) Reset() { *m = BeaconStateResponse{} } func (m *BeaconStateResponse) String() string { return proto.CompactTextString(m) } func (*BeaconStateResponse) ProtoMessage() {} func (*BeaconStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_5ffe4c1d22e7f9bb, []int{8} + return fileDescriptor_messages_8d34ab5c984b7ffe, []int{8} } func (m *BeaconStateResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconStateResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconStateResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BeaconStateResponse.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 (dst *BeaconStateResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconStateResponse.Merge(dst, src) } func (m *BeaconStateResponse) XXX_Size() int { - return xxx_messageInfo_BeaconStateResponse.Size(m) + return m.Size() } func (m *BeaconStateResponse) XXX_DiscardUnknown() { xxx_messageInfo_BeaconStateResponse.DiscardUnknown(m) @@ -443,41 +526,1371 @@ func init() { proto.RegisterType((*BeaconStateResponse)(nil), "ethereum.beacon.p2p.v1.BeaconStateResponse") proto.RegisterEnum("ethereum.beacon.p2p.v1.Topic", Topic_name, Topic_value) } +func (m *BeaconBlockAnnounce) 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 *BeaconBlockAnnounce) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) + } + if m.SlotNumber != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.SlotNumber)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BeaconBlockRequest) 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 *BeaconBlockRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BeaconBlockRequestBySlotNumber) 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 *BeaconBlockRequestBySlotNumber) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.SlotNumber != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.SlotNumber)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BeaconBlockResponse) 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 *BeaconBlockResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Block != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.Block.Size())) + n1, err := m.Block.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Attestation != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.Attestation.Size())) + n2, err := m.Attestation.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ChainHeadRequest) 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 *ChainHeadRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ChainHeadResponse) 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 *ChainHeadResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) + } + if m.Slot != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.Slot)) + } + if m.Block != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.Block.Size())) + n3, err := m.Block.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 *BeaconStateHashAnnounce) 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 *BeaconStateHashAnnounce) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BeaconStateRequest) 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 *BeaconStateRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BeaconStateResponse) 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 *BeaconStateResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.BeaconState != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.BeaconState.Size())) + n4, err := m.BeaconState.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 encodeVarintMessages(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 *BeaconBlockAnnounce) Size() (n int) { + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.SlotNumber != 0 { + n += 1 + sovMessages(uint64(m.SlotNumber)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BeaconBlockRequest) Size() (n int) { + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BeaconBlockRequestBySlotNumber) Size() (n int) { + var l int + _ = l + if m.SlotNumber != 0 { + n += 1 + sovMessages(uint64(m.SlotNumber)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BeaconBlockResponse) Size() (n int) { + var l int + _ = l + if m.Block != nil { + l = m.Block.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.Attestation != nil { + l = m.Attestation.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ChainHeadRequest) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ChainHeadResponse) Size() (n int) { + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.Slot != 0 { + n += 1 + sovMessages(uint64(m.Slot)) + } + if m.Block != nil { + l = m.Block.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BeaconStateHashAnnounce) Size() (n int) { + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BeaconStateRequest) Size() (n int) { + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BeaconStateResponse) Size() (n int) { + var l int + _ = l + if m.BeaconState != nil { + l = m.BeaconState.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMessages(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMessages(x uint64) (n int) { + return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BeaconBlockAnnounce) 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 ErrIntOverflowMessages + } + 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: BeaconBlockAnnounce: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeaconBlockAnnounce: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlotNumber", wireType) + } + m.SlotNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SlotNumber |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *BeaconBlockRequest) 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 ErrIntOverflowMessages + } + 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: BeaconBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeaconBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *BeaconBlockRequestBySlotNumber) 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 ErrIntOverflowMessages + } + 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: BeaconBlockRequestBySlotNumber: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeaconBlockRequestBySlotNumber: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlotNumber", wireType) + } + m.SlotNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SlotNumber |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *BeaconBlockResponse) 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 ErrIntOverflowMessages + } + 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: BeaconBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeaconBlockResponse: 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 ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + 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 Attestation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attestation == nil { + m.Attestation = &Attestation{} + } + if err := m.Attestation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *ChainHeadRequest) 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 ErrIntOverflowMessages + } + 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: ChainHeadRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainHeadRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *ChainHeadResponse) 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 ErrIntOverflowMessages + } + 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: ChainHeadResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainHeadResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []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 ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Slot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + 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 ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + 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 + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *BeaconStateHashAnnounce) 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 ErrIntOverflowMessages + } + 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: BeaconStateHashAnnounce: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeaconStateHashAnnounce: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *BeaconStateRequest) 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 ErrIntOverflowMessages + } + 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: BeaconStateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeaconStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *BeaconStateResponse) 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 ErrIntOverflowMessages + } + 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: BeaconStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeaconStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeaconState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BeaconState == nil { + m.BeaconState = &BeaconState{} + } + if err := m.BeaconState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 skipMessages(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, ErrIntOverflowMessages + } + 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, ErrIntOverflowMessages + } + 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, ErrIntOverflowMessages + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthMessages + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } + 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 := skipMessages(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") +) func init() { - proto.RegisterFile("proto/beacon/p2p/v1/messages.proto", fileDescriptor_messages_5ffe4c1d22e7f9bb) + proto.RegisterFile("proto/beacon/p2p/v1/messages.proto", fileDescriptor_messages_8d34ab5c984b7ffe) } -var fileDescriptor_messages_5ffe4c1d22e7f9bb = []byte{ - // 470 bytes of a gzipped FileDescriptorProto +var fileDescriptor_messages_8d34ab5c984b7ffe = []byte{ + // 489 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x6e, 0xd3, 0x40, - 0x14, 0xc4, 0x69, 0xd2, 0xc2, 0x73, 0x0f, 0x66, 0x0b, 0x6d, 0xe8, 0xa1, 0xad, 0xdc, 0x03, 0x11, - 0x12, 0x8e, 0x1a, 0x4e, 0x1c, 0x6d, 0xb3, 0xc8, 0xd0, 0xb2, 0x06, 0xdb, 0x11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a, 0x56, 0xdb, + 0xa0, 0xff, 0x77, 0x84, 0xc2, 0x42, 0x4d, 0xaa, 0x1f, 0xcf, 0x7e, 0xb4, 0xa0, 0x13, 0xb2, 0x7c, + 0x32, 0x46, 0x2a, 0x1c, 0x8c, 0xc8, 0x25, 0xf1, 0x3e, 0x12, 0xed, 0x1e, 0x7a, 0x02, 0x8f, 0x6d, + 0x6c, 0x39, 0x1e, 0x89, 0xec, 0x2b, 0xcf, 0xb9, 0x8c, 0x2c, 0x42, 0xbc, 0x11, 0x71, 0xb0, 0xa6, + 0xa0, 0x1e, 0x3c, 0xda, 0xa0, 0x7c, 0xfc, 0x61, 0x84, 0x83, 0x50, 0x6b, 0xa1, 0xa7, 0x70, 0xde, + 0xc4, 0x44, 0xf6, 0xa7, 0x28, 0xb8, 0xf2, 0xc2, 0x88, 0x8c, 0xde, 0xd9, 0xd8, 0xd7, 0xf6, 0xb6, + 0xdc, 0x7d, 0x1c, 0xbc, 0xf7, 0x48, 0x80, 0xb5, 0x36, 0x3a, 0x02, 0xe4, 0xb8, 0xd6, 0x1b, 0x12, + 0xb9, 0xd8, 0x7a, 0x75, 0xeb, 0xdd, 0x41, 0xc7, 0x70, 0xb8, 0x81, 0x97, 0x82, 0x7d, 0xa4, 0xc3, + 0x49, 0xe9, 0x15, 0x84, 0x56, 0x88, 0x23, 0xd7, 0x0a, 0xdc, 0x2a, 0xee, 0x41, 0x2d, 0x6e, 0xc1, + 0xaf, 0x2d, 0xef, 0xd7, 0x52, 0xac, 0x99, 0xd2, 0xf4, 0x81, 0xdd, 0xfd, 0xb5, 0xd4, 0x95, 0xdf, + 0x4b, 0x5d, 0xf9, 0xb3, 0xd4, 0x95, 0x64, 0x5f, 0xfe, 0x83, 0x5f, 0xfc, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0xbc, 0x6a, 0xda, 0x9e, 0x20, 0x04, 0x00, 0x00, } diff --git a/proto/beacon/p2p/v1/types.pb.go b/proto/beacon/p2p/v1/types.pb.go index d0116503c..9ebb209df 100644 --- a/proto/beacon/p2p/v1/types.pb.go +++ b/proto/beacon/p2p/v1/types.pb.go @@ -1,14 +1,16 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/beacon/p2p/v1/types.proto package ethereum_beacon_p2p_v1 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" +import types "github.com/gogo/protobuf/types" import common "github.com/prysmaticlabs/prysm/proto/common" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -18,10 +20,8 @@ var _ = math.Inf // 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.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -// Possible validator status code: -// https://github.com/ethereum/eth2.0-specs/blob/master/specs/core/0_beacon-chain.md#constants type ValidatorRecord_StatusCodes int32 const ( @@ -51,66 +51,67 @@ func (x ValidatorRecord_StatusCodes) String() string { return proto.EnumName(ValidatorRecord_StatusCodes_name, int32(x)) } func (ValidatorRecord_StatusCodes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{6, 0} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{6, 0} } type BeaconState struct { - // Validator registry [1-1000] - ValidatorRegistry []*ValidatorRecord `protobuf:"bytes,1,rep,name=validator_registry,json=validatorRegistry,proto3" json:"validator_registry,omitempty"` - ValidatorRegistryLastChangeSlot uint64 `protobuf:"varint,2,opt,name=validator_registry_last_change_slot,json=validatorRegistryLastChangeSlot,proto3" json:"validator_registry_last_change_slot,omitempty"` - ValidatorRegistryExitCount uint64 `protobuf:"varint,3,opt,name=validator_registry_exit_count,json=validatorRegistryExitCount,proto3" json:"validator_registry_exit_count,omitempty"` - ValidatorRegistryDeltaChainTipHash32 []byte `protobuf:"bytes,4,opt,name=validator_registry_delta_chain_tip_hash32,json=validatorRegistryDeltaChainTipHash32,proto3" json:"validator_registry_delta_chain_tip_hash32,omitempty"` - ValidatorBalances []uint64 `protobuf:"varint,5,rep,packed,name=validator_balances,json=validatorBalances,proto3" json:"validator_balances,omitempty"` - // Randomness and committees [1001-2000] - RandaoMixHash32 []byte `protobuf:"bytes,1001,opt,name=randao_mix_hash32,json=randaoMixHash32,proto3" json:"randao_mix_hash32,omitempty"` - NextSeedHash32 []byte `protobuf:"bytes,1002,opt,name=next_seed_hash32,json=nextSeedHash32,proto3" json:"next_seed_hash32,omitempty"` - ShardAndCommitteesAtSlots []*ShardAndCommitteeArray `protobuf:"bytes,1003,rep,name=shard_and_committees_at_slots,json=shardAndCommitteesAtSlots,proto3" json:"shard_and_committees_at_slots,omitempty"` - PersistentCommittees []*common.Uint32List `protobuf:"bytes,1004,rep,name=persistent_committees,json=persistentCommittees,proto3" json:"persistent_committees,omitempty"` - PersistentCommitteeReassignments []*ShardReassignmentRecord `protobuf:"bytes,1005,rep,name=persistent_committee_reassignments,json=persistentCommitteeReassignments,proto3" json:"persistent_committee_reassignments,omitempty"` - // Finality [2001-3000] - PreviousJustifiedSlot uint64 `protobuf:"varint,2001,opt,name=previous_justified_slot,json=previousJustifiedSlot,proto3" json:"previous_justified_slot,omitempty"` - JustifiedSlot uint64 `protobuf:"varint,2002,opt,name=justified_slot,json=justifiedSlot,proto3" json:"justified_slot,omitempty"` - JustifiedSlotBitfield uint64 `protobuf:"varint,2003,opt,name=justified_slot_bitfield,json=justifiedSlotBitfield,proto3" json:"justified_slot_bitfield,omitempty"` - FinalizedSlot uint64 `protobuf:"varint,2004,opt,name=finalized_slot,json=finalizedSlot,proto3" json:"finalized_slot,omitempty"` - // Recent state [3001-4000] - LatestCrosslinks []*CrosslinkRecord `protobuf:"bytes,3001,rep,name=latest_crosslinks,json=latestCrosslinks,proto3" json:"latest_crosslinks,omitempty"` - LastStateRecalculationSlot uint64 `protobuf:"varint,3002,opt,name=last_state_recalculation_slot,json=lastStateRecalculationSlot,proto3" json:"last_state_recalculation_slot,omitempty"` - LatestBlockRootHash32S [][]byte `protobuf:"bytes,3003,rep,name=latest_block_root_hash32s,json=latestBlockRootHash32s,proto3" json:"latest_block_root_hash32s,omitempty"` - LatestPenalizedExitBalances []uint64 `protobuf:"varint,3004,rep,packed,name=latest_penalized_exit_balances,json=latestPenalizedExitBalances,proto3" json:"latest_penalized_exit_balances,omitempty"` - LatestAttestations []*PendingAttestationRecord `protobuf:"bytes,3005,rep,name=latest_attestations,json=latestAttestations,proto3" json:"latest_attestations,omitempty"` - // PoW receipt root [4001-5000] - ProcessedPowReceiptRootHash32 []byte `protobuf:"bytes,4001,opt,name=processed_pow_receipt_root_hash32,json=processedPowReceiptRootHash32,proto3" json:"processed_pow_receipt_root_hash32,omitempty"` - CandidatePowReceiptRoots []*CandidatePoWReceiptRootRecord `protobuf:"bytes,4002,rep,name=candidate_pow_receipt_roots,json=candidatePowReceiptRoots,proto3" json:"candidate_pow_receipt_roots,omitempty"` - // Miscellaneous [5001-6000] - GenesisTime uint64 `protobuf:"varint,5001,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - ForkData *ForkData `protobuf:"bytes,5002,opt,name=fork_data,json=forkData,proto3" json:"fork_data,omitempty"` - Slot uint64 `protobuf:"varint,5003,opt,name=slot,proto3" json:"slot,omitempty"` - // Deprecated fields - // All fields mustbe annotated with [deprecated=true]; - JustifiedStreak uint64 `protobuf:"varint,10007,opt,name=justified_streak,json=justifiedStreak,proto3" json:"justified_streak,omitempty"` // Deprecated: Do not use. - ShardAndCommitteesForSlots []*ShardAndCommitteeArray `protobuf:"bytes,10019,rep,name=shard_and_committees_for_slots,json=shardAndCommitteesForSlots,proto3" json:"shard_and_committees_for_slots,omitempty"` // Deprecated: Do not use. - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ValidatorRegistry []*ValidatorRecord `protobuf:"bytes,1,rep,name=validator_registry,json=validatorRegistry" json:"validator_registry,omitempty"` + ValidatorRegistryLastChangeSlot uint64 `protobuf:"varint,2,opt,name=validator_registry_last_change_slot,json=validatorRegistryLastChangeSlot,proto3" json:"validator_registry_last_change_slot,omitempty"` + ValidatorRegistryExitCount uint64 `protobuf:"varint,3,opt,name=validator_registry_exit_count,json=validatorRegistryExitCount,proto3" json:"validator_registry_exit_count,omitempty"` + ValidatorRegistryDeltaChainTipHash32 []byte `protobuf:"bytes,4,opt,name=validator_registry_delta_chain_tip_hash32,json=validatorRegistryDeltaChainTipHash32,proto3" json:"validator_registry_delta_chain_tip_hash32,omitempty"` + ValidatorBalances []uint64 `protobuf:"varint,5,rep,packed,name=validator_balances,json=validatorBalances" json:"validator_balances,omitempty"` + RandaoMixHash32 []byte `protobuf:"bytes,1001,opt,name=randao_mix_hash32,json=randaoMixHash32,proto3" json:"randao_mix_hash32,omitempty"` + NextSeedHash32 []byte `protobuf:"bytes,1002,opt,name=next_seed_hash32,json=nextSeedHash32,proto3" json:"next_seed_hash32,omitempty"` + ShardAndCommitteesAtSlots []*ShardAndCommitteeArray `protobuf:"bytes,1003,rep,name=shard_and_committees_at_slots,json=shardAndCommitteesAtSlots" json:"shard_and_committees_at_slots,omitempty"` + PersistentCommittees []*common.Uint32List `protobuf:"bytes,1004,rep,name=persistent_committees,json=persistentCommittees" json:"persistent_committees,omitempty"` + PersistentCommitteeReassignments []*ShardReassignmentRecord `protobuf:"bytes,1005,rep,name=persistent_committee_reassignments,json=persistentCommitteeReassignments" json:"persistent_committee_reassignments,omitempty"` + PreviousJustifiedSlot uint64 `protobuf:"varint,2001,opt,name=previous_justified_slot,json=previousJustifiedSlot,proto3" json:"previous_justified_slot,omitempty"` + JustifiedSlot uint64 `protobuf:"varint,2002,opt,name=justified_slot,json=justifiedSlot,proto3" json:"justified_slot,omitempty"` + JustifiedSlotBitfield uint64 `protobuf:"varint,2003,opt,name=justified_slot_bitfield,json=justifiedSlotBitfield,proto3" json:"justified_slot_bitfield,omitempty"` + FinalizedSlot uint64 `protobuf:"varint,2004,opt,name=finalized_slot,json=finalizedSlot,proto3" json:"finalized_slot,omitempty"` + LatestCrosslinks []*CrosslinkRecord `protobuf:"bytes,3001,rep,name=latest_crosslinks,json=latestCrosslinks" json:"latest_crosslinks,omitempty"` + LastStateRecalculationSlot uint64 `protobuf:"varint,3002,opt,name=last_state_recalculation_slot,json=lastStateRecalculationSlot,proto3" json:"last_state_recalculation_slot,omitempty"` + LatestBlockRootHash32S [][]byte `protobuf:"bytes,3003,rep,name=latest_block_root_hash32s,json=latestBlockRootHash32s" json:"latest_block_root_hash32s,omitempty"` + LatestPenalizedExitBalances []uint64 `protobuf:"varint,3004,rep,packed,name=latest_penalized_exit_balances,json=latestPenalizedExitBalances" json:"latest_penalized_exit_balances,omitempty"` + LatestAttestations []*PendingAttestationRecord `protobuf:"bytes,3005,rep,name=latest_attestations,json=latestAttestations" json:"latest_attestations,omitempty"` + ProcessedPowReceiptRootHash32 []byte `protobuf:"bytes,4001,opt,name=processed_pow_receipt_root_hash32,json=processedPowReceiptRootHash32,proto3" json:"processed_pow_receipt_root_hash32,omitempty"` + CandidatePowReceiptRoots []*CandidatePoWReceiptRootRecord `protobuf:"bytes,4002,rep,name=candidate_pow_receipt_roots,json=candidatePowReceiptRoots" json:"candidate_pow_receipt_roots,omitempty"` + GenesisTime uint64 `protobuf:"varint,5001,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` + ForkData *ForkData `protobuf:"bytes,5002,opt,name=fork_data,json=forkData" json:"fork_data,omitempty"` + Slot uint64 `protobuf:"varint,5003,opt,name=slot,proto3" json:"slot,omitempty"` + JustifiedStreak uint64 `protobuf:"varint,10007,opt,name=justified_streak,json=justifiedStreak,proto3" json:"justified_streak,omitempty"` // Deprecated: Do not use. + ShardAndCommitteesForSlots []*ShardAndCommitteeArray `protobuf:"bytes,10019,rep,name=shard_and_committees_for_slots,json=shardAndCommitteesForSlots" json:"shard_and_committees_for_slots,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BeaconState) Reset() { *m = BeaconState{} } func (m *BeaconState) String() string { return proto.CompactTextString(m) } func (*BeaconState) ProtoMessage() {} func (*BeaconState) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{0} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{0} } func (m *BeaconState) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconState.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconState.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BeaconState.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 (dst *BeaconState) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconState.Merge(dst, src) } func (m *BeaconState) XXX_Size() int { - return xxx_messageInfo_BeaconState.Size(m) + return m.Size() } func (m *BeaconState) XXX_DiscardUnknown() { xxx_messageInfo_BeaconState.DiscardUnknown(m) @@ -315,19 +316,28 @@ func (m *ForkData) Reset() { *m = ForkData{} } func (m *ForkData) String() string { return proto.CompactTextString(m) } func (*ForkData) ProtoMessage() {} func (*ForkData) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{1} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{1} } func (m *ForkData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ForkData.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ForkData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ForkData.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ForkData.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 (dst *ForkData) XXX_Merge(src proto.Message) { xxx_messageInfo_ForkData.Merge(dst, src) } func (m *ForkData) XXX_Size() int { - return xxx_messageInfo_ForkData.Size(m) + return m.Size() } func (m *ForkData) XXX_DiscardUnknown() { xxx_messageInfo_ForkData.DiscardUnknown(m) @@ -368,19 +378,28 @@ func (m *CandidatePoWReceiptRootRecord) Reset() { *m = CandidatePoWRecei func (m *CandidatePoWReceiptRootRecord) String() string { return proto.CompactTextString(m) } func (*CandidatePoWReceiptRootRecord) ProtoMessage() {} func (*CandidatePoWReceiptRootRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{2} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{2} } func (m *CandidatePoWReceiptRootRecord) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CandidatePoWReceiptRootRecord.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CandidatePoWReceiptRootRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CandidatePoWReceiptRootRecord.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CandidatePoWReceiptRootRecord.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 (dst *CandidatePoWReceiptRootRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_CandidatePoWReceiptRootRecord.Merge(dst, src) } func (m *CandidatePoWReceiptRootRecord) XXX_Size() int { - return xxx_messageInfo_CandidatePoWReceiptRootRecord.Size(m) + return m.Size() } func (m *CandidatePoWReceiptRootRecord) XXX_DiscardUnknown() { xxx_messageInfo_CandidatePoWReceiptRootRecord.DiscardUnknown(m) @@ -403,7 +422,7 @@ func (m *CandidatePoWReceiptRootRecord) GetVotes() uint64 { } type PendingAttestationRecord struct { - Data *AttestationData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *AttestationData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` ParticipationBitfield []byte `protobuf:"bytes,2,opt,name=participation_bitfield,json=participationBitfield,proto3" json:"participation_bitfield,omitempty"` CustodyBitfield []byte `protobuf:"bytes,3,opt,name=custody_bitfield,json=custodyBitfield,proto3" json:"custody_bitfield,omitempty"` SlotIncluded uint64 `protobuf:"varint,4,opt,name=slot_included,json=slotIncluded,proto3" json:"slot_included,omitempty"` @@ -416,19 +435,28 @@ func (m *PendingAttestationRecord) Reset() { *m = PendingAttestationReco func (m *PendingAttestationRecord) String() string { return proto.CompactTextString(m) } func (*PendingAttestationRecord) ProtoMessage() {} func (*PendingAttestationRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{3} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{3} } func (m *PendingAttestationRecord) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PendingAttestationRecord.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *PendingAttestationRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PendingAttestationRecord.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_PendingAttestationRecord.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 (dst *PendingAttestationRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_PendingAttestationRecord.Merge(dst, src) } func (m *PendingAttestationRecord) XXX_Size() int { - return xxx_messageInfo_PendingAttestationRecord.Size(m) + return m.Size() } func (m *PendingAttestationRecord) XXX_DiscardUnknown() { xxx_messageInfo_PendingAttestationRecord.DiscardUnknown(m) @@ -465,7 +493,7 @@ func (m *PendingAttestationRecord) GetSlotIncluded() uint64 { } type Attestation struct { - Data *AttestationData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *AttestationData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` ParticipationBitfield []byte `protobuf:"bytes,2,opt,name=participation_bitfield,json=participationBitfield,proto3" json:"participation_bitfield,omitempty"` CustodyBitfield []byte `protobuf:"bytes,3,opt,name=custody_bitfield,json=custodyBitfield,proto3" json:"custody_bitfield,omitempty"` AggregateSignature []byte `protobuf:"bytes,4,opt,name=aggregate_signature,json=aggregateSignature,proto3" json:"aggregate_signature,omitempty"` @@ -478,19 +506,28 @@ 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_types_98bf693b23569082, []int{4} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{4} } func (m *Attestation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Attestation.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Attestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Attestation.Marshal(b, m, deterministic) + 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 (dst *Attestation) XXX_Merge(src proto.Message) { xxx_messageInfo_Attestation.Merge(dst, src) } func (m *Attestation) XXX_Size() int { - return xxx_messageInfo_Attestation.Size(m) + return m.Size() } func (m *Attestation) XXX_DiscardUnknown() { xxx_messageInfo_Attestation.DiscardUnknown(m) @@ -544,19 +581,28 @@ 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_types_98bf693b23569082, []int{5} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{5} } func (m *AttestationData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AttestationData.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *AttestationData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AttestationData.Marshal(b, m, deterministic) + 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 (dst *AttestationData) XXX_Merge(src proto.Message) { xxx_messageInfo_AttestationData.Merge(dst, src) } func (m *AttestationData) XXX_Size() int { - return xxx_messageInfo_AttestationData.Size(m) + return m.Size() } func (m *AttestationData) XXX_DiscardUnknown() { xxx_messageInfo_AttestationData.DiscardUnknown(m) @@ -621,40 +667,45 @@ func (m *AttestationData) GetJustifiedBlockRootHash32() []byte { } type ValidatorRecord struct { - Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - // TODO(781): The usage of withdrawal_credentials is not defined in spec. Not used in Prysm yet. + Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` WithdrawalCredentials []byte `protobuf:"bytes,2,opt,name=withdrawal_credentials,json=withdrawalCredentials,proto3" json:"withdrawal_credentials,omitempty"` RandaoCommitmentHash32 []byte `protobuf:"bytes,3,opt,name=randao_commitment_hash32,json=randaoCommitmentHash32,proto3" json:"randao_commitment_hash32,omitempty"` RandaoLayers uint64 `protobuf:"varint,4,opt,name=randao_layers,json=randaoLayers,proto3" json:"randao_layers,omitempty"` Status ValidatorRecord_StatusCodes `protobuf:"varint,5,opt,name=status,proto3,enum=ethereum.beacon.p2p.v1.ValidatorRecord_StatusCodes" json:"status,omitempty"` LatestStatusChangeSlot uint64 `protobuf:"varint,6,opt,name=latest_status_change_slot,json=latestStatusChangeSlot,proto3" json:"latest_status_change_slot,omitempty"` ExitCount uint64 `protobuf:"varint,7,opt,name=exit_count,json=exitCount,proto3" json:"exit_count,omitempty"` - // Deprecated fields - // All fields must be annotated with [deprecated=true]; - // Balance in Gwei - Balance uint64 `protobuf:"varint,1000,opt,name=balance,proto3" json:"balance,omitempty"` // Deprecated: Do not use. - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Balance uint64 `protobuf:"varint,1000,opt,name=balance,proto3" json:"balance,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ValidatorRecord) Reset() { *m = ValidatorRecord{} } func (m *ValidatorRecord) String() string { return proto.CompactTextString(m) } func (*ValidatorRecord) ProtoMessage() {} func (*ValidatorRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{6} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{6} } func (m *ValidatorRecord) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidatorRecord.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ValidatorRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidatorRecord.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ValidatorRecord.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 (dst *ValidatorRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatorRecord.Merge(dst, src) } func (m *ValidatorRecord) XXX_Size() int { - return xxx_messageInfo_ValidatorRecord.Size(m) + return m.Size() } func (m *ValidatorRecord) XXX_DiscardUnknown() { xxx_messageInfo_ValidatorRecord.DiscardUnknown(m) @@ -732,19 +783,28 @@ func (m *ShardReassignmentRecord) Reset() { *m = ShardReassignmentRecord func (m *ShardReassignmentRecord) String() string { return proto.CompactTextString(m) } func (*ShardReassignmentRecord) ProtoMessage() {} func (*ShardReassignmentRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{7} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{7} } func (m *ShardReassignmentRecord) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ShardReassignmentRecord.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ShardReassignmentRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ShardReassignmentRecord.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ShardReassignmentRecord.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 (dst *ShardReassignmentRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_ShardReassignmentRecord.Merge(dst, src) } func (m *ShardReassignmentRecord) XXX_Size() int { - return xxx_messageInfo_ShardReassignmentRecord.Size(m) + return m.Size() } func (m *ShardReassignmentRecord) XXX_DiscardUnknown() { xxx_messageInfo_ShardReassignmentRecord.DiscardUnknown(m) @@ -775,7 +835,7 @@ func (m *ShardReassignmentRecord) GetSlot() uint64 { type SpecialRecord struct { Kind uint32 `protobuf:"varint,1,opt,name=kind,proto3" json:"kind,omitempty"` // Deprecated: Do not use. - Data [][]byte `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // Deprecated: Do not use. + Data [][]byte `protobuf:"bytes,2,rep,name=data" json:"data,omitempty"` // Deprecated: Do not use. XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -785,19 +845,28 @@ func (m *SpecialRecord) Reset() { *m = SpecialRecord{} } func (m *SpecialRecord) String() string { return proto.CompactTextString(m) } func (*SpecialRecord) ProtoMessage() {} func (*SpecialRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{8} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{8} } func (m *SpecialRecord) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SpecialRecord.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SpecialRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SpecialRecord.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SpecialRecord.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 (dst *SpecialRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_SpecialRecord.Merge(dst, src) } func (m *SpecialRecord) XXX_Size() int { - return xxx_messageInfo_SpecialRecord.Size(m) + return m.Size() } func (m *SpecialRecord) XXX_DiscardUnknown() { xxx_messageInfo_SpecialRecord.DiscardUnknown(m) @@ -833,19 +902,28 @@ func (m *CrosslinkRecord) Reset() { *m = CrosslinkRecord{} } func (m *CrosslinkRecord) String() string { return proto.CompactTextString(m) } func (*CrosslinkRecord) ProtoMessage() {} func (*CrosslinkRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{9} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{9} } func (m *CrosslinkRecord) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CrosslinkRecord.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CrosslinkRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CrosslinkRecord.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CrosslinkRecord.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 (dst *CrosslinkRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_CrosslinkRecord.Merge(dst, src) } func (m *CrosslinkRecord) XXX_Size() int { - return xxx_messageInfo_CrosslinkRecord.Size(m) + return m.Size() } func (m *CrosslinkRecord) XXX_DiscardUnknown() { xxx_messageInfo_CrosslinkRecord.DiscardUnknown(m) @@ -868,7 +946,7 @@ func (m *CrosslinkRecord) GetShardBlockRootHash32() []byte { } type ShardAndCommitteeArray struct { - ArrayShardAndCommittee []*ShardAndCommittee `protobuf:"bytes,1,rep,name=array_shard_and_committee,json=arrayShardAndCommittee,proto3" json:"array_shard_and_committee,omitempty"` + ArrayShardAndCommittee []*ShardAndCommittee `protobuf:"bytes,1,rep,name=array_shard_and_committee,json=arrayShardAndCommittee" json:"array_shard_and_committee,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -878,19 +956,28 @@ func (m *ShardAndCommitteeArray) Reset() { *m = ShardAndCommitteeArray{} func (m *ShardAndCommitteeArray) String() string { return proto.CompactTextString(m) } func (*ShardAndCommitteeArray) ProtoMessage() {} func (*ShardAndCommitteeArray) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{10} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{10} } func (m *ShardAndCommitteeArray) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ShardAndCommitteeArray.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ShardAndCommitteeArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ShardAndCommitteeArray.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ShardAndCommitteeArray.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 (dst *ShardAndCommitteeArray) XXX_Merge(src proto.Message) { xxx_messageInfo_ShardAndCommitteeArray.Merge(dst, src) } func (m *ShardAndCommitteeArray) XXX_Size() int { - return xxx_messageInfo_ShardAndCommitteeArray.Size(m) + return m.Size() } func (m *ShardAndCommitteeArray) XXX_DiscardUnknown() { xxx_messageInfo_ShardAndCommitteeArray.DiscardUnknown(m) @@ -907,7 +994,7 @@ func (m *ShardAndCommitteeArray) GetArrayShardAndCommittee() []*ShardAndCommitte type ShardAndCommittee struct { Shard uint64 `protobuf:"varint,1,opt,name=shard,proto3" json:"shard,omitempty"` - Committee []uint32 `protobuf:"varint,2,rep,packed,name=committee,proto3" json:"committee,omitempty"` + Committee []uint32 `protobuf:"varint,2,rep,packed,name=committee" json:"committee,omitempty"` TotalValidatorCount uint64 `protobuf:"varint,3,opt,name=total_validator_count,json=totalValidatorCount,proto3" json:"total_validator_count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -918,19 +1005,28 @@ func (m *ShardAndCommittee) Reset() { *m = ShardAndCommittee{} } func (m *ShardAndCommittee) String() string { return proto.CompactTextString(m) } func (*ShardAndCommittee) ProtoMessage() {} func (*ShardAndCommittee) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{11} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{11} } func (m *ShardAndCommittee) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ShardAndCommittee.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ShardAndCommittee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ShardAndCommittee.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ShardAndCommittee.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 (dst *ShardAndCommittee) XXX_Merge(src proto.Message) { xxx_messageInfo_ShardAndCommittee.Merge(dst, src) } func (m *ShardAndCommittee) XXX_Size() int { - return xxx_messageInfo_ShardAndCommittee.Size(m) + return m.Size() } func (m *ShardAndCommittee) XXX_DiscardUnknown() { xxx_messageInfo_ShardAndCommittee.DiscardUnknown(m) @@ -960,39 +1056,45 @@ func (m *ShardAndCommittee) GetTotalValidatorCount() uint64 { } type BeaconBlock struct { - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - ParentRootHash32 []byte `protobuf:"bytes,2,opt,name=parent_root_hash32,json=parentRootHash32,proto3" json:"parent_root_hash32,omitempty"` - StateRootHash32 []byte `protobuf:"bytes,3,opt,name=state_root_hash32,json=stateRootHash32,proto3" json:"state_root_hash32,omitempty"` - RandaoRevealHash32 []byte `protobuf:"bytes,4,opt,name=randao_reveal_hash32,json=randaoRevealHash32,proto3" json:"randao_reveal_hash32,omitempty"` - CandidatePowReceiptRootHash32 []byte `protobuf:"bytes,5,opt,name=candidate_pow_receipt_root_hash32,json=candidatePowReceiptRootHash32,proto3" json:"candidate_pow_receipt_root_hash32,omitempty"` - Signature [][]byte `protobuf:"bytes,6,rep,name=signature,proto3" json:"signature,omitempty"` - // Block Body - Body *BeaconBlockBody `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` - // Deprecated fields - // All fields must be annotated with [deprecated=true]; - Timestamp *timestamp.Timestamp `protobuf:"bytes,1006,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Deprecated: Do not use. - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + ParentRootHash32 []byte `protobuf:"bytes,2,opt,name=parent_root_hash32,json=parentRootHash32,proto3" json:"parent_root_hash32,omitempty"` + StateRootHash32 []byte `protobuf:"bytes,3,opt,name=state_root_hash32,json=stateRootHash32,proto3" json:"state_root_hash32,omitempty"` + RandaoRevealHash32 []byte `protobuf:"bytes,4,opt,name=randao_reveal_hash32,json=randaoRevealHash32,proto3" json:"randao_reveal_hash32,omitempty"` + CandidatePowReceiptRootHash32 []byte `protobuf:"bytes,5,opt,name=candidate_pow_receipt_root_hash32,json=candidatePowReceiptRootHash32,proto3" json:"candidate_pow_receipt_root_hash32,omitempty"` + Signature [][]byte `protobuf:"bytes,6,rep,name=signature" json:"signature,omitempty"` + Body *BeaconBlockBody `protobuf:"bytes,7,opt,name=body" json:"body,omitempty"` + Timestamp *types.Timestamp `protobuf:"bytes,1006,opt,name=timestamp" json:"timestamp,omitempty"` // Deprecated: Do not use. + 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_types_98bf693b23569082, []int{12} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{12} } func (m *BeaconBlock) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconBlock.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconBlock.Marshal(b, m, deterministic) + 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 (dst *BeaconBlock) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconBlock.Merge(dst, src) } func (m *BeaconBlock) XXX_Size() int { - return xxx_messageInfo_BeaconBlock.Size(m) + return m.Size() } func (m *BeaconBlock) XXX_DiscardUnknown() { xxx_messageInfo_BeaconBlock.DiscardUnknown(m) @@ -1050,7 +1152,7 @@ func (m *BeaconBlock) GetBody() *BeaconBlockBody { } // Deprecated: Do not use. -func (m *BeaconBlock) GetTimestamp() *timestamp.Timestamp { +func (m *BeaconBlock) GetTimestamp() *types.Timestamp { if m != nil { return m.Timestamp } @@ -1058,11 +1160,11 @@ func (m *BeaconBlock) GetTimestamp() *timestamp.Timestamp { } type BeaconBlockBody struct { - Attestations []*Attestation `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` - ProposerSlashings []*ProposerSlashing `protobuf:"bytes,2,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty"` - CasperSlashings []*CasperSlashing `protobuf:"bytes,3,rep,name=casper_slashings,json=casperSlashings,proto3" json:"casper_slashings,omitempty"` - Deposits []*Deposit `protobuf:"bytes,4,rep,name=deposits,proto3" json:"deposits,omitempty"` - Exits []*Exit `protobuf:"bytes,5,rep,name=exits,proto3" json:"exits,omitempty"` + Attestations []*Attestation `protobuf:"bytes,1,rep,name=attestations" json:"attestations,omitempty"` + ProposerSlashings []*ProposerSlashing `protobuf:"bytes,2,rep,name=proposer_slashings,json=proposerSlashings" json:"proposer_slashings,omitempty"` + CasperSlashings []*CasperSlashing `protobuf:"bytes,3,rep,name=casper_slashings,json=casperSlashings" json:"casper_slashings,omitempty"` + Deposits []*Deposit `protobuf:"bytes,4,rep,name=deposits" json:"deposits,omitempty"` + Exits []*Exit `protobuf:"bytes,5,rep,name=exits" json:"exits,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1072,19 +1174,28 @@ 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_types_98bf693b23569082, []int{13} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{13} } func (m *BeaconBlockBody) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeaconBlockBody.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BeaconBlockBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeaconBlockBody.Marshal(b, m, deterministic) + 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 (dst *BeaconBlockBody) XXX_Merge(src proto.Message) { xxx_messageInfo_BeaconBlockBody.Merge(dst, src) } func (m *BeaconBlockBody) XXX_Size() int { - return xxx_messageInfo_BeaconBlockBody.Size(m) + return m.Size() } func (m *BeaconBlockBody) XXX_DiscardUnknown() { xxx_messageInfo_BeaconBlockBody.DiscardUnknown(m) @@ -1128,9 +1239,8 @@ func (m *BeaconBlockBody) GetExits() []*Exit { } type DepositParameters struct { - Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - ProofOfPossession []byte `protobuf:"bytes,2,opt,name=proof_of_possession,json=proofOfPossession,proto3" json:"proof_of_possession,omitempty"` - // TODO(781): The usage of withdrawal_credentials is not defined in spec. Not used in Prysm yet. + Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + ProofOfPossession []byte `protobuf:"bytes,2,opt,name=proof_of_possession,json=proofOfPossession,proto3" json:"proof_of_possession,omitempty"` WithdrawalCredentialsHash32 []byte `protobuf:"bytes,3,opt,name=withdrawal_credentials_hash32,json=withdrawalCredentialsHash32,proto3" json:"withdrawal_credentials_hash32,omitempty"` RandaoCommitmentHash32 []byte `protobuf:"bytes,4,opt,name=randao_commitment_hash32,json=randaoCommitmentHash32,proto3" json:"randao_commitment_hash32,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1142,19 +1252,28 @@ func (m *DepositParameters) Reset() { *m = DepositParameters{} } func (m *DepositParameters) String() string { return proto.CompactTextString(m) } func (*DepositParameters) ProtoMessage() {} func (*DepositParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{14} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{14} } func (m *DepositParameters) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DepositParameters.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *DepositParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DepositParameters.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_DepositParameters.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 (dst *DepositParameters) XXX_Merge(src proto.Message) { xxx_messageInfo_DepositParameters.Merge(dst, src) } func (m *DepositParameters) XXX_Size() int { - return xxx_messageInfo_DepositParameters.Size(m) + return m.Size() } func (m *DepositParameters) XXX_DiscardUnknown() { xxx_messageInfo_DepositParameters.DiscardUnknown(m) @@ -1203,19 +1322,28 @@ func (m *ProposalSignedData) Reset() { *m = ProposalSignedData{} } func (m *ProposalSignedData) String() string { return proto.CompactTextString(m) } func (*ProposalSignedData) ProtoMessage() {} func (*ProposalSignedData) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{15} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{15} } func (m *ProposalSignedData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposalSignedData.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ProposalSignedData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposalSignedData.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ProposalSignedData.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 (dst *ProposalSignedData) XXX_Merge(src proto.Message) { xxx_messageInfo_ProposalSignedData.Merge(dst, src) } func (m *ProposalSignedData) XXX_Size() int { - return xxx_messageInfo_ProposalSignedData.Size(m) + return m.Size() } func (m *ProposalSignedData) XXX_DiscardUnknown() { xxx_messageInfo_ProposalSignedData.DiscardUnknown(m) @@ -1245,9 +1373,9 @@ func (m *ProposalSignedData) GetBlockRootHash32() []byte { } type SlashableVoteData struct { - AggregateSignaturePoc_0Indices []uint32 `protobuf:"varint,1,rep,packed,name=aggregate_signature_poc_0_indices,json=aggregateSignaturePoc0Indices,proto3" json:"aggregate_signature_poc_0_indices,omitempty"` - AggregateSignaturePoc_1Indices []uint32 `protobuf:"varint,2,rep,packed,name=aggregate_signature_poc_1_indices,json=aggregateSignaturePoc1Indices,proto3" json:"aggregate_signature_poc_1_indices,omitempty"` - Data *AttestationData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + AggregateSignaturePoc_0Indices []uint32 `protobuf:"varint,1,rep,packed,name=aggregate_signature_poc_0_indices,json=aggregateSignaturePoc0Indices" json:"aggregate_signature_poc_0_indices,omitempty"` + AggregateSignaturePoc_1Indices []uint32 `protobuf:"varint,2,rep,packed,name=aggregate_signature_poc_1_indices,json=aggregateSignaturePoc1Indices" json:"aggregate_signature_poc_1_indices,omitempty"` + Data *AttestationData `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"` AggregateSignature []byte `protobuf:"bytes,4,opt,name=aggregate_signature,json=aggregateSignature,proto3" json:"aggregate_signature,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1258,19 +1386,28 @@ func (m *SlashableVoteData) Reset() { *m = SlashableVoteData{} } func (m *SlashableVoteData) String() string { return proto.CompactTextString(m) } func (*SlashableVoteData) ProtoMessage() {} func (*SlashableVoteData) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{16} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{16} } func (m *SlashableVoteData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SlashableVoteData.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SlashableVoteData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SlashableVoteData.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SlashableVoteData.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 (dst *SlashableVoteData) XXX_Merge(src proto.Message) { xxx_messageInfo_SlashableVoteData.Merge(dst, src) } func (m *SlashableVoteData) XXX_Size() int { - return xxx_messageInfo_SlashableVoteData.Size(m) + return m.Size() } func (m *SlashableVoteData) XXX_DiscardUnknown() { xxx_messageInfo_SlashableVoteData.DiscardUnknown(m) @@ -1307,7 +1444,7 @@ func (m *SlashableVoteData) GetAggregateSignature() []byte { } type DepositData struct { - DepositParameters *DepositParameters `protobuf:"bytes,1,opt,name=deposit_parameters,json=depositParameters,proto3" json:"deposit_parameters,omitempty"` + DepositParameters *DepositParameters `protobuf:"bytes,1,opt,name=deposit_parameters,json=depositParameters" json:"deposit_parameters,omitempty"` Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1319,19 +1456,28 @@ func (m *DepositData) Reset() { *m = DepositData{} } func (m *DepositData) String() string { return proto.CompactTextString(m) } func (*DepositData) ProtoMessage() {} func (*DepositData) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{17} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{17} } func (m *DepositData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DepositData.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *DepositData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DepositData.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_DepositData.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 (dst *DepositData) XXX_Merge(src proto.Message) { xxx_messageInfo_DepositData.Merge(dst, src) } func (m *DepositData) XXX_Size() int { - return xxx_messageInfo_DepositData.Size(m) + return m.Size() } func (m *DepositData) XXX_DiscardUnknown() { xxx_messageInfo_DepositData.DiscardUnknown(m) @@ -1362,9 +1508,9 @@ func (m *DepositData) GetTimestamp() uint64 { type ProposerSlashing struct { ProposerIndex uint32 `protobuf:"varint,1,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty"` - ProposalData_1 *ProposalSignedData `protobuf:"bytes,2,opt,name=proposal_data_1,json=proposalData1,proto3" json:"proposal_data_1,omitempty"` + ProposalData_1 *ProposalSignedData `protobuf:"bytes,2,opt,name=proposal_data_1,json=proposalData1" json:"proposal_data_1,omitempty"` ProposalSignature_1 []byte `protobuf:"bytes,3,opt,name=proposal_signature_1,json=proposalSignature1,proto3" json:"proposal_signature_1,omitempty"` - ProposalData_2 *ProposalSignedData `protobuf:"bytes,4,opt,name=proposal_data_2,json=proposalData2,proto3" json:"proposal_data_2,omitempty"` + ProposalData_2 *ProposalSignedData `protobuf:"bytes,4,opt,name=proposal_data_2,json=proposalData2" json:"proposal_data_2,omitempty"` ProposalSignature_2 []byte `protobuf:"bytes,5,opt,name=proposal_signature_2,json=proposalSignature2,proto3" json:"proposal_signature_2,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1375,19 +1521,28 @@ 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_types_98bf693b23569082, []int{18} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{18} } func (m *ProposerSlashing) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposerSlashing.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ProposerSlashing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposerSlashing.Marshal(b, m, deterministic) + 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 (dst *ProposerSlashing) XXX_Merge(src proto.Message) { xxx_messageInfo_ProposerSlashing.Merge(dst, src) } func (m *ProposerSlashing) XXX_Size() int { - return xxx_messageInfo_ProposerSlashing.Size(m) + return m.Size() } func (m *ProposerSlashing) XXX_DiscardUnknown() { xxx_messageInfo_ProposerSlashing.DiscardUnknown(m) @@ -1431,8 +1586,8 @@ func (m *ProposerSlashing) GetProposalSignature_2() []byte { } type CasperSlashing struct { - Votes_1 *SlashableVoteData `protobuf:"bytes,1,opt,name=votes_1,json=votes1,proto3" json:"votes_1,omitempty"` - Votes_2 *SlashableVoteData `protobuf:"bytes,2,opt,name=votes_2,json=votes2,proto3" json:"votes_2,omitempty"` + Votes_1 *SlashableVoteData `protobuf:"bytes,1,opt,name=votes_1,json=votes1" json:"votes_1,omitempty"` + Votes_2 *SlashableVoteData `protobuf:"bytes,2,opt,name=votes_2,json=votes2" json:"votes_2,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1442,19 +1597,28 @@ func (m *CasperSlashing) Reset() { *m = CasperSlashing{} } func (m *CasperSlashing) String() string { return proto.CompactTextString(m) } func (*CasperSlashing) ProtoMessage() {} func (*CasperSlashing) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{19} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{19} } func (m *CasperSlashing) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CasperSlashing.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CasperSlashing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CasperSlashing.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CasperSlashing.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 (dst *CasperSlashing) XXX_Merge(src proto.Message) { xxx_messageInfo_CasperSlashing.Merge(dst, src) } func (m *CasperSlashing) XXX_Size() int { - return xxx_messageInfo_CasperSlashing.Size(m) + return m.Size() } func (m *CasperSlashing) XXX_DiscardUnknown() { xxx_messageInfo_CasperSlashing.DiscardUnknown(m) @@ -1477,9 +1641,9 @@ func (m *CasperSlashing) GetVotes_2() *SlashableVoteData { } type Deposit struct { - MerkleBranchHash32S [][]byte `protobuf:"bytes,1,rep,name=merkle_branch_hash32s,json=merkleBranchHash32s,proto3" json:"merkle_branch_hash32s,omitempty"` + MerkleBranchHash32S [][]byte `protobuf:"bytes,1,rep,name=merkle_branch_hash32s,json=merkleBranchHash32s" json:"merkle_branch_hash32s,omitempty"` MerkleTreeIndex uint64 `protobuf:"varint,2,opt,name=merkle_tree_index,json=merkleTreeIndex,proto3" json:"merkle_tree_index,omitempty"` - DepositData *DepositData `protobuf:"bytes,3,opt,name=deposit_data,json=depositData,proto3" json:"deposit_data,omitempty"` + DepositData *DepositData `protobuf:"bytes,3,opt,name=deposit_data,json=depositData" json:"deposit_data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1489,19 +1653,28 @@ 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_types_98bf693b23569082, []int{20} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{20} } func (m *Deposit) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Deposit.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Deposit.Marshal(b, m, deterministic) + 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 (dst *Deposit) XXX_Merge(src proto.Message) { xxx_messageInfo_Deposit.Merge(dst, src) } func (m *Deposit) XXX_Size() int { - return xxx_messageInfo_Deposit.Size(m) + return m.Size() } func (m *Deposit) XXX_DiscardUnknown() { xxx_messageInfo_Deposit.DiscardUnknown(m) @@ -1543,19 +1716,28 @@ func (m *Exit) Reset() { *m = Exit{} } func (m *Exit) String() string { return proto.CompactTextString(m) } func (*Exit) ProtoMessage() {} func (*Exit) Descriptor() ([]byte, []int) { - return fileDescriptor_types_98bf693b23569082, []int{21} + return fileDescriptor_types_aae01fd3d2e90d2d, []int{21} } func (m *Exit) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Exit.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Exit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Exit.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Exit.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 (dst *Exit) XXX_Merge(src proto.Message) { xxx_messageInfo_Exit.Merge(dst, src) } func (m *Exit) XXX_Size() int { - return xxx_messageInfo_Exit.Size(m) + return m.Size() } func (m *Exit) XXX_DiscardUnknown() { xxx_messageInfo_Exit.DiscardUnknown(m) @@ -1609,153 +1791,6349 @@ func init() { proto.RegisterType((*Exit)(nil), "ethereum.beacon.p2p.v1.Exit") proto.RegisterEnum("ethereum.beacon.p2p.v1.ValidatorRecord_StatusCodes", ValidatorRecord_StatusCodes_name, ValidatorRecord_StatusCodes_value) } +func (m *BeaconState) 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 *BeaconState) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ValidatorRegistry) > 0 { + for _, msg := range m.ValidatorRegistry { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.ValidatorRegistryLastChangeSlot != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorRegistryLastChangeSlot)) + } + if m.ValidatorRegistryExitCount != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorRegistryExitCount)) + } + if len(m.ValidatorRegistryDeltaChainTipHash32) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorRegistryDeltaChainTipHash32))) + i += copy(dAtA[i:], m.ValidatorRegistryDeltaChainTipHash32) + } + if len(m.ValidatorBalances) > 0 { + dAtA2 := make([]byte, len(m.ValidatorBalances)*10) + var j1 int + for _, num := range m.ValidatorBalances { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) + } + if len(m.RandaoMixHash32) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0x3e + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.RandaoMixHash32))) + i += copy(dAtA[i:], m.RandaoMixHash32) + } + if len(m.NextSeedHash32) > 0 { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0x3e + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextSeedHash32))) + i += copy(dAtA[i:], m.NextSeedHash32) + } + if len(m.ShardAndCommitteesAtSlots) > 0 { + for _, msg := range m.ShardAndCommitteesAtSlots { + dAtA[i] = 0xda + i++ + dAtA[i] = 0x3e + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.PersistentCommittees) > 0 { + for _, msg := range m.PersistentCommittees { + dAtA[i] = 0xe2 + i++ + dAtA[i] = 0x3e + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.PersistentCommitteeReassignments) > 0 { + for _, msg := range m.PersistentCommitteeReassignments { + dAtA[i] = 0xea + i++ + dAtA[i] = 0x3e + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.PreviousJustifiedSlot != 0 { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x7d + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.PreviousJustifiedSlot)) + } + if m.JustifiedSlot != 0 { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x7d + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.JustifiedSlot)) + } + if m.JustifiedSlotBitfield != 0 { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x7d + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.JustifiedSlotBitfield)) + } + if m.FinalizedSlot != 0 { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x7d + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.FinalizedSlot)) + } + if len(m.LatestCrosslinks) > 0 { + for _, msg := range m.LatestCrosslinks { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xbb + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.LastStateRecalculationSlot != 0 { + dAtA[i] = 0xd0 + i++ + dAtA[i] = 0xbb + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.LastStateRecalculationSlot)) + } + if len(m.LatestBlockRootHash32S) > 0 { + for _, b := range m.LatestBlockRootHash32S { + dAtA[i] = 0xda + i++ + dAtA[i] = 0xbb + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if len(m.LatestPenalizedExitBalances) > 0 { + dAtA4 := make([]byte, len(m.LatestPenalizedExitBalances)*10) + var j3 int + for _, num := range m.LatestPenalizedExitBalances { + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + dAtA[i] = 0xe2 + i++ + dAtA[i] = 0xbb + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(j3)) + i += copy(dAtA[i:], dAtA4[:j3]) + } + if len(m.LatestAttestations) > 0 { + for _, msg := range m.LatestAttestations { + dAtA[i] = 0xea + i++ + dAtA[i] = 0xbb + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.ProcessedPowReceiptRootHash32) > 0 { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0xfa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProcessedPowReceiptRootHash32))) + i += copy(dAtA[i:], m.ProcessedPowReceiptRootHash32) + } + if len(m.CandidatePowReceiptRoots) > 0 { + for _, msg := range m.CandidatePowReceiptRoots { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0xfa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.GenesisTime != 0 { + dAtA[i] = 0xc8 + i++ + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.GenesisTime)) + } + if m.ForkData != nil { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ForkData.Size())) + n5, err := m.ForkData.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.Slot != 0 { + dAtA[i] = 0xd8 + i++ + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Slot)) + } + if m.JustifiedStreak != 0 { + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0xf1 + i++ + dAtA[i] = 0x4 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.JustifiedStreak)) + } + if len(m.ShardAndCommitteesForSlots) > 0 { + for _, msg := range m.ShardAndCommitteesForSlots { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0xf2 + i++ + dAtA[i] = 0x4 + i++ + i = encodeVarintTypes(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 *ForkData) 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 *ForkData) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.PreForkVersion != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.PreForkVersion)) + } + if m.PostForkVersion != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.PostForkVersion)) + } + if m.ForkSlot != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ForkSlot)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CandidatePoWReceiptRootRecord) 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 *CandidatePoWReceiptRootRecord) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CandidatePowReceiptRootHash32) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.CandidatePowReceiptRootHash32))) + i += copy(dAtA[i:], m.CandidatePowReceiptRootHash32) + } + if m.Votes != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Votes)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *PendingAttestationRecord) 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 *PendingAttestationRecord) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Data != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Data.Size())) + n6, err := m.Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if len(m.ParticipationBitfield) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ParticipationBitfield))) + i += copy(dAtA[i:], m.ParticipationBitfield) + } + if len(m.CustodyBitfield) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.CustodyBitfield))) + i += copy(dAtA[i:], m.CustodyBitfield) + } + if m.SlotIncluded != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.SlotIncluded)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +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 m.Data != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Data.Size())) + n7, err := m.Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if len(m.ParticipationBitfield) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ParticipationBitfield))) + i += copy(dAtA[i:], m.ParticipationBitfield) + } + if len(m.CustodyBitfield) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.CustodyBitfield))) + i += copy(dAtA[i:], m.CustodyBitfield) + } + if len(m.AggregateSignature) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.AggregateSignature))) + i += copy(dAtA[i:], m.AggregateSignature) + } + 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 = encodeVarintTypes(dAtA, i, uint64(m.Slot)) + } + if m.Shard != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Shard)) + } + if len(m.BeaconBlockRootHash32) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.BeaconBlockRootHash32))) + i += copy(dAtA[i:], m.BeaconBlockRootHash32) + } + if len(m.EpochBoundaryRootHash32) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.EpochBoundaryRootHash32))) + i += copy(dAtA[i:], m.EpochBoundaryRootHash32) + } + if len(m.ShardBlockRootHash32) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ShardBlockRootHash32))) + i += copy(dAtA[i:], m.ShardBlockRootHash32) + } + if len(m.LatestCrosslinkRootHash32) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.LatestCrosslinkRootHash32))) + i += copy(dAtA[i:], m.LatestCrosslinkRootHash32) + } + if m.JustifiedSlot != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.JustifiedSlot)) + } + if len(m.JustifiedBlockRootHash32) > 0 { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.JustifiedBlockRootHash32))) + i += copy(dAtA[i:], m.JustifiedBlockRootHash32) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ValidatorRecord) 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 *ValidatorRecord) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Pubkey) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Pubkey))) + i += copy(dAtA[i:], m.Pubkey) + } + if len(m.WithdrawalCredentials) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.WithdrawalCredentials))) + i += copy(dAtA[i:], m.WithdrawalCredentials) + } + if len(m.RandaoCommitmentHash32) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.RandaoCommitmentHash32))) + i += copy(dAtA[i:], m.RandaoCommitmentHash32) + } + if m.RandaoLayers != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RandaoLayers)) + } + if m.Status != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + } + if m.LatestStatusChangeSlot != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.LatestStatusChangeSlot)) + } + if m.ExitCount != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ExitCount)) + } + if m.Balance != 0 { + dAtA[i] = 0xc0 + i++ + dAtA[i] = 0x3e + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Balance)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ShardReassignmentRecord) 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 *ShardReassignmentRecord) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ValidatorIndex != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex)) + } + if m.Shard != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Shard)) + } + if m.Slot != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Slot)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SpecialRecord) 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 *SpecialRecord) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Kind != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Kind)) + } + if len(m.Data) > 0 { + for _, b := range m.Data { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(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 *CrosslinkRecord) 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 *CrosslinkRecord) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Slot != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Slot)) + } + if len(m.ShardBlockRootHash32) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ShardBlockRootHash32))) + i += copy(dAtA[i:], m.ShardBlockRootHash32) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ShardAndCommitteeArray) 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 *ShardAndCommitteeArray) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ArrayShardAndCommittee) > 0 { + for _, msg := range m.ArrayShardAndCommittee { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(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 *ShardAndCommittee) 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 *ShardAndCommittee) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Shard != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Shard)) + } + if len(m.Committee) > 0 { + dAtA9 := make([]byte, len(m.Committee)*10) + var j8 int + for _, num := range m.Committee { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ + } + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(j8)) + i += copy(dAtA[i:], dAtA9[:j8]) + } + if m.TotalValidatorCount != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.TotalValidatorCount)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +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 = encodeVarintTypes(dAtA, i, uint64(m.Slot)) + } + if len(m.ParentRootHash32) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ParentRootHash32))) + i += copy(dAtA[i:], m.ParentRootHash32) + } + if len(m.StateRootHash32) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.StateRootHash32))) + i += copy(dAtA[i:], m.StateRootHash32) + } + if len(m.RandaoRevealHash32) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.RandaoRevealHash32))) + i += copy(dAtA[i:], m.RandaoRevealHash32) + } + if len(m.CandidatePowReceiptRootHash32) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.CandidatePowReceiptRootHash32))) + i += copy(dAtA[i:], m.CandidatePowReceiptRootHash32) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.Body != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Body.Size())) + n10, err := m.Body.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Timestamp != nil { + dAtA[i] = 0xf2 + i++ + dAtA[i] = 0x3e + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n11, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + 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.Attestations) > 0 { + for _, msg := range m.Attestations { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(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] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.CasperSlashings) > 0 { + for _, msg := range m.CasperSlashings { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(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] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Exits) > 0 { + for _, msg := range m.Exits { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(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 *DepositParameters) 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 *DepositParameters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Pubkey) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Pubkey))) + i += copy(dAtA[i:], m.Pubkey) + } + if len(m.ProofOfPossession) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProofOfPossession))) + i += copy(dAtA[i:], m.ProofOfPossession) + } + if len(m.WithdrawalCredentialsHash32) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.WithdrawalCredentialsHash32))) + i += copy(dAtA[i:], m.WithdrawalCredentialsHash32) + } + if len(m.RandaoCommitmentHash32) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.RandaoCommitmentHash32))) + i += copy(dAtA[i:], m.RandaoCommitmentHash32) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProposalSignedData) 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 *ProposalSignedData) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Slot != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Slot)) + } + if m.Shard != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Shard)) + } + if len(m.BlockRootHash32) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.BlockRootHash32))) + i += copy(dAtA[i:], m.BlockRootHash32) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SlashableVoteData) 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 *SlashableVoteData) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.AggregateSignaturePoc_0Indices) > 0 { + dAtA13 := make([]byte, len(m.AggregateSignaturePoc_0Indices)*10) + var j12 int + for _, num := range m.AggregateSignaturePoc_0Indices { + for num >= 1<<7 { + dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j12++ + } + dAtA13[j12] = uint8(num) + j12++ + } + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(j12)) + i += copy(dAtA[i:], dAtA13[:j12]) + } + if len(m.AggregateSignaturePoc_1Indices) > 0 { + dAtA15 := make([]byte, len(m.AggregateSignaturePoc_1Indices)*10) + var j14 int + for _, num := range m.AggregateSignaturePoc_1Indices { + for num >= 1<<7 { + dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j14++ + } + dAtA15[j14] = uint8(num) + j14++ + } + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(j14)) + i += copy(dAtA[i:], dAtA15[:j14]) + } + if m.Data != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Data.Size())) + n16, err := m.Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if len(m.AggregateSignature) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.AggregateSignature))) + i += copy(dAtA[i:], m.AggregateSignature) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DepositData) 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 *DepositData) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.DepositParameters != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.DepositParameters.Size())) + n17, err := m.DepositParameters.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.Value != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Value)) + } + if m.Timestamp != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp)) + } + 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 = encodeVarintTypes(dAtA, i, uint64(m.ProposerIndex)) + } + if m.ProposalData_1 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ProposalData_1.Size())) + n18, err := m.ProposalData_1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if len(m.ProposalSignature_1) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposalSignature_1))) + i += copy(dAtA[i:], m.ProposalSignature_1) + } + if m.ProposalData_2 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ProposalData_2.Size())) + n19, err := m.ProposalData_2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if len(m.ProposalSignature_2) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposalSignature_2))) + i += copy(dAtA[i:], m.ProposalSignature_2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CasperSlashing) 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 *CasperSlashing) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Votes_1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Votes_1.Size())) + n20, err := m.Votes_1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if m.Votes_2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Votes_2.Size())) + n21, err := m.Votes_2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + 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.MerkleBranchHash32S) > 0 { + for _, b := range m.MerkleBranchHash32S { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.MerkleTreeIndex != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.MerkleTreeIndex)) + } + if m.DepositData != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.DepositData.Size())) + n22, err := m.DepositData.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Exit) 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 *Exit) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Slot != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Slot)) + } + if m.ValidatorIndex != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex)) + } + if len(m.Signature) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(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 encodeVarintTypes(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 *BeaconState) Size() (n int) { + var l int + _ = l + if len(m.ValidatorRegistry) > 0 { + for _, e := range m.ValidatorRegistry { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.ValidatorRegistryLastChangeSlot != 0 { + n += 1 + sovTypes(uint64(m.ValidatorRegistryLastChangeSlot)) + } + if m.ValidatorRegistryExitCount != 0 { + n += 1 + sovTypes(uint64(m.ValidatorRegistryExitCount)) + } + l = len(m.ValidatorRegistryDeltaChainTipHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.ValidatorBalances) > 0 { + l = 0 + for _, e := range m.ValidatorBalances { + l += sovTypes(uint64(e)) + } + n += 1 + sovTypes(uint64(l)) + l + } + l = len(m.RandaoMixHash32) + if l > 0 { + n += 2 + l + sovTypes(uint64(l)) + } + l = len(m.NextSeedHash32) + if l > 0 { + n += 2 + l + sovTypes(uint64(l)) + } + if len(m.ShardAndCommitteesAtSlots) > 0 { + for _, e := range m.ShardAndCommitteesAtSlots { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.PersistentCommittees) > 0 { + for _, e := range m.PersistentCommittees { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.PersistentCommitteeReassignments) > 0 { + for _, e := range m.PersistentCommitteeReassignments { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.PreviousJustifiedSlot != 0 { + n += 2 + sovTypes(uint64(m.PreviousJustifiedSlot)) + } + if m.JustifiedSlot != 0 { + n += 2 + sovTypes(uint64(m.JustifiedSlot)) + } + if m.JustifiedSlotBitfield != 0 { + n += 2 + sovTypes(uint64(m.JustifiedSlotBitfield)) + } + if m.FinalizedSlot != 0 { + n += 2 + sovTypes(uint64(m.FinalizedSlot)) + } + if len(m.LatestCrosslinks) > 0 { + for _, e := range m.LatestCrosslinks { + l = e.Size() + n += 3 + l + sovTypes(uint64(l)) + } + } + if m.LastStateRecalculationSlot != 0 { + n += 3 + sovTypes(uint64(m.LastStateRecalculationSlot)) + } + if len(m.LatestBlockRootHash32S) > 0 { + for _, b := range m.LatestBlockRootHash32S { + l = len(b) + n += 3 + l + sovTypes(uint64(l)) + } + } + if len(m.LatestPenalizedExitBalances) > 0 { + l = 0 + for _, e := range m.LatestPenalizedExitBalances { + l += sovTypes(uint64(e)) + } + n += 3 + sovTypes(uint64(l)) + l + } + if len(m.LatestAttestations) > 0 { + for _, e := range m.LatestAttestations { + l = e.Size() + n += 3 + l + sovTypes(uint64(l)) + } + } + l = len(m.ProcessedPowReceiptRootHash32) + if l > 0 { + n += 3 + l + sovTypes(uint64(l)) + } + if len(m.CandidatePowReceiptRoots) > 0 { + for _, e := range m.CandidatePowReceiptRoots { + l = e.Size() + n += 3 + l + sovTypes(uint64(l)) + } + } + if m.GenesisTime != 0 { + n += 3 + sovTypes(uint64(m.GenesisTime)) + } + if m.ForkData != nil { + l = m.ForkData.Size() + n += 3 + l + sovTypes(uint64(l)) + } + if m.Slot != 0 { + n += 3 + sovTypes(uint64(m.Slot)) + } + if m.JustifiedStreak != 0 { + n += 3 + sovTypes(uint64(m.JustifiedStreak)) + } + if len(m.ShardAndCommitteesForSlots) > 0 { + for _, e := range m.ShardAndCommitteesForSlots { + l = e.Size() + n += 3 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ForkData) Size() (n int) { + var l int + _ = l + if m.PreForkVersion != 0 { + n += 1 + sovTypes(uint64(m.PreForkVersion)) + } + if m.PostForkVersion != 0 { + n += 1 + sovTypes(uint64(m.PostForkVersion)) + } + if m.ForkSlot != 0 { + n += 1 + sovTypes(uint64(m.ForkSlot)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CandidatePoWReceiptRootRecord) Size() (n int) { + var l int + _ = l + l = len(m.CandidatePowReceiptRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Votes != 0 { + n += 1 + sovTypes(uint64(m.Votes)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PendingAttestationRecord) Size() (n int) { + var l int + _ = l + if m.Data != nil { + l = m.Data.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ParticipationBitfield) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.CustodyBitfield) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.SlotIncluded != 0 { + n += 1 + sovTypes(uint64(m.SlotIncluded)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Attestation) Size() (n int) { + var l int + _ = l + if m.Data != nil { + l = m.Data.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ParticipationBitfield) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.CustodyBitfield) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.AggregateSignature) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AttestationData) Size() (n int) { + var l int + _ = l + if m.Slot != 0 { + n += 1 + sovTypes(uint64(m.Slot)) + } + if m.Shard != 0 { + n += 1 + sovTypes(uint64(m.Shard)) + } + l = len(m.BeaconBlockRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.EpochBoundaryRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ShardBlockRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.LatestCrosslinkRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.JustifiedSlot != 0 { + n += 1 + sovTypes(uint64(m.JustifiedSlot)) + } + l = len(m.JustifiedBlockRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ValidatorRecord) Size() (n int) { + var l int + _ = l + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.WithdrawalCredentials) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.RandaoCommitmentHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.RandaoLayers != 0 { + n += 1 + sovTypes(uint64(m.RandaoLayers)) + } + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + if m.LatestStatusChangeSlot != 0 { + n += 1 + sovTypes(uint64(m.LatestStatusChangeSlot)) + } + if m.ExitCount != 0 { + n += 1 + sovTypes(uint64(m.ExitCount)) + } + if m.Balance != 0 { + n += 2 + sovTypes(uint64(m.Balance)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ShardReassignmentRecord) Size() (n int) { + var l int + _ = l + if m.ValidatorIndex != 0 { + n += 1 + sovTypes(uint64(m.ValidatorIndex)) + } + if m.Shard != 0 { + n += 1 + sovTypes(uint64(m.Shard)) + } + if m.Slot != 0 { + n += 1 + sovTypes(uint64(m.Slot)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SpecialRecord) Size() (n int) { + var l int + _ = l + if m.Kind != 0 { + n += 1 + sovTypes(uint64(m.Kind)) + } + if len(m.Data) > 0 { + for _, b := range m.Data { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CrosslinkRecord) Size() (n int) { + var l int + _ = l + if m.Slot != 0 { + n += 1 + sovTypes(uint64(m.Slot)) + } + l = len(m.ShardBlockRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ShardAndCommitteeArray) Size() (n int) { + var l int + _ = l + if len(m.ArrayShardAndCommittee) > 0 { + for _, e := range m.ArrayShardAndCommittee { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ShardAndCommittee) Size() (n int) { + var l int + _ = l + if m.Shard != 0 { + n += 1 + sovTypes(uint64(m.Shard)) + } + if len(m.Committee) > 0 { + l = 0 + for _, e := range m.Committee { + l += sovTypes(uint64(e)) + } + n += 1 + sovTypes(uint64(l)) + l + } + if m.TotalValidatorCount != 0 { + n += 1 + sovTypes(uint64(m.TotalValidatorCount)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BeaconBlock) Size() (n int) { + var l int + _ = l + if m.Slot != 0 { + n += 1 + sovTypes(uint64(m.Slot)) + } + l = len(m.ParentRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.StateRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.RandaoRevealHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.CandidatePowReceiptRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 2 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BeaconBlockBody) Size() (n int) { + var l int + _ = l + if len(m.Attestations) > 0 { + for _, e := range m.Attestations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.ProposerSlashings) > 0 { + for _, e := range m.ProposerSlashings { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.CasperSlashings) > 0 { + for _, e := range m.CasperSlashings { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Deposits) > 0 { + for _, e := range m.Deposits { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Exits) > 0 { + for _, e := range m.Exits { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DepositParameters) Size() (n int) { + var l int + _ = l + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProofOfPossession) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.WithdrawalCredentialsHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.RandaoCommitmentHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProposalSignedData) Size() (n int) { + var l int + _ = l + if m.Slot != 0 { + n += 1 + sovTypes(uint64(m.Slot)) + } + if m.Shard != 0 { + n += 1 + sovTypes(uint64(m.Shard)) + } + l = len(m.BlockRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SlashableVoteData) Size() (n int) { + var l int + _ = l + if len(m.AggregateSignaturePoc_0Indices) > 0 { + l = 0 + for _, e := range m.AggregateSignaturePoc_0Indices { + l += sovTypes(uint64(e)) + } + n += 1 + sovTypes(uint64(l)) + l + } + if len(m.AggregateSignaturePoc_1Indices) > 0 { + l = 0 + for _, e := range m.AggregateSignaturePoc_1Indices { + l += sovTypes(uint64(e)) + } + n += 1 + sovTypes(uint64(l)) + l + } + if m.Data != nil { + l = m.Data.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.AggregateSignature) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DepositData) Size() (n int) { + var l int + _ = l + if m.DepositParameters != nil { + l = m.DepositParameters.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Value != 0 { + n += 1 + sovTypes(uint64(m.Value)) + } + if m.Timestamp != 0 { + n += 1 + sovTypes(uint64(m.Timestamp)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProposerSlashing) Size() (n int) { + var l int + _ = l + if m.ProposerIndex != 0 { + n += 1 + sovTypes(uint64(m.ProposerIndex)) + } + if m.ProposalData_1 != nil { + l = m.ProposalData_1.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposalSignature_1) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.ProposalData_2 != nil { + l = m.ProposalData_2.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposalSignature_2) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CasperSlashing) Size() (n int) { + var l int + _ = l + if m.Votes_1 != nil { + l = m.Votes_1.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Votes_2 != nil { + l = m.Votes_2.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Deposit) Size() (n int) { + var l int + _ = l + if len(m.MerkleBranchHash32S) > 0 { + for _, b := range m.MerkleBranchHash32S { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.MerkleTreeIndex != 0 { + n += 1 + sovTypes(uint64(m.MerkleTreeIndex)) + } + if m.DepositData != nil { + l = m.DepositData.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Exit) Size() (n int) { + var l int + _ = l + if m.Slot != 0 { + n += 1 + sovTypes(uint64(m.Slot)) + } + if m.ValidatorIndex != 0 { + n += 1 + sovTypes(uint64(m.ValidatorIndex)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BeaconState) 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 ErrIntOverflowTypes + } + 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: BeaconState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeaconState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorRegistry", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorRegistry = append(m.ValidatorRegistry, &ValidatorRecord{}) + if err := m.ValidatorRegistry[len(m.ValidatorRegistry)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorRegistryLastChangeSlot", wireType) + } + m.ValidatorRegistryLastChangeSlot = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorRegistryLastChangeSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorRegistryExitCount", wireType) + } + m.ValidatorRegistryExitCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorRegistryExitCount |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorRegistryDeltaChainTipHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorRegistryDeltaChainTipHash32 = append(m.ValidatorRegistryDeltaChainTipHash32[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorRegistryDeltaChainTipHash32 == nil { + m.ValidatorRegistryDeltaChainTipHash32 = []byte{} + } + iNdEx = postIndex + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ValidatorBalances = append(m.ValidatorBalances, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ValidatorBalances = append(m.ValidatorBalances, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorBalances", wireType) + } + case 1001: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RandaoMixHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RandaoMixHash32 = append(m.RandaoMixHash32[:0], dAtA[iNdEx:postIndex]...) + if m.RandaoMixHash32 == nil { + m.RandaoMixHash32 = []byte{} + } + iNdEx = postIndex + case 1002: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextSeedHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextSeedHash32 = append(m.NextSeedHash32[:0], dAtA[iNdEx:postIndex]...) + if m.NextSeedHash32 == nil { + m.NextSeedHash32 = []byte{} + } + iNdEx = postIndex + case 1003: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShardAndCommitteesAtSlots", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShardAndCommitteesAtSlots = append(m.ShardAndCommitteesAtSlots, &ShardAndCommitteeArray{}) + if err := m.ShardAndCommitteesAtSlots[len(m.ShardAndCommitteesAtSlots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 1004: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PersistentCommittees", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PersistentCommittees = append(m.PersistentCommittees, &common.Uint32List{}) + if err := m.PersistentCommittees[len(m.PersistentCommittees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 1005: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PersistentCommitteeReassignments", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PersistentCommitteeReassignments = append(m.PersistentCommitteeReassignments, &ShardReassignmentRecord{}) + if err := m.PersistentCommitteeReassignments[len(m.PersistentCommitteeReassignments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2001: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PreviousJustifiedSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2002: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JustifiedSlot", wireType) + } + m.JustifiedSlot = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.JustifiedSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2003: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JustifiedSlotBitfield", wireType) + } + m.JustifiedSlotBitfield = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.JustifiedSlotBitfield |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2004: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FinalizedSlot", wireType) + } + m.FinalizedSlot = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FinalizedSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3001: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestCrosslinks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LatestCrosslinks = append(m.LatestCrosslinks, &CrosslinkRecord{}) + if err := m.LatestCrosslinks[len(m.LatestCrosslinks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3002: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastStateRecalculationSlot", wireType) + } + m.LastStateRecalculationSlot = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastStateRecalculationSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3003: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockRootHash32S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LatestBlockRootHash32S = append(m.LatestBlockRootHash32S, make([]byte, postIndex-iNdEx)) + copy(m.LatestBlockRootHash32S[len(m.LatestBlockRootHash32S)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3004: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LatestPenalizedExitBalances = append(m.LatestPenalizedExitBalances, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LatestPenalizedExitBalances = append(m.LatestPenalizedExitBalances, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field LatestPenalizedExitBalances", wireType) + } + case 3005: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestAttestations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LatestAttestations = append(m.LatestAttestations, &PendingAttestationRecord{}) + if err := m.LatestAttestations[len(m.LatestAttestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4001: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessedPowReceiptRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProcessedPowReceiptRootHash32 = append(m.ProcessedPowReceiptRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.ProcessedPowReceiptRootHash32 == nil { + m.ProcessedPowReceiptRootHash32 = []byte{} + } + iNdEx = postIndex + case 4002: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CandidatePowReceiptRoots", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CandidatePowReceiptRoots = append(m.CandidatePowReceiptRoots, &CandidatePoWReceiptRootRecord{}) + if err := m.CandidatePowReceiptRoots[len(m.CandidatePowReceiptRoots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5001: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) + } + m.GenesisTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GenesisTime |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5002: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForkData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ForkData == nil { + m.ForkData = &ForkData{} + } + if err := m.ForkData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5003: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Slot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 10007: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JustifiedStreak", wireType) + } + m.JustifiedStreak = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.JustifiedStreak |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 10019: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShardAndCommitteesForSlots", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShardAndCommitteesForSlots = append(m.ShardAndCommitteesForSlots, &ShardAndCommitteeArray{}) + if err := m.ShardAndCommitteesForSlots[len(m.ShardAndCommitteesForSlots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *ForkData) 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 ErrIntOverflowTypes + } + 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: ForkData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ForkData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreForkVersion", wireType) + } + m.PreForkVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PreForkVersion |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PostForkVersion", wireType) + } + m.PostForkVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PostForkVersion |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForkSlot", wireType) + } + m.ForkSlot = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForkSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *CandidatePoWReceiptRootRecord) 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 ErrIntOverflowTypes + } + 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: CandidatePoWReceiptRootRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CandidatePoWReceiptRootRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CandidatePowReceiptRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CandidatePowReceiptRootHash32 = append(m.CandidatePowReceiptRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.CandidatePowReceiptRootHash32 == nil { + m.CandidatePowReceiptRootHash32 = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + } + m.Votes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Votes |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *PendingAttestationRecord) 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 ErrIntOverflowTypes + } + 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: PendingAttestationRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PendingAttestationRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + 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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParticipationBitfield", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParticipationBitfield = append(m.ParticipationBitfield[:0], dAtA[iNdEx:postIndex]...) + if m.ParticipationBitfield == nil { + m.ParticipationBitfield = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustodyBitfield", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CustodyBitfield = append(m.CustodyBitfield[:0], dAtA[iNdEx:postIndex]...) + if m.CustodyBitfield == nil { + m.CustodyBitfield = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlotIncluded", wireType) + } + m.SlotIncluded = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SlotIncluded |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *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 ErrIntOverflowTypes + } + 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 Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + 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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParticipationBitfield", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParticipationBitfield = append(m.ParticipationBitfield[:0], dAtA[iNdEx:postIndex]...) + if m.ParticipationBitfield == nil { + m.ParticipationBitfield = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustodyBitfield", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CustodyBitfield = append(m.CustodyBitfield[:0], dAtA[iNdEx:postIndex]...) + if m.CustodyBitfield == nil { + m.CustodyBitfield = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateSignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateSignature = append(m.AggregateSignature[:0], dAtA[iNdEx:postIndex]...) + if m.AggregateSignature == nil { + m.AggregateSignature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 ErrIntOverflowTypes + } + 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 ErrIntOverflowTypes + } + 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 Shard", wireType) + } + m.Shard = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Shard |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeaconBlockRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BeaconBlockRootHash32 = append(m.BeaconBlockRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.BeaconBlockRootHash32 == nil { + m.BeaconBlockRootHash32 = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochBoundaryRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EpochBoundaryRootHash32 = append(m.EpochBoundaryRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.EpochBoundaryRootHash32 == nil { + m.EpochBoundaryRootHash32 = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShardBlockRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShardBlockRootHash32 = append(m.ShardBlockRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.ShardBlockRootHash32 == nil { + m.ShardBlockRootHash32 = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestCrosslinkRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LatestCrosslinkRootHash32 = append(m.LatestCrosslinkRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.LatestCrosslinkRootHash32 == nil { + m.LatestCrosslinkRootHash32 = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JustifiedSlot", wireType) + } + m.JustifiedSlot = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.JustifiedSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JustifiedBlockRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JustifiedBlockRootHash32 = append(m.JustifiedBlockRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.JustifiedBlockRootHash32 == nil { + m.JustifiedBlockRootHash32 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *ValidatorRecord) 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 ErrIntOverflowTypes + } + 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: ValidatorRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = append(m.Pubkey[:0], dAtA[iNdEx:postIndex]...) + if m.Pubkey == nil { + m.Pubkey = []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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + 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 != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RandaoCommitmentHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RandaoCommitmentHash32 = append(m.RandaoCommitmentHash32[:0], dAtA[iNdEx:postIndex]...) + if m.RandaoCommitmentHash32 == nil { + m.RandaoCommitmentHash32 = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RandaoLayers", wireType) + } + m.RandaoLayers = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RandaoLayers |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= (ValidatorRecord_StatusCodes(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestStatusChangeSlot", wireType) + } + m.LatestStatusChangeSlot = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LatestStatusChangeSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitCount", wireType) + } + m.ExitCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExitCount |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 1000: + 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 ErrIntOverflowTypes + } + 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 := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *ShardReassignmentRecord) 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 ErrIntOverflowTypes + } + 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: ShardReassignmentRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShardReassignmentRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorIndex |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Shard |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + 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 ErrIntOverflowTypes + } + 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 := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *SpecialRecord) 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 ErrIntOverflowTypes + } + 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: SpecialRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpecialRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, make([]byte, postIndex-iNdEx)) + copy(m.Data[len(m.Data)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *CrosslinkRecord) 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 ErrIntOverflowTypes + } + 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: CrosslinkRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CrosslinkRecord: 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 ErrIntOverflowTypes + } + 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 ShardBlockRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShardBlockRootHash32 = append(m.ShardBlockRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.ShardBlockRootHash32 == nil { + m.ShardBlockRootHash32 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *ShardAndCommitteeArray) 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 ErrIntOverflowTypes + } + 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: ShardAndCommitteeArray: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShardAndCommitteeArray: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ArrayShardAndCommittee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ArrayShardAndCommittee = append(m.ArrayShardAndCommittee, &ShardAndCommittee{}) + if err := m.ArrayShardAndCommittee[len(m.ArrayShardAndCommittee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *ShardAndCommittee) 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 ErrIntOverflowTypes + } + 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: ShardAndCommittee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShardAndCommittee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Shard |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(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 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalValidatorCount", wireType) + } + m.TotalValidatorCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalValidatorCount |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *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 ErrIntOverflowTypes + } + 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 ErrIntOverflowTypes + } + 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 ParentRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentRootHash32 = append(m.ParentRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.ParentRootHash32 == nil { + m.ParentRootHash32 = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StateRootHash32 = append(m.StateRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.StateRootHash32 == nil { + m.StateRootHash32 = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RandaoRevealHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RandaoRevealHash32 = append(m.RandaoRevealHash32[:0], dAtA[iNdEx:postIndex]...) + if m.RandaoRevealHash32 == nil { + m.RandaoRevealHash32 = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CandidatePowReceiptRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CandidatePowReceiptRootHash32 = append(m.CandidatePowReceiptRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.CandidatePowReceiptRootHash32 == nil { + m.CandidatePowReceiptRootHash32 = []byte{} + } + iNdEx = postIndex + case 6: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + 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 1006: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = &types.Timestamp{} + } + if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 ErrIntOverflowTypes + } + 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 Attestations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + 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 ProposerSlashings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + 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 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CasperSlashings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CasperSlashings = append(m.CasperSlashings, &CasperSlashing{}) + if err := m.CasperSlashings[len(m.CasperSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + 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 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Exits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Exits = append(m.Exits, &Exit{}) + if err := m.Exits[len(m.Exits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *DepositParameters) 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 ErrIntOverflowTypes + } + 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: DepositParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DepositParameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = append(m.Pubkey[:0], dAtA[iNdEx:postIndex]...) + if m.Pubkey == nil { + m.Pubkey = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofOfPossession", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProofOfPossession = append(m.ProofOfPossession[:0], dAtA[iNdEx:postIndex]...) + if m.ProofOfPossession == nil { + m.ProofOfPossession = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawalCredentialsHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WithdrawalCredentialsHash32 = append(m.WithdrawalCredentialsHash32[:0], dAtA[iNdEx:postIndex]...) + if m.WithdrawalCredentialsHash32 == nil { + m.WithdrawalCredentialsHash32 = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RandaoCommitmentHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RandaoCommitmentHash32 = append(m.RandaoCommitmentHash32[:0], dAtA[iNdEx:postIndex]...) + if m.RandaoCommitmentHash32 == nil { + m.RandaoCommitmentHash32 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *ProposalSignedData) 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 ErrIntOverflowTypes + } + 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: ProposalSignedData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposalSignedData: 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 ErrIntOverflowTypes + } + 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 Shard", wireType) + } + m.Shard = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Shard |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockRootHash32 = append(m.BlockRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.BlockRootHash32 == nil { + m.BlockRootHash32 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *SlashableVoteData) 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 ErrIntOverflowTypes + } + 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: SlashableVoteData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SlashableVoteData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AggregateSignaturePoc_0Indices = append(m.AggregateSignaturePoc_0Indices, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AggregateSignaturePoc_0Indices = append(m.AggregateSignaturePoc_0Indices, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateSignaturePoc_0Indices", wireType) + } + case 2: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AggregateSignaturePoc_1Indices = append(m.AggregateSignaturePoc_1Indices, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AggregateSignaturePoc_1Indices = append(m.AggregateSignaturePoc_1Indices, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateSignaturePoc_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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + 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 AggregateSignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateSignature = append(m.AggregateSignature[:0], dAtA[iNdEx:postIndex]...) + if m.AggregateSignature == nil { + m.AggregateSignature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *DepositData) 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 ErrIntOverflowTypes + } + 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: DepositData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DepositData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DepositParameters == nil { + m.DepositParameters = &DepositParameters{} + } + if err := m.DepositParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 ErrIntOverflowTypes + } + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposerIndex |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalData_1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProposalData_1 == nil { + m.ProposalData_1 = &ProposalSignedData{} + } + if err := m.ProposalData_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 ProposalSignature_1", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposalSignature_1 = append(m.ProposalSignature_1[:0], dAtA[iNdEx:postIndex]...) + if m.ProposalSignature_1 == nil { + m.ProposalSignature_1 = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalData_2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProposalData_2 == nil { + m.ProposalData_2 = &ProposalSignedData{} + } + if err := m.ProposalData_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalSignature_2", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposalSignature_2 = append(m.ProposalSignature_2[:0], dAtA[iNdEx:postIndex]...) + if m.ProposalSignature_2 == nil { + m.ProposalSignature_2 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *CasperSlashing) 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 ErrIntOverflowTypes + } + 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: CasperSlashing: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CasperSlashing: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes_1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Votes_1 == nil { + m.Votes_1 = &SlashableVoteData{} + } + if err := m.Votes_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 Votes_2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Votes_2 == nil { + m.Votes_2 = &SlashableVoteData{} + } + if err := m.Votes_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 ErrIntOverflowTypes + } + 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 MerkleBranchHash32S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MerkleBranchHash32S = append(m.MerkleBranchHash32S, make([]byte, postIndex-iNdEx)) + copy(m.MerkleBranchHash32S[len(m.MerkleBranchHash32S)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MerkleTreeIndex", wireType) + } + m.MerkleTreeIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MerkleTreeIndex |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DepositData == nil { + m.DepositData = &DepositData{} + } + if err := m.DepositData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *Exit) 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 ErrIntOverflowTypes + } + 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: Exit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Exit: 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 ErrIntOverflowTypes + } + 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 ValidatorIndex", wireType) + } + m.ValidatorIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + 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 := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthTypes + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + 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 := skipTypes(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") +) func init() { - proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_types_98bf693b23569082) + proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_types_aae01fd3d2e90d2d) } -var fileDescriptor_types_98bf693b23569082 = []byte{ - // 2257 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1c, 0x4b, - 0xf5, 0xff, 0x8f, 0x3d, 0xb6, 0x93, 0x33, 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, 0x58, 0x50, 0xe6, - 0x32, 0xd2, 0x0e, 0xb8, 0x60, 0x67, 0x56, 0x61, 0x7d, 0x72, 0xa3, 0x54, 0xbf, 0x51, 0x1b, 0x6e, - 0x42, 0xed, 0x79, 0x22, 0xe1, 0x10, 0x8f, 0x32, 0xdf, 0xa9, 0x9e, 0x64, 0x04, 0xad, 0x01, 0x3d, - 0x86, 0xeb, 0x83, 0x7a, 0xdd, 0x10, 0x73, 0xe1, 0x7a, 0x47, 0x38, 0x6a, 0x13, 0x97, 0x87, 0x54, - 0x58, 0x13, 0xeb, 0x85, 0x8d, 0xa2, 0xb3, 0x36, 0x20, 0xff, 0x18, 0x73, 0xb1, 0xab, 0x70, 0x87, - 0x21, 0x15, 0x68, 0x1b, 0x56, 0x87, 0x68, 0x23, 0xa7, 0x81, 0x70, 0x3d, 0xda, 0x8d, 0x84, 0x35, - 0xa9, 0xf4, 0x2c, 0x0f, 0xe8, 0x79, 0x70, 0x1a, 0x88, 0x5d, 0x89, 0x40, 0x2f, 0xe0, 0xe6, 0x10, - 0x15, 0x3e, 0x09, 0x05, 0x96, 0x16, 0x05, 0x91, 0x2b, 0x82, 0xd8, 0x3d, 0xc2, 0xfc, 0xe8, 0x4e, - 0xdd, 0x2a, 0xae, 0x17, 0x36, 0x66, 0x9d, 0xff, 0x1f, 0x50, 0xb7, 0x27, 0xe1, 0xbb, 0x12, 0xdd, - 0x08, 0xe2, 0x47, 0x0a, 0x8b, 0x3e, 0x99, 0xf7, 0x60, 0x13, 0x87, 0x38, 0xf2, 0x08, 0xb7, 0xa6, - 0xd6, 0x27, 0x37, 0x8a, 0x39, 0xc7, 0xec, 0x18, 0x06, 0xfa, 0x38, 0x54, 0x19, 0x8e, 0x7c, 0x4c, - 0xdd, 0x4e, 0x70, 0x9a, 0x9c, 0xf7, 0xd7, 0x19, 0x75, 0x60, 0x59, 0x73, 0xbe, 0x10, 0x9c, 0x1a, - 0xdd, 0x37, 0xa1, 0x12, 0x91, 0x53, 0xe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ce, 0x6d, 0x06, 0xa2, - 0x15, 0x90, 0xd0, 0xb7, 0x7e, 0x6f, 0x0e, 0xe8, 0x11, 0xd8, 0x31, 0x5c, 0x79, 0x40, 0x2b, 0x88, - 0x70, 0x18, 0x7c, 0x35, 0x39, 0xe0, 0x0f, 0xe6, 0x80, 0x94, 0xac, 0x0e, 0x78, 0x06, 0xd5, 0x10, - 0x0b, 0x22, 0xf3, 0x8c, 0x51, 0xce, 0xc3, 0x20, 0x3a, 0xe6, 0xd6, 0xcf, 0x96, 0xc6, 0x27, 0xf4, - 0x6e, 0x02, 0x35, 0x8e, 0xaa, 0x68, 0x15, 0x29, 0x99, 0xa3, 0x1d, 0x58, 0x55, 0xc9, 0xcb, 0x65, - 0xd5, 0x70, 0x19, 0xf1, 0x70, 0xe8, 0x75, 0x43, 0x2c, 0x02, 0x1a, 0x69, 0x6b, 0x7e, 0xbe, 0xa4, - 0x53, 0x50, 0xa2, 0x54, 0x69, 0x71, 0xf2, 0x18, 0x65, 0xda, 0x67, 0xe0, 0x8a, 0x31, 0xad, 0x19, - 0x52, 0xef, 0xd8, 0x65, 0x94, 0x0a, 0x13, 0xd5, 0xdc, 0xfa, 0x85, 0x34, 0x71, 0xd6, 0x59, 0xd4, - 0x88, 0x1d, 0x09, 0x70, 0x28, 0x15, 0x3a, 0xba, 0x39, 0xda, 0x83, 0xb7, 0x8c, 0x6c, 0x4c, 0x12, - 0x2f, 0xa8, 0xfc, 0x4f, 0x33, 0xee, 0x97, 0x4b, 0x2a, 0xe5, 0x56, 0x34, 0xec, 0x20, 0x41, 0xc9, - 0x0a, 0x90, 0x26, 0x5f, 0x13, 0x16, 0x8c, 0x16, 0x2c, 0xe4, 0x8f, 0xb2, 0x8d, 0x5b, 0xbf, 0xd2, - 0xee, 0xb9, 0x3d, 0xca, 0x3d, 0x07, 0x24, 0xf2, 0x83, 0xa8, 0xbd, 0x9d, 0xc9, 0x18, 0x3f, 0x21, - 0xad, 0x2d, 0xc7, 0xe0, 0x68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x1c, 0xc5, 0x32, 0x12, 0xe7, 0x9a, 0x3a, 0xa6, 0xce, 0x33, 0x75, 0x5c, 0x85, 0x8b, - 0x59, 0x17, 0x9b, 0x56, 0x8b, 0x41, 0x46, 0x90, 0xcd, 0xb8, 0x49, 0xfd, 0x33, 0x95, 0xda, 0x63, - 0x9a, 0x71, 0xce, 0x75, 0x3b, 0xd4, 0x3f, 0x73, 0x94, 0x10, 0x7a, 0x07, 0x2e, 0xa6, 0x1f, 0x4c, - 0xac, 0x7f, 0x69, 0x15, 0xcb, 0x35, 0xfd, 0x4d, 0xa5, 0x96, 0x7c, 0x53, 0xa9, 0x35, 0x12, 0x88, - 0x8a, 0xf4, 0x4c, 0xc2, 0xfe, 0xf7, 0x04, 0x94, 0xfb, 0x14, 0xa3, 0xf7, 0x60, 0xb6, 0x67, 0x9d, - 0xd0, 0xd1, 0x77, 0xfd, 0x1c, 0x43, 0x82, 0xd3, 0x23, 0x88, 0x5e, 0x00, 0x8a, 0x19, 0x8d, 0x29, - 0x27, 0x72, 0x7e, 0xc5, 0xfc, 0x28, 0x88, 0xda, 0x5c, 0xc5, 0x52, 0xa9, 0xbe, 0x31, 0x72, 0x39, - 0x31, 0x12, 0x87, 0x46, 0xc0, 0xa9, 0xc6, 0x7d, 0x14, 0xb9, 0xa9, 0x57, 0x3c, 0xcc, 0xe3, 0x1e, - 0xb5, 0x93, 0x4a, 0xed, 0xdb, 0xa3, 0x97, 0x07, 0x89, 0x4f, 0x95, 0x96, 0xbd, 0x9e, 0x67, 0x8e, - 0xee, 0xc3, 0x05, 0x9f, 0xc4, 0x94, 0x07, 0x42, 0x76, 0x03, 0xa9, 0x6a, 0x6d, 0x94, 0xaa, 0x3d, - 0x8d, 0x73, 0x52, 0x01, 0x54, 0x87, 0x29, 0x59, 0x90, 0xf5, 0x67, 0x92, 0x52, 0xfd, 0xea, 0x28, - 0x49, 0xb9, 0xbc, 0x39, 0x1a, 0x6a, 0xff, 0xb1, 0x00, 0x55, 0xa3, 0xe9, 0x00, 0x33, 0xdc, 0x21, - 0x42, 0x36, 0x9d, 0x51, 0x2d, 0xb2, 0x06, 0x0b, 0x31, 0xa3, 0xb4, 0xe5, 0xd2, 0x96, 0x1b, 0x53, - 0xce, 0x09, 0x4f, 0xa7, 0xed, 0x59, 0xe5, 0x21, 0xda, 0x7a, 0xda, 0x3a, 0x48, 0x19, 0x72, 0xbf, - 0x1d, 0xde, 0x52, 0x7b, 0xb3, 0x64, 0x65, 0x68, 0x67, 0x35, 0x51, 0x3b, 0xae, 0xbf, 0x16, 0xc7, - 0xf5, 0x57, 0xfb, 0x25, 0x20, 0x7d, 0x8d, 0x38, 0x94, 0x33, 0x1a, 0xf1, 0xdf, 0x70, 0x20, 0xbb, - 0x05, 0xd5, 0x51, 0x93, 0x58, 0xb9, 0xd9, 0x57, 0x52, 0xbf, 0x37, 0x01, 0x55, 0x75, 0x8d, 0xb8, - 0x19, 0x92, 0xe7, 0x54, 0x10, 0x75, 0xd6, 0x23, 0xb8, 0x36, 0x64, 0x82, 0x74, 0x63, 0xea, 0xb9, - 0xb7, 0x65, 0xab, 0x09, 0xe4, 0x8a, 0x5d, 0x50, 0x55, 0x6d, 0x75, 0x70, 0x9e, 0x3c, 0xa0, 0xde, - 0xed, 0x7d, 0x0d, 0x1a, 0xa7, 0x69, 0x2b, 0xd5, 0x34, 0x31, 0x46, 0xd3, 0x56, 0xa2, 0x29, 0x19, - 0xba, 0x27, 0x3f, 0xca, 0xd0, 0xfd, 0xc6, 0x23, 0xf1, 0x0f, 0x0b, 0x50, 0x32, 0xf1, 0xa5, 0x3c, - 0xf2, 0x3e, 0x20, 0x13, 0xaf, 0x6e, 0x9c, 0xc6, 0x9b, 0x59, 0x00, 0x6e, 0xbe, 0x26, 0xd4, 0xb3, - 0x00, 0x75, 0xaa, 0xfe, 0x40, 0xcc, 0xca, 0x9d, 0x0a, 0x87, 0x5d, 0x92, 0xee, 0x54, 0xf2, 0x41, - 0xd6, 0xbc, 0xac, 0x30,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, 0x3d, 0xb4, 0x54, 0x0d, - 0x99, 0x56, 0xb5, 0x35, 0xfd, 0xd3, 0x6a, 0x4f, 0xb7, 0xd7, 0x01, 0x94, 0x11, 0x9a, 0xd3, 0xaa, - 0x29, 0xdf, 0xf9, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x3e, 0x83, 0x23, 0x31, 0x19, 0x00, - 0x00, +var fileDescriptor_types_aae01fd3d2e90d2d = []byte{ + // 2274 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0x1c, 0x49, + 0x15, 0xa7, 0xed, 0xb1, 0x9d, 0xbc, 0xb1, 0x3d, 0x33, 0xe5, 0xc4, 0xee, 0xd8, 0x71, 0xec, 0xed, + 0xc0, 0xc6, 0x09, 0x30, 0x8e, 0x27, 0x8a, 0x02, 0x44, 0xcb, 0xca, 0x63, 0x27, 0x1b, 0x43, 0x48, + 0x4c, 0x7b, 0x92, 0x2c, 0x12, 0x52, 0xab, 0xa6, 0xbb, 0x66, 0xdc, 0x71, 0x4f, 0x57, 0xd3, 0x55, + 0xe3, 0xd8, 0x20, 0x76, 0x6f, 0x48, 0xc0, 0x01, 0x71, 0x40, 0x20, 0x71, 0x02, 0xfe, 0x02, 0x8e, + 0x7c, 0x9d, 0x10, 0x12, 0x47, 0xbe, 0x2e, 0x1c, 0x40, 0x28, 0x27, 0xbe, 0xaf, 0x5c, 0x51, 0x7d, + 0xf4, 0xc7, 0x7c, 0xc6, 0x59, 0x2e, 0x9c, 0x66, 0xfa, 0xbd, 0xdf, 0x7b, 0xf5, 0xfa, 0xd5, 0xfb, + 0x6c, 0x58, 0x8b, 0x62, 0xca, 0xe9, 0x66, 0x93, 0x60, 0x97, 0x86, 0x9b, 0x51, 0x2d, 0xda, 0x3c, + 0xde, 0xda, 0xe4, 0xa7, 0x11, 0x61, 0x55, 0xc9, 0x41, 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, + 0x67, 0x86, 0x75, 0xf6, 0xb7, 0x60, 0x25, 0x83, 0x0d, 0x9a, 0x78, 0x4e, 0x1e, 0x63, 0xa6, 0x90, + 0x3e, 0x33, 0xad, 0xaf, 0x15, 0xa0, 0xd4, 0x37, 0x57, 0xa3, 0x45, 0x98, 0x8e, 0xba, 0xcd, 0x23, + 0x72, 0xaa, 0x73, 0x55, 0x3f, 0x89, 0x80, 0x7a, 0xe1, 0xf3, 0x43, 0x2f, 0xc6, 0x2f, 0x70, 0xe0, + 0xb8, 0x31, 0xf1, 0x48, 0xc8, 0x7d, 0x1c, 0xb0, 0x24, 0xa0, 0x32, 0xee, 0x4e, 0xc6, 0x44, 0x9f, + 0x00, 0x53, 0x8f, 0x9e, 0xaa, 0x56, 0x8a, 0x91, 0xa7, 0xf7, 0xda, 0x16, 0x15, 0x7f, 0x27, 0x65, + 0x6b, 0x17, 0x5c, 0x85, 0x39, 0x2d, 0x19, 0xe0, 0x53, 0x12, 0xb3, 0x24, 0x67, 0x14, 0xf1, 0xa1, + 0xa4, 0xa1, 0xcf, 0xc2, 0xb4, 0x08, 0xa7, 0x2e, 0x93, 0xd7, 0x31, 0x5f, 0xbb, 0x75, 0xc6, 0xf5, + 0xa1, 0x7a, 0x20, 0xa5, 0x76, 0xa8, 0x47, 0x98, 0xad, 0x55, 0xa0, 0x4f, 0xa6, 0xb3, 0x82, 0x22, + 0xf4, 0x6c, 0x0d, 0xd3, 0xf2, 0x74, 0x3d, 0x2a, 0x68, 0xe9, 0x6c, 0x59, 0x58, 0x05, 0xc8, 0x6d, + 0x06, 0xea, 0xae, 0xce, 0x93, 0x74, 0x11, 0x58, 0x85, 0x19, 0x3d, 0x33, 0x98, 0x7f, 0x9d, 0x49, + 0x7b, 0x4b, 0x42, 0xb3, 0xde, 0x87, 0x62, 0xce, 0x1e, 0xb4, 0x08, 0x68, 0xff, 0xde, 0xa3, 0xdd, + 0xbd, 0x47, 0xef, 0x38, 0xdb, 0x3b, 0x8d, 0xb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 0xa2, 0x25, 0x0e, 0xb4, 0x80, 0x5d, 0x89, 0xfa, 0x28, 0x62, 0x53, 0x2f, 0xbb, 0x98, + 0x45, 0x3d, 0x6a, 0x27, 0xa5, 0xda, 0x37, 0x47, 0x2f, 0x0f, 0x02, 0x9f, 0x2a, 0x2d, 0xb9, 0x3d, + 0xcf, 0x0c, 0xdd, 0x85, 0x73, 0x1e, 0x89, 0x28, 0xf3, 0xb9, 0xe8, 0x06, 0x42, 0xd5, 0xda, 0x28, + 0x55, 0xbb, 0x0a, 0x67, 0xa7, 0x02, 0xa8, 0x06, 0x53, 0xa2, 0x20, 0xab, 0xcf, 0x24, 0xc5, 0xda, + 0xe5, 0x51, 0x92, 0x62, 0x79, 0xb3, 0x15, 0xd4, 0xfa, 0xa3, 0x01, 0x15, 0xad, 0x69, 0x1f, 0xc7, + 0xb8, 0x43, 0xb8, 0x68, 0x3a, 0xa3, 0x5a, 0x64, 0x15, 0x16, 0xa2, 0x98, 0xd2, 0x96, 0x43, 0x5b, + 0x4e, 0x44, 0x19, 0x23, 0x2c, 0x9d, 0xb6, 0x67, 0xa5, 0x87, 0x68, 0xeb, 0x71, 0x6b, 0x3f, 0x65, + 0x88, 0xfd, 0x76, 0x78, 0x4b, 0xed, 0xcd, 0x92, 0x95, 0xa1, 0x9d, 0x55, 0x47, 0xed, 0xb8, 0xfe, + 0x5a, 0x18, 0xd7, 0x5f, 0xad, 0xe7, 0x80, 0xd4, 0x35, 0xe2, 0x40, 0xcc, 0x68, 0xc4, 0x7b, 0xcd, + 0x81, 0xec, 0x06, 0x54, 0x46, 0x4d, 0x62, 0xa5, 0x66, 0x5f, 0x49, 0xfd, 0xce, 0x04, 0x54, 0xe4, + 0x35, 0xe2, 0x66, 0x40, 0x9e, 0x52, 0x4e, 0xe4, 0x59, 0x0f, 0xe0, 0x8d, 0x21, 0x13, 0xa4, 0x13, + 0x51, 0xd7, 0xb9, 0x29, 0x5a, 0x8d, 0x2f, 0x56, 0x6c, 0x43, 0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 0xed, 0x6b, 0xeb, 0xa8, 0x59, 0x3f, 0x36, 0x60, 0x46, 0xc7, 0x8f, 0x18, 0x17, 0x3a, + 0x24, 0x3e, 0x0a, 0x88, 0xd3, 0x8c, 0x71, 0xe8, 0x1e, 0xa6, 0x9f, 0xc9, 0x0c, 0xd9, 0x0c, 0x17, + 0x14, 0xb3, 0x2e, 0x79, 0xc9, 0x27, 0xb2, 0x1b, 0x50, 0xd1, 0x32, 0x3c, 0x26, 0x44, 0x07, 0x84, + 0xfe, 0xbc, 0xa0, 0x18, 0x8d, 0x98, 0x10, 0x15, 0x12, 0xf7, 0x61, 0x36, 0x09, 0xee, 0x5c, 0x8a, + 0x5d, 0x7d, 0x45, 0x58, 0x4b, 0x73, 0x8b, 0x5e, 0xf6, 0x60, 0x61, 0x28, 0x88, 0x1a, 0x3d, 0xb4, + 0x54, 0x0d, 0x99, 0x56, 0x95, 0x35, 0xfd, 0xd3, 0x6a, 0x4f, 0xb7, 0x57, 0x01, 0x94, 0x11, 0xea, + 0xb3, 0xbf, 0x7e, 0x79, 0xc5, 0xf8, 0xcd, 0xcb, 0x2b, 0xc6, 0x5f, 0x5e, 0x5e, 0x31, 0x9a, 0xd3, + 0xb2, 0x45, 0xdf, 0xfa, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x41, 0x58, 0x9f, 0x53, 0x3f, 0x19, + 0x00, 0x00, } diff --git a/proto/beacon/rpc/v1/BUILD.bazel b/proto/beacon/rpc/v1/BUILD.bazel index ec44d387f..d670267de 100644 --- a/proto/beacon/rpc/v1/BUILD.bazel +++ b/proto/beacon/rpc/v1/BUILD.bazel @@ -4,7 +4,6 @@ load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") go_proto_library( name = "v1_go_proto", - compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1", proto = ":v1_proto", visibility = ["//visibility:public"], @@ -12,6 +11,7 @@ go_proto_library( "//proto/beacon/p2p/v1:go_default_library", "//proto/sharding/p2p/v1:go_default_library", ], + compiler = "//:grpc_proto_compiler", ) go_library( diff --git a/proto/beacon/rpc/v1/services.pb.go b/proto/beacon/rpc/v1/services.pb.go index 12300395b..c6e4ff35d 100755 --- a/proto/beacon/rpc/v1/services.pb.go +++ b/proto/beacon/rpc/v1/services.pb.go @@ -1,19 +1,18 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/beacon/rpc/v1/services.proto -package ethereum_beacon_rpc_v1 +package v1 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import empty "github.com/golang/protobuf/ptypes/empty" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" +import types "github.com/gogo/protobuf/types" import v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) +import context "golang.org/x/net/context" +import grpc "google.golang.org/grpc" + +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -24,7 +23,7 @@ var _ = math.Inf // 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.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type ValidatorRole int32 @@ -49,38 +48,47 @@ func (x ValidatorRole) String() string { return proto.EnumName(ValidatorRole_name, int32(x)) } func (ValidatorRole) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{0} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{0} } type ProposeRequest struct { - ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` - SlotNumber uint64 `protobuf:"varint,2,opt,name=slot_number,json=slotNumber,proto3" json:"slot_number,omitempty"` - RandaoRevealHash32 []byte `protobuf:"bytes,3,opt,name=randao_reveal_hash32,json=randaoRevealHash32,proto3" json:"randao_reveal_hash32,omitempty"` - AttestationBitmask []byte `protobuf:"bytes,4,opt,name=attestation_bitmask,json=attestationBitmask,proto3" json:"attestation_bitmask,omitempty"` - AttestationAggregateSig []uint32 `protobuf:"varint,5,rep,packed,name=attestation_aggregate_sig,json=attestationAggregateSig,proto3" json:"attestation_aggregate_sig,omitempty"` - Timestamp *timestamp.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + SlotNumber uint64 `protobuf:"varint,2,opt,name=slot_number,json=slotNumber,proto3" json:"slot_number,omitempty"` + RandaoRevealHash32 []byte `protobuf:"bytes,3,opt,name=randao_reveal_hash32,json=randaoRevealHash32,proto3" json:"randao_reveal_hash32,omitempty"` + AttestationBitmask []byte `protobuf:"bytes,4,opt,name=attestation_bitmask,json=attestationBitmask,proto3" json:"attestation_bitmask,omitempty"` + AttestationAggregateSig []uint32 `protobuf:"varint,5,rep,packed,name=attestation_aggregate_sig,json=attestationAggregateSig" json:"attestation_aggregate_sig,omitempty"` + Timestamp *types.Timestamp `protobuf:"bytes,6,opt,name=timestamp" json:"timestamp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ProposeRequest) Reset() { *m = ProposeRequest{} } func (m *ProposeRequest) String() string { return proto.CompactTextString(m) } func (*ProposeRequest) ProtoMessage() {} func (*ProposeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{0} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{0} } func (m *ProposeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposeRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ProposeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposeRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ProposeRequest.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 (dst *ProposeRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ProposeRequest.Merge(dst, src) } func (m *ProposeRequest) XXX_Size() int { - return xxx_messageInfo_ProposeRequest.Size(m) + return m.Size() } func (m *ProposeRequest) XXX_DiscardUnknown() { xxx_messageInfo_ProposeRequest.DiscardUnknown(m) @@ -123,7 +131,7 @@ func (m *ProposeRequest) GetAttestationAggregateSig() []uint32 { return nil } -func (m *ProposeRequest) GetTimestamp() *timestamp.Timestamp { +func (m *ProposeRequest) GetTimestamp() *types.Timestamp { if m != nil { return m.Timestamp } @@ -141,19 +149,28 @@ func (m *ProposeResponse) Reset() { *m = ProposeResponse{} } func (m *ProposeResponse) String() string { return proto.CompactTextString(m) } func (*ProposeResponse) ProtoMessage() {} func (*ProposeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{1} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{1} } func (m *ProposeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposeResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ProposeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposeResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ProposeResponse.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 (dst *ProposeResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ProposeResponse.Merge(dst, src) } func (m *ProposeResponse) XXX_Size() int { - return xxx_messageInfo_ProposeResponse.Size(m) + return m.Size() } func (m *ProposeResponse) XXX_DiscardUnknown() { xxx_messageInfo_ProposeResponse.DiscardUnknown(m) @@ -169,7 +186,7 @@ func (m *ProposeResponse) GetBlockHash() []byte { } type AttestRequest struct { - Attestation *v1.Attestation `protobuf:"bytes,1,opt,name=attestation,proto3" json:"attestation,omitempty"` + Attestation *v1.Attestation `protobuf:"bytes,1,opt,name=attestation" json:"attestation,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -179,19 +196,28 @@ func (m *AttestRequest) Reset() { *m = AttestRequest{} } func (m *AttestRequest) String() string { return proto.CompactTextString(m) } func (*AttestRequest) ProtoMessage() {} func (*AttestRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{2} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{2} } func (m *AttestRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AttestRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *AttestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AttestRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_AttestRequest.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 (dst *AttestRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_AttestRequest.Merge(dst, src) } func (m *AttestRequest) XXX_Size() int { - return xxx_messageInfo_AttestRequest.Size(m) + return m.Size() } func (m *AttestRequest) XXX_DiscardUnknown() { xxx_messageInfo_AttestRequest.DiscardUnknown(m) @@ -217,19 +243,28 @@ func (m *AttestResponse) Reset() { *m = AttestResponse{} } func (m *AttestResponse) String() string { return proto.CompactTextString(m) } func (*AttestResponse) ProtoMessage() {} func (*AttestResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{3} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{3} } func (m *AttestResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AttestResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *AttestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AttestResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_AttestResponse.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 (dst *AttestResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_AttestResponse.Merge(dst, src) } func (m *AttestResponse) XXX_Size() int { - return xxx_messageInfo_AttestResponse.Size(m) + return m.Size() } func (m *AttestResponse) XXX_DiscardUnknown() { xxx_messageInfo_AttestResponse.DiscardUnknown(m) @@ -244,11 +279,9 @@ func (m *AttestResponse) GetAttestationHash() []byte { return nil } -// Request assignment updates for either all validators or a subset of validators -// defined by their public keys. type ValidatorAssignmentRequest struct { AllValidators bool `protobuf:"varint,1,opt,name=all_validators,json=allValidators,proto3" json:"all_validators,omitempty"` - PublicKeys []*PublicKey `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"` + PublicKeys []*PublicKey `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys" json:"public_keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -258,19 +291,28 @@ func (m *ValidatorAssignmentRequest) Reset() { *m = ValidatorAssignmentR func (m *ValidatorAssignmentRequest) String() string { return proto.CompactTextString(m) } func (*ValidatorAssignmentRequest) ProtoMessage() {} func (*ValidatorAssignmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{4} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{4} } func (m *ValidatorAssignmentRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidatorAssignmentRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ValidatorAssignmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidatorAssignmentRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ValidatorAssignmentRequest.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 (dst *ValidatorAssignmentRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatorAssignmentRequest.Merge(dst, src) } func (m *ValidatorAssignmentRequest) XXX_Size() int { - return xxx_messageInfo_ValidatorAssignmentRequest.Size(m) + return m.Size() } func (m *ValidatorAssignmentRequest) XXX_DiscardUnknown() { xxx_messageInfo_ValidatorAssignmentRequest.DiscardUnknown(m) @@ -293,7 +335,7 @@ func (m *ValidatorAssignmentRequest) GetPublicKeys() []*PublicKey { } type ValidatorAssignmentResponse struct { - Assignments []*Assignment `protobuf:"bytes,1,rep,name=assignments,proto3" json:"assignments,omitempty"` + Assignments []*Assignment `protobuf:"bytes,1,rep,name=assignments" json:"assignments,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -303,19 +345,28 @@ func (m *ValidatorAssignmentResponse) Reset() { *m = ValidatorAssignment func (m *ValidatorAssignmentResponse) String() string { return proto.CompactTextString(m) } func (*ValidatorAssignmentResponse) ProtoMessage() {} func (*ValidatorAssignmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{5} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{5} } func (m *ValidatorAssignmentResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidatorAssignmentResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ValidatorAssignmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidatorAssignmentResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ValidatorAssignmentResponse.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 (dst *ValidatorAssignmentResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatorAssignmentResponse.Merge(dst, src) } func (m *ValidatorAssignmentResponse) XXX_Size() int { - return xxx_messageInfo_ValidatorAssignmentResponse.Size(m) + return m.Size() } func (m *ValidatorAssignmentResponse) XXX_DiscardUnknown() { xxx_messageInfo_ValidatorAssignmentResponse.DiscardUnknown(m) @@ -330,9 +381,8 @@ func (m *ValidatorAssignmentResponse) GetAssignments() []*Assignment { return nil } -// Assignment defines a validator's assignment responsibilities. type Assignment struct { - PublicKey *PublicKey `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + PublicKey *PublicKey `protobuf:"bytes,1,opt,name=public_key,json=publicKey" json:"public_key,omitempty"` ShardId uint64 `protobuf:"varint,2,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` Role ValidatorRole `protobuf:"varint,3,opt,name=role,proto3,enum=ethereum.beacon.rpc.v1.ValidatorRole" json:"role,omitempty"` AssignedSlot uint64 `protobuf:"varint,4,opt,name=assigned_slot,json=assignedSlot,proto3" json:"assigned_slot,omitempty"` @@ -345,19 +395,28 @@ func (m *Assignment) Reset() { *m = Assignment{} } func (m *Assignment) String() string { return proto.CompactTextString(m) } func (*Assignment) ProtoMessage() {} func (*Assignment) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{6} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{6} } func (m *Assignment) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Assignment.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Assignment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Assignment.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Assignment.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 (dst *Assignment) XXX_Merge(src proto.Message) { xxx_messageInfo_Assignment.Merge(dst, src) } func (m *Assignment) XXX_Size() int { - return xxx_messageInfo_Assignment.Size(m) + return m.Size() } func (m *Assignment) XXX_DiscardUnknown() { xxx_messageInfo_Assignment.DiscardUnknown(m) @@ -404,19 +463,28 @@ func (m *PublicKey) Reset() { *m = PublicKey{} } func (m *PublicKey) String() string { return proto.CompactTextString(m) } func (*PublicKey) ProtoMessage() {} func (*PublicKey) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{7} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{7} } func (m *PublicKey) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PublicKey.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_PublicKey.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 (dst *PublicKey) XXX_Merge(src proto.Message) { xxx_messageInfo_PublicKey.Merge(dst, src) } func (m *PublicKey) XXX_Size() int { - return xxx_messageInfo_PublicKey.Size(m) + return m.Size() } func (m *PublicKey) XXX_DiscardUnknown() { xxx_messageInfo_PublicKey.DiscardUnknown(m) @@ -443,19 +511,28 @@ func (m *SlotResponsibilityResponse) Reset() { *m = SlotResponsibilityRe func (m *SlotResponsibilityResponse) String() string { return proto.CompactTextString(m) } func (*SlotResponsibilityResponse) ProtoMessage() {} func (*SlotResponsibilityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{8} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{8} } func (m *SlotResponsibilityResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SlotResponsibilityResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SlotResponsibilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SlotResponsibilityResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SlotResponsibilityResponse.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 (dst *SlotResponsibilityResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_SlotResponsibilityResponse.Merge(dst, src) } func (m *SlotResponsibilityResponse) XXX_Size() int { - return xxx_messageInfo_SlotResponsibilityResponse.Size(m) + return m.Size() } func (m *SlotResponsibilityResponse) XXX_DiscardUnknown() { xxx_messageInfo_SlotResponsibilityResponse.DiscardUnknown(m) @@ -488,19 +565,28 @@ func (m *IndexResponse) Reset() { *m = IndexResponse{} } func (m *IndexResponse) String() string { return proto.CompactTextString(m) } func (*IndexResponse) ProtoMessage() {} func (*IndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{9} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{9} } func (m *IndexResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *IndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_IndexResponse.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 (dst *IndexResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_IndexResponse.Merge(dst, src) } func (m *IndexResponse) XXX_Size() int { - return xxx_messageInfo_IndexResponse.Size(m) + return m.Size() } func (m *IndexResponse) XXX_DiscardUnknown() { xxx_messageInfo_IndexResponse.DiscardUnknown(m) @@ -526,19 +612,28 @@ func (m *ShardIDResponse) Reset() { *m = ShardIDResponse{} } func (m *ShardIDResponse) String() string { return proto.CompactTextString(m) } func (*ShardIDResponse) ProtoMessage() {} func (*ShardIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{10} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{10} } func (m *ShardIDResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ShardIDResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ShardIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ShardIDResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ShardIDResponse.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 (dst *ShardIDResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ShardIDResponse.Merge(dst, src) } func (m *ShardIDResponse) XXX_Size() int { - return xxx_messageInfo_ShardIDResponse.Size(m) + return m.Size() } func (m *ShardIDResponse) XXX_DiscardUnknown() { xxx_messageInfo_ShardIDResponse.DiscardUnknown(m) @@ -554,30 +649,39 @@ func (m *ShardIDResponse) GetShardId() uint64 { } type CurrentAssignmentsResponse struct { - Assignments []*Assignment `protobuf:"bytes,1,rep,name=assignments,proto3" json:"assignments,omitempty"` - GenesisTimestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=genesis_timestamp,json=genesisTimestamp,proto3" json:"genesis_timestamp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Assignments []*Assignment `protobuf:"bytes,1,rep,name=assignments" json:"assignments,omitempty"` + GenesisTimestamp *types.Timestamp `protobuf:"bytes,2,opt,name=genesis_timestamp,json=genesisTimestamp" json:"genesis_timestamp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CurrentAssignmentsResponse) Reset() { *m = CurrentAssignmentsResponse{} } func (m *CurrentAssignmentsResponse) String() string { return proto.CompactTextString(m) } func (*CurrentAssignmentsResponse) ProtoMessage() {} func (*CurrentAssignmentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_services_2219ca6bc0739501, []int{11} + return fileDescriptor_services_3b6f14e6d00f3ce9, []int{11} } func (m *CurrentAssignmentsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CurrentAssignmentsResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CurrentAssignmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CurrentAssignmentsResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CurrentAssignmentsResponse.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 (dst *CurrentAssignmentsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_CurrentAssignmentsResponse.Merge(dst, src) } func (m *CurrentAssignmentsResponse) XXX_Size() int { - return xxx_messageInfo_CurrentAssignmentsResponse.Size(m) + return m.Size() } func (m *CurrentAssignmentsResponse) XXX_DiscardUnknown() { xxx_messageInfo_CurrentAssignmentsResponse.DiscardUnknown(m) @@ -592,7 +696,7 @@ func (m *CurrentAssignmentsResponse) GetAssignments() []*Assignment { return nil } -func (m *CurrentAssignmentsResponse) GetGenesisTimestamp() *timestamp.Timestamp { +func (m *CurrentAssignmentsResponse) GetGenesisTimestamp() *types.Timestamp { if m != nil { return m.GenesisTimestamp } @@ -623,22 +727,12 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// BeaconServiceClient is the client API for BeaconService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// Client API for BeaconService service + type BeaconServiceClient interface { - // CanonicalHead can be called on demand to fetch the current, head block of a - // beacon node. - CanonicalHead(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1.BeaconBlock, error) - // LatestAttestation streams the latest aggregated attestation to connected - // validator clients. - LatestAttestation(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (BeaconService_LatestAttestationClient, error) - // CurrentAssignmentsAndGenesisTime is called by a validator client upon first connecting - // to a beacon node in order to determine the current validator assignments - // and genesis timestamp of the protocol. + CanonicalHead(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*v1.BeaconBlock, error) + LatestAttestation(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (BeaconService_LatestAttestationClient, error) CurrentAssignmentsAndGenesisTime(ctx context.Context, in *ValidatorAssignmentRequest, opts ...grpc.CallOption) (*CurrentAssignmentsResponse, error) - // ValidatorAssignments streams validator assignments to clients - // for a subset of public keys in the active validator set. ValidatorAssignments(ctx context.Context, in *ValidatorAssignmentRequest, opts ...grpc.CallOption) (BeaconService_ValidatorAssignmentsClient, error) } @@ -650,7 +744,7 @@ func NewBeaconServiceClient(cc *grpc.ClientConn) BeaconServiceClient { return &beaconServiceClient{cc} } -func (c *beaconServiceClient) CanonicalHead(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1.BeaconBlock, error) { +func (c *beaconServiceClient) CanonicalHead(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*v1.BeaconBlock, error) { out := new(v1.BeaconBlock) err := c.cc.Invoke(ctx, "/ethereum.beacon.rpc.v1.BeaconService/CanonicalHead", in, out, opts...) if err != nil { @@ -659,7 +753,7 @@ func (c *beaconServiceClient) CanonicalHead(ctx context.Context, in *empty.Empty return out, nil } -func (c *beaconServiceClient) LatestAttestation(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (BeaconService_LatestAttestationClient, error) { +func (c *beaconServiceClient) LatestAttestation(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (BeaconService_LatestAttestationClient, error) { stream, err := c.cc.NewStream(ctx, &_BeaconService_serviceDesc.Streams[0], "/ethereum.beacon.rpc.v1.BeaconService/LatestAttestation", opts...) if err != nil { return nil, err @@ -732,20 +826,12 @@ func (x *beaconServiceValidatorAssignmentsClient) Recv() (*ValidatorAssignmentRe return m, nil } -// BeaconServiceServer is the server API for BeaconService service. +// Server API for BeaconService service + type BeaconServiceServer interface { - // CanonicalHead can be called on demand to fetch the current, head block of a - // beacon node. - CanonicalHead(context.Context, *empty.Empty) (*v1.BeaconBlock, error) - // LatestAttestation streams the latest aggregated attestation to connected - // validator clients. - LatestAttestation(*empty.Empty, BeaconService_LatestAttestationServer) error - // CurrentAssignmentsAndGenesisTime is called by a validator client upon first connecting - // to a beacon node in order to determine the current validator assignments - // and genesis timestamp of the protocol. + CanonicalHead(context.Context, *types.Empty) (*v1.BeaconBlock, error) + LatestAttestation(*types.Empty, BeaconService_LatestAttestationServer) error CurrentAssignmentsAndGenesisTime(context.Context, *ValidatorAssignmentRequest) (*CurrentAssignmentsResponse, error) - // ValidatorAssignments streams validator assignments to clients - // for a subset of public keys in the active validator set. ValidatorAssignments(*ValidatorAssignmentRequest, BeaconService_ValidatorAssignmentsServer) error } @@ -754,7 +840,7 @@ func RegisterBeaconServiceServer(s *grpc.Server, srv BeaconServiceServer) { } func _BeaconService_CanonicalHead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(types.Empty) if err := dec(in); err != nil { return nil, err } @@ -766,13 +852,13 @@ func _BeaconService_CanonicalHead_Handler(srv interface{}, ctx context.Context, FullMethod: "/ethereum.beacon.rpc.v1.BeaconService/CanonicalHead", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconServiceServer).CanonicalHead(ctx, req.(*empty.Empty)) + return srv.(BeaconServiceServer).CanonicalHead(ctx, req.(*types.Empty)) } return interceptor(ctx, in, info, handler) } func _BeaconService_LatestAttestation_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(empty.Empty) + m := new(types.Empty) if err := stream.RecvMsg(m); err != nil { return err } @@ -859,9 +945,8 @@ var _BeaconService_serviceDesc = grpc.ServiceDesc{ Metadata: "proto/beacon/rpc/v1/services.proto", } -// AttesterServiceClient is the client API for AttesterService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// Client API for AttesterService service + type AttesterServiceClient interface { AttestHead(ctx context.Context, in *AttestRequest, opts ...grpc.CallOption) (*AttestResponse, error) } @@ -883,7 +968,8 @@ func (c *attesterServiceClient) AttestHead(ctx context.Context, in *AttestReques return out, nil } -// AttesterServiceServer is the server API for AttesterService service. +// Server API for AttesterService service + type AttesterServiceServer interface { AttestHead(context.Context, *AttestRequest) (*AttestResponse, error) } @@ -923,9 +1009,8 @@ var _AttesterService_serviceDesc = grpc.ServiceDesc{ Metadata: "proto/beacon/rpc/v1/services.proto", } -// ProposerServiceClient is the client API for ProposerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// Client API for ProposerService service + type ProposerServiceClient interface { ProposeBlock(ctx context.Context, in *ProposeRequest, opts ...grpc.CallOption) (*ProposeResponse, error) } @@ -947,7 +1032,8 @@ func (c *proposerServiceClient) ProposeBlock(ctx context.Context, in *ProposeReq return out, nil } -// ProposerServiceServer is the server API for ProposerService service. +// Server API for ProposerService service + type ProposerServiceServer interface { ProposeBlock(context.Context, *ProposeRequest) (*ProposeResponse, error) } @@ -987,12 +1073,9 @@ var _ProposerService_serviceDesc = grpc.ServiceDesc{ Metadata: "proto/beacon/rpc/v1/services.proto", } -// ValidatorServiceClient is the client API for ValidatorService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// Client API for ValidatorService service + type ValidatorServiceClient interface { - // These endpoints can be called on demand in the future - // by some web3 API for users to conveniently know their assignment. ValidatorShardID(ctx context.Context, in *PublicKey, opts ...grpc.CallOption) (*ShardIDResponse, error) ValidatorIndex(ctx context.Context, in *PublicKey, opts ...grpc.CallOption) (*IndexResponse, error) ValidatorSlotAndResponsibility(ctx context.Context, in *PublicKey, opts ...grpc.CallOption) (*SlotResponsibilityResponse, error) @@ -1033,10 +1116,9 @@ func (c *validatorServiceClient) ValidatorSlotAndResponsibility(ctx context.Cont return out, nil } -// ValidatorServiceServer is the server API for ValidatorService service. +// Server API for ValidatorService service + type ValidatorServiceServer interface { - // These endpoints can be called on demand in the future - // by some web3 API for users to conveniently know their assignment. ValidatorShardID(context.Context, *PublicKey) (*ShardIDResponse, error) ValidatorIndex(context.Context, *PublicKey) (*IndexResponse, error) ValidatorSlotAndResponsibility(context.Context, *PublicKey) (*SlotResponsibilityResponse, error) @@ -1121,68 +1203,2085 @@ var _ValidatorService_serviceDesc = grpc.ServiceDesc{ Metadata: "proto/beacon/rpc/v1/services.proto", } -func init() { - proto.RegisterFile("proto/beacon/rpc/v1/services.proto", fileDescriptor_services_2219ca6bc0739501) +func (m *ProposeRequest) 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 } -var fileDescriptor_services_2219ca6bc0739501 = []byte{ - // 928 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x5d, 0x6f, 0xe3, 0x44, - 0x14, 0xc5, 0x69, 0x76, 0xb7, 0xbd, 0xf9, 0x68, 0x76, 0xa8, 0x96, 0xac, 0x57, 0xd0, 0xe0, 0x55, - 0x21, 0xac, 0x90, 0xd3, 0xba, 0x2f, 0x0b, 0xbc, 0x90, 0xee, 0x46, 0xdb, 0xd5, 0xae, 0xda, 0xca, - 0x29, 0x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a9, 0x0b, 0x72, 0xd6, 0xae, 0xd0, 0x35, - 0xfb, 0x31, 0x4b, 0x31, 0xff, 0xb1, 0x09, 0xbf, 0x1b, 0xb0, 0x73, 0x43, 0x4b, 0xfe, 0xbf, 0x08, - 0x1c, 0xde, 0x09, 0xa3, 0x18, 0xec, 0x1b, 0x4e, 0x0c, 0xdb, 0x4a, 0x21, 0xc2, 0xf2, 0x53, 0xfc, - 0x11, 0x40, 0x85, 0xe4, 0x11, 0x96, 0xfe, 0x4f, 0x2b, 0x37, 0x84, 0xf9, 0xd9, 0xba, 0x32, 0x35, - 0xd1, 0x61, 0xfa, 0x32, 0xd2, 0xf3, 0x3c, 0xa8, 0x67, 0x21, 0x75, 0xee, 0xa5, 0xad, 0x56, 0xaf, - 0x7c, 0xf3, 0xf3, 0xb5, 0x75, 0xd9, 0xcc, 0xbf, 0x2b, 0xd0, 0xd2, 0x2a, 0xe4, 0x53, 0x7f, 0x2a, - 0xc6, 0xd4, 0xcf, 0x8d, 0xd6, 0x1b, 0x6a, 0xf9, 0xd0, 0xab, 0x06, 0xf1, 0x03, 0x34, 0x75, 0x7f, - 0xe9, 0x31, 0xb7, 0xe9, 0x5e, 0x2a, 0xf6, 0xaa, 0x4b, 0xfd, 0x0a, 0x9f, 0x2c, 0xb9, 0x47, 0x54, - 0xf4, 0x63, 0x7f, 0xd5, 0x2f, 0x6f, 0x33, 0xab, 0x74, 0xc9, 0xca, 0xed, 0x77, 0x74, 0x5f, 0xfe, - 0x75, 0x87, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xb4, 0x4d, 0x75, 0x1c, 0x0a, 0x00, 0x00, +func (m *ProposeRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ParentHash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintServices(dAtA, i, uint64(len(m.ParentHash))) + i += copy(dAtA[i:], m.ParentHash) + } + if m.SlotNumber != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.SlotNumber)) + } + if len(m.RandaoRevealHash32) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintServices(dAtA, i, uint64(len(m.RandaoRevealHash32))) + i += copy(dAtA[i:], m.RandaoRevealHash32) + } + if len(m.AttestationBitmask) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintServices(dAtA, i, uint64(len(m.AttestationBitmask))) + i += copy(dAtA[i:], m.AttestationBitmask) + } + if len(m.AttestationAggregateSig) > 0 { + dAtA2 := make([]byte, len(m.AttestationAggregateSig)*10) + var j1 int + for _, num := range m.AttestationAggregateSig { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintServices(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) + } + if m.Timestamp != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.Timestamp.Size())) + n3, err := m.Timestamp.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 *ProposeResponse) 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 *ProposeResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.BlockHash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintServices(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 *AttestRequest) 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 *AttestRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Attestation != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintServices(dAtA, i, uint64(m.Attestation.Size())) + n4, err := m.Attestation.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 *AttestResponse) 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 *AttestResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.AttestationHash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintServices(dAtA, i, uint64(len(m.AttestationHash))) + i += copy(dAtA[i:], m.AttestationHash) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ValidatorAssignmentRequest) 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 *ValidatorAssignmentRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AllValidators { + dAtA[i] = 0x8 + i++ + if m.AllValidators { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.PublicKeys) > 0 { + for _, msg := range m.PublicKeys { + dAtA[i] = 0x12 + i++ + i = encodeVarintServices(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 *ValidatorAssignmentResponse) 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 *ValidatorAssignmentResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Assignments) > 0 { + for _, msg := range m.Assignments { + dAtA[i] = 0xa + i++ + i = encodeVarintServices(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 *Assignment) 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 *Assignment) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.PublicKey != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintServices(dAtA, i, uint64(m.PublicKey.Size())) + n5, err := m.PublicKey.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.ShardId != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.ShardId)) + } + if m.Role != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.Role)) + } + if m.AssignedSlot != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.AssignedSlot)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *PublicKey) 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 *PublicKey) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PublicKey) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintServices(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 *SlotResponsibilityResponse) 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 *SlotResponsibilityResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Slot != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.Slot)) + } + if m.Role != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.Role)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *IndexResponse) 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 *IndexResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Index != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.Index)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ShardIDResponse) 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 *ShardIDResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ShardId != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.ShardId)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CurrentAssignmentsResponse) 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 *CurrentAssignmentsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Assignments) > 0 { + for _, msg := range m.Assignments { + dAtA[i] = 0xa + i++ + i = encodeVarintServices(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.GenesisTimestamp != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintServices(dAtA, i, uint64(m.GenesisTimestamp.Size())) + n6, err := m.GenesisTimestamp.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 encodeVarintServices(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 *ProposeRequest) Size() (n int) { + var l int + _ = l + l = len(m.ParentHash) + if l > 0 { + n += 1 + l + sovServices(uint64(l)) + } + if m.SlotNumber != 0 { + n += 1 + sovServices(uint64(m.SlotNumber)) + } + l = len(m.RandaoRevealHash32) + if l > 0 { + n += 1 + l + sovServices(uint64(l)) + } + l = len(m.AttestationBitmask) + if l > 0 { + n += 1 + l + sovServices(uint64(l)) + } + if len(m.AttestationAggregateSig) > 0 { + l = 0 + for _, e := range m.AttestationAggregateSig { + l += sovServices(uint64(e)) + } + n += 1 + sovServices(uint64(l)) + l + } + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovServices(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProposeResponse) Size() (n int) { + var l int + _ = l + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovServices(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AttestRequest) Size() (n int) { + var l int + _ = l + if m.Attestation != nil { + l = m.Attestation.Size() + n += 1 + l + sovServices(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AttestResponse) Size() (n int) { + var l int + _ = l + l = len(m.AttestationHash) + if l > 0 { + n += 1 + l + sovServices(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ValidatorAssignmentRequest) Size() (n int) { + var l int + _ = l + if m.AllValidators { + n += 2 + } + if len(m.PublicKeys) > 0 { + for _, e := range m.PublicKeys { + l = e.Size() + n += 1 + l + sovServices(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ValidatorAssignmentResponse) Size() (n int) { + var l int + _ = l + if len(m.Assignments) > 0 { + for _, e := range m.Assignments { + l = e.Size() + n += 1 + l + sovServices(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Assignment) Size() (n int) { + var l int + _ = l + if m.PublicKey != nil { + l = m.PublicKey.Size() + n += 1 + l + sovServices(uint64(l)) + } + if m.ShardId != 0 { + n += 1 + sovServices(uint64(m.ShardId)) + } + if m.Role != 0 { + n += 1 + sovServices(uint64(m.Role)) + } + if m.AssignedSlot != 0 { + n += 1 + sovServices(uint64(m.AssignedSlot)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PublicKey) Size() (n int) { + var l int + _ = l + l = len(m.PublicKey) + if l > 0 { + n += 1 + l + sovServices(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SlotResponsibilityResponse) Size() (n int) { + var l int + _ = l + if m.Slot != 0 { + n += 1 + sovServices(uint64(m.Slot)) + } + if m.Role != 0 { + n += 1 + sovServices(uint64(m.Role)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *IndexResponse) Size() (n int) { + var l int + _ = l + if m.Index != 0 { + n += 1 + sovServices(uint64(m.Index)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ShardIDResponse) Size() (n int) { + var l int + _ = l + if m.ShardId != 0 { + n += 1 + sovServices(uint64(m.ShardId)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CurrentAssignmentsResponse) Size() (n int) { + var l int + _ = l + if len(m.Assignments) > 0 { + for _, e := range m.Assignments { + l = e.Size() + n += 1 + l + sovServices(uint64(l)) + } + } + if m.GenesisTimestamp != nil { + l = m.GenesisTimestamp.Size() + n += 1 + l + sovServices(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovServices(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozServices(x uint64) (n int) { + return sovServices(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ProposeRequest) 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 ErrIntOverflowServices + } + 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: ProposeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentHash = append(m.ParentHash[:0], dAtA[iNdEx:postIndex]...) + if m.ParentHash == nil { + m.ParentHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlotNumber", wireType) + } + m.SlotNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SlotNumber |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RandaoRevealHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RandaoRevealHash32 = append(m.RandaoRevealHash32[:0], dAtA[iNdEx:postIndex]...) + if m.RandaoRevealHash32 == nil { + m.RandaoRevealHash32 = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttestationBitmask", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttestationBitmask = append(m.AttestationBitmask[:0], dAtA[iNdEx:postIndex]...) + if m.AttestationBitmask == nil { + m.AttestationBitmask = []byte{} + } + iNdEx = postIndex + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AttestationAggregateSig = append(m.AttestationAggregateSig, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AttestationAggregateSig = append(m.AttestationAggregateSig, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field AttestationAggregateSig", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = &types.Timestamp{} + } + if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *ProposeResponse) 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 ErrIntOverflowServices + } + 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: ProposeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + byteLen + 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 := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *AttestRequest) 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 ErrIntOverflowServices + } + 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: AttestRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttestRequest: 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", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attestation == nil { + m.Attestation = &v1.Attestation{} + } + if err := m.Attestation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *AttestResponse) 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 ErrIntOverflowServices + } + 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: AttestResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttestationHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttestationHash = append(m.AttestationHash[:0], dAtA[iNdEx:postIndex]...) + if m.AttestationHash == nil { + m.AttestationHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *ValidatorAssignmentRequest) 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 ErrIntOverflowServices + } + 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: ValidatorAssignmentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorAssignmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllValidators", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AllValidators = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKeys", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKeys = append(m.PublicKeys, &PublicKey{}) + if err := m.PublicKeys[len(m.PublicKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *ValidatorAssignmentResponse) 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 ErrIntOverflowServices + } + 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: ValidatorAssignmentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorAssignmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Assignments = append(m.Assignments, &Assignment{}) + if err := m.Assignments[len(m.Assignments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *Assignment) 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 ErrIntOverflowServices + } + 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: Assignment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Assignment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PublicKey == nil { + m.PublicKey = &PublicKey{} + } + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShardId", wireType) + } + m.ShardId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ShardId |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= (ValidatorRole(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AssignedSlot", wireType) + } + m.AssignedSlot = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AssignedSlot |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *PublicKey) 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 ErrIntOverflowServices + } + 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: PublicKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PublicKey: 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 ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + byteLen + 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 := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *SlotResponsibilityResponse) 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 ErrIntOverflowServices + } + 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: SlotResponsibilityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SlotResponsibilityResponse: 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 ErrIntOverflowServices + } + 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 Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= (ValidatorRole(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *IndexResponse) 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 ErrIntOverflowServices + } + 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: IndexResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IndexResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *ShardIDResponse) 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 ErrIntOverflowServices + } + 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: ShardIDResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShardIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShardId", wireType) + } + m.ShardId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ShardId |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 *CurrentAssignmentsResponse) 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 ErrIntOverflowServices + } + 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: CurrentAssignmentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CurrentAssignmentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Assignments = append(m.Assignments, &Assignment{}) + if err := m.Assignments[len(m.Assignments)-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 GenesisTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthServices + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GenesisTimestamp == nil { + m.GenesisTimestamp = &types.Timestamp{} + } + if err := m.GenesisTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthServices + } + 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 skipServices(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, ErrIntOverflowServices + } + 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, ErrIntOverflowServices + } + 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, ErrIntOverflowServices + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthServices + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowServices + } + 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 := skipServices(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthServices = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowServices = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("proto/beacon/rpc/v1/services.proto", fileDescriptor_services_3b6f14e6d00f3ce9) +} + +var fileDescriptor_services_3b6f14e6d00f3ce9 = []byte{ + // 946 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x51, 0x6f, 0xdb, 0x54, + 0x14, 0xc6, 0x69, 0xb7, 0xb5, 0x27, 0x71, 0x9a, 0x5d, 0xaa, 0x91, 0x79, 0xa2, 0x0d, 0x9e, 0x0a, + 0x61, 0x42, 0x4e, 0xeb, 0xbe, 0x0c, 0x78, 0x21, 0xd9, 0xa2, 0x75, 0xda, 0xd4, 0x56, 0x4e, 0x19, + 0x12, 0x48, 0x58, 0x37, 0xf1, 0xc5, 0xb1, 0xea, 0xf8, 0x1a, 0xdf, 0x9b, 0x40, 0x1e, 0x79, 0x42, + 0xe2, 0xaf, 0xec, 0x5f, 0xf0, 0x02, 0xbc, 0xf1, 0x13, 0x50, 0x7f, 0x09, 0xf2, 0xbd, 0xf6, 0x8d, + 0xd3, 0xd6, 0xa4, 0x45, 0x7b, 0xb3, 0xcf, 0x39, 0xdf, 0x39, 0x9f, 0xbf, 0x7b, 0xfc, 0x5d, 0x30, + 0xe3, 0x84, 0x72, 0xda, 0x19, 0x12, 0x3c, 0xa2, 0x51, 0x27, 0x89, 0x47, 0x9d, 0xd9, 0x41, 0x87, + 0x91, 0x64, 0x16, 0x8c, 0x08, 0xb3, 0x44, 0x12, 0x3d, 0x20, 0x7c, 0x4c, 0x12, 0x32, 0x9d, 0x58, + 0xb2, 0xcc, 0x4a, 0xe2, 0x91, 0x35, 0x3b, 0x30, 0x76, 0x97, 0xb0, 0xb1, 0x1d, 0xa7, 0x58, 0x3e, + 0x8f, 0x73, 0xa0, 0xf1, 0xc8, 0xa7, 0xd4, 0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73, 0x1f, + 0xb6, 0x94, 0x58, 0x2c, 0xa6, 0x11, 0x23, 0xe8, 0x43, 0x80, 0x61, 0x48, 0x47, 0xe7, 0x45, 0xb1, + 0x36, 0x45, 0x24, 0xfd, 0x34, 0xf3, 0x0d, 0xe8, 0x5d, 0x41, 0x23, 0x57, 0xb7, 0x0f, 0xd5, 0x02, + 0x2f, 0x01, 0xa8, 0xda, 0x8f, 0xad, 0xcb, 0xa7, 0x1f, 0xdb, 0xb1, 0x35, 0x3b, 0xb0, 0xba, 0x8b, + 0x52, 0xa7, 0x88, 0x33, 0xbf, 0x84, 0x7a, 0xde, 0x37, 0x23, 0xf2, 0x29, 0x34, 0x8a, 0x8a, 0x14, + 0xe8, 0x6c, 0x15, 0xe2, 0x82, 0xd4, 0xaf, 0x1a, 0x18, 0x6f, 0x70, 0x18, 0x78, 0x98, 0xd3, 0xa4, + 0xcb, 0x58, 0xe0, 0x47, 0x13, 0x12, 0x29, 0x8a, 0x7b, 0x50, 0xc7, 0x61, 0xe8, 0xce, 0xf2, 0x0a, + 0x26, 0xfa, 0x6c, 0x38, 0x3a, 0x0e, 0x43, 0x05, 0x63, 0xa8, 0x07, 0xd5, 0x78, 0x3a, 0x0c, 0x83, + 0x91, 0x7b, 0x4e, 0xe6, 0xac, 0x59, 0x69, 0xad, 0xb5, 0xab, 0xf6, 0x47, 0xd6, 0xf5, 0x7b, 0x6c, + 0x9d, 0x8a, 0xd2, 0x57, 0x64, 0xee, 0x40, 0x9c, 0x3f, 0x32, 0x73, 0x04, 0x8f, 0xae, 0x25, 0x92, + 0x7d, 0xd3, 0x73, 0xa8, 0x62, 0x15, 0x4d, 0x69, 0xa4, 0x23, 0xcc, 0xb2, 0x11, 0x85, 0x06, 0x45, + 0x98, 0xf9, 0x97, 0x06, 0xb0, 0xc8, 0xa1, 0xaf, 0x00, 0x16, 0xbc, 0xb3, 0x03, 0xb8, 0x01, 0xed, + 0x4d, 0x45, 0x1b, 0x3d, 0x84, 0x0d, 0x36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 0x16, 0xea, 0xaa, 0xbf, 0xf0, 0x98, 0x9b, 0x74, 0x2f, 0x15, 0x7b, 0xd9, 0xa5, 0x7e, 0x82, + 0x9d, 0x05, 0xf7, 0x90, 0xf2, 0x6e, 0xe4, 0x2d, 0xfb, 0xe5, 0x4d, 0x66, 0x95, 0x2e, 0x59, 0xb9, + 0xfd, 0xf6, 0x6a, 0x7f, 0x5e, 0xec, 0x68, 0x7f, 0x5f, 0xec, 0x68, 0xff, 0x5c, 0xec, 0x68, 0xc3, + 0xbb, 0xe2, 0x1f, 0x3c, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0xca, 0xb5, 0x33, 0x47, 0x2a, 0x0a, + 0x00, 0x00, } diff --git a/proto/common/BUILD.bazel b/proto/common/BUILD.bazel index 97df3d182..b84a59552 100644 --- a/proto/common/BUILD.bazel +++ b/proto/common/BUILD.bazel @@ -13,6 +13,7 @@ go_proto_library( importpath = "github.com/prysmaticlabs/prysm/proto/common", proto = ":common_proto", visibility = ["//visibility:public"], + compiler = "//:proto_compiler", ) go_library( diff --git a/proto/common/messages.pb.go b/proto/common/messages.pb.go index 02cbc8b64..38ff09710 100755 --- a/proto/common/messages.pb.go +++ b/proto/common/messages.pb.go @@ -1,12 +1,14 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/common/messages.proto package common -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -16,10 +18,10 @@ var _ = math.Inf // 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.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Uint32List struct { - List []uint32 `protobuf:"varint,1,rep,packed,name=list,proto3" json:"list,omitempty"` + List []uint32 `protobuf:"varint,1,rep,packed,name=list" json:"list,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -29,19 +31,28 @@ func (m *Uint32List) Reset() { *m = Uint32List{} } func (m *Uint32List) String() string { return proto.CompactTextString(m) } func (*Uint32List) ProtoMessage() {} func (*Uint32List) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_b5bf9291ad2f880e, []int{0} + return fileDescriptor_messages_ae0f39d901774850, []int{0} } func (m *Uint32List) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Uint32List.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Uint32List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Uint32List.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Uint32List.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 (dst *Uint32List) XXX_Merge(src proto.Message) { xxx_messageInfo_Uint32List.Merge(dst, src) } func (m *Uint32List) XXX_Size() int { - return xxx_messageInfo_Uint32List.Size(m) + return m.Size() } func (m *Uint32List) XXX_DiscardUnknown() { xxx_messageInfo_Uint32List.DiscardUnknown(m) @@ -59,18 +70,312 @@ func (m *Uint32List) GetList() []uint32 { func init() { proto.RegisterType((*Uint32List)(nil), "ethereum.common.Uint32List") } - -func init() { - proto.RegisterFile("proto/common/messages.proto", fileDescriptor_messages_b5bf9291ad2f880e) +func (m *Uint32List) 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 } -var fileDescriptor_messages_b5bf9291ad2f880e = []byte{ - // 99 bytes of a gzipped FileDescriptorProto +func (m *Uint32List) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.List) > 0 { + dAtA2 := make([]byte, len(m.List)*10) + var j1 int + for _, num := range m.List { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMessages(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 *Uint32List) Size() (n int) { + var l int + _ = l + if len(m.List) > 0 { + l = 0 + for _, e := range m.List { + l += sovMessages(uint64(e)) + } + n += 1 + sovMessages(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMessages(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMessages(x uint64) (n int) { + return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Uint32List) 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 ErrIntOverflowMessages + } + 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: Uint32List: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint32List: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.List = append(m.List, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.List = append(m.List, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field List", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 skipMessages(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, ErrIntOverflowMessages + } + 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, ErrIntOverflowMessages + } + 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, ErrIntOverflowMessages + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthMessages + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } + 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 := skipMessages(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("proto/common/messages.proto", fileDescriptor_messages_ae0f39d901774850) +} + +var fileDescriptor_messages_ae0f39d901774850 = []byte{ + // 113 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x2d, 0xd6, 0x03, 0x8b, 0x0a, 0xf1, 0xa7, 0x96, 0x64, 0xa4, 0x16, 0xa5, 0x96, 0xe6, 0xea, 0x41, 0xe4, 0x95, 0x14, 0xb8, 0xb8, 0x42, 0x33, 0xf3, 0x4a, 0x8c, 0x8d, 0x7c, 0x32, 0x8b, 0x4b, 0x84, - 0x84, 0xb8, 0x58, 0x72, 0x32, 0x8b, 0x4b, 0x24, 0x18, 0x15, 0x98, 0x35, 0x78, 0x83, 0xc0, 0xec, - 0x24, 0x36, 0xb0, 0x4e, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x72, 0x32, 0x68, 0x58, - 0x00, 0x00, 0x00, + 0x84, 0xb8, 0x58, 0x72, 0x32, 0x8b, 0x4b, 0x24, 0x18, 0x15, 0x98, 0x35, 0x78, 0x83, 0xc0, 0x6c, + 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x89, + 0x0d, 0x6c, 0x8e, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xc7, 0x49, 0x9d, 0x66, 0x00, 0x00, + 0x00, } diff --git a/proto/sharding/p2p/v1/BUILD.bazel b/proto/sharding/p2p/v1/BUILD.bazel index 2b7490581..c392d9848 100644 --- a/proto/sharding/p2p/v1/BUILD.bazel +++ b/proto/sharding/p2p/v1/BUILD.bazel @@ -8,6 +8,7 @@ go_proto_library( proto = ":v1_proto", visibility = ["//visibility:public"], deps = ["//proto/beacon/p2p/v1:go_default_library"], + compiler = "//:proto_compiler", ) go_library( diff --git a/proto/sharding/p2p/v1/messages.pb.go b/proto/sharding/p2p/v1/messages.pb.go index a60084cb7..6828f4ede 100644 --- a/proto/sharding/p2p/v1/messages.pb.go +++ b/proto/sharding/p2p/v1/messages.pb.go @@ -1,12 +1,14 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/sharding/p2p/v1/messages.proto package v1 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -16,7 +18,7 @@ var _ = math.Inf // 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.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Topic int32 @@ -44,12 +46,12 @@ func (x Topic) String() string { return proto.EnumName(Topic_name, int32(x)) } func (Topic) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_messages_8b1affe159ebec96, []int{0} + return fileDescriptor_messages_378f1318ba5b4c6a, []int{0} } type CollationBodyRequest struct { - ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId" json:"shard_id,omitempty"` - Period uint64 `protobuf:"varint,2,opt,name=period" json:"period,omitempty"` + ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` + Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` ChunkRoot []byte `protobuf:"bytes,3,opt,name=chunk_root,json=chunkRoot,proto3" json:"chunk_root,omitempty"` ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` @@ -62,19 +64,28 @@ func (m *CollationBodyRequest) Reset() { *m = CollationBodyRequest{} } func (m *CollationBodyRequest) String() string { return proto.CompactTextString(m) } func (*CollationBodyRequest) ProtoMessage() {} func (*CollationBodyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_8b1affe159ebec96, []int{0} + return fileDescriptor_messages_378f1318ba5b4c6a, []int{0} } func (m *CollationBodyRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CollationBodyRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CollationBodyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CollationBodyRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CollationBodyRequest.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 (dst *CollationBodyRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_CollationBodyRequest.Merge(dst, src) } func (m *CollationBodyRequest) XXX_Size() int { - return xxx_messageInfo_CollationBodyRequest.Size(m) + return m.Size() } func (m *CollationBodyRequest) XXX_DiscardUnknown() { xxx_messageInfo_CollationBodyRequest.DiscardUnknown(m) @@ -129,19 +140,28 @@ func (m *CollationBodyResponse) Reset() { *m = CollationBodyResponse{} } func (m *CollationBodyResponse) String() string { return proto.CompactTextString(m) } func (*CollationBodyResponse) ProtoMessage() {} func (*CollationBodyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_8b1affe159ebec96, []int{1} + return fileDescriptor_messages_378f1318ba5b4c6a, []int{1} } func (m *CollationBodyResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CollationBodyResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CollationBodyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CollationBodyResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CollationBodyResponse.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 (dst *CollationBodyResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_CollationBodyResponse.Merge(dst, src) } func (m *CollationBodyResponse) XXX_Size() int { - return xxx_messageInfo_CollationBodyResponse.Size(m) + return m.Size() } func (m *CollationBodyResponse) XXX_DiscardUnknown() { xxx_messageInfo_CollationBodyResponse.DiscardUnknown(m) @@ -164,11 +184,11 @@ func (m *CollationBodyResponse) GetBody() []byte { } type Transaction struct { - Nonce uint64 `protobuf:"varint,1,opt,name=nonce" json:"nonce,omitempty"` - GasPrice uint64 `protobuf:"varint,2,opt,name=gas_price,json=gasPrice" json:"gas_price,omitempty"` - GasLimit uint64 `protobuf:"varint,3,opt,name=gas_limit,json=gasLimit" json:"gas_limit,omitempty"` + Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + GasPrice uint64 `protobuf:"varint,2,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + GasLimit uint64 `protobuf:"varint,3,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` Recipient []byte `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` - Value uint64 `protobuf:"varint,5,opt,name=value" json:"value,omitempty"` + Value uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` Input []byte `protobuf:"bytes,6,opt,name=input,proto3" json:"input,omitempty"` Signature *Signature `protobuf:"bytes,7,opt,name=signature" json:"signature,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -180,19 +200,28 @@ func (m *Transaction) Reset() { *m = Transaction{} } func (m *Transaction) String() string { return proto.CompactTextString(m) } func (*Transaction) ProtoMessage() {} func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_8b1affe159ebec96, []int{2} + return fileDescriptor_messages_378f1318ba5b4c6a, []int{2} } func (m *Transaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transaction.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Transaction.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 (dst *Transaction) XXX_Merge(src proto.Message) { xxx_messageInfo_Transaction.Merge(dst, src) } func (m *Transaction) XXX_Size() int { - return xxx_messageInfo_Transaction.Size(m) + return m.Size() } func (m *Transaction) XXX_DiscardUnknown() { xxx_messageInfo_Transaction.DiscardUnknown(m) @@ -250,9 +279,9 @@ func (m *Transaction) GetSignature() *Signature { } type Signature struct { - V uint64 `protobuf:"varint,1,opt,name=v" json:"v,omitempty"` - R uint64 `protobuf:"varint,2,opt,name=r" json:"r,omitempty"` - S uint64 `protobuf:"varint,3,opt,name=s" json:"s,omitempty"` + V uint64 `protobuf:"varint,1,opt,name=v,proto3" json:"v,omitempty"` + R uint64 `protobuf:"varint,2,opt,name=r,proto3" json:"r,omitempty"` + S uint64 `protobuf:"varint,3,opt,name=s,proto3" json:"s,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -262,19 +291,28 @@ func (m *Signature) Reset() { *m = Signature{} } func (m *Signature) String() string { return proto.CompactTextString(m) } func (*Signature) ProtoMessage() {} func (*Signature) Descriptor() ([]byte, []int) { - return fileDescriptor_messages_8b1affe159ebec96, []int{3} + return fileDescriptor_messages_378f1318ba5b4c6a, []int{3} } func (m *Signature) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Signature.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Signature.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Signature.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 (dst *Signature) XXX_Merge(src proto.Message) { xxx_messageInfo_Signature.Merge(dst, src) } func (m *Signature) XXX_Size() int { - return xxx_messageInfo_Signature.Size(m) + return m.Size() } func (m *Signature) XXX_DiscardUnknown() { xxx_messageInfo_Signature.DiscardUnknown(m) @@ -310,40 +348,1068 @@ func init() { proto.RegisterType((*Signature)(nil), "ethereum.sharding.p2p.v1.Signature") proto.RegisterEnum("ethereum.sharding.p2p.v1.Topic", Topic_name, Topic_value) } +func (m *CollationBodyRequest) 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 *CollationBodyRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ShardId != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.ShardId)) + } + if m.Period != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.Period)) + } + if len(m.ChunkRoot) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.ChunkRoot))) + i += copy(dAtA[i:], m.ChunkRoot) + } + if len(m.ProposerAddress) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.ProposerAddress))) + i += copy(dAtA[i:], m.ProposerAddress) + } + if len(m.Signature) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintMessages(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 *CollationBodyResponse) 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 *CollationBodyResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.HeaderHash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.HeaderHash))) + i += copy(dAtA[i:], m.HeaderHash) + } + if len(m.Body) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.Body))) + i += copy(dAtA[i:], m.Body) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Transaction) 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 *Transaction) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Nonce != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.Nonce)) + } + if m.GasPrice != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.GasPrice)) + } + if m.GasLimit != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.GasLimit)) + } + if len(m.Recipient) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.Recipient))) + i += copy(dAtA[i:], m.Recipient) + } + if m.Value != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.Value)) + } + if len(m.Input) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintMessages(dAtA, i, uint64(len(m.Input))) + i += copy(dAtA[i:], m.Input) + } + if m.Signature != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.Signature.Size())) + n1, err := m.Signature.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Signature) 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 *Signature) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.V != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.V)) + } + if m.R != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.R)) + } + if m.S != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMessages(dAtA, i, uint64(m.S)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMessages(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 *CollationBodyRequest) Size() (n int) { + var l int + _ = l + if m.ShardId != 0 { + n += 1 + sovMessages(uint64(m.ShardId)) + } + if m.Period != 0 { + n += 1 + sovMessages(uint64(m.Period)) + } + l = len(m.ChunkRoot) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CollationBodyResponse) Size() (n int) { + var l int + _ = l + l = len(m.HeaderHash) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + l = len(m.Body) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Transaction) Size() (n int) { + var l int + _ = l + if m.Nonce != 0 { + n += 1 + sovMessages(uint64(m.Nonce)) + } + if m.GasPrice != 0 { + n += 1 + sovMessages(uint64(m.GasPrice)) + } + if m.GasLimit != 0 { + n += 1 + sovMessages(uint64(m.GasLimit)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.Value != 0 { + n += 1 + sovMessages(uint64(m.Value)) + } + l = len(m.Input) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.Signature != nil { + l = m.Signature.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Signature) Size() (n int) { + var l int + _ = l + if m.V != 0 { + n += 1 + sovMessages(uint64(m.V)) + } + if m.R != 0 { + n += 1 + sovMessages(uint64(m.R)) + } + if m.S != 0 { + n += 1 + sovMessages(uint64(m.S)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMessages(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMessages(x uint64) (n int) { + return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CollationBodyRequest) 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 ErrIntOverflowMessages + } + 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: CollationBodyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CollationBodyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShardId", wireType) + } + m.ShardId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ShardId |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChunkRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChunkRoot = append(m.ChunkRoot[:0], dAtA[iNdEx:postIndex]...) + if m.ChunkRoot == nil { + m.ChunkRoot = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []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 ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + 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 := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *CollationBodyResponse) 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 ErrIntOverflowMessages + } + 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: CollationBodyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CollationBodyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HeaderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HeaderHash = append(m.HeaderHash[:0], dAtA[iNdEx:postIndex]...) + if m.HeaderHash == nil { + m.HeaderHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Body = append(m.Body[:0], dAtA[iNdEx:postIndex]...) + if m.Body == nil { + m.Body = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *Transaction) 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 ErrIntOverflowMessages + } + 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: Transaction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Transaction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) + } + m.GasPrice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasPrice |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = append(m.Recipient[:0], dAtA[iNdEx:postIndex]...) + if m.Recipient == nil { + m.Recipient = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Input = append(m.Input[:0], dAtA[iNdEx:postIndex]...) + if m.Input == nil { + m.Input = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &Signature{} + } + if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 *Signature) 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 ErrIntOverflowMessages + } + 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: Signature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + m.V = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.V |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + m.R = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.R |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + m.S = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.S |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + 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 skipMessages(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, ErrIntOverflowMessages + } + 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, ErrIntOverflowMessages + } + 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, ErrIntOverflowMessages + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthMessages + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } + 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 := skipMessages(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") +) func init() { - proto.RegisterFile("proto/sharding/p2p/v1/messages.proto", fileDescriptor_messages_8b1affe159ebec96) + proto.RegisterFile("proto/sharding/p2p/v1/messages.proto", fileDescriptor_messages_378f1318ba5b4c6a) } -var fileDescriptor_messages_8b1affe159ebec96 = []byte{ - // 459 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xdf, 0x6e, 0xd3, 0x30, - 0x14, 0xc6, 0xf1, 0xd6, 0x3f, 0xeb, 0x69, 0x24, 0x22, 0x6b, 0x8c, 0xc0, 0x40, 0x54, 0x85, 0x8b, - 0xc2, 0x45, 0xaa, 0x15, 0xf1, 0x00, 0x59, 0xa9, 0xc4, 0x44, 0x95, 0x8c, 0x24, 0x13, 0xe2, 0x2a, - 0xf2, 0x12, 0x2b, 0xb1, 0x68, 0x6d, 0x63, 0x27, 0x91, 0xf6, 0x58, 0xbc, 0x16, 0x4f, 0x81, 0x62, - 0xa7, 0x63, 0x02, 0x71, 0x97, 0xdf, 0xf7, 0x1d, 0x39, 0xe7, 0xe7, 0x04, 0xde, 0x48, 0x25, 0x6a, - 0xb1, 0xd4, 0x15, 0x51, 0x05, 0xe3, 0xe5, 0x52, 0xae, 0xe4, 0xb2, 0xbd, 0x58, 0xee, 0xa9, 0xd6, - 0xa4, 0xa4, 0xda, 0x37, 0x35, 0xf6, 0x68, 0x5d, 0x51, 0x45, 0x9b, 0xbd, 0x7f, 0x18, 0xf4, 0xe5, - 0x4a, 0xfa, 0xed, 0xc5, 0xfc, 0x27, 0x82, 0xd3, 0xb5, 0xd8, 0xed, 0x48, 0xcd, 0x04, 0xbf, 0x14, - 0xc5, 0x5d, 0x4c, 0x7f, 0x34, 0x54, 0xd7, 0xf8, 0x19, 0x9c, 0x98, 0xd9, 0x8c, 0x15, 0x1e, 0x9a, - 0xa1, 0xc5, 0x20, 0x1e, 0x1b, 0xbe, 0x2a, 0xf0, 0x19, 0x8c, 0x24, 0x55, 0x4c, 0x14, 0xde, 0x91, - 0x29, 0x7a, 0xc2, 0x2f, 0x01, 0xf2, 0xaa, 0xe1, 0xdf, 0x33, 0x25, 0x44, 0xed, 0x1d, 0xcf, 0xd0, - 0xc2, 0x89, 0x27, 0x26, 0x89, 0x85, 0xa8, 0xf1, 0x5b, 0x70, 0xa5, 0x12, 0x52, 0x68, 0xaa, 0x32, - 0x52, 0x14, 0x8a, 0x6a, 0xed, 0x0d, 0xcc, 0xd0, 0xe3, 0x43, 0x1e, 0xd8, 0x18, 0xbf, 0x80, 0x89, - 0x66, 0x25, 0x27, 0x75, 0xa3, 0xa8, 0x37, 0xb4, 0x07, 0xdd, 0x07, 0xf3, 0x2d, 0x3c, 0xf9, 0x6b, - 0x65, 0x2d, 0x05, 0xd7, 0x14, 0xbf, 0x82, 0x69, 0x45, 0x49, 0x41, 0x55, 0x56, 0x11, 0x5d, 0x99, - 0xb5, 0x9d, 0x18, 0x6c, 0xf4, 0x89, 0xe8, 0x0a, 0x63, 0x18, 0xdc, 0x8a, 0xe2, 0xce, 0xec, 0xed, - 0xc4, 0xe6, 0x79, 0xfe, 0x0b, 0xc1, 0x34, 0x55, 0x84, 0x6b, 0x92, 0x77, 0x07, 0xe2, 0x53, 0x18, - 0x72, 0xc1, 0x73, 0xda, 0x5b, 0x5b, 0xc0, 0xe7, 0x30, 0x29, 0x89, 0xce, 0xa4, 0x62, 0x39, 0xed, - 0xb5, 0x4f, 0x4a, 0xa2, 0xaf, 0x3b, 0x3e, 0x94, 0x3b, 0xb6, 0x67, 0xd6, 0xdb, 0x96, 0xdb, 0x8e, - 0x3b, 0x17, 0x45, 0x73, 0x26, 0x19, 0xe5, 0x75, 0xef, 0xfb, 0x27, 0xe8, 0xde, 0xd6, 0x92, 0x5d, - 0x63, 0x2d, 0x07, 0xb1, 0x85, 0x2e, 0x65, 0x5c, 0x36, 0xb5, 0x37, 0x32, 0xf3, 0x16, 0x70, 0xf0, - 0xf0, 0x56, 0xc6, 0x33, 0xb4, 0x98, 0xae, 0x5e, 0xfb, 0xff, 0xfb, 0xb2, 0x7e, 0x72, 0x18, 0x7d, - 0x78, 0x75, 0x1f, 0x60, 0x72, 0x9f, 0x63, 0x07, 0x50, 0xdb, 0x5b, 0xa2, 0xb6, 0x23, 0xd5, 0x9b, - 0x21, 0xd5, 0x91, 0xee, 0x55, 0x90, 0x7e, 0x97, 0xc1, 0x30, 0x15, 0x92, 0xe5, 0x78, 0x0a, 0xe3, - 0x9b, 0xf0, 0x73, 0x18, 0x7d, 0x0d, 0xdd, 0x47, 0xf8, 0x39, 0x9c, 0xad, 0xa3, 0xed, 0x36, 0x48, - 0xaf, 0xa2, 0x30, 0xbb, 0x8c, 0x3e, 0x7e, 0xcb, 0xe2, 0xcd, 0x97, 0x9b, 0x4d, 0x92, 0xba, 0x08, - 0x9f, 0xc3, 0xd3, 0x7f, 0xba, 0xe4, 0x3a, 0x0a, 0x93, 0x8d, 0x7b, 0x84, 0x5d, 0x70, 0xd2, 0x38, - 0x08, 0x93, 0x60, 0xdd, 0xd5, 0x89, 0x7b, 0x7c, 0x3b, 0x32, 0xff, 0xe9, 0xfb, 0xdf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x1e, 0x58, 0xa9, 0xa1, 0xcf, 0x02, 0x00, 0x00, +var fileDescriptor_messages_378f1318ba5b4c6a = []byte{ + // 479 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xdf, 0x6e, 0xd3, 0x3c, + 0x18, 0xc6, 0x3f, 0x6f, 0xfd, 0xb3, 0xbe, 0x8d, 0xf4, 0x45, 0xd6, 0x18, 0x81, 0x41, 0xa9, 0x0a, + 0x07, 0x85, 0x83, 0x54, 0x2b, 0xe2, 0x02, 0xda, 0x52, 0x89, 0x89, 0x2a, 0x19, 0x49, 0x26, 0xc4, + 0x51, 0xe4, 0x25, 0x56, 0x62, 0xd1, 0xda, 0xc6, 0x4e, 0x22, 0xed, 0xb2, 0xb8, 0x0b, 0x0e, 0xb9, + 0x04, 0xd4, 0x43, 0xae, 0x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, 0x3e, 0xc2, 0x36, 0x58, 0x51, 0xb0, 0xf0, 0xc2, 0xc5, 0xaa, 0xae, 0x43, 0xfb, 0x78, + 0x69, 0x7d, 0xdb, 0x8f, 0xd0, 0xf7, 0xfd, 0x08, 0xfd, 0xd8, 0x8f, 0xd0, 0x4d, 0xcf, 0xfc, 0xb5, + 0xaf, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x1a, 0xde, 0xa7, 0xdd, 0x02, 0x00, 0x00, } diff --git a/proto/testing/BUILD.bazel b/proto/testing/BUILD.bazel index f6b385b07..b32f52e21 100644 --- a/proto/testing/BUILD.bazel +++ b/proto/testing/BUILD.bazel @@ -11,6 +11,7 @@ proto_library( go_proto_library( name = "ethereum_testing_go_proto", + compiler = "//:proto_compiler", importpath = "github.com/prysmaticlabs/prysm/proto/testing", proto = ":ethereum_testing_proto", visibility = ["//visibility:public"], diff --git a/proto/testing/test.pb.go b/proto/testing/test.pb.go index 87c0c517d..285978f79 100755 --- a/proto/testing/test.pb.go +++ b/proto/testing/test.pb.go @@ -1,12 +1,14 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/testing/test.proto package testing -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -16,10 +18,10 @@ var _ = math.Inf // 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.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type TestMessage struct { - Foo string `protobuf:"bytes,1,opt,name=foo" json:"foo,omitempty"` + Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -29,19 +31,28 @@ func (m *TestMessage) Reset() { *m = TestMessage{} } func (m *TestMessage) String() string { return proto.CompactTextString(m) } func (*TestMessage) ProtoMessage() {} func (*TestMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_test_efe8e22469748e36, []int{0} + return fileDescriptor_test_49400e164d60488b, []int{0} } func (m *TestMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TestMessage.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TestMessage.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_TestMessage.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 (dst *TestMessage) XXX_Merge(src proto.Message) { xxx_messageInfo_TestMessage.Merge(dst, src) } func (m *TestMessage) XXX_Size() int { - return xxx_messageInfo_TestMessage.Size(m) + return m.Size() } func (m *TestMessage) XXX_DiscardUnknown() { xxx_messageInfo_TestMessage.DiscardUnknown(m) @@ -57,8 +68,8 @@ func (m *TestMessage) GetFoo() string { } type Puzzle struct { - Challenge string `protobuf:"bytes,1,opt,name=challenge" json:"challenge,omitempty"` - Answer string `protobuf:"bytes,2,opt,name=answer" json:"answer,omitempty"` + Challenge string `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` + Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -68,19 +79,28 @@ func (m *Puzzle) Reset() { *m = Puzzle{} } func (m *Puzzle) String() string { return proto.CompactTextString(m) } func (*Puzzle) ProtoMessage() {} func (*Puzzle) Descriptor() ([]byte, []int) { - return fileDescriptor_test_efe8e22469748e36, []int{1} + return fileDescriptor_test_49400e164d60488b, []int{1} } func (m *Puzzle) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Puzzle.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Puzzle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Puzzle.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Puzzle.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 (dst *Puzzle) XXX_Merge(src proto.Message) { xxx_messageInfo_Puzzle.Merge(dst, src) } func (m *Puzzle) XXX_Size() int { - return xxx_messageInfo_Puzzle.Size(m) + return m.Size() } func (m *Puzzle) XXX_DiscardUnknown() { xxx_messageInfo_Puzzle.DiscardUnknown(m) @@ -106,11 +126,416 @@ func init() { proto.RegisterType((*TestMessage)(nil), "ethereum.testing.TestMessage") proto.RegisterType((*Puzzle)(nil), "ethereum.testing.Puzzle") } +func (m *TestMessage) 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 init() { proto.RegisterFile("proto/testing/test.proto", fileDescriptor_test_efe8e22469748e36) } +func (m *TestMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Foo) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTest(dAtA, i, uint64(len(m.Foo))) + i += copy(dAtA[i:], m.Foo) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} -var fileDescriptor_test_efe8e22469748e36 = []byte{ - // 135 bytes of a gzipped FileDescriptorProto +func (m *Puzzle) 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 *Puzzle) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Challenge) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTest(dAtA, i, uint64(len(m.Challenge))) + i += copy(dAtA[i:], m.Challenge) + } + if len(m.Answer) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTest(dAtA, i, uint64(len(m.Answer))) + i += copy(dAtA[i:], m.Answer) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintTest(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 *TestMessage) Size() (n int) { + var l int + _ = l + l = len(m.Foo) + if l > 0 { + n += 1 + l + sovTest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Puzzle) Size() (n int) { + var l int + _ = l + l = len(m.Challenge) + if l > 0 { + n += 1 + l + sovTest(uint64(l)) + } + l = len(m.Answer) + if l > 0 { + n += 1 + l + sovTest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTest(x uint64) (n int) { + return sovTest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TestMessage) 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 ErrIntOverflowTest + } + 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: TestMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Foo", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTest + } + 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 ErrInvalidLengthTest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Foo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTest + } + 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 *Puzzle) 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 ErrIntOverflowTest + } + 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: Puzzle: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Puzzle: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Challenge", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTest + } + 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 ErrInvalidLengthTest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Challenge = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Answer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTest + } + 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 ErrInvalidLengthTest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Answer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTest + } + 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 skipTest(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, ErrIntOverflowTest + } + 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, ErrIntOverflowTest + } + 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, ErrIntOverflowTest + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthTest + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTest + } + 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 := skipTest(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTest = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto/testing/test.proto", fileDescriptor_test_49400e164d60488b) } + +var fileDescriptor_test_49400e164d60488b = []byte{ + // 150 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x49, 0x2d, 0x2e, 0xc9, 0xcc, 0x4b, 0x07, 0xd3, 0x7a, 0x60, 0x21, 0x21, 0x81, 0xd4, 0x92, 0x8c, 0xd4, 0xa2, 0xd4, 0xd2, 0x5c, 0x3d, 0xa8, 0xa4, 0x92, 0x3c, 0x17, 0x77, 0x48, @@ -118,6 +543,7 @@ var fileDescriptor_test_efe8e22469748e36 = []byte{ 0xbe, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x88, 0xa9, 0x64, 0xc7, 0xc5, 0x16, 0x50, 0x5a, 0x55, 0x95, 0x93, 0x2a, 0x24, 0xc3, 0xc5, 0x99, 0x9c, 0x91, 0x98, 0x93, 0x93, 0x9a, 0x97, 0x9e, 0x0a, 0x55, 0x81, 0x10, 0x10, 0x12, 0xe3, 0x62, 0x4b, 0xcc, 0x2b, 0x2e, 0x4f, 0x2d, 0x92, 0x60, - 0x02, 0x4b, 0x41, 0x79, 0x49, 0x6c, 0x60, 0x9b, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7f, - 0xb3, 0xa3, 0x6b, 0x95, 0x00, 0x00, 0x00, + 0x02, 0x4b, 0x41, 0x79, 0x4e, 0x3c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, + 0x91, 0x1c, 0x63, 0x12, 0x1b, 0xd8, 0x1d, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe4, 0xa8, + 0x6d, 0x56, 0xa3, 0x00, 0x00, 0x00, } diff --git a/shared/p2p/BUILD.bazel b/shared/p2p/BUILD.bazel index 824e517d2..cf5d61cd5 100644 --- a/shared/p2p/BUILD.bazel +++ b/shared/p2p/BUILD.bazel @@ -19,7 +19,7 @@ go_library( deps = [ "//shared/event:go_default_library", "//shared/iputils:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_ipfs_go_datastore//:go_default_library", "@com_github_ipfs_go_datastore//sync:go_default_library", "@com_github_ipfs_go_ipfs_addr//:go_default_library", @@ -55,8 +55,8 @@ go_test( "//proto/sharding/p2p/v1:go_default_library", "//proto/testing:go_default_library", "//shared/p2p/mock:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_golang_mock//gomock:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", "@com_github_ipfs_go_log//:go_default_library", "@com_github_libp2p_go_libp2p_blankhost//:go_default_library", "@com_github_libp2p_go_libp2p_pubsub//:go_default_library", diff --git a/shared/p2p/adapter/metric/BUILD.bazel b/shared/p2p/adapter/metric/BUILD.bazel index fb0c88dfc..ab7968a81 100644 --- a/shared/p2p/adapter/metric/BUILD.bazel +++ b/shared/p2p/adapter/metric/BUILD.bazel @@ -7,7 +7,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//shared/p2p:go_default_library", - "@com_github_golang_protobuf//proto:go_default_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", ], diff --git a/shared/p2p/adapter/metric/metric.go b/shared/p2p/adapter/metric/metric.go index 0674c2af1..9480b68a0 100644 --- a/shared/p2p/adapter/metric/metric.go +++ b/shared/p2p/adapter/metric/metric.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prysmaticlabs/prysm/shared/p2p" diff --git a/shared/p2p/feed.go b/shared/p2p/feed.go index e48afc211..2c4fe9516 100644 --- a/shared/p2p/feed.go +++ b/shared/p2p/feed.go @@ -1,7 +1,7 @@ package p2p import ( - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" "github.com/prysmaticlabs/prysm/shared/event" ) diff --git a/shared/p2p/feed_test.go b/shared/p2p/feed_test.go index 7e59a1bb0..36948a4ee 100644 --- a/shared/p2p/feed_test.go +++ b/shared/p2p/feed_test.go @@ -5,7 +5,7 @@ import ( "sync" "testing" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" testpb "github.com/prysmaticlabs/prysm/proto/testing" ) diff --git a/shared/p2p/message.go b/shared/p2p/message.go index 91d0e1346..d1b5f685c 100644 --- a/shared/p2p/message.go +++ b/shared/p2p/message.go @@ -4,7 +4,7 @@ import ( "context" "reflect" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" ) // Message represents a message received from an external peer. diff --git a/shared/p2p/message_test.go b/shared/p2p/message_test.go index 0f1eef0ac..41ef46edb 100644 --- a/shared/p2p/message_test.go +++ b/shared/p2p/message_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" testpb "github.com/prysmaticlabs/prysm/proto/testing" ) diff --git a/shared/p2p/register_topic_example_test.go b/shared/p2p/register_topic_example_test.go index cef34ecb9..e3b752f18 100644 --- a/shared/p2p/register_topic_example_test.go +++ b/shared/p2p/register_topic_example_test.go @@ -3,7 +3,7 @@ package p2p_test import ( "fmt" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" "github.com/prysmaticlabs/prysm/shared/p2p" ) diff --git a/shared/p2p/service.go b/shared/p2p/service.go index 51302d70a..e0acf4ac8 100644 --- a/shared/p2p/service.go +++ b/shared/p2p/service.go @@ -7,7 +7,7 @@ import ( "reflect" "sync" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" ds "github.com/ipfs/go-datastore" dsync "github.com/ipfs/go-datastore/sync" libp2p "github.com/libp2p/go-libp2p" diff --git a/shared/p2p/service_test.go b/shared/p2p/service_test.go index bb4cfb4cd..2a9aeb065 100644 --- a/shared/p2p/service_test.go +++ b/shared/p2p/service_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/golang/mock/gomock" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" ipfslog "github.com/ipfs/go-log" bhost "github.com/libp2p/go-libp2p-blankhost" pubsub "github.com/libp2p/go-libp2p-pubsub" diff --git a/validator/attester/service.go b/validator/attester/service.go index df8a0aefa..5f78de784 100644 --- a/validator/attester/service.go +++ b/validator/attester/service.go @@ -88,6 +88,10 @@ func (a *Attester) run(attester pb.AttesterServiceClient, validator pb.Validator case latestBeaconBlock := <-a.assignmentChan: log.Info("Performing attester responsibility") + if latestBeaconBlock == nil { + log.Errorf("could not marshal nil latest beacon block") + continue + } data, err := proto.Marshal(latestBeaconBlock) if err != nil { log.Errorf("could not marshal latest beacon block: %v", err) diff --git a/validator/attester/service_test.go b/validator/attester/service_test.go index f4bf74aad..ccf52ef8b 100644 --- a/validator/attester/service_test.go +++ b/validator/attester/service_test.go @@ -132,7 +132,7 @@ func TestAttesterMarshalError(t *testing.T) { att.cancel() exitRoutine <- true - testutil.AssertLogsContain(t, hook, "could not marshal latest beacon block") + testutil.AssertLogsContain(t, hook, "could not marshal nil latest beacon block") testutil.AssertLogsContain(t, hook, "Attester context closed") } diff --git a/validator/beacon/BUILD.bazel b/validator/beacon/BUILD.bazel index 6a7b2d5c2..687cb91ca 100644 --- a/validator/beacon/BUILD.bazel +++ b/validator/beacon/BUILD.bazel @@ -10,9 +10,8 @@ go_library( "//shared/event:go_default_library", "//shared/params:go_default_library", "//shared/slotticker:go_default_library", - "@com_github_golang_protobuf//ptypes:go_default_library_gen", + "@com_github_gogo_protobuf//types:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", - "@io_bazel_rules_go//proto/wkt:empty_go_proto", ], ) @@ -25,10 +24,9 @@ go_test( "//proto/beacon/rpc/v1:go_default_library", "//shared/testutil:go_default_library", "//validator/internal:go_default_library", + "@com_github_gogo_protobuf//types:go_default_library", "@com_github_golang_mock//gomock:go_default_library", - "@com_github_golang_protobuf//ptypes:go_default_library_gen", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", - "@io_bazel_rules_go//proto/wkt:empty_go_proto", ], ) diff --git a/validator/beacon/service.go b/validator/beacon/service.go index c20555f3c..2877e73a3 100644 --- a/validator/beacon/service.go +++ b/validator/beacon/service.go @@ -7,8 +7,7 @@ import ( "io" "time" - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/empty" + ptypes "github.com/gogo/protobuf/types" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/shared/event" "github.com/prysmaticlabs/prysm/shared/params" @@ -120,11 +119,10 @@ func (s *Service) fetchCurrentAssignmentsAndGenesisTime(client pb.BeaconServiceC // Determine what slot the beacon node is in by checking the number of seconds // since the genesis block. - genesisTimestamp, err := ptypes.Timestamp(res.GetGenesisTimestamp()) + genesisTimestamp, err := ptypes.TimestampFromProto(res.GetGenesisTimestamp()) if err != nil { return fmt.Errorf("could not compute genesis timestamp: %v", err) } - s.genesisTimestamp = genesisTimestamp startSlot := s.startSlot() @@ -185,7 +183,7 @@ func (s *Service) waitForAssignment(ticker <-chan uint64, client pb.BeaconServic continue } - block, err := client.CanonicalHead(s.ctx, &empty.Empty{}) + block, err := client.CanonicalHead(s.ctx, &ptypes.Empty{}) if err != nil { log.Errorf("Could not fetch canonical head via gRPC from beacon node: %v", err) continue @@ -207,7 +205,7 @@ func (s *Service) waitForAssignment(ticker <-chan uint64, client pb.BeaconServic // listenForProcessedAttestations receives processed attestations from the // the beacon node's RPC server via gRPC streams. func (s *Service) listenForProcessedAttestations(client pb.BeaconServiceClient) { - stream, err := client.LatestAttestation(s.ctx, &empty.Empty{}) + stream, err := client.LatestAttestation(s.ctx, &ptypes.Empty{}) if err != nil { log.Errorf("Could not setup beacon chain attestation streaming client: %v", err) return diff --git a/validator/beacon/service_test.go b/validator/beacon/service_test.go index 536beea5d..fae9cdd29 100644 --- a/validator/beacon/service_test.go +++ b/validator/beacon/service_test.go @@ -8,9 +8,8 @@ import ( "testing" "time" + ptypes "github.com/gogo/protobuf/types" "github.com/golang/mock/gomock" - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/empty" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/shared/testutil" @@ -36,7 +35,7 @@ func (fc *mockClient) BeaconServiceClient() pb.BeaconServiceClient { mockServiceClient.EXPECT().LatestAttestation( gomock.Any(), - &empty.Empty{}, + &ptypes.Empty{}, ).Return(attesterStream, nil) return mockServiceClient @@ -68,7 +67,7 @@ func (fc *mockLifecycleClient) BeaconServiceClient() pb.BeaconServiceClient { attesterStream := internal.NewMockBeaconService_LatestAttestationClient(fc.ctrl) mockServiceClient.EXPECT().LatestAttestation( gomock.Any(), - &empty.Empty{}, + &ptypes.Empty{}, ).Return(attesterStream, nil) attesterStream.EXPECT().Recv().Return(&pbp2p.Attestation{}, io.EOF) diff --git a/validator/internal/BUILD.bazel b/validator/internal/BUILD.bazel index 79c41d80e..cfc963d4d 100644 --- a/validator/internal/BUILD.bazel +++ b/validator/internal/BUILD.bazel @@ -14,8 +14,8 @@ go_library( deps = [ "//proto/beacon/p2p/v1:go_default_library", "//proto/beacon/rpc/v1:go_default_library", + "@com_github_gogo_protobuf//types:go_default_library", "@com_github_golang_mock//gomock:go_default_library", - "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//metadata:go_default_library", ], diff --git a/validator/internal/beacon_service_mock.go b/validator/internal/beacon_service_mock.go index e3aa01717..1aa8e8757 100644 --- a/validator/internal/beacon_service_mock.go +++ b/validator/internal/beacon_service_mock.go @@ -1,19 +1,18 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1 (interfaces: BeaconServiceClient,BeaconService_LatestAttestationClient,BeaconService_ValidatorAssignmentsClient) -// Package mock_v1 is a generated GoMock package. +// Package internal is a generated GoMock package. package internal import ( context "context" - reflect "reflect" - + types "github.com/gogo/protobuf/types" gomock "github.com/golang/mock/gomock" - empty "github.com/golang/protobuf/ptypes/empty" v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" v10 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" grpc "google.golang.org/grpc" metadata "google.golang.org/grpc/metadata" + reflect "reflect" ) // MockBeaconServiceClient is a mock of BeaconServiceClient interface @@ -40,7 +39,7 @@ func (m *MockBeaconServiceClient) EXPECT() *MockBeaconServiceClientMockRecorder } // CanonicalHead mocks base method -func (m *MockBeaconServiceClient) CanonicalHead(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*v1.BeaconBlock, error) { +func (m *MockBeaconServiceClient) CanonicalHead(arg0 context.Context, arg1 *types.Empty, arg2 ...grpc.CallOption) (*v1.BeaconBlock, error) { varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -63,7 +62,6 @@ func (m *MockBeaconServiceClient) CurrentAssignmentsAndGenesisTime(arg0 context. for _, a := range arg2 { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "CurrentAssignmentsAndGenesisTime", varargs...) ret0, _ := ret[0].(*v10.CurrentAssignmentsResponse) ret1, _ := ret[1].(error) @@ -77,7 +75,7 @@ func (mr *MockBeaconServiceClientMockRecorder) CurrentAssignmentsAndGenesisTime( } // LatestAttestation mocks base method -func (m *MockBeaconServiceClient) LatestAttestation(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (v10.BeaconService_LatestAttestationClient, error) { +func (m *MockBeaconServiceClient) LatestAttestation(arg0 context.Context, arg1 *types.Empty, arg2 ...grpc.CallOption) (v10.BeaconService_LatestAttestationClient, error) { varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) diff --git a/validator/node/BUILD.bazel b/validator/node/BUILD.bazel index 3e95acb28..0afb988e3 100644 --- a/validator/node/BUILD.bazel +++ b/validator/node/BUILD.bazel @@ -30,7 +30,7 @@ go_library( "//validator/rpcclient:go_default_library", "//validator/txpool:go_default_library", "//validator/types:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli//:go_default_library", ], diff --git a/validator/node/p2p_config.go b/validator/node/p2p_config.go index cff9a3581..c0208577f 100644 --- a/validator/node/p2p_config.go +++ b/validator/node/p2p_config.go @@ -1,7 +1,7 @@ package node import ( - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" pb "github.com/prysmaticlabs/prysm/proto/sharding/p2p/v1" "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/p2p" diff --git a/validator/proposer/BUILD.bazel b/validator/proposer/BUILD.bazel index a4101fb0f..4bf81abb2 100644 --- a/validator/proposer/BUILD.bazel +++ b/validator/proposer/BUILD.bazel @@ -10,8 +10,8 @@ go_library( "//proto/beacon/rpc/v1:go_default_library", "//shared/event:go_default_library", "//shared/hashutil:go_default_library", - "@com_github_golang_protobuf//proto:go_default_library", - "@com_github_golang_protobuf//ptypes:go_default_library_gen", + "@com_github_gogo_protobuf//proto:go_default_library", + "@com_github_gogo_protobuf//types:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", ], ) diff --git a/validator/proposer/service.go b/validator/proposer/service.go index 1bdb376c8..938a69c01 100644 --- a/validator/proposer/service.go +++ b/validator/proposer/service.go @@ -7,8 +7,8 @@ import ( "context" "sync" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" + "github.com/gogo/protobuf/proto" + ptypes "github.com/gogo/protobuf/types" pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" "github.com/prysmaticlabs/prysm/shared/event" @@ -156,6 +156,10 @@ func (p *Proposer) run(done <-chan struct{}, client pb.ProposerServiceClient) { // Extract the hash of the latest beacon block to use as parent hash in // the proposal. + if latestBeaconBlock == nil { + log.Errorf("Could not marshal nil latest beacon block") + continue + } data, err := proto.Marshal(latestBeaconBlock) if err != nil { log.Errorf("Could not marshal latest beacon block: %v", err) diff --git a/validator/proposer/service_test.go b/validator/proposer/service_test.go index ab5f37960..83b830a80 100644 --- a/validator/proposer/service_test.go +++ b/validator/proposer/service_test.go @@ -272,7 +272,7 @@ func TestProposerServiceErrors(t *testing.T) { exitRoutine <- true testutil.AssertLogsContain(t, hook, "Performing proposer responsibility") - testutil.AssertLogsContain(t, hook, "Could not marshal latest beacon block") + testutil.AssertLogsContain(t, hook, "Could not marshal nil latest beacon block") testutil.AssertLogsContain(t, hook, "Proposer context closed") testutil.AssertLogsContain(t, hook, "Could not propose block: bad block proposed") }