prysm-pulse/proto/beacon/rpc/v1/services.pb.go
shayzluf 59575bcac9
fuzz core/blocks package (#4907)
* fuzz core/blocks package

* gaz goimports

* fix test

* terence feedback

* terence feedback

* add error to domain. halfway through

* adding error to domain

* goimports

* added error handling to test

* error instead of continue

* terence and nishant feedback

* domain error handling

* domain error handling

* handle nil validator in ReadOnlyValidator creation

* goinmports

* [4]byte domain type

* [4]byte domain type

* [4]byte domain type fix tests

* fix tests

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-03-03 19:02:14 +05:30

1161 lines
31 KiB
Go
Executable File
Generated

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// proto/beacon/rpc/v1/services.proto is a deprecated file.
package ethereum_beacon_rpc_v1
import (
context "context"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/gogo/protobuf/proto"
_ "github.com/gogo/protobuf/types"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ValidatorRole int32 // Deprecated: Do not use.
const (
ValidatorRole_UNKNOWN ValidatorRole = 0
ValidatorRole_ATTESTER ValidatorRole = 1
ValidatorRole_PROPOSER ValidatorRole = 2
ValidatorRole_AGGREGATOR ValidatorRole = 3
)
var ValidatorRole_name = map[int32]string{
0: "UNKNOWN",
1: "ATTESTER",
2: "PROPOSER",
3: "AGGREGATOR",
}
var ValidatorRole_value = map[string]int32{
"UNKNOWN": 0,
"ATTESTER": 1,
"PROPOSER": 2,
"AGGREGATOR": 3,
}
func (x ValidatorRole) String() string {
return proto.EnumName(ValidatorRole_name, int32(x))
}
func (ValidatorRole) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_9eb4e94b85965285, []int{0}
}
// Deprecated: Do not use.
type AggregationRequest struct {
Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"`
CommitteeIndex uint64 `protobuf:"varint,2,opt,name=committee_index,json=committeeIndex,proto3" json:"committee_index,omitempty"`
PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
SlotSignature []byte `protobuf:"bytes,4,opt,name=slot_signature,json=slotSignature,proto3" json:"slot_signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AggregationRequest) Reset() { *m = AggregationRequest{} }
func (m *AggregationRequest) String() string { return proto.CompactTextString(m) }
func (*AggregationRequest) ProtoMessage() {}
func (*AggregationRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9eb4e94b85965285, []int{0}
}
func (m *AggregationRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AggregationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AggregationRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AggregationRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AggregationRequest.Merge(m, src)
}
func (m *AggregationRequest) XXX_Size() int {
return m.Size()
}
func (m *AggregationRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AggregationRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AggregationRequest proto.InternalMessageInfo
func (m *AggregationRequest) GetSlot() uint64 {
if m != nil {
return m.Slot
}
return 0
}
func (m *AggregationRequest) GetCommitteeIndex() uint64 {
if m != nil {
return m.CommitteeIndex
}
return 0
}
func (m *AggregationRequest) GetPublicKey() []byte {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *AggregationRequest) GetSlotSignature() []byte {
if m != nil {
return m.SlotSignature
}
return nil
}
// Deprecated: Do not use.
type AggregationResponse struct {
Root []byte `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AggregationResponse) Reset() { *m = AggregationResponse{} }
func (m *AggregationResponse) String() string { return proto.CompactTextString(m) }
func (*AggregationResponse) ProtoMessage() {}
func (*AggregationResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9eb4e94b85965285, []int{1}
}
func (m *AggregationResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AggregationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AggregationResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AggregationResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AggregationResponse.Merge(m, src)
}
func (m *AggregationResponse) XXX_Size() int {
return m.Size()
}
func (m *AggregationResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AggregationResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AggregationResponse proto.InternalMessageInfo
func (m *AggregationResponse) GetRoot() []byte {
if m != nil {
return m.Root
}
return nil
}
// Deprecated: Do not use.
type ExitedValidatorsRequest struct {
PublicKeys [][]byte `protobuf:"bytes,1,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExitedValidatorsRequest) Reset() { *m = ExitedValidatorsRequest{} }
func (m *ExitedValidatorsRequest) String() string { return proto.CompactTextString(m) }
func (*ExitedValidatorsRequest) ProtoMessage() {}
func (*ExitedValidatorsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9eb4e94b85965285, []int{2}
}
func (m *ExitedValidatorsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ExitedValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ExitedValidatorsRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ExitedValidatorsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExitedValidatorsRequest.Merge(m, src)
}
func (m *ExitedValidatorsRequest) XXX_Size() int {
return m.Size()
}
func (m *ExitedValidatorsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ExitedValidatorsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ExitedValidatorsRequest proto.InternalMessageInfo
func (m *ExitedValidatorsRequest) GetPublicKeys() [][]byte {
if m != nil {
return m.PublicKeys
}
return nil
}
// Deprecated: Do not use.
type ExitedValidatorsResponse struct {
PublicKeys [][]byte `protobuf:"bytes,1,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExitedValidatorsResponse) Reset() { *m = ExitedValidatorsResponse{} }
func (m *ExitedValidatorsResponse) String() string { return proto.CompactTextString(m) }
func (*ExitedValidatorsResponse) ProtoMessage() {}
func (*ExitedValidatorsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9eb4e94b85965285, []int{3}
}
func (m *ExitedValidatorsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ExitedValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ExitedValidatorsResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ExitedValidatorsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExitedValidatorsResponse.Merge(m, src)
}
func (m *ExitedValidatorsResponse) XXX_Size() int {
return m.Size()
}
func (m *ExitedValidatorsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ExitedValidatorsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ExitedValidatorsResponse proto.InternalMessageInfo
func (m *ExitedValidatorsResponse) GetPublicKeys() [][]byte {
if m != nil {
return m.PublicKeys
}
return nil
}
func init() {
proto.RegisterEnum("ethereum.beacon.rpc.v1.ValidatorRole", ValidatorRole_name, ValidatorRole_value)
proto.RegisterType((*AggregationRequest)(nil), "ethereum.beacon.rpc.v1.AggregationRequest")
proto.RegisterType((*AggregationResponse)(nil), "ethereum.beacon.rpc.v1.AggregationResponse")
proto.RegisterType((*ExitedValidatorsRequest)(nil), "ethereum.beacon.rpc.v1.ExitedValidatorsRequest")
proto.RegisterType((*ExitedValidatorsResponse)(nil), "ethereum.beacon.rpc.v1.ExitedValidatorsResponse")
}
func init() { proto.RegisterFile("proto/beacon/rpc/v1/services.proto", fileDescriptor_9eb4e94b85965285) }
var fileDescriptor_9eb4e94b85965285 = []byte{
// 428 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xdd, 0x8a, 0xd3, 0x40,
0x14, 0x76, 0xd2, 0xe2, 0xcf, 0xd9, 0x6e, 0xb7, 0x8e, 0xe0, 0x0e, 0x15, 0x6b, 0x29, 0x88, 0x65,
0xc5, 0x84, 0xd5, 0x3b, 0x2f, 0x94, 0x08, 0xa1, 0xc8, 0x4a, 0x5b, 0x26, 0x55, 0x2f, 0x4b, 0x92,
0x9e, 0x8d, 0x83, 0x49, 0x26, 0xce, 0x4c, 0xca, 0xf6, 0x0d, 0xbc, 0xf0, 0x0d, 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00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// AggregatorServiceClient is the client API for AggregatorService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
//
// Deprecated: Do not use.
type AggregatorServiceClient interface {
SubmitAggregateAndProof(ctx context.Context, in *AggregationRequest, opts ...grpc.CallOption) (*AggregationResponse, error)
}
type aggregatorServiceClient struct {
cc *grpc.ClientConn
}
// Deprecated: Do not use.
func NewAggregatorServiceClient(cc *grpc.ClientConn) AggregatorServiceClient {
return &aggregatorServiceClient{cc}
}
func (c *aggregatorServiceClient) SubmitAggregateAndProof(ctx context.Context, in *AggregationRequest, opts ...grpc.CallOption) (*AggregationResponse, error) {
out := new(AggregationResponse)
err := c.cc.Invoke(ctx, "/ethereum.beacon.rpc.v1.AggregatorService/SubmitAggregateAndProof", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AggregatorServiceServer is the server API for AggregatorService service.
//
// Deprecated: Do not use.
type AggregatorServiceServer interface {
SubmitAggregateAndProof(context.Context, *AggregationRequest) (*AggregationResponse, error)
}
// Deprecated: Do not use.
// UnimplementedAggregatorServiceServer can be embedded to have forward compatible implementations.
type UnimplementedAggregatorServiceServer struct {
}
func (*UnimplementedAggregatorServiceServer) SubmitAggregateAndProof(ctx context.Context, req *AggregationRequest) (*AggregationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SubmitAggregateAndProof not implemented")
}
// Deprecated: Do not use.
func RegisterAggregatorServiceServer(s *grpc.Server, srv AggregatorServiceServer) {
s.RegisterService(&_AggregatorService_serviceDesc, srv)
}
func _AggregatorService_SubmitAggregateAndProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AggregationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AggregatorServiceServer).SubmitAggregateAndProof(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.beacon.rpc.v1.AggregatorService/SubmitAggregateAndProof",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AggregatorServiceServer).SubmitAggregateAndProof(ctx, req.(*AggregationRequest))
}
return interceptor(ctx, in, info, handler)
}
var _AggregatorService_serviceDesc = grpc.ServiceDesc{
ServiceName: "ethereum.beacon.rpc.v1.AggregatorService",
HandlerType: (*AggregatorServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SubmitAggregateAndProof",
Handler: _AggregatorService_SubmitAggregateAndProof_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/beacon/rpc/v1/services.proto",
}
func (m *AggregationRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AggregationRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AggregationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.SlotSignature) > 0 {
i -= len(m.SlotSignature)
copy(dAtA[i:], m.SlotSignature)
i = encodeVarintServices(dAtA, i, uint64(len(m.SlotSignature)))
i--
dAtA[i] = 0x22
}
if len(m.PublicKey) > 0 {
i -= len(m.PublicKey)
copy(dAtA[i:], m.PublicKey)
i = encodeVarintServices(dAtA, i, uint64(len(m.PublicKey)))
i--
dAtA[i] = 0x1a
}
if m.CommitteeIndex != 0 {
i = encodeVarintServices(dAtA, i, uint64(m.CommitteeIndex))
i--
dAtA[i] = 0x10
}
if m.Slot != 0 {
i = encodeVarintServices(dAtA, i, uint64(m.Slot))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *AggregationResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AggregationResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AggregationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Root) > 0 {
i -= len(m.Root)
copy(dAtA[i:], m.Root)
i = encodeVarintServices(dAtA, i, uint64(len(m.Root)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ExitedValidatorsRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ExitedValidatorsRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ExitedValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.PublicKeys) > 0 {
for iNdEx := len(m.PublicKeys) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.PublicKeys[iNdEx])
copy(dAtA[i:], m.PublicKeys[iNdEx])
i = encodeVarintServices(dAtA, i, uint64(len(m.PublicKeys[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *ExitedValidatorsResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ExitedValidatorsResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ExitedValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.PublicKeys) > 0 {
for iNdEx := len(m.PublicKeys) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.PublicKeys[iNdEx])
copy(dAtA[i:], m.PublicKeys[iNdEx])
i = encodeVarintServices(dAtA, i, uint64(len(m.PublicKeys[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintServices(dAtA []byte, offset int, v uint64) int {
offset -= sovServices(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *AggregationRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Slot != 0 {
n += 1 + sovServices(uint64(m.Slot))
}
if m.CommitteeIndex != 0 {
n += 1 + sovServices(uint64(m.CommitteeIndex))
}
l = len(m.PublicKey)
if l > 0 {
n += 1 + l + sovServices(uint64(l))
}
l = len(m.SlotSignature)
if l > 0 {
n += 1 + l + sovServices(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *AggregationResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Root)
if l > 0 {
n += 1 + l + sovServices(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ExitedValidatorsRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.PublicKeys) > 0 {
for _, b := range m.PublicKeys {
l = len(b)
n += 1 + l + sovServices(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ExitedValidatorsResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.PublicKeys) > 0 {
for _, b := range m.PublicKeys {
l = len(b)
n += 1 + l + sovServices(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovServices(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozServices(x uint64) (n int) {
return sovServices(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *AggregationRequest) 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: AggregationRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AggregationRequest: 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 CommitteeIndex", wireType)
}
m.CommitteeIndex = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowServices
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.CommitteeIndex |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
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 < 0 {
return ErrInvalidLengthServices
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...)
if m.PublicKey == nil {
m.PublicKey = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SlotSignature", 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 < 0 {
return ErrInvalidLengthServices
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SlotSignature = append(m.SlotSignature[:0], dAtA[iNdEx:postIndex]...)
if m.SlotSignature == nil {
m.SlotSignature = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipServices(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthServices
}
if (iNdEx + 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 *AggregationResponse) 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: AggregationResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AggregationResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 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 < 0 {
return ErrInvalidLengthServices
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Root = append(m.Root[:0], dAtA[iNdEx:postIndex]...)
if m.Root == nil {
m.Root = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipServices(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthServices
}
if (iNdEx + 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 *ExitedValidatorsRequest) 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: ExitedValidatorsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ExitedValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PublicKeys", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 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 < 0 {
return ErrInvalidLengthServices
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PublicKeys = append(m.PublicKeys, make([]byte, postIndex-iNdEx))
copy(m.PublicKeys[len(m.PublicKeys)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipServices(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthServices
}
if (iNdEx + 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 *ExitedValidatorsResponse) 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: ExitedValidatorsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ExitedValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PublicKeys", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 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 < 0 {
return ErrInvalidLengthServices
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PublicKeys = append(m.PublicKeys, make([]byte, postIndex-iNdEx))
copy(m.PublicKeys[len(m.PublicKeys)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipServices(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthServices
}
if (iNdEx + 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
depth := 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
}
}
case 1:
iNdEx += 8
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
}
}
if length < 0 {
return 0, ErrInvalidLengthServices
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupServices
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthServices
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthServices = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowServices = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupServices = fmt.Errorf("proto: unexpected end of group")
)