diff --git a/proto/beacon/db/attestation_container.pb.go b/proto/beacon/db/attestation_container.pb.go deleted file mode 100755 index 077567e979bc..000000000000 --- a/proto/beacon/db/attestation_container.pb.go +++ /dev/null @@ -1,698 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/beacon/db/attestation_container.proto - -package db - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" - github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type AttestationContainer struct { - Data *v1alpha1.AttestationData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - SignaturePairs []*AttestationContainer_SignaturePair `protobuf:"bytes,2,rep,name=signature_pairs,json=signaturePairs,proto3" json:"signature_pairs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttestationContainer) Reset() { *m = AttestationContainer{} } -func (m *AttestationContainer) String() string { return proto.CompactTextString(m) } -func (*AttestationContainer) ProtoMessage() {} -func (*AttestationContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_29679516eb4218c9, []int{0} -} -func (m *AttestationContainer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttestationContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttestationContainer.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 *AttestationContainer) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttestationContainer.Merge(m, src) -} -func (m *AttestationContainer) XXX_Size() int { - return m.Size() -} -func (m *AttestationContainer) XXX_DiscardUnknown() { - xxx_messageInfo_AttestationContainer.DiscardUnknown(m) -} - -var xxx_messageInfo_AttestationContainer proto.InternalMessageInfo - -func (m *AttestationContainer) GetData() *v1alpha1.AttestationData { - if m != nil { - return m.Data - } - return nil -} - -func (m *AttestationContainer) GetSignaturePairs() []*AttestationContainer_SignaturePair { - if m != nil { - return m.SignaturePairs - } - return nil -} - -type AttestationContainer_SignaturePair struct { - AggregationBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3,casttype=github.com/prysmaticlabs/go-bitfield.Bitlist" json:"aggregation_bits,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - VoteCounted bool `protobuf:"varint,3,opt,name=vote_counted,json=voteCounted,proto3" json:"vote_counted,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttestationContainer_SignaturePair) Reset() { *m = AttestationContainer_SignaturePair{} } -func (m *AttestationContainer_SignaturePair) String() string { return proto.CompactTextString(m) } -func (*AttestationContainer_SignaturePair) ProtoMessage() {} -func (*AttestationContainer_SignaturePair) Descriptor() ([]byte, []int) { - return fileDescriptor_29679516eb4218c9, []int{0, 0} -} -func (m *AttestationContainer_SignaturePair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttestationContainer_SignaturePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttestationContainer_SignaturePair.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 *AttestationContainer_SignaturePair) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttestationContainer_SignaturePair.Merge(m, src) -} -func (m *AttestationContainer_SignaturePair) XXX_Size() int { - return m.Size() -} -func (m *AttestationContainer_SignaturePair) XXX_DiscardUnknown() { - xxx_messageInfo_AttestationContainer_SignaturePair.DiscardUnknown(m) -} - -var xxx_messageInfo_AttestationContainer_SignaturePair proto.InternalMessageInfo - -func (m *AttestationContainer_SignaturePair) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitlist { - if m != nil { - return m.AggregationBits - } - return nil -} - -func (m *AttestationContainer_SignaturePair) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *AttestationContainer_SignaturePair) GetVoteCounted() bool { - if m != nil { - return m.VoteCounted - } - return false -} - -func init() { - proto.RegisterType((*AttestationContainer)(nil), "prysm.beacon.db.AttestationContainer") - proto.RegisterType((*AttestationContainer_SignaturePair)(nil), "prysm.beacon.db.AttestationContainer.SignaturePair") -} - -func init() { - proto.RegisterFile("proto/beacon/db/attestation_container.proto", fileDescriptor_29679516eb4218c9) -} - -var fileDescriptor_29679516eb4218c9 = []byte{ - // 354 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcf, 0x6a, 0xdb, 0x30, - 0x18, 0xc7, 0xc9, 0x18, 0x9b, 0x92, 0x2d, 0xc3, 0xec, 0x60, 0xc2, 0xf0, 0xb2, 0x1d, 0x46, 0x60, - 0x8b, 0xb4, 0x24, 0xb7, 0xd2, 0x4b, 0x9d, 0x3e, 0x40, 0x71, 0x6f, 0x6d, 0x21, 0x7c, 0xb2, 0x15, - 0x59, 0xe0, 0x58, 0x46, 0xfa, 0x1c, 0xe8, 0x43, 0xf5, 0x3d, 0x7a, 0xec, 0x13, 0x94, 0x90, 0xc7, - 0xe8, 0xa9, 0x58, 0x26, 0x8d, 0x1b, 0xda, 0xdb, 0xf7, 0xfd, 0xf8, 0xfd, 0xd3, 0x87, 0xc8, 0xdf, - 0xd2, 0x68, 0xd4, 0x8c, 0x0b, 0x48, 0x74, 0xc1, 0x52, 0xce, 0x00, 0x51, 0x58, 0x04, 0x54, 0xba, - 0x58, 0x26, 0xba, 0x40, 0x50, 0x85, 0x30, 0xd4, 0xb1, 0xfc, 0x41, 0x69, 0x6e, 0xed, 0x9a, 0x36, - 0x64, 0x9a, 0xf2, 0x61, 0x28, 0x30, 0x63, 0x9b, 0x29, 0xe4, 0x65, 0x06, 0xd3, 0xb6, 0xb4, 0x11, - 0x0c, 0x27, 0x52, 0x61, 0x56, 0x71, 0x9a, 0xe8, 0x35, 0x93, 0x5a, 0x6a, 0xe6, 0x60, 0x5e, 0xad, - 0xdc, 0xd6, 0x44, 0xd7, 0x53, 0x43, 0xff, 0xbd, 0xed, 0x90, 0xef, 0x67, 0x07, 0x93, 0xc5, 0x3e, - 0xde, 0x3f, 0x21, 0x1f, 0x52, 0x40, 0x08, 0xbc, 0x91, 0x37, 0xee, 0xcd, 0xfe, 0x50, 0x81, 0x99, - 0x30, 0xa2, 0x5a, 0xd7, 0x03, 0xdd, 0xe7, 0xd3, 0x96, 0xf4, 0x1c, 0x10, 0x62, 0xa7, 0xf1, 0x6f, - 0xc8, 0xc0, 0x2a, 0x59, 0x00, 0x56, 0x46, 0x2c, 0x4b, 0x50, 0xc6, 0x06, 0x9d, 0x51, 0x77, 0xdc, - 0x9b, 0xcd, 0xe9, 0xd1, 0x73, 0xe8, 0x5b, 0xd9, 0xf4, 0x72, 0x2f, 0xbe, 0x00, 0x65, 0xe2, 0xaf, - 0xb6, 0xbd, 0xda, 0xe1, 0x9d, 0x47, 0xbe, 0xbc, 0x62, 0xf8, 0xd7, 0xe4, 0x1b, 0x48, 0x69, 0x84, - 0x6c, 0x6e, 0xc8, 0x15, 0x5a, 0xd7, 0xbb, 0x1f, 0xfd, 0x7f, 0x7a, 0xfc, 0xf9, 0xaf, 0x75, 0x11, - 0x17, 0x0f, 0xa8, 0x92, 0x1c, 0xb8, 0x65, 0x52, 0x4f, 0xb8, 0xc2, 0x95, 0x12, 0x79, 0x4a, 0x23, - 0x85, 0xb9, 0xb2, 0x18, 0x0f, 0x5a, 0x4e, 0x91, 0x42, 0xeb, 0xff, 0x20, 0x9f, 0x5f, 0x0a, 0x04, - 0x9d, 0xda, 0x35, 0x3e, 0x00, 0xfe, 0x2f, 0xd2, 0xdf, 0x68, 0x14, 0xcb, 0x44, 0x57, 0x05, 0x8a, - 0x34, 0xe8, 0x8e, 0xbc, 0xf1, 0xa7, 0xb8, 0x57, 0x63, 0x8b, 0x06, 0x8a, 0x4e, 0xef, 0x77, 0xa1, - 0xf7, 0xb0, 0x0b, 0xbd, 0xed, 0x2e, 0xf4, 0xae, 0xe8, 0xbb, 0x6d, 0xdc, 0xc6, 0x8e, 0x3e, 0x07, - 0xff, 0xe8, 0x80, 0xf9, 0x73, 0x00, 0x00, 0x00, 0xff, 0xff, 0x91, 0x7d, 0x56, 0xe1, 0x36, 0x02, - 0x00, 0x00, -} - -func (m *AttestationContainer) 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 *AttestationContainer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AttestationContainer) 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.SignaturePairs) > 0 { - for iNdEx := len(m.SignaturePairs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SignaturePairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAttestationContainer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAttestationContainer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AttestationContainer_SignaturePair) 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 *AttestationContainer_SignaturePair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AttestationContainer_SignaturePair) 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 m.VoteCounted { - i-- - if m.VoteCounted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintAttestationContainer(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.AggregationBits) > 0 { - i -= len(m.AggregationBits) - copy(dAtA[i:], m.AggregationBits) - i = encodeVarintAttestationContainer(dAtA, i, uint64(len(m.AggregationBits))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAttestationContainer(dAtA []byte, offset int, v uint64) int { - offset -= sovAttestationContainer(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AttestationContainer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovAttestationContainer(uint64(l)) - } - if len(m.SignaturePairs) > 0 { - for _, e := range m.SignaturePairs { - l = e.Size() - n += 1 + l + sovAttestationContainer(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttestationContainer_SignaturePair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AggregationBits) - if l > 0 { - n += 1 + l + sovAttestationContainer(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovAttestationContainer(uint64(l)) - } - if m.VoteCounted { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAttestationContainer(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAttestationContainer(x uint64) (n int) { - return sovAttestationContainer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AttestationContainer) 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 ErrIntOverflowAttestationContainer - } - 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: AttestationContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttestationContainer: 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 ErrIntOverflowAttestationContainer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttestationContainer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttestationContainer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &v1alpha1.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 SignaturePairs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestationContainer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttestationContainer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttestationContainer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SignaturePairs = append(m.SignaturePairs, &AttestationContainer_SignaturePair{}) - if err := m.SignaturePairs[len(m.SignaturePairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAttestationContainer(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttestationContainer - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttestationContainer - } - 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 *AttestationContainer_SignaturePair) 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 ErrIntOverflowAttestationContainer - } - 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: SignaturePair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignaturePair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationBits", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestationContainer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAttestationContainer - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAttestationContainer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AggregationBits = append(m.AggregationBits[:0], dAtA[iNdEx:postIndex]...) - if m.AggregationBits == nil { - m.AggregationBits = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestationContainer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAttestationContainer - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAttestationContainer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VoteCounted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttestationContainer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.VoteCounted = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAttestationContainer(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttestationContainer - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttestationContainer - } - 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 skipAttestationContainer(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, ErrIntOverflowAttestationContainer - } - 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, ErrIntOverflowAttestationContainer - } - 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, ErrIntOverflowAttestationContainer - } - 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, ErrInvalidLengthAttestationContainer - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAttestationContainer - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAttestationContainer - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAttestationContainer = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAttestationContainer = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAttestationContainer = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/beacon/db/finalized_block_root_container.pb.go b/proto/beacon/db/finalized_block_root_container.pb.go deleted file mode 100755 index f1cbb44283cf..000000000000 --- a/proto/beacon/db/finalized_block_root_container.pb.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/beacon/db/finalized_block_root_container.proto - -package db - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type FinalizedBlockRootContainer struct { - ParentRoot []byte `protobuf:"bytes,1,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty"` - ChildRoot []byte `protobuf:"bytes,2,opt,name=child_root,json=childRoot,proto3" json:"child_root,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FinalizedBlockRootContainer) Reset() { *m = FinalizedBlockRootContainer{} } -func (m *FinalizedBlockRootContainer) String() string { return proto.CompactTextString(m) } -func (*FinalizedBlockRootContainer) ProtoMessage() {} -func (*FinalizedBlockRootContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_f952363f5bc83b7b, []int{0} -} -func (m *FinalizedBlockRootContainer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FinalizedBlockRootContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FinalizedBlockRootContainer.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 *FinalizedBlockRootContainer) XXX_Merge(src proto.Message) { - xxx_messageInfo_FinalizedBlockRootContainer.Merge(m, src) -} -func (m *FinalizedBlockRootContainer) XXX_Size() int { - return m.Size() -} -func (m *FinalizedBlockRootContainer) XXX_DiscardUnknown() { - xxx_messageInfo_FinalizedBlockRootContainer.DiscardUnknown(m) -} - -var xxx_messageInfo_FinalizedBlockRootContainer proto.InternalMessageInfo - -func (m *FinalizedBlockRootContainer) GetParentRoot() []byte { - if m != nil { - return m.ParentRoot - } - return nil -} - -func (m *FinalizedBlockRootContainer) GetChildRoot() []byte { - if m != nil { - return m.ChildRoot - } - return nil -} - -func init() { - proto.RegisterType((*FinalizedBlockRootContainer)(nil), "prysm.beacon.db.FinalizedBlockRootContainer") -} - -func init() { - proto.RegisterFile("proto/beacon/db/finalized_block_root_container.proto", fileDescriptor_f952363f5bc83b7b) -} - -var fileDescriptor_f952363f5bc83b7b = []byte{ - // 196 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x29, 0x28, 0xca, 0x2f, - 0xc9, 0xd7, 0x4f, 0x4a, 0x4d, 0x4c, 0xce, 0xcf, 0xd3, 0x4f, 0x49, 0xd2, 0x4f, 0xcb, 0xcc, 0x4b, - 0xcc, 0xc9, 0xac, 0x4a, 0x4d, 0x89, 0x4f, 0xca, 0xc9, 0x4f, 0xce, 0x8e, 0x2f, 0xca, 0xcf, 0x2f, - 0x89, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0xd2, 0x03, 0x2b, 0x17, 0xe2, 0x2f, - 0x28, 0xaa, 0x2c, 0xce, 0xd5, 0x83, 0xe8, 0xd2, 0x4b, 0x49, 0x52, 0x8a, 0xe5, 0x92, 0x76, 0x83, - 0x69, 0x74, 0x02, 0xe9, 0x0b, 0xca, 0xcf, 0x2f, 0x71, 0x86, 0xe9, 0x12, 0x92, 0xe7, 0xe2, 0x2e, - 0x48, 0x2c, 0x4a, 0xcd, 0x2b, 0x01, 0x1b, 0x27, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x13, 0xc4, 0x05, - 0x11, 0x02, 0xa9, 0x14, 0x92, 0xe5, 0xe2, 0x4a, 0xce, 0xc8, 0xcc, 0x49, 0x81, 0xc8, 0x33, 0x81, - 0xe5, 0x39, 0xc1, 0x22, 0x20, 0x69, 0x27, 0x9b, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, - 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x4a, 0x2f, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, - 0x57, 0x1f, 0xec, 0x90, 0xc4, 0x92, 0xcc, 0xe4, 0x9c, 0xc4, 0xa4, 0x62, 0x08, 0x4f, 0x1f, 0xcd, - 0x4b, 0x49, 0x6c, 0x60, 0x01, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xd3, 0xda, 0x04, - 0xec, 0x00, 0x00, 0x00, -} - -func (m *FinalizedBlockRootContainer) 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 *FinalizedBlockRootContainer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FinalizedBlockRootContainer) 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.ChildRoot) > 0 { - i -= len(m.ChildRoot) - copy(dAtA[i:], m.ChildRoot) - i = encodeVarintFinalizedBlockRootContainer(dAtA, i, uint64(len(m.ChildRoot))) - i-- - dAtA[i] = 0x12 - } - if len(m.ParentRoot) > 0 { - i -= len(m.ParentRoot) - copy(dAtA[i:], m.ParentRoot) - i = encodeVarintFinalizedBlockRootContainer(dAtA, i, uint64(len(m.ParentRoot))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintFinalizedBlockRootContainer(dAtA []byte, offset int, v uint64) int { - offset -= sovFinalizedBlockRootContainer(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *FinalizedBlockRootContainer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ParentRoot) - if l > 0 { - n += 1 + l + sovFinalizedBlockRootContainer(uint64(l)) - } - l = len(m.ChildRoot) - if l > 0 { - n += 1 + l + sovFinalizedBlockRootContainer(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovFinalizedBlockRootContainer(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFinalizedBlockRootContainer(x uint64) (n int) { - return sovFinalizedBlockRootContainer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *FinalizedBlockRootContainer) 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 ErrIntOverflowFinalizedBlockRootContainer - } - 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: FinalizedBlockRootContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FinalizedBlockRootContainer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFinalizedBlockRootContainer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFinalizedBlockRootContainer - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFinalizedBlockRootContainer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ParentRoot = append(m.ParentRoot[:0], dAtA[iNdEx:postIndex]...) - if m.ParentRoot == nil { - m.ParentRoot = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChildRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFinalizedBlockRootContainer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFinalizedBlockRootContainer - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFinalizedBlockRootContainer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChildRoot = append(m.ChildRoot[:0], dAtA[iNdEx:postIndex]...) - if m.ChildRoot == nil { - m.ChildRoot = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFinalizedBlockRootContainer(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFinalizedBlockRootContainer - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFinalizedBlockRootContainer - } - 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 skipFinalizedBlockRootContainer(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, ErrIntOverflowFinalizedBlockRootContainer - } - 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, ErrIntOverflowFinalizedBlockRootContainer - } - 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, ErrIntOverflowFinalizedBlockRootContainer - } - 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, ErrInvalidLengthFinalizedBlockRootContainer - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFinalizedBlockRootContainer - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFinalizedBlockRootContainer - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFinalizedBlockRootContainer = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFinalizedBlockRootContainer = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFinalizedBlockRootContainer = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/beacon/db/powchain.pb.go b/proto/beacon/db/powchain.pb.go deleted file mode 100755 index 297a2fb6062b..000000000000 --- a/proto/beacon/db/powchain.pb.go +++ /dev/null @@ -1,2060 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/beacon/db/powchain.proto - -package db - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - proto "github.com/gogo/protobuf/proto" - v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" - v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" -) - -// 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 ETH1ChainData struct { - CurrentEth1Data *LatestETH1Data `protobuf:"bytes,1,opt,name=current_eth1_data,json=currentEth1Data,proto3" json:"current_eth1_data,omitempty"` - ChainstartData *ChainStartData `protobuf:"bytes,2,opt,name=chainstart_data,json=chainstartData,proto3" json:"chainstart_data,omitempty"` - BeaconState *v1.BeaconState `protobuf:"bytes,3,opt,name=beacon_state,json=beaconState,proto3" json:"beacon_state,omitempty"` - Trie *SparseMerkleTrie `protobuf:"bytes,4,opt,name=trie,proto3" json:"trie,omitempty"` - DepositContainers []*DepositContainer `protobuf:"bytes,5,rep,name=deposit_containers,json=depositContainers,proto3" json:"deposit_containers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ETH1ChainData) Reset() { *m = ETH1ChainData{} } -func (m *ETH1ChainData) String() string { return proto.CompactTextString(m) } -func (*ETH1ChainData) ProtoMessage() {} -func (*ETH1ChainData) Descriptor() ([]byte, []int) { - return fileDescriptor_338787f8da2f3d61, []int{0} -} -func (m *ETH1ChainData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ETH1ChainData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ETH1ChainData.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 *ETH1ChainData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ETH1ChainData.Merge(m, src) -} -func (m *ETH1ChainData) XXX_Size() int { - return m.Size() -} -func (m *ETH1ChainData) XXX_DiscardUnknown() { - xxx_messageInfo_ETH1ChainData.DiscardUnknown(m) -} - -var xxx_messageInfo_ETH1ChainData proto.InternalMessageInfo - -func (m *ETH1ChainData) GetCurrentEth1Data() *LatestETH1Data { - if m != nil { - return m.CurrentEth1Data - } - return nil -} - -func (m *ETH1ChainData) GetChainstartData() *ChainStartData { - if m != nil { - return m.ChainstartData - } - return nil -} - -func (m *ETH1ChainData) GetBeaconState() *v1.BeaconState { - if m != nil { - return m.BeaconState - } - return nil -} - -func (m *ETH1ChainData) GetTrie() *SparseMerkleTrie { - if m != nil { - return m.Trie - } - return nil -} - -func (m *ETH1ChainData) GetDepositContainers() []*DepositContainer { - if m != nil { - return m.DepositContainers - } - return nil -} - -type LatestETH1Data struct { - BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - BlockTime uint64 `protobuf:"varint,3,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - LastRequestedBlock uint64 `protobuf:"varint,5,opt,name=last_requested_block,json=lastRequestedBlock,proto3" json:"last_requested_block,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LatestETH1Data) Reset() { *m = LatestETH1Data{} } -func (m *LatestETH1Data) String() string { return proto.CompactTextString(m) } -func (*LatestETH1Data) ProtoMessage() {} -func (*LatestETH1Data) Descriptor() ([]byte, []int) { - return fileDescriptor_338787f8da2f3d61, []int{1} -} -func (m *LatestETH1Data) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LatestETH1Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LatestETH1Data.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 *LatestETH1Data) XXX_Merge(src proto.Message) { - xxx_messageInfo_LatestETH1Data.Merge(m, src) -} -func (m *LatestETH1Data) XXX_Size() int { - return m.Size() -} -func (m *LatestETH1Data) XXX_DiscardUnknown() { - xxx_messageInfo_LatestETH1Data.DiscardUnknown(m) -} - -var xxx_messageInfo_LatestETH1Data proto.InternalMessageInfo - -func (m *LatestETH1Data) GetBlockHeight() uint64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *LatestETH1Data) GetBlockTime() uint64 { - if m != nil { - return m.BlockTime - } - return 0 -} - -func (m *LatestETH1Data) GetBlockHash() []byte { - if m != nil { - return m.BlockHash - } - return nil -} - -func (m *LatestETH1Data) GetLastRequestedBlock() uint64 { - if m != nil { - return m.LastRequestedBlock - } - return 0 -} - -type ChainStartData struct { - Chainstarted bool `protobuf:"varint,1,opt,name=chainstarted,proto3" json:"chainstarted,omitempty"` - GenesisTime uint64 `protobuf:"varint,2,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GenesisBlock uint64 `protobuf:"varint,3,opt,name=genesis_block,json=genesisBlock,proto3" json:"genesis_block,omitempty"` - Eth1Data *v1alpha1.Eth1Data `protobuf:"bytes,4,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"` - ChainstartDeposits []*v1alpha1.Deposit `protobuf:"bytes,5,rep,name=chainstart_deposits,json=chainstartDeposits,proto3" json:"chainstart_deposits,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ChainStartData) Reset() { *m = ChainStartData{} } -func (m *ChainStartData) String() string { return proto.CompactTextString(m) } -func (*ChainStartData) ProtoMessage() {} -func (*ChainStartData) Descriptor() ([]byte, []int) { - return fileDescriptor_338787f8da2f3d61, []int{2} -} -func (m *ChainStartData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainStartData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainStartData.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 *ChainStartData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainStartData.Merge(m, src) -} -func (m *ChainStartData) XXX_Size() int { - return m.Size() -} -func (m *ChainStartData) XXX_DiscardUnknown() { - xxx_messageInfo_ChainStartData.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainStartData proto.InternalMessageInfo - -func (m *ChainStartData) GetChainstarted() bool { - if m != nil { - return m.Chainstarted - } - return false -} - -func (m *ChainStartData) GetGenesisTime() uint64 { - if m != nil { - return m.GenesisTime - } - return 0 -} - -func (m *ChainStartData) GetGenesisBlock() uint64 { - if m != nil { - return m.GenesisBlock - } - return 0 -} - -func (m *ChainStartData) GetEth1Data() *v1alpha1.Eth1Data { - if m != nil { - return m.Eth1Data - } - return nil -} - -func (m *ChainStartData) GetChainstartDeposits() []*v1alpha1.Deposit { - if m != nil { - return m.ChainstartDeposits - } - return nil -} - -type SparseMerkleTrie struct { - Depth uint64 `protobuf:"varint,1,opt,name=depth,proto3" json:"depth,omitempty"` - Layers []*TrieLayer `protobuf:"bytes,2,rep,name=layers,proto3" json:"layers,omitempty"` - OriginalItems [][]byte `protobuf:"bytes,3,rep,name=original_items,json=originalItems,proto3" json:"original_items,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SparseMerkleTrie) Reset() { *m = SparseMerkleTrie{} } -func (m *SparseMerkleTrie) String() string { return proto.CompactTextString(m) } -func (*SparseMerkleTrie) ProtoMessage() {} -func (*SparseMerkleTrie) Descriptor() ([]byte, []int) { - return fileDescriptor_338787f8da2f3d61, []int{3} -} -func (m *SparseMerkleTrie) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SparseMerkleTrie) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SparseMerkleTrie.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 *SparseMerkleTrie) XXX_Merge(src proto.Message) { - xxx_messageInfo_SparseMerkleTrie.Merge(m, src) -} -func (m *SparseMerkleTrie) XXX_Size() int { - return m.Size() -} -func (m *SparseMerkleTrie) XXX_DiscardUnknown() { - xxx_messageInfo_SparseMerkleTrie.DiscardUnknown(m) -} - -var xxx_messageInfo_SparseMerkleTrie proto.InternalMessageInfo - -func (m *SparseMerkleTrie) GetDepth() uint64 { - if m != nil { - return m.Depth - } - return 0 -} - -func (m *SparseMerkleTrie) GetLayers() []*TrieLayer { - if m != nil { - return m.Layers - } - return nil -} - -func (m *SparseMerkleTrie) GetOriginalItems() [][]byte { - if m != nil { - return m.OriginalItems - } - return nil -} - -type TrieLayer struct { - Layer [][]byte `protobuf:"bytes,1,rep,name=layer,proto3" json:"layer,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TrieLayer) Reset() { *m = TrieLayer{} } -func (m *TrieLayer) String() string { return proto.CompactTextString(m) } -func (*TrieLayer) ProtoMessage() {} -func (*TrieLayer) Descriptor() ([]byte, []int) { - return fileDescriptor_338787f8da2f3d61, []int{4} -} -func (m *TrieLayer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TrieLayer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TrieLayer.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 *TrieLayer) XXX_Merge(src proto.Message) { - xxx_messageInfo_TrieLayer.Merge(m, src) -} -func (m *TrieLayer) XXX_Size() int { - return m.Size() -} -func (m *TrieLayer) XXX_DiscardUnknown() { - xxx_messageInfo_TrieLayer.DiscardUnknown(m) -} - -var xxx_messageInfo_TrieLayer proto.InternalMessageInfo - -func (m *TrieLayer) GetLayer() [][]byte { - if m != nil { - return m.Layer - } - return nil -} - -type DepositContainer struct { - Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Eth1BlockHeight uint64 `protobuf:"varint,2,opt,name=eth1_block_height,json=eth1BlockHeight,proto3" json:"eth1_block_height,omitempty"` - Deposit *v1alpha1.Deposit `protobuf:"bytes,3,opt,name=deposit,proto3" json:"deposit,omitempty"` - DepositRoot []byte `protobuf:"bytes,4,opt,name=deposit_root,json=depositRoot,proto3" json:"deposit_root,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DepositContainer) Reset() { *m = DepositContainer{} } -func (m *DepositContainer) String() string { return proto.CompactTextString(m) } -func (*DepositContainer) ProtoMessage() {} -func (*DepositContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_338787f8da2f3d61, []int{5} -} -func (m *DepositContainer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DepositContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DepositContainer.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 *DepositContainer) XXX_Merge(src proto.Message) { - xxx_messageInfo_DepositContainer.Merge(m, src) -} -func (m *DepositContainer) XXX_Size() int { - return m.Size() -} -func (m *DepositContainer) XXX_DiscardUnknown() { - xxx_messageInfo_DepositContainer.DiscardUnknown(m) -} - -var xxx_messageInfo_DepositContainer proto.InternalMessageInfo - -func (m *DepositContainer) GetIndex() int64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *DepositContainer) GetEth1BlockHeight() uint64 { - if m != nil { - return m.Eth1BlockHeight - } - return 0 -} - -func (m *DepositContainer) GetDeposit() *v1alpha1.Deposit { - if m != nil { - return m.Deposit - } - return nil -} - -func (m *DepositContainer) GetDepositRoot() []byte { - if m != nil { - return m.DepositRoot - } - return nil -} - -func init() { - proto.RegisterType((*ETH1ChainData)(nil), "prysm.beacon.db.ETH1ChainData") - proto.RegisterType((*LatestETH1Data)(nil), "prysm.beacon.db.LatestETH1Data") - proto.RegisterType((*ChainStartData)(nil), "prysm.beacon.db.ChainStartData") - proto.RegisterType((*SparseMerkleTrie)(nil), "prysm.beacon.db.SparseMerkleTrie") - proto.RegisterType((*TrieLayer)(nil), "prysm.beacon.db.TrieLayer") - proto.RegisterType((*DepositContainer)(nil), "prysm.beacon.db.DepositContainer") -} - -func init() { proto.RegisterFile("proto/beacon/db/powchain.proto", fileDescriptor_338787f8da2f3d61) } - -var fileDescriptor_338787f8da2f3d61 = []byte{ - // 666 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xcf, 0x4e, 0xdb, 0x4e, - 0x10, 0x96, 0x93, 0xc0, 0x0f, 0x36, 0x21, 0x81, 0xfd, 0x71, 0x88, 0x90, 0x1a, 0x20, 0xa8, 0x12, - 0xea, 0xc1, 0x6e, 0x52, 0x55, 0xea, 0x81, 0x53, 0x80, 0x2a, 0x55, 0xa9, 0x5a, 0x2d, 0x9c, 0x7a, - 0x89, 0xd6, 0xf1, 0x28, 0x5e, 0xe1, 0xd8, 0xae, 0x77, 0x42, 0xcb, 0xb9, 0xc7, 0x3e, 0x46, 0x9f, - 0xa0, 0x6f, 0xd1, 0x63, 0x1f, 0xa1, 0xe2, 0x25, 0x7a, 0xad, 0x76, 0x76, 0x4d, 0x48, 0x00, 0xf5, - 0x38, 0x33, 0xdf, 0xf7, 0xed, 0xfc, 0xf9, 0x6c, 0xd6, 0xc9, 0x8b, 0x0c, 0xb3, 0x20, 0x04, 0x39, - 0xce, 0xd2, 0x20, 0x0a, 0x83, 0x3c, 0xfb, 0x3c, 0x8e, 0xa5, 0x4a, 0x7d, 0x2a, 0xf0, 0x56, 0x5e, - 0x5c, 0xeb, 0xa9, 0x6f, 0xeb, 0x7e, 0x14, 0xee, 0xec, 0x02, 0xc6, 0xc1, 0x55, 0x4f, 0x26, 0x79, - 0x2c, 0x7b, 0x8e, 0x37, 0x0a, 0x93, 0x6c, 0x7c, 0x69, 0x19, 0x3b, 0xbb, 0x0b, 0x8a, 0x79, 0x3f, - 0x0f, 0xae, 0x7a, 0x01, 0x5e, 0xe7, 0xa0, 0x2d, 0xa0, 0xfb, 0xa7, 0xc2, 0x36, 0x4e, 0x2f, 0x86, - 0xbd, 0x63, 0xf3, 0xcc, 0x89, 0x44, 0xc9, 0xdf, 0xb2, 0xad, 0xf1, 0xac, 0x28, 0x20, 0xc5, 0x11, - 0x60, 0xdc, 0x1b, 0x45, 0x12, 0x65, 0xdb, 0xdb, 0xf3, 0x0e, 0xeb, 0xfd, 0x5d, 0x7f, 0xa9, 0x01, - 0xff, 0x4c, 0x22, 0x68, 0x34, 0x02, 0x86, 0x2b, 0x5a, 0x8e, 0x79, 0x8a, 0x31, 0x25, 0xf8, 0x90, - 0xb5, 0x68, 0x00, 0x8d, 0xb2, 0x40, 0x2b, 0x55, 0x79, 0x44, 0x8a, 0x3a, 0x38, 0x37, 0x38, 0x92, - 0x6a, 0xce, 0x79, 0xa4, 0xf4, 0x9a, 0x35, 0xdc, 0x7c, 0x1a, 0x25, 0x42, 0xbb, 0x4a, 0x32, 0x07, - 0x3e, 0x60, 0x0c, 0x05, 0xcc, 0x6e, 0x95, 0xf2, 0x7e, 0xee, 0x5f, 0xf5, 0xfc, 0x01, 0x45, 0xe7, - 0x06, 0x2a, 0xea, 0xe1, 0x3c, 0xe0, 0x2f, 0x59, 0x0d, 0x0b, 0x05, 0xed, 0x1a, 0xf1, 0xf7, 0xef, - 0xb5, 0x71, 0x9e, 0xcb, 0x42, 0xc3, 0x3b, 0x28, 0x2e, 0x13, 0xb8, 0x28, 0x14, 0x08, 0x82, 0xf3, - 0x0f, 0x8c, 0x47, 0x90, 0x67, 0x5a, 0xe1, 0x68, 0x9c, 0xa5, 0x28, 0x55, 0x0a, 0x85, 0x6e, 0xaf, - 0xec, 0x55, 0x1f, 0x14, 0x39, 0xb1, 0xd0, 0xe3, 0x12, 0x29, 0xb6, 0xa2, 0xa5, 0x8c, 0xee, 0x7e, - 0xf7, 0x58, 0x73, 0x71, 0x7d, 0x7c, 0x9f, 0x35, 0xe8, 0x78, 0xa3, 0x18, 0xd4, 0x24, 0x46, 0x5a, - 0x55, 0x4d, 0xd4, 0x29, 0x37, 0xa4, 0x14, 0x7f, 0xc2, 0x98, 0x85, 0xa0, 0x9a, 0xda, 0x25, 0xd4, - 0xc4, 0x3a, 0x65, 0x2e, 0xd4, 0x14, 0xe6, 0xe5, 0x58, 0xea, 0x98, 0x66, 0x6c, 0xb8, 0xf2, 0x50, - 0xea, 0x98, 0x3f, 0x67, 0xdb, 0x89, 0xd4, 0x38, 0x2a, 0xe0, 0xd3, 0x0c, 0x34, 0x42, 0x64, 0xcd, - 0xd2, 0x5e, 0x21, 0x1d, 0x6e, 0x6a, 0xa2, 0x2c, 0x0d, 0x4c, 0xa5, 0xfb, 0xad, 0xc2, 0x9a, 0x8b, - 0x97, 0xe1, 0x5d, 0xd6, 0x98, 0xdf, 0x06, 0x22, 0xf2, 0xc6, 0x9a, 0x58, 0xc8, 0x99, 0x49, 0x26, - 0x90, 0x82, 0x56, 0xda, 0x36, 0xea, 0x26, 0x71, 0x39, 0x6a, 0xf5, 0x80, 0x6d, 0x94, 0x10, 0xdb, - 0x84, 0x1d, 0xa6, 0xe4, 0xd1, 0xf3, 0xfc, 0x88, 0xad, 0xcf, 0x4d, 0x58, 0x73, 0xce, 0xb9, 0x3d, - 0x39, 0x60, 0xec, 0x97, 0xee, 0xf7, 0x4b, 0xcf, 0x89, 0x35, 0x28, 0xdd, 0xf7, 0x9e, 0xfd, 0x7f, - 0xd7, 0x7d, 0xf6, 0x04, 0xe5, 0xd5, 0x3a, 0x8f, 0xe8, 0xb8, 0xdb, 0x09, 0x7e, 0xc7, 0x80, 0x8e, - 0xd9, 0xfd, 0xea, 0xb1, 0xcd, 0x65, 0x83, 0xf0, 0x6d, 0xb6, 0x12, 0x41, 0x8e, 0x31, 0x2d, 0xa2, - 0x26, 0x6c, 0xc0, 0xfb, 0x6c, 0x35, 0x91, 0xd7, 0xc6, 0x24, 0x15, 0x7a, 0x6e, 0xe7, 0x9e, 0x49, - 0x0c, 0xf9, 0xcc, 0x40, 0x84, 0x43, 0xf2, 0xa7, 0xac, 0x99, 0x15, 0x6a, 0xa2, 0x52, 0x99, 0x8c, - 0x14, 0xc2, 0x54, 0xb7, 0xab, 0x7b, 0xd5, 0xc3, 0x86, 0xd8, 0x28, 0xb3, 0x6f, 0x4c, 0xb2, 0xbb, - 0xcf, 0xd6, 0x6f, 0xb9, 0xe6, 0x75, 0x62, 0xb7, 0x3d, 0x82, 0xda, 0xa0, 0xfb, 0xc3, 0x63, 0x9b, - 0xcb, 0x26, 0x34, 0x50, 0x95, 0x46, 0xf0, 0x85, 0x1a, 0xad, 0x0a, 0x1b, 0xf0, 0x67, 0x6c, 0x8b, - 0x56, 0xfc, 0x80, 0xf3, 0x5a, 0xa6, 0x30, 0xb8, 0xe3, 0xbe, 0x57, 0xec, 0x3f, 0xb7, 0x45, 0xf7, - 0xfd, 0xfd, 0x6b, 0x89, 0x25, 0xdc, 0x18, 0xa2, 0xfc, 0x7e, 0x8a, 0x2c, 0x43, 0x67, 0xcd, 0xba, - 0xcb, 0x89, 0x2c, 0xc3, 0xc1, 0xd1, 0xcf, 0x9b, 0x8e, 0xf7, 0xeb, 0xa6, 0xe3, 0xfd, 0xbe, 0xe9, - 0x78, 0x1f, 0xfd, 0x89, 0xc2, 0x78, 0x16, 0xfa, 0xe3, 0x6c, 0x1a, 0xd0, 0xe6, 0x24, 0xaa, 0x71, - 0x22, 0x43, 0x6d, 0xa3, 0x60, 0xe9, 0x57, 0x19, 0xae, 0x52, 0xe2, 0xc5, 0xdf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x45, 0x35, 0x8c, 0x86, 0x44, 0x05, 0x00, 0x00, -} - -func (m *ETH1ChainData) 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 *ETH1ChainData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ETH1ChainData) 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.DepositContainers) > 0 { - for iNdEx := len(m.DepositContainers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DepositContainers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.Trie != nil { - { - size, err := m.Trie.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.BeaconState != nil { - { - size, err := m.BeaconState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ChainstartData != nil { - { - size, err := m.ChainstartData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.CurrentEth1Data != nil { - { - size, err := m.CurrentEth1Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LatestETH1Data) 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 *LatestETH1Data) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LatestETH1Data) 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 m.LastRequestedBlock != 0 { - i = encodeVarintPowchain(dAtA, i, uint64(m.LastRequestedBlock)) - i-- - dAtA[i] = 0x28 - } - if len(m.BlockHash) > 0 { - i -= len(m.BlockHash) - copy(dAtA[i:], m.BlockHash) - i = encodeVarintPowchain(dAtA, i, uint64(len(m.BlockHash))) - i-- - dAtA[i] = 0x22 - } - if m.BlockTime != 0 { - i = encodeVarintPowchain(dAtA, i, uint64(m.BlockTime)) - i-- - dAtA[i] = 0x18 - } - if m.BlockHeight != 0 { - i = encodeVarintPowchain(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ChainStartData) 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 *ChainStartData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChainStartData) 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.ChainstartDeposits) > 0 { - for iNdEx := len(m.ChainstartDeposits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChainstartDeposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.Eth1Data != nil { - { - size, err := m.Eth1Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.GenesisBlock != 0 { - i = encodeVarintPowchain(dAtA, i, uint64(m.GenesisBlock)) - i-- - dAtA[i] = 0x18 - } - if m.GenesisTime != 0 { - i = encodeVarintPowchain(dAtA, i, uint64(m.GenesisTime)) - i-- - dAtA[i] = 0x10 - } - if m.Chainstarted { - i-- - if m.Chainstarted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SparseMerkleTrie) 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 *SparseMerkleTrie) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SparseMerkleTrie) 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.OriginalItems) > 0 { - for iNdEx := len(m.OriginalItems) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.OriginalItems[iNdEx]) - copy(dAtA[i:], m.OriginalItems[iNdEx]) - i = encodeVarintPowchain(dAtA, i, uint64(len(m.OriginalItems[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Layers) > 0 { - for iNdEx := len(m.Layers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Layers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Depth != 0 { - i = encodeVarintPowchain(dAtA, i, uint64(m.Depth)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TrieLayer) 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 *TrieLayer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TrieLayer) 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.Layer) > 0 { - for iNdEx := len(m.Layer) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Layer[iNdEx]) - copy(dAtA[i:], m.Layer[iNdEx]) - i = encodeVarintPowchain(dAtA, i, uint64(len(m.Layer[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DepositContainer) 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 *DepositContainer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DepositContainer) 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.DepositRoot) > 0 { - i -= len(m.DepositRoot) - copy(dAtA[i:], m.DepositRoot) - i = encodeVarintPowchain(dAtA, i, uint64(len(m.DepositRoot))) - i-- - dAtA[i] = 0x22 - } - if m.Deposit != nil { - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPowchain(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Eth1BlockHeight != 0 { - i = encodeVarintPowchain(dAtA, i, uint64(m.Eth1BlockHeight)) - i-- - dAtA[i] = 0x10 - } - if m.Index != 0 { - i = encodeVarintPowchain(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintPowchain(dAtA []byte, offset int, v uint64) int { - offset -= sovPowchain(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ETH1ChainData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CurrentEth1Data != nil { - l = m.CurrentEth1Data.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - if m.ChainstartData != nil { - l = m.ChainstartData.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - if m.BeaconState != nil { - l = m.BeaconState.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - if m.Trie != nil { - l = m.Trie.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - if len(m.DepositContainers) > 0 { - for _, e := range m.DepositContainers { - l = e.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LatestETH1Data) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovPowchain(uint64(m.BlockHeight)) - } - if m.BlockTime != 0 { - n += 1 + sovPowchain(uint64(m.BlockTime)) - } - l = len(m.BlockHash) - if l > 0 { - n += 1 + l + sovPowchain(uint64(l)) - } - if m.LastRequestedBlock != 0 { - n += 1 + sovPowchain(uint64(m.LastRequestedBlock)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ChainStartData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Chainstarted { - n += 2 - } - if m.GenesisTime != 0 { - n += 1 + sovPowchain(uint64(m.GenesisTime)) - } - if m.GenesisBlock != 0 { - n += 1 + sovPowchain(uint64(m.GenesisBlock)) - } - if m.Eth1Data != nil { - l = m.Eth1Data.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - if len(m.ChainstartDeposits) > 0 { - for _, e := range m.ChainstartDeposits { - l = e.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SparseMerkleTrie) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Depth != 0 { - n += 1 + sovPowchain(uint64(m.Depth)) - } - if len(m.Layers) > 0 { - for _, e := range m.Layers { - l = e.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - } - if len(m.OriginalItems) > 0 { - for _, b := range m.OriginalItems { - l = len(b) - n += 1 + l + sovPowchain(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TrieLayer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Layer) > 0 { - for _, b := range m.Layer { - l = len(b) - n += 1 + l + sovPowchain(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DepositContainer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Index != 0 { - n += 1 + sovPowchain(uint64(m.Index)) - } - if m.Eth1BlockHeight != 0 { - n += 1 + sovPowchain(uint64(m.Eth1BlockHeight)) - } - if m.Deposit != nil { - l = m.Deposit.Size() - n += 1 + l + sovPowchain(uint64(l)) - } - l = len(m.DepositRoot) - if l > 0 { - n += 1 + l + sovPowchain(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovPowchain(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPowchain(x uint64) (n int) { - return sovPowchain(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ETH1ChainData) 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 ErrIntOverflowPowchain - } - 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: ETH1ChainData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ETH1ChainData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentEth1Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CurrentEth1Data == nil { - m.CurrentEth1Data = &LatestETH1Data{} - } - if err := m.CurrentEth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainstartData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChainstartData == nil { - m.ChainstartData = &ChainStartData{} - } - if err := m.ChainstartData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - 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 ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BeaconState == nil { - m.BeaconState = &v1.BeaconState{} - } - if err := m.BeaconState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Trie", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Trie == nil { - m.Trie = &SparseMerkleTrie{} - } - if err := m.Trie.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositContainers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositContainers = append(m.DepositContainers, &DepositContainer{}) - if err := m.DepositContainers[len(m.DepositContainers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPowchain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPowchain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthPowchain - } - 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 *LatestETH1Data) 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 ErrIntOverflowPowchain - } - 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: LatestETH1Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LatestETH1Data: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) - } - m.BlockTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - 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 ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = append(m.BlockHash[:0], dAtA[iNdEx:postIndex]...) - if m.BlockHash == nil { - m.BlockHash = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastRequestedBlock", wireType) - } - m.LastRequestedBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastRequestedBlock |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipPowchain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPowchain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthPowchain - } - 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 *ChainStartData) 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 ErrIntOverflowPowchain - } - 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: ChainStartData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChainStartData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Chainstarted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Chainstarted = bool(v != 0) - case 2: - 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 ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GenesisTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisBlock", wireType) - } - m.GenesisBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GenesisBlock |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Eth1Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Eth1Data == nil { - m.Eth1Data = &v1alpha1.Eth1Data{} - } - if err := m.Eth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainstartDeposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainstartDeposits = append(m.ChainstartDeposits, &v1alpha1.Deposit{}) - if err := m.ChainstartDeposits[len(m.ChainstartDeposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPowchain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPowchain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthPowchain - } - 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 *SparseMerkleTrie) 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 ErrIntOverflowPowchain - } - 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: SparseMerkleTrie: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SparseMerkleTrie: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Depth", wireType) - } - m.Depth = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Depth |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Layers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Layers = append(m.Layers, &TrieLayer{}) - if err := m.Layers[len(m.Layers)-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 OriginalItems", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalItems = append(m.OriginalItems, make([]byte, postIndex-iNdEx)) - copy(m.OriginalItems[len(m.OriginalItems)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPowchain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPowchain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthPowchain - } - 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 *TrieLayer) 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 ErrIntOverflowPowchain - } - 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: TrieLayer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TrieLayer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Layer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Layer = append(m.Layer, make([]byte, postIndex-iNdEx)) - copy(m.Layer[len(m.Layer)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPowchain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPowchain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthPowchain - } - 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 *DepositContainer) 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 ErrIntOverflowPowchain - } - 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: DepositContainer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DepositContainer: 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 ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Eth1BlockHeight", wireType) - } - m.Eth1BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Eth1BlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Deposit == nil { - m.Deposit = &v1alpha1.Deposit{} - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPowchain - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPowchain - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPowchain - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositRoot = append(m.DepositRoot[:0], dAtA[iNdEx:postIndex]...) - if m.DepositRoot == nil { - m.DepositRoot = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPowchain(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPowchain - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthPowchain - } - 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 skipPowchain(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, ErrIntOverflowPowchain - } - 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, ErrIntOverflowPowchain - } - 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, ErrIntOverflowPowchain - } - 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, ErrInvalidLengthPowchain - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPowchain - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPowchain - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPowchain = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPowchain = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPowchain = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/beacon/p2p/v1/archive.pb.go b/proto/beacon/p2p/v1/archive.pb.go deleted file mode 100755 index 5ce5c621e042..000000000000 --- a/proto/beacon/p2p/v1/archive.pb.go +++ /dev/null @@ -1,1157 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/beacon/p2p/v1/archive.proto - -package ethereum_beacon_p2p_v1 - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" -) - -// 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 ArchivedActiveSetChanges struct { - Activated []uint64 `protobuf:"varint,1,rep,packed,name=activated,proto3" json:"activated,omitempty"` - Exited []uint64 `protobuf:"varint,2,rep,packed,name=exited,proto3" json:"exited,omitempty"` - Slashed []uint64 `protobuf:"varint,3,rep,packed,name=slashed,proto3" json:"slashed,omitempty"` - Ejected []uint64 `protobuf:"varint,4,rep,packed,name=ejected,proto3" json:"ejected,omitempty"` - VoluntaryExits []*v1alpha1.VoluntaryExit `protobuf:"bytes,6,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty"` - ProposerSlashings []*v1alpha1.ProposerSlashing `protobuf:"bytes,7,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty"` - AttesterSlashings []*v1alpha1.AttesterSlashing `protobuf:"bytes,8,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ArchivedActiveSetChanges) Reset() { *m = ArchivedActiveSetChanges{} } -func (m *ArchivedActiveSetChanges) String() string { return proto.CompactTextString(m) } -func (*ArchivedActiveSetChanges) ProtoMessage() {} -func (*ArchivedActiveSetChanges) Descriptor() ([]byte, []int) { - return fileDescriptor_289929478e9672a3, []int{0} -} -func (m *ArchivedActiveSetChanges) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArchivedActiveSetChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArchivedActiveSetChanges.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ArchivedActiveSetChanges) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArchivedActiveSetChanges.Merge(m, src) -} -func (m *ArchivedActiveSetChanges) XXX_Size() int { - return m.Size() -} -func (m *ArchivedActiveSetChanges) XXX_DiscardUnknown() { - xxx_messageInfo_ArchivedActiveSetChanges.DiscardUnknown(m) -} - -var xxx_messageInfo_ArchivedActiveSetChanges proto.InternalMessageInfo - -func (m *ArchivedActiveSetChanges) GetActivated() []uint64 { - if m != nil { - return m.Activated - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetExited() []uint64 { - if m != nil { - return m.Exited - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetSlashed() []uint64 { - if m != nil { - return m.Slashed - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetEjected() []uint64 { - if m != nil { - return m.Ejected - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetVoluntaryExits() []*v1alpha1.VoluntaryExit { - if m != nil { - return m.VoluntaryExits - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetProposerSlashings() []*v1alpha1.ProposerSlashing { - if m != nil { - return m.ProposerSlashings - } - return nil -} - -func (m *ArchivedActiveSetChanges) GetAttesterSlashings() []*v1alpha1.AttesterSlashing { - if m != nil { - return m.AttesterSlashings - } - return nil -} - -type ArchivedCommitteeInfo struct { - ProposerSeed []byte `protobuf:"bytes,1,opt,name=proposer_seed,json=proposerSeed,proto3" json:"proposer_seed,omitempty" ssz-size:"32"` - AttesterSeed []byte `protobuf:"bytes,2,opt,name=attester_seed,json=attesterSeed,proto3" json:"attester_seed,omitempty" ssz-size:"32"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ArchivedCommitteeInfo) Reset() { *m = ArchivedCommitteeInfo{} } -func (m *ArchivedCommitteeInfo) String() string { return proto.CompactTextString(m) } -func (*ArchivedCommitteeInfo) ProtoMessage() {} -func (*ArchivedCommitteeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_289929478e9672a3, []int{1} -} -func (m *ArchivedCommitteeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArchivedCommitteeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArchivedCommitteeInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ArchivedCommitteeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArchivedCommitteeInfo.Merge(m, src) -} -func (m *ArchivedCommitteeInfo) XXX_Size() int { - return m.Size() -} -func (m *ArchivedCommitteeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ArchivedCommitteeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ArchivedCommitteeInfo proto.InternalMessageInfo - -func (m *ArchivedCommitteeInfo) GetProposerSeed() []byte { - if m != nil { - return m.ProposerSeed - } - return nil -} - -func (m *ArchivedCommitteeInfo) GetAttesterSeed() []byte { - if m != nil { - return m.AttesterSeed - } - return nil -} - -func init() { - proto.RegisterType((*ArchivedActiveSetChanges)(nil), "ethereum.beacon.p2p.v1.ArchivedActiveSetChanges") - proto.RegisterType((*ArchivedCommitteeInfo)(nil), "ethereum.beacon.p2p.v1.ArchivedCommitteeInfo") -} - -func init() { proto.RegisterFile("proto/beacon/p2p/v1/archive.proto", fileDescriptor_289929478e9672a3) } - -var fileDescriptor_289929478e9672a3 = []byte{ - // 404 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4f, 0x8b, 0xd3, 0x40, - 0x14, 0x27, 0x66, 0xe9, 0xea, 0xd8, 0x55, 0x76, 0xc0, 0x25, 0x2c, 0xd2, 0x5d, 0x83, 0x60, 0x2f, - 0x3b, 0x21, 0x59, 0xf0, 0xe0, 0xad, 0x2d, 0x1e, 0x3c, 0x08, 0x92, 0x42, 0xaf, 0x65, 0x92, 0xbc, - 0x66, 0x46, 0x93, 0xcc, 0x90, 0x99, 0x84, 0xda, 0xab, 0x07, 0xbf, 0x9a, 0x47, 0x3f, 0x81, 0x48, - 0x3f, 0x82, 0x9f, 0x40, 0x32, 0x49, 0x1a, 0x2d, 0x74, 0x6f, 0xf9, 0xbd, 0xdf, 0x9f, 0xf7, 0x5e, - 0xde, 0xa0, 0x57, 0xb2, 0x14, 0x5a, 0x78, 0x11, 0xd0, 0x58, 0x14, 0x9e, 0x0c, 0xa4, 0x57, 0xfb, - 0x1e, 0x2d, 0x63, 0xc6, 0x6b, 0x20, 0x86, 0xc3, 0x57, 0xa0, 0x19, 0x94, 0x50, 0xe5, 0xa4, 0x55, - 0x11, 0x19, 0x48, 0x52, 0xfb, 0xd7, 0x77, 0x29, 0xd7, 0xac, 0x8a, 0x48, 0x2c, 0x72, 0x2f, 0x15, - 0xa9, 0xf0, 0x8c, 0x3c, 0xaa, 0x36, 0x06, 0xb5, 0xb9, 0xcd, 0x57, 0x1b, 0x73, 0x7d, 0x03, 0x9a, - 0x79, 0xb5, 0x4f, 0x33, 0xc9, 0xa8, 0xdf, 0x35, 0x5c, 0x47, 0x99, 0x88, 0xbf, 0xb4, 0x02, 0xf7, - 0x9b, 0x8d, 0x9c, 0x59, 0xdb, 0x39, 0x99, 0xc5, 0x9a, 0xd7, 0xb0, 0x04, 0xbd, 0x60, 0xb4, 0x48, - 0x41, 0xe1, 0x97, 0xe8, 0x09, 0x6d, 0x6a, 0x54, 0x43, 0xe2, 0x58, 0xb7, 0xf6, 0xf4, 0x2c, 0x1c, - 0x0a, 0xf8, 0x0a, 0x8d, 0x60, 0xcb, 0x1b, 0xea, 0x91, 0xa1, 0x3a, 0x84, 0x1d, 0x74, 0xae, 0x32, - 0xaa, 0x18, 0x24, 0x8e, 0x6d, 0x88, 0x1e, 0x36, 0x0c, 0x7c, 0x86, 0xb8, 0xb1, 0x9c, 0xb5, 0x4c, - 0x07, 0xf1, 0x47, 0xf4, 0xbc, 0x16, 0x59, 0x55, 0x68, 0x5a, 0x7e, 0x5d, 0x37, 0x39, 0xca, 0x19, - 0xdd, 0xda, 0xd3, 0xa7, 0xc1, 0x6b, 0x72, 0xf8, 0x11, 0xa0, 0x19, 0xe9, 0x57, 0x21, 0xab, 0x5e, - 0xfd, 0x7e, 0xcb, 0x75, 0xf8, 0xac, 0xfe, 0x17, 0x2a, 0xbc, 0x42, 0x58, 0x96, 0x42, 0x0a, 0x05, - 0xe5, 0xda, 0x34, 0xe7, 0x45, 0xaa, 0x9c, 0x73, 0x93, 0xf8, 0xe6, 0x44, 0xe2, 0xa7, 0xce, 0xb0, - 0xec, 0xf4, 0xe1, 0xa5, 0x3c, 0xaa, 0x98, 0x5c, 0xaa, 0x35, 0x28, 0xfd, 0x5f, 0xee, 0xe3, 0x07, - 0x73, 0x67, 0x9d, 0x61, 0xc8, 0xa5, 0x47, 0x15, 0xe5, 0x7e, 0xb7, 0xd0, 0x8b, 0xfe, 0x0a, 0x0b, - 0x91, 0xe7, 0x5c, 0x6b, 0x80, 0x0f, 0xc5, 0x46, 0xe0, 0xb7, 0xe8, 0x62, 0xd8, 0x04, 0xcc, 0x19, - 0xac, 0xe9, 0x78, 0x7e, 0xf9, 0xe7, 0xd7, 0xcd, 0x85, 0x52, 0xbb, 0x3b, 0xc5, 0x77, 0xf0, 0xce, - 0xbd, 0x0f, 0xdc, 0x70, 0x7c, 0x18, 0x17, 0x20, 0x69, 0x7c, 0xc3, 0xa4, 0x60, 0x6e, 0x74, 0xca, - 0x77, 0x18, 0x07, 0x20, 0x99, 0x8f, 0x7f, 0xec, 0x27, 0xd6, 0xcf, 0xfd, 0xc4, 0xfa, 0xbd, 0x9f, - 0x58, 0xd1, 0xc8, 0x3c, 0x92, 0xfb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xce, 0x29, 0x1c, 0xa1, - 0xb1, 0x02, 0x00, 0x00, -} - -func (m *ArchivedActiveSetChanges) 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 *ArchivedActiveSetChanges) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArchivedActiveSetChanges) 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.AttesterSlashings) > 0 { - for iNdEx := len(m.AttesterSlashings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AttesterSlashings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintArchive(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.ProposerSlashings) > 0 { - for iNdEx := len(m.ProposerSlashings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ProposerSlashings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintArchive(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.VoluntaryExits) > 0 { - for iNdEx := len(m.VoluntaryExits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VoluntaryExits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintArchive(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Ejected) > 0 { - dAtA2 := make([]byte, len(m.Ejected)*10) - var j1 int - for _, num := range m.Ejected { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintArchive(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x22 - } - if len(m.Slashed) > 0 { - dAtA4 := make([]byte, len(m.Slashed)*10) - var j3 int - for _, num := range m.Slashed { - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ - } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintArchive(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0x1a - } - if len(m.Exited) > 0 { - dAtA6 := make([]byte, len(m.Exited)*10) - var j5 int - for _, num := range m.Exited { - for num >= 1<<7 { - dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - dAtA6[j5] = uint8(num) - j5++ - } - i -= j5 - copy(dAtA[i:], dAtA6[:j5]) - i = encodeVarintArchive(dAtA, i, uint64(j5)) - i-- - dAtA[i] = 0x12 - } - if len(m.Activated) > 0 { - dAtA8 := make([]byte, len(m.Activated)*10) - var j7 int - for _, num := range m.Activated { - for num >= 1<<7 { - dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ - } - dAtA8[j7] = uint8(num) - j7++ - } - i -= j7 - copy(dAtA[i:], dAtA8[:j7]) - i = encodeVarintArchive(dAtA, i, uint64(j7)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ArchivedCommitteeInfo) 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 *ArchivedCommitteeInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArchivedCommitteeInfo) 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.AttesterSeed) > 0 { - i -= len(m.AttesterSeed) - copy(dAtA[i:], m.AttesterSeed) - i = encodeVarintArchive(dAtA, i, uint64(len(m.AttesterSeed))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProposerSeed) > 0 { - i -= len(m.ProposerSeed) - copy(dAtA[i:], m.ProposerSeed) - i = encodeVarintArchive(dAtA, i, uint64(len(m.ProposerSeed))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintArchive(dAtA []byte, offset int, v uint64) int { - offset -= sovArchive(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ArchivedActiveSetChanges) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Activated) > 0 { - l = 0 - for _, e := range m.Activated { - l += sovArchive(uint64(e)) - } - n += 1 + sovArchive(uint64(l)) + l - } - if len(m.Exited) > 0 { - l = 0 - for _, e := range m.Exited { - l += sovArchive(uint64(e)) - } - n += 1 + sovArchive(uint64(l)) + l - } - if len(m.Slashed) > 0 { - l = 0 - for _, e := range m.Slashed { - l += sovArchive(uint64(e)) - } - n += 1 + sovArchive(uint64(l)) + l - } - if len(m.Ejected) > 0 { - l = 0 - for _, e := range m.Ejected { - l += sovArchive(uint64(e)) - } - n += 1 + sovArchive(uint64(l)) + l - } - if len(m.VoluntaryExits) > 0 { - for _, e := range m.VoluntaryExits { - l = e.Size() - n += 1 + l + sovArchive(uint64(l)) - } - } - if len(m.ProposerSlashings) > 0 { - for _, e := range m.ProposerSlashings { - l = e.Size() - n += 1 + l + sovArchive(uint64(l)) - } - } - if len(m.AttesterSlashings) > 0 { - for _, e := range m.AttesterSlashings { - l = e.Size() - n += 1 + l + sovArchive(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ArchivedCommitteeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProposerSeed) - if l > 0 { - n += 1 + l + sovArchive(uint64(l)) - } - l = len(m.AttesterSeed) - if l > 0 { - n += 1 + l + sovArchive(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovArchive(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozArchive(x uint64) (n int) { - return sovArchive(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ArchivedActiveSetChanges) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ArchivedActiveSetChanges: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArchivedActiveSetChanges: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Activated = append(m.Activated, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Activated) == 0 { - m.Activated = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Activated = append(m.Activated, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Activated", wireType) - } - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exited = append(m.Exited, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Exited) == 0 { - m.Exited = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exited = append(m.Exited, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Exited", wireType) - } - case 3: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Slashed = append(m.Slashed, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Slashed) == 0 { - m.Slashed = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Slashed = append(m.Slashed, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Slashed", wireType) - } - case 4: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ejected = append(m.Ejected, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Ejected) == 0 { - m.Ejected = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ejected = append(m.Ejected, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Ejected", wireType) - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VoluntaryExits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VoluntaryExits = append(m.VoluntaryExits, &v1alpha1.VoluntaryExit{}) - if err := m.VoluntaryExits[len(m.VoluntaryExits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerSlashings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerSlashings = append(m.ProposerSlashings, &v1alpha1.ProposerSlashing{}) - if err := m.ProposerSlashings[len(m.ProposerSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttesterSlashings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttesterSlashings = append(m.AttesterSlashings, &v1alpha1.AttesterSlashing{}) - if err := m.AttesterSlashings[len(m.AttesterSlashings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipArchive(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthArchive - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthArchive - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArchivedCommitteeInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ArchivedCommitteeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArchivedCommitteeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerSeed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerSeed = append(m.ProposerSeed[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerSeed == nil { - m.ProposerSeed = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttesterSeed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowArchive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthArchive - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthArchive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttesterSeed = append(m.AttesterSeed[:0], dAtA[iNdEx:postIndex]...) - if m.AttesterSeed == nil { - m.AttesterSeed = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipArchive(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthArchive - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthArchive - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipArchive(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowArchive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowArchive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowArchive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthArchive - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupArchive - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthArchive - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthArchive = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowArchive = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupArchive = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/beacon/p2p/v1/messages.pb.go b/proto/beacon/p2p/v1/messages.pb.go deleted file mode 100755 index d7e5a02c568c..000000000000 --- a/proto/beacon/p2p/v1/messages.pb.go +++ /dev/null @@ -1,1265 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/beacon/p2p/v1/messages.proto - -package ethereum_beacon_p2p_v1 - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Status struct { - ForkDigest []byte `protobuf:"bytes,1,opt,name=fork_digest,json=forkDigest,proto3" json:"fork_digest,omitempty" ssz-size:"4"` - FinalizedRoot []byte `protobuf:"bytes,2,opt,name=finalized_root,json=finalizedRoot,proto3" json:"finalized_root,omitempty" ssz-size:"32"` - FinalizedEpoch uint64 `protobuf:"varint,3,opt,name=finalized_epoch,json=finalizedEpoch,proto3" json:"finalized_epoch,omitempty"` - HeadRoot []byte `protobuf:"bytes,4,opt,name=head_root,json=headRoot,proto3" json:"head_root,omitempty" ssz-size:"32"` - HeadSlot uint64 `protobuf:"varint,5,opt,name=head_slot,json=headSlot,proto3" json:"head_slot,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Status) Reset() { *m = Status{} } -func (m *Status) String() string { return proto.CompactTextString(m) } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_a1d590cda035b632, []int{0} -} -func (m *Status) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Status.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 *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(m, src) -} -func (m *Status) XXX_Size() int { - return m.Size() -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} - -var xxx_messageInfo_Status proto.InternalMessageInfo - -func (m *Status) GetForkDigest() []byte { - if m != nil { - return m.ForkDigest - } - return nil -} - -func (m *Status) GetFinalizedRoot() []byte { - if m != nil { - return m.FinalizedRoot - } - return nil -} - -func (m *Status) GetFinalizedEpoch() uint64 { - if m != nil { - return m.FinalizedEpoch - } - return 0 -} - -func (m *Status) GetHeadRoot() []byte { - if m != nil { - return m.HeadRoot - } - return nil -} - -func (m *Status) GetHeadSlot() uint64 { - if m != nil { - return m.HeadSlot - } - return 0 -} - -type BeaconBlocksByRangeRequest struct { - StartSlot uint64 `protobuf:"varint,1,opt,name=start_slot,json=startSlot,proto3" json:"start_slot,omitempty"` - Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` - Step uint64 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeaconBlocksByRangeRequest) Reset() { *m = BeaconBlocksByRangeRequest{} } -func (m *BeaconBlocksByRangeRequest) String() string { return proto.CompactTextString(m) } -func (*BeaconBlocksByRangeRequest) ProtoMessage() {} -func (*BeaconBlocksByRangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a1d590cda035b632, []int{1} -} -func (m *BeaconBlocksByRangeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeaconBlocksByRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeaconBlocksByRangeRequest.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 *BeaconBlocksByRangeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeaconBlocksByRangeRequest.Merge(m, src) -} -func (m *BeaconBlocksByRangeRequest) XXX_Size() int { - return m.Size() -} -func (m *BeaconBlocksByRangeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BeaconBlocksByRangeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BeaconBlocksByRangeRequest proto.InternalMessageInfo - -func (m *BeaconBlocksByRangeRequest) GetStartSlot() uint64 { - if m != nil { - return m.StartSlot - } - return 0 -} - -func (m *BeaconBlocksByRangeRequest) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *BeaconBlocksByRangeRequest) GetStep() uint64 { - if m != nil { - return m.Step - } - return 0 -} - -type ENRForkID struct { - CurrentForkDigest []byte `protobuf:"bytes,1,opt,name=current_fork_digest,json=currentForkDigest,proto3" json:"current_fork_digest,omitempty" ssz-size:"4"` - NextForkVersion []byte `protobuf:"bytes,2,opt,name=next_fork_version,json=nextForkVersion,proto3" json:"next_fork_version,omitempty" ssz-size:"4"` - NextForkEpoch uint64 `protobuf:"varint,3,opt,name=next_fork_epoch,json=nextForkEpoch,proto3" json:"next_fork_epoch,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ENRForkID) Reset() { *m = ENRForkID{} } -func (m *ENRForkID) String() string { return proto.CompactTextString(m) } -func (*ENRForkID) ProtoMessage() {} -func (*ENRForkID) Descriptor() ([]byte, []int) { - return fileDescriptor_a1d590cda035b632, []int{2} -} -func (m *ENRForkID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ENRForkID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ENRForkID.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 *ENRForkID) XXX_Merge(src proto.Message) { - xxx_messageInfo_ENRForkID.Merge(m, src) -} -func (m *ENRForkID) XXX_Size() int { - return m.Size() -} -func (m *ENRForkID) XXX_DiscardUnknown() { - xxx_messageInfo_ENRForkID.DiscardUnknown(m) -} - -var xxx_messageInfo_ENRForkID proto.InternalMessageInfo - -func (m *ENRForkID) GetCurrentForkDigest() []byte { - if m != nil { - return m.CurrentForkDigest - } - return nil -} - -func (m *ENRForkID) GetNextForkVersion() []byte { - if m != nil { - return m.NextForkVersion - } - return nil -} - -func (m *ENRForkID) GetNextForkEpoch() uint64 { - if m != nil { - return m.NextForkEpoch - } - return 0 -} - -type MetaData struct { - SeqNumber uint64 `protobuf:"varint,1,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"` - Attnets github_com_prysmaticlabs_go_bitfield.Bitvector64 `protobuf:"bytes,2,opt,name=attnets,proto3,casttype=github.com/prysmaticlabs/go-bitfield.Bitvector64" json:"attnets,omitempty" ssz-size:"64"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetaData) Reset() { *m = MetaData{} } -func (m *MetaData) String() string { return proto.CompactTextString(m) } -func (*MetaData) ProtoMessage() {} -func (*MetaData) Descriptor() ([]byte, []int) { - return fileDescriptor_a1d590cda035b632, []int{3} -} -func (m *MetaData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetaData.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 *MetaData) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetaData.Merge(m, src) -} -func (m *MetaData) XXX_Size() int { - return m.Size() -} -func (m *MetaData) XXX_DiscardUnknown() { - xxx_messageInfo_MetaData.DiscardUnknown(m) -} - -var xxx_messageInfo_MetaData proto.InternalMessageInfo - -func (m *MetaData) GetSeqNumber() uint64 { - if m != nil { - return m.SeqNumber - } - return 0 -} - -func (m *MetaData) GetAttnets() github_com_prysmaticlabs_go_bitfield.Bitvector64 { - if m != nil { - return m.Attnets - } - return nil -} - -func init() { - proto.RegisterType((*Status)(nil), "ethereum.beacon.p2p.v1.Status") - proto.RegisterType((*BeaconBlocksByRangeRequest)(nil), "ethereum.beacon.p2p.v1.BeaconBlocksByRangeRequest") - proto.RegisterType((*ENRForkID)(nil), "ethereum.beacon.p2p.v1.ENRForkID") - proto.RegisterType((*MetaData)(nil), "ethereum.beacon.p2p.v1.MetaData") -} - -func init() { - proto.RegisterFile("proto/beacon/p2p/v1/messages.proto", fileDescriptor_a1d590cda035b632) -} - -var fileDescriptor_a1d590cda035b632 = []byte{ - // 490 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xb1, 0x6e, 0xd3, 0x40, - 0x18, 0xc7, 0x65, 0x48, 0x4b, 0x7b, 0x24, 0x84, 0x1c, 0x08, 0x45, 0x45, 0x24, 0x95, 0x07, 0xe8, - 0x12, 0x9b, 0xa4, 0x51, 0x85, 0x10, 0x03, 0xb2, 0x92, 0x4a, 0x0c, 0x74, 0x70, 0x25, 0xd6, 0xe8, - 0xec, 0x7c, 0x71, 0x4e, 0x71, 0xfc, 0x39, 0x77, 0x9f, 0x23, 0x9a, 0x47, 0xe0, 0x75, 0x78, 0x09, - 0x46, 0x9e, 0x20, 0x42, 0x59, 0xd9, 0x3a, 0x32, 0x21, 0x9f, 0xdd, 0xba, 0x08, 0x21, 0xb1, 0xf9, - 0xbe, 0xfb, 0xfd, 0xfe, 0xba, 0xfb, 0xfb, 0x98, 0x9d, 0x2a, 0x24, 0x74, 0x03, 0x10, 0x21, 0x26, - 0x6e, 0x3a, 0x48, 0xdd, 0x75, 0xdf, 0x5d, 0x82, 0xd6, 0x22, 0x02, 0xed, 0x98, 0x4d, 0xfe, 0x0c, - 0x68, 0x0e, 0x0a, 0xb2, 0xa5, 0x53, 0x60, 0x4e, 0x3a, 0x48, 0x9d, 0x75, 0xff, 0xa8, 0x17, 0x49, - 0x9a, 0x67, 0x81, 0x13, 0xe2, 0xd2, 0x8d, 0x30, 0x42, 0xd7, 0xe0, 0x41, 0x36, 0x33, 0xab, 0x22, - 0x38, 0xff, 0x2a, 0x62, 0xec, 0x9f, 0x16, 0xdb, 0xbf, 0x24, 0x41, 0x99, 0xe6, 0x7d, 0xf6, 0x70, - 0x86, 0x6a, 0x31, 0x99, 0xca, 0x08, 0x34, 0xb5, 0xad, 0x63, 0xeb, 0xa4, 0xee, 0x3d, 0xbe, 0xde, - 0x76, 0xeb, 0x5a, 0x6f, 0x7a, 0x5a, 0x6e, 0xe0, 0xad, 0x3d, 0xb4, 0x7d, 0x96, 0x43, 0x23, 0xc3, - 0xf0, 0x37, 0xec, 0xd1, 0x4c, 0x26, 0x22, 0x96, 0x1b, 0x98, 0x4e, 0x14, 0x22, 0xb5, 0xef, 0x19, - 0xab, 0x75, 0xbd, 0xed, 0x36, 0x2a, 0xeb, 0x74, 0x60, 0xfb, 0x8d, 0x5b, 0xd0, 0x47, 0x24, 0xfe, - 0x8a, 0x35, 0x2b, 0x13, 0x52, 0x0c, 0xe7, 0xed, 0xfb, 0xc7, 0xd6, 0x49, 0xcd, 0xaf, 0x02, 0xc7, - 0xf9, 0x94, 0x3b, 0xec, 0x70, 0x0e, 0xa2, 0x4c, 0xaf, 0xfd, 0x2b, 0xfd, 0x20, 0x67, 0x4c, 0xf0, - 0xf3, 0x92, 0xd7, 0x31, 0x52, 0x7b, 0xcf, 0x44, 0x9a, 0xcd, 0xcb, 0x18, 0xc9, 0x06, 0x76, 0xe4, - 0x99, 0xb6, 0xbc, 0x18, 0xc3, 0x85, 0xf6, 0xae, 0x7c, 0x91, 0x44, 0xe0, 0xc3, 0x2a, 0xcb, 0x6f, - 0xf3, 0x82, 0x31, 0x4d, 0x42, 0x51, 0xe1, 0x5a, 0xc6, 0x3d, 0x34, 0x93, 0x5c, 0xe6, 0x4f, 0xd9, - 0x5e, 0x88, 0x59, 0x52, 0xdc, 0xb1, 0xe6, 0x17, 0x0b, 0xce, 0x59, 0x4d, 0x13, 0xa4, 0xe5, 0xe9, - 0xcd, 0xb7, 0xfd, 0xd5, 0x62, 0x87, 0xe3, 0x0b, 0xff, 0x1c, 0xd5, 0xe2, 0xc3, 0x88, 0xbf, 0x67, - 0x4f, 0xc2, 0x4c, 0x29, 0x48, 0x68, 0xf2, 0x3f, 0xfd, 0xb6, 0x4a, 0xf8, 0xbc, 0xaa, 0xf9, 0x1d, - 0x6b, 0x25, 0xf0, 0xb9, 0xd4, 0xd7, 0xa0, 0xb4, 0xc4, 0xa4, 0x6c, 0xfa, 0x6f, 0xbf, 0x99, 0xa3, - 0xb9, 0xfc, 0xa9, 0x00, 0xf9, 0x4b, 0xd6, 0xac, 0xec, 0xbb, 0x55, 0x37, 0x6e, 0x48, 0xd3, 0xb4, - 0xfd, 0xc5, 0x62, 0x07, 0x1f, 0x81, 0xc4, 0x48, 0x90, 0x30, 0x5d, 0xc0, 0x6a, 0x92, 0x64, 0xcb, - 0x00, 0xd4, 0x6d, 0x17, 0xb0, 0xba, 0x30, 0x03, 0x3e, 0x61, 0x0f, 0x04, 0x51, 0x02, 0xa4, 0xcb, - 0x73, 0x8c, 0xff, 0xfc, 0x27, 0x67, 0x43, 0xfb, 0xd7, 0xb6, 0xfb, 0xfa, 0xce, 0x5b, 0x4c, 0xd5, - 0x95, 0x5e, 0x0a, 0x92, 0x61, 0x2c, 0x02, 0xed, 0x46, 0xd8, 0x0b, 0x24, 0xcd, 0x24, 0xc4, 0x53, - 0xc7, 0x93, 0xb4, 0x86, 0x90, 0x50, 0x9d, 0x0d, 0xfd, 0x9b, 0x54, 0xaf, 0xfe, 0x6d, 0xd7, 0xb1, - 0xbe, 0xef, 0x3a, 0xd6, 0x8f, 0x5d, 0xc7, 0x0a, 0xf6, 0xcd, 0x63, 0x3d, 0xfd, 0x1d, 0x00, 0x00, - 0xff, 0xff, 0xd5, 0xcc, 0x55, 0xef, 0x19, 0x03, 0x00, 0x00, -} - -func (m *Status) 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 *Status) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Status) 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 m.HeadSlot != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.HeadSlot)) - i-- - dAtA[i] = 0x28 - } - if len(m.HeadRoot) > 0 { - i -= len(m.HeadRoot) - copy(dAtA[i:], m.HeadRoot) - i = encodeVarintMessages(dAtA, i, uint64(len(m.HeadRoot))) - i-- - dAtA[i] = 0x22 - } - if m.FinalizedEpoch != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.FinalizedEpoch)) - i-- - dAtA[i] = 0x18 - } - if len(m.FinalizedRoot) > 0 { - i -= len(m.FinalizedRoot) - copy(dAtA[i:], m.FinalizedRoot) - i = encodeVarintMessages(dAtA, i, uint64(len(m.FinalizedRoot))) - i-- - dAtA[i] = 0x12 - } - if len(m.ForkDigest) > 0 { - i -= len(m.ForkDigest) - copy(dAtA[i:], m.ForkDigest) - i = encodeVarintMessages(dAtA, i, uint64(len(m.ForkDigest))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BeaconBlocksByRangeRequest) 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 *BeaconBlocksByRangeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BeaconBlocksByRangeRequest) 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 m.Step != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.Step)) - i-- - dAtA[i] = 0x18 - } - if m.Count != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x10 - } - if m.StartSlot != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.StartSlot)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ENRForkID) 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 *ENRForkID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ENRForkID) 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 m.NextForkEpoch != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.NextForkEpoch)) - i-- - dAtA[i] = 0x18 - } - if len(m.NextForkVersion) > 0 { - i -= len(m.NextForkVersion) - copy(dAtA[i:], m.NextForkVersion) - i = encodeVarintMessages(dAtA, i, uint64(len(m.NextForkVersion))) - i-- - dAtA[i] = 0x12 - } - if len(m.CurrentForkDigest) > 0 { - i -= len(m.CurrentForkDigest) - copy(dAtA[i:], m.CurrentForkDigest) - i = encodeVarintMessages(dAtA, i, uint64(len(m.CurrentForkDigest))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MetaData) 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 *MetaData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetaData) 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.Attnets) > 0 { - i -= len(m.Attnets) - copy(dAtA[i:], m.Attnets) - i = encodeVarintMessages(dAtA, i, uint64(len(m.Attnets))) - i-- - dAtA[i] = 0x12 - } - if m.SeqNumber != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.SeqNumber)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintMessages(dAtA []byte, offset int, v uint64) int { - offset -= sovMessages(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Status) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ForkDigest) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - l = len(m.FinalizedRoot) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - if m.FinalizedEpoch != 0 { - n += 1 + sovMessages(uint64(m.FinalizedEpoch)) - } - l = len(m.HeadRoot) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - if m.HeadSlot != 0 { - n += 1 + sovMessages(uint64(m.HeadSlot)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BeaconBlocksByRangeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartSlot != 0 { - n += 1 + sovMessages(uint64(m.StartSlot)) - } - if m.Count != 0 { - n += 1 + sovMessages(uint64(m.Count)) - } - if m.Step != 0 { - n += 1 + sovMessages(uint64(m.Step)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ENRForkID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CurrentForkDigest) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - l = len(m.NextForkVersion) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - if m.NextForkEpoch != 0 { - n += 1 + sovMessages(uint64(m.NextForkEpoch)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MetaData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SeqNumber != 0 { - n += 1 + sovMessages(uint64(m.SeqNumber)) - } - l = len(m.Attnets) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMessages(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMessages(x uint64) (n int) { - return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Status) 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: Status: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ForkDigest", 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 < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ForkDigest = append(m.ForkDigest[:0], dAtA[iNdEx:postIndex]...) - if m.ForkDigest == nil { - m.ForkDigest = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FinalizedRoot", 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 < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FinalizedRoot = append(m.FinalizedRoot[:0], dAtA[iNdEx:postIndex]...) - if m.FinalizedRoot == nil { - m.FinalizedRoot = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FinalizedEpoch", wireType) - } - m.FinalizedEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FinalizedEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadRoot", 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 < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeadRoot = append(m.HeadRoot[:0], dAtA[iNdEx:postIndex]...) - if m.HeadRoot == nil { - m.HeadRoot = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadSlot", wireType) - } - m.HeadSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeadSlot |= 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) < 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 *BeaconBlocksByRangeRequest) 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: BeaconBlocksByRangeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BeaconBlocksByRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartSlot", wireType) - } - m.StartSlot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartSlot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) - } - m.Step = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Step |= 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) < 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 *ENRForkID) 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: ENRForkID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ENRForkID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentForkDigest", 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 < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CurrentForkDigest = append(m.CurrentForkDigest[:0], dAtA[iNdEx:postIndex]...) - if m.CurrentForkDigest == nil { - m.CurrentForkDigest = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextForkVersion", 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 < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextForkVersion = append(m.NextForkVersion[:0], dAtA[iNdEx:postIndex]...) - if m.NextForkVersion == nil { - m.NextForkVersion = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextForkEpoch", wireType) - } - m.NextForkEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NextForkEpoch |= 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) < 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 *MetaData) 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: MetaData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetaData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SeqNumber", wireType) - } - m.SeqNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SeqNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attnets", 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 < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attnets = append(m.Attnets[:0], dAtA[iNdEx:postIndex]...) - if m.Attnets == nil { - m.Attnets = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessages(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessages - } - if (iNdEx + 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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthMessages - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMessages - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMessages - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/beacon/p2p/v1/types.pb.go b/proto/beacon/p2p/v1/types.pb.go deleted file mode 100755 index 52f23d415d53..000000000000 --- a/proto/beacon/p2p/v1/types.pb.go +++ /dev/null @@ -1,3673 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/beacon/p2p/v1/types.proto - -package ethereum_beacon_p2p_v1 - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" - github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type BeaconState struct { - GenesisTime uint64 `protobuf:"varint,1001,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GenesisValidatorsRoot []byte `protobuf:"bytes,1002,opt,name=genesis_validators_root,json=genesisValidatorsRoot,proto3" json:"genesis_validators_root,omitempty" ssz-size:"32"` - Slot uint64 `protobuf:"varint,1003,opt,name=slot,proto3" json:"slot,omitempty"` - Fork *Fork `protobuf:"bytes,1004,opt,name=fork,proto3" json:"fork,omitempty"` - LatestBlockHeader *v1alpha1.BeaconBlockHeader `protobuf:"bytes,2001,opt,name=latest_block_header,json=latestBlockHeader,proto3" json:"latest_block_header,omitempty"` - BlockRoots [][]byte `protobuf:"bytes,2002,rep,name=block_roots,json=blockRoots,proto3" json:"block_roots,omitempty" ssz-size:"8192,32"` - StateRoots [][]byte `protobuf:"bytes,2003,rep,name=state_roots,json=stateRoots,proto3" json:"state_roots,omitempty" ssz-size:"8192,32"` - HistoricalRoots [][]byte `protobuf:"bytes,2004,rep,name=historical_roots,json=historicalRoots,proto3" json:"historical_roots,omitempty" ssz-size:"?,32" ssz-max:"16777216"` - Eth1Data *v1alpha1.Eth1Data `protobuf:"bytes,3001,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"` - Eth1DataVotes []*v1alpha1.Eth1Data `protobuf:"bytes,3002,rep,name=eth1_data_votes,json=eth1DataVotes,proto3" json:"eth1_data_votes,omitempty" ssz-max:"1024"` - Eth1DepositIndex uint64 `protobuf:"varint,3003,opt,name=eth1_deposit_index,json=eth1DepositIndex,proto3" json:"eth1_deposit_index,omitempty"` - Validators []*v1alpha1.Validator `protobuf:"bytes,4001,rep,name=validators,proto3" json:"validators,omitempty" ssz-max:"1099511627776"` - Balances []uint64 `protobuf:"varint,4002,rep,packed,name=balances,proto3" json:"balances,omitempty" ssz-max:"1099511627776"` - RandaoMixes [][]byte `protobuf:"bytes,5001,rep,name=randao_mixes,json=randaoMixes,proto3" json:"randao_mixes,omitempty" ssz-size:"65536,32"` - Slashings []uint64 `protobuf:"varint,6001,rep,packed,name=slashings,proto3" json:"slashings,omitempty" ssz-size:"8192"` - PreviousEpochAttestations []*PendingAttestation `protobuf:"bytes,7001,rep,name=previous_epoch_attestations,json=previousEpochAttestations,proto3" json:"previous_epoch_attestations,omitempty" ssz-max:"4096"` - CurrentEpochAttestations []*PendingAttestation `protobuf:"bytes,7002,rep,name=current_epoch_attestations,json=currentEpochAttestations,proto3" json:"current_epoch_attestations,omitempty" ssz-max:"4096"` - JustificationBits github_com_prysmaticlabs_go_bitfield.Bitvector4 `protobuf:"bytes,8001,opt,name=justification_bits,json=justificationBits,proto3,casttype=github.com/prysmaticlabs/go-bitfield.Bitvector4" json:"justification_bits,omitempty" ssz-size:"1"` - PreviousJustifiedCheckpoint *v1alpha1.Checkpoint `protobuf:"bytes,8002,opt,name=previous_justified_checkpoint,json=previousJustifiedCheckpoint,proto3" json:"previous_justified_checkpoint,omitempty"` - CurrentJustifiedCheckpoint *v1alpha1.Checkpoint `protobuf:"bytes,8003,opt,name=current_justified_checkpoint,json=currentJustifiedCheckpoint,proto3" json:"current_justified_checkpoint,omitempty"` - FinalizedCheckpoint *v1alpha1.Checkpoint `protobuf:"bytes,8004,opt,name=finalized_checkpoint,json=finalizedCheckpoint,proto3" json:"finalized_checkpoint,omitempty"` - 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_e719e7d82cfa7b0d, []int{0} -} -func (m *BeaconState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeaconState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeaconState.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 *BeaconState) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeaconState.Merge(m, src) -} -func (m *BeaconState) XXX_Size() int { - return m.Size() -} -func (m *BeaconState) XXX_DiscardUnknown() { - xxx_messageInfo_BeaconState.DiscardUnknown(m) -} - -var xxx_messageInfo_BeaconState proto.InternalMessageInfo - -func (m *BeaconState) GetGenesisTime() uint64 { - if m != nil { - return m.GenesisTime - } - return 0 -} - -func (m *BeaconState) GetGenesisValidatorsRoot() []byte { - if m != nil { - return m.GenesisValidatorsRoot - } - return nil -} - -func (m *BeaconState) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -func (m *BeaconState) GetFork() *Fork { - if m != nil { - return m.Fork - } - return nil -} - -func (m *BeaconState) GetLatestBlockHeader() *v1alpha1.BeaconBlockHeader { - if m != nil { - return m.LatestBlockHeader - } - return nil -} - -func (m *BeaconState) GetBlockRoots() [][]byte { - if m != nil { - return m.BlockRoots - } - return nil -} - -func (m *BeaconState) GetStateRoots() [][]byte { - if m != nil { - return m.StateRoots - } - return nil -} - -func (m *BeaconState) GetHistoricalRoots() [][]byte { - if m != nil { - return m.HistoricalRoots - } - return nil -} - -func (m *BeaconState) GetEth1Data() *v1alpha1.Eth1Data { - if m != nil { - return m.Eth1Data - } - return nil -} - -func (m *BeaconState) GetEth1DataVotes() []*v1alpha1.Eth1Data { - if m != nil { - return m.Eth1DataVotes - } - return nil -} - -func (m *BeaconState) GetEth1DepositIndex() uint64 { - if m != nil { - return m.Eth1DepositIndex - } - return 0 -} - -func (m *BeaconState) GetValidators() []*v1alpha1.Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *BeaconState) GetBalances() []uint64 { - if m != nil { - return m.Balances - } - return nil -} - -func (m *BeaconState) GetRandaoMixes() [][]byte { - if m != nil { - return m.RandaoMixes - } - return nil -} - -func (m *BeaconState) GetSlashings() []uint64 { - if m != nil { - return m.Slashings - } - return nil -} - -func (m *BeaconState) GetPreviousEpochAttestations() []*PendingAttestation { - if m != nil { - return m.PreviousEpochAttestations - } - return nil -} - -func (m *BeaconState) GetCurrentEpochAttestations() []*PendingAttestation { - if m != nil { - return m.CurrentEpochAttestations - } - return nil -} - -func (m *BeaconState) GetJustificationBits() github_com_prysmaticlabs_go_bitfield.Bitvector4 { - if m != nil { - return m.JustificationBits - } - return nil -} - -func (m *BeaconState) GetPreviousJustifiedCheckpoint() *v1alpha1.Checkpoint { - if m != nil { - return m.PreviousJustifiedCheckpoint - } - return nil -} - -func (m *BeaconState) GetCurrentJustifiedCheckpoint() *v1alpha1.Checkpoint { - if m != nil { - return m.CurrentJustifiedCheckpoint - } - return nil -} - -func (m *BeaconState) GetFinalizedCheckpoint() *v1alpha1.Checkpoint { - if m != nil { - return m.FinalizedCheckpoint - } - return nil -} - -type Fork struct { - PreviousVersion []byte `protobuf:"bytes,1,opt,name=previous_version,json=previousVersion,proto3" json:"previous_version,omitempty" ssz-size:"4"` - CurrentVersion []byte `protobuf:"bytes,2,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty" ssz-size:"4"` - Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Fork) Reset() { *m = Fork{} } -func (m *Fork) String() string { return proto.CompactTextString(m) } -func (*Fork) ProtoMessage() {} -func (*Fork) Descriptor() ([]byte, []int) { - return fileDescriptor_e719e7d82cfa7b0d, []int{1} -} -func (m *Fork) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Fork) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Fork.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 *Fork) XXX_Merge(src proto.Message) { - xxx_messageInfo_Fork.Merge(m, src) -} -func (m *Fork) XXX_Size() int { - return m.Size() -} -func (m *Fork) XXX_DiscardUnknown() { - xxx_messageInfo_Fork.DiscardUnknown(m) -} - -var xxx_messageInfo_Fork proto.InternalMessageInfo - -func (m *Fork) GetPreviousVersion() []byte { - if m != nil { - return m.PreviousVersion - } - return nil -} - -func (m *Fork) GetCurrentVersion() []byte { - if m != nil { - return m.CurrentVersion - } - return nil -} - -func (m *Fork) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -type PendingAttestation struct { - AggregationBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3,casttype=github.com/prysmaticlabs/go-bitfield.Bitlist" json:"aggregation_bits,omitempty" ssz-max:"2048"` - Data *v1alpha1.AttestationData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - InclusionDelay uint64 `protobuf:"varint,3,opt,name=inclusion_delay,json=inclusionDelay,proto3" json:"inclusion_delay,omitempty"` - ProposerIndex uint64 `protobuf:"varint,4,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PendingAttestation) Reset() { *m = PendingAttestation{} } -func (m *PendingAttestation) String() string { return proto.CompactTextString(m) } -func (*PendingAttestation) ProtoMessage() {} -func (*PendingAttestation) Descriptor() ([]byte, []int) { - return fileDescriptor_e719e7d82cfa7b0d, []int{2} -} -func (m *PendingAttestation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PendingAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PendingAttestation.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 *PendingAttestation) XXX_Merge(src proto.Message) { - xxx_messageInfo_PendingAttestation.Merge(m, src) -} -func (m *PendingAttestation) XXX_Size() int { - return m.Size() -} -func (m *PendingAttestation) XXX_DiscardUnknown() { - xxx_messageInfo_PendingAttestation.DiscardUnknown(m) -} - -var xxx_messageInfo_PendingAttestation proto.InternalMessageInfo - -func (m *PendingAttestation) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitlist { - if m != nil { - return m.AggregationBits - } - return nil -} - -func (m *PendingAttestation) GetData() *v1alpha1.AttestationData { - if m != nil { - return m.Data - } - return nil -} - -func (m *PendingAttestation) GetInclusionDelay() uint64 { - if m != nil { - return m.InclusionDelay - } - return 0 -} - -func (m *PendingAttestation) GetProposerIndex() uint64 { - if m != nil { - return m.ProposerIndex - } - return 0 -} - -type ValidatorLatestVote struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - Root []byte `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorLatestVote) Reset() { *m = ValidatorLatestVote{} } -func (m *ValidatorLatestVote) String() string { return proto.CompactTextString(m) } -func (*ValidatorLatestVote) ProtoMessage() {} -func (*ValidatorLatestVote) Descriptor() ([]byte, []int) { - return fileDescriptor_e719e7d82cfa7b0d, []int{3} -} -func (m *ValidatorLatestVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorLatestVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorLatestVote.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 *ValidatorLatestVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorLatestVote.Merge(m, src) -} -func (m *ValidatorLatestVote) XXX_Size() int { - return m.Size() -} -func (m *ValidatorLatestVote) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorLatestVote.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorLatestVote proto.InternalMessageInfo - -func (m *ValidatorLatestVote) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *ValidatorLatestVote) GetRoot() []byte { - if m != nil { - return m.Root - } - return nil -} - -type HistoricalBatch struct { - BlockRoots [][]byte `protobuf:"bytes,1,rep,name=block_roots,json=blockRoots,proto3" json:"block_roots,omitempty" ssz-size:"8192,32"` - StateRoots [][]byte `protobuf:"bytes,2,rep,name=state_roots,json=stateRoots,proto3" json:"state_roots,omitempty" ssz-size:"8192,32"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HistoricalBatch) Reset() { *m = HistoricalBatch{} } -func (m *HistoricalBatch) String() string { return proto.CompactTextString(m) } -func (*HistoricalBatch) ProtoMessage() {} -func (*HistoricalBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_e719e7d82cfa7b0d, []int{4} -} -func (m *HistoricalBatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HistoricalBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HistoricalBatch.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 *HistoricalBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistoricalBatch.Merge(m, src) -} -func (m *HistoricalBatch) XXX_Size() int { - return m.Size() -} -func (m *HistoricalBatch) XXX_DiscardUnknown() { - xxx_messageInfo_HistoricalBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_HistoricalBatch proto.InternalMessageInfo - -func (m *HistoricalBatch) GetBlockRoots() [][]byte { - if m != nil { - return m.BlockRoots - } - return nil -} - -func (m *HistoricalBatch) GetStateRoots() [][]byte { - if m != nil { - return m.StateRoots - } - return nil -} - -type StateSummary struct { - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - Root []byte `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StateSummary) Reset() { *m = StateSummary{} } -func (m *StateSummary) String() string { return proto.CompactTextString(m) } -func (*StateSummary) ProtoMessage() {} -func (*StateSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_e719e7d82cfa7b0d, []int{5} -} -func (m *StateSummary) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StateSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StateSummary.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 *StateSummary) XXX_Merge(src proto.Message) { - xxx_messageInfo_StateSummary.Merge(m, src) -} -func (m *StateSummary) XXX_Size() int { - return m.Size() -} -func (m *StateSummary) XXX_DiscardUnknown() { - xxx_messageInfo_StateSummary.DiscardUnknown(m) -} - -var xxx_messageInfo_StateSummary proto.InternalMessageInfo - -func (m *StateSummary) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -func (m *StateSummary) GetRoot() []byte { - if m != nil { - return m.Root - } - return nil -} - -type SigningRoot struct { - ObjectRoot []byte `protobuf:"bytes,1,opt,name=object_root,json=objectRoot,proto3" json:"object_root,omitempty" ssz-size:"32"` - Domain []byte `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty" ssz-size:"32"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SigningRoot) Reset() { *m = SigningRoot{} } -func (m *SigningRoot) String() string { return proto.CompactTextString(m) } -func (*SigningRoot) ProtoMessage() {} -func (*SigningRoot) Descriptor() ([]byte, []int) { - return fileDescriptor_e719e7d82cfa7b0d, []int{6} -} -func (m *SigningRoot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SigningRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SigningRoot.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 *SigningRoot) XXX_Merge(src proto.Message) { - xxx_messageInfo_SigningRoot.Merge(m, src) -} -func (m *SigningRoot) XXX_Size() int { - return m.Size() -} -func (m *SigningRoot) XXX_DiscardUnknown() { - xxx_messageInfo_SigningRoot.DiscardUnknown(m) -} - -var xxx_messageInfo_SigningRoot proto.InternalMessageInfo - -func (m *SigningRoot) GetObjectRoot() []byte { - if m != nil { - return m.ObjectRoot - } - return nil -} - -func (m *SigningRoot) GetDomain() []byte { - if m != nil { - return m.Domain - } - return nil -} - -type ForkData struct { - CurrentVersion []byte `protobuf:"bytes,4,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty" ssz-size:"4"` - GenesisValidatorsRoot []byte `protobuf:"bytes,2,opt,name=genesis_validators_root,json=genesisValidatorsRoot,proto3" json:"genesis_validators_root,omitempty" ssz-size:"32"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -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_e719e7d82cfa7b0d, []int{7} -} -func (m *ForkData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForkData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ForkData.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 *ForkData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForkData.Merge(m, src) -} -func (m *ForkData) XXX_Size() int { - return m.Size() -} -func (m *ForkData) XXX_DiscardUnknown() { - xxx_messageInfo_ForkData.DiscardUnknown(m) -} - -var xxx_messageInfo_ForkData proto.InternalMessageInfo - -func (m *ForkData) GetCurrentVersion() []byte { - if m != nil { - return m.CurrentVersion - } - return nil -} - -func (m *ForkData) GetGenesisValidatorsRoot() []byte { - if m != nil { - return m.GenesisValidatorsRoot - } - return nil -} - -type SignedAggregateAndProof struct { - Message *v1alpha1.AggregateAttestationAndProof `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SignedAggregateAndProof) Reset() { *m = SignedAggregateAndProof{} } -func (m *SignedAggregateAndProof) String() string { return proto.CompactTextString(m) } -func (*SignedAggregateAndProof) ProtoMessage() {} -func (*SignedAggregateAndProof) Descriptor() ([]byte, []int) { - return fileDescriptor_e719e7d82cfa7b0d, []int{8} -} -func (m *SignedAggregateAndProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedAggregateAndProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedAggregateAndProof.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 *SignedAggregateAndProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedAggregateAndProof.Merge(m, src) -} -func (m *SignedAggregateAndProof) XXX_Size() int { - return m.Size() -} -func (m *SignedAggregateAndProof) XXX_DiscardUnknown() { - xxx_messageInfo_SignedAggregateAndProof.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedAggregateAndProof proto.InternalMessageInfo - -func (m *SignedAggregateAndProof) GetMessage() *v1alpha1.AggregateAttestationAndProof { - if m != nil { - return m.Message - } - return nil -} - -func (m *SignedAggregateAndProof) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func init() { - proto.RegisterType((*BeaconState)(nil), "ethereum.beacon.p2p.v1.BeaconState") - proto.RegisterType((*Fork)(nil), "ethereum.beacon.p2p.v1.Fork") - proto.RegisterType((*PendingAttestation)(nil), "ethereum.beacon.p2p.v1.PendingAttestation") - proto.RegisterType((*ValidatorLatestVote)(nil), "ethereum.beacon.p2p.v1.ValidatorLatestVote") - proto.RegisterType((*HistoricalBatch)(nil), "ethereum.beacon.p2p.v1.HistoricalBatch") - proto.RegisterType((*StateSummary)(nil), "ethereum.beacon.p2p.v1.StateSummary") - proto.RegisterType((*SigningRoot)(nil), "ethereum.beacon.p2p.v1.SigningRoot") - proto.RegisterType((*ForkData)(nil), "ethereum.beacon.p2p.v1.ForkData") - proto.RegisterType((*SignedAggregateAndProof)(nil), "ethereum.beacon.p2p.v1.SignedAggregateAndProof") -} - -func init() { proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_e719e7d82cfa7b0d) } - -var fileDescriptor_e719e7d82cfa7b0d = []byte{ - // 1243 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x8f, 0xdb, 0xc4, - 0x1b, 0x96, 0xb7, 0xf9, 0xf5, 0x63, 0x92, 0x6e, 0xb6, 0xb3, 0xfd, 0x35, 0xa6, 0x2d, 0xeb, 0xc5, - 0x12, 0x6d, 0x41, 0xdd, 0xa4, 0xf6, 0x6e, 0x93, 0xdd, 0x56, 0xb4, 0x6a, 0xda, 0xa2, 0xb6, 0xa2, - 0x52, 0xe5, 0x42, 0x25, 0x24, 0x84, 0x35, 0xb1, 0x27, 0xf6, 0x74, 0x6d, 0x8f, 0xe5, 0x99, 0x44, - 0xdd, 0x4a, 0x88, 0x03, 0x27, 0x4e, 0x70, 0xe0, 0xc2, 0x11, 0xfe, 0x0b, 0xe0, 0xc4, 0xc7, 0x81, - 0x23, 0x5f, 0x97, 0x72, 0x88, 0xd0, 0xde, 0xf8, 0xb8, 0x90, 0x23, 0x27, 0x34, 0xe3, 0xaf, 0x84, - 0x26, 0x10, 0x24, 0x6e, 0x9e, 0x99, 0xe7, 0x79, 0xde, 0x77, 0xde, 0xf7, 0xf5, 0x3b, 0x2f, 0xd0, - 0xe2, 0x84, 0x72, 0xda, 0xea, 0x61, 0xe4, 0xd0, 0xa8, 0x15, 0x9b, 0x71, 0x6b, 0x68, 0xb4, 0xf8, - 0x5e, 0x8c, 0x59, 0x53, 0x9e, 0xc0, 0x13, 0x98, 0xfb, 0x38, 0xc1, 0x83, 0xb0, 0x99, 0x62, 0x9a, - 0xb1, 0x19, 0x37, 0x87, 0xc6, 0xc9, 0x35, 0xcc, 0xfd, 0xd6, 0xd0, 0x40, 0x41, 0xec, 0x23, 0xa3, - 0x85, 0x38, 0xc7, 0x8c, 0x23, 0x4e, 0x04, 0x40, 0xf0, 0x4e, 0x6a, 0x53, 0xe7, 0x29, 0xd7, 0xee, - 0x05, 0xd4, 0xd9, 0xcd, 0x00, 0xa7, 0xa7, 0x00, 0x43, 0x14, 0x10, 0x17, 0x71, 0x9a, 0x64, 0xa7, - 0x1b, 0x1e, 0xe1, 0xfe, 0xa0, 0xd7, 0x74, 0x68, 0xd8, 0xf2, 0xa8, 0x47, 0x5b, 0x72, 0xbb, 0x37, - 0xe8, 0xcb, 0x55, 0xea, 0xb4, 0xf8, 0x4a, 0xe1, 0xfa, 0x93, 0x1a, 0xa8, 0x76, 0xa5, 0x8d, 0xfb, - 0x1c, 0x71, 0x0c, 0x75, 0x50, 0xf3, 0x70, 0x84, 0x19, 0x61, 0x36, 0x27, 0x21, 0x56, 0x7f, 0x3e, - 0xb4, 0xae, 0x9c, 0xab, 0x58, 0xd5, 0x6c, 0xf3, 0x55, 0x12, 0x62, 0x78, 0x07, 0x34, 0x72, 0x4c, - 0x61, 0x9d, 0xd9, 0x09, 0xa5, 0x5c, 0xfd, 0x45, 0xc0, 0x6b, 0xdd, 0x63, 0xe3, 0x91, 0x76, 0x94, - 0xb1, 0xc7, 0x1b, 0x8c, 0x3c, 0xc6, 0x97, 0xf4, 0x4d, 0x53, 0xb7, 0xfe, 0x9f, 0x51, 0x1e, 0x14, - 0x0c, 0x8b, 0x52, 0x0e, 0x57, 0x41, 0x85, 0x05, 0x94, 0xab, 0xbf, 0xa6, 0x76, 0xe4, 0x02, 0x1a, - 0xa0, 0xd2, 0xa7, 0xc9, 0xae, 0xfa, 0x9b, 0xd8, 0xac, 0x9a, 0xa7, 0x9b, 0xb3, 0x43, 0xd9, 0x7c, - 0x99, 0x26, 0xbb, 0x96, 0x84, 0xc2, 0xd7, 0xc1, 0x6a, 0x80, 0x44, 0x28, 0xd3, 0x50, 0xd9, 0x3e, - 0x46, 0x2e, 0x4e, 0xd4, 0x6f, 0xeb, 0x52, 0xe1, 0x5c, 0xa9, 0x80, 0xb9, 0xdf, 0xcc, 0x83, 0xd7, - 0x4c, 0x6f, 0xde, 0x15, 0x8c, 0x5b, 0x92, 0x60, 0x1d, 0x4b, 0x55, 0x26, 0xb6, 0xe0, 0x36, 0xa8, - 0xa6, 0x9a, 0xe2, 0x86, 0x4c, 0xfd, 0xae, 0xbe, 0x7e, 0xe0, 0x5c, 0xad, 0x7b, 0x62, 0x3c, 0xd2, - 0x60, 0x79, 0xc5, 0x6d, 0x63, 0xc7, 0x3c, 0x2f, 0xee, 0x09, 0x24, 0x56, 0xdc, 0x8d, 0x09, 0xa6, - 0xc8, 0x2d, 0xce, 0x98, 0xdf, 0xff, 0x03, 0x53, 0x62, 0x53, 0xa6, 0x05, 0x56, 0x7c, 0xc2, 0x38, - 0x4d, 0x88, 0x83, 0x82, 0x8c, 0xfe, 0x43, 0x4a, 0x3f, 0x33, 0x1e, 0x69, 0x7a, 0x49, 0xbf, 0x2a, - 0xb8, 0xeb, 0x62, 0x1d, 0xa2, 0x47, 0x97, 0x74, 0xa3, 0xdd, 0xe9, 0x74, 0x4c, 0xa3, 0xad, 0x5b, - 0xf5, 0x52, 0x20, 0xd5, 0x7c, 0x09, 0x1c, 0xc1, 0xdc, 0x37, 0x6c, 0x17, 0x71, 0xa4, 0x7e, 0xd2, - 0x90, 0x81, 0xd1, 0xe6, 0x04, 0xe6, 0x26, 0xf7, 0x8d, 0x1b, 0x88, 0x23, 0xeb, 0x30, 0xce, 0xbe, - 0xe0, 0x1b, 0xa0, 0x5e, 0xd0, 0xed, 0x21, 0xe5, 0x98, 0xa9, 0x9f, 0x36, 0xd6, 0x0f, 0x2c, 0x20, - 0xd2, 0x85, 0xe3, 0x91, 0xb6, 0x5c, 0xba, 0x78, 0xc1, 0xdc, 0xd2, 0xad, 0xa3, 0xb9, 0xf0, 0x03, - 0x21, 0x05, 0x37, 0x00, 0x4c, 0xd5, 0x71, 0x4c, 0x19, 0xe1, 0x36, 0x89, 0x5c, 0xfc, 0x48, 0xfd, - 0xac, 0x21, 0xab, 0x62, 0x45, 0x62, 0xd3, 0x93, 0xdb, 0xe2, 0x00, 0xbe, 0x09, 0x40, 0x59, 0x7a, - 0xea, 0x47, 0x9a, 0xf4, 0x63, 0x7d, 0x8e, 0x1f, 0x45, 0xc9, 0x75, 0x4f, 0x8d, 0x47, 0x5a, 0x63, - 0xc2, 0x91, 0x9d, 0x9d, 0x8b, 0x86, 0xd1, 0x36, 0x3b, 0x9d, 0x4e, 0x5b, 0xb7, 0x26, 0x14, 0xe1, - 0x36, 0x38, 0xdc, 0x43, 0x01, 0x8a, 0x1c, 0xcc, 0xd4, 0x8f, 0x85, 0x7a, 0xe5, 0xef, 0xb9, 0x05, - 0x1a, 0x5e, 0x06, 0xb5, 0x04, 0x45, 0x2e, 0xa2, 0x76, 0x48, 0x1e, 0x61, 0xa6, 0xbe, 0x7b, 0x56, - 0x66, 0xad, 0x31, 0x1e, 0x69, 0xab, 0x65, 0xd6, 0xda, 0x17, 0x2f, 0x6e, 0xb6, 0x65, 0xd6, 0xab, - 0x29, 0xfa, 0xae, 0x00, 0x43, 0x13, 0x1c, 0x61, 0x01, 0x62, 0x3e, 0x89, 0x3c, 0xa6, 0xfe, 0xde, - 0x94, 0x76, 0x57, 0xc7, 0x23, 0xad, 0x3e, 0x5d, 0x2e, 0xba, 0x55, 0xc2, 0xe0, 0xdb, 0xe0, 0x54, - 0x9c, 0xe0, 0x21, 0xa1, 0x03, 0x66, 0xe3, 0x98, 0x3a, 0xbe, 0x3d, 0xd1, 0x53, 0x98, 0xfa, 0xa4, - 0x2d, 0x63, 0xf3, 0xe2, 0xbc, 0x7f, 0xe8, 0x1e, 0x8e, 0x5c, 0x12, 0x79, 0xd7, 0x4a, 0xce, 0x5f, - 0xd2, 0xb5, 0x75, 0x61, 0xa7, 0xad, 0x5b, 0xcf, 0xe4, 0x36, 0x6e, 0x0a, 0x13, 0x13, 0x68, 0x06, - 0xdf, 0x02, 0x27, 0x9d, 0x41, 0x92, 0xe0, 0x88, 0xcf, 0xb2, 0xff, 0xe3, 0x7f, 0x63, 0x5f, 0xcd, - 0x4c, 0x3c, 0x6d, 0x9e, 0x01, 0xf8, 0x70, 0xc0, 0x38, 0xe9, 0x13, 0x47, 0xee, 0xd8, 0x3d, 0xc2, - 0x99, 0xfa, 0xf9, 0x15, 0xd9, 0x88, 0xae, 0x8f, 0x47, 0x5a, 0xad, 0x0c, 0x9e, 0xa1, 0xff, 0x31, - 0xd2, 0x5a, 0x13, 0x1d, 0x32, 0x4e, 0xf6, 0x58, 0x88, 0x38, 0x71, 0x02, 0xd4, 0x63, 0x2d, 0x8f, - 0x6e, 0xf4, 0x08, 0xef, 0x13, 0x1c, 0xb8, 0xcd, 0x2e, 0xe1, 0x43, 0xec, 0x70, 0x9a, 0x6c, 0x59, - 0xc7, 0xa6, 0xf4, 0xbb, 0x84, 0x33, 0xd8, 0x07, 0xcf, 0x16, 0x41, 0xcf, 0x4e, 0xb1, 0x6b, 0x3b, - 0x3e, 0x76, 0x76, 0x63, 0x4a, 0x22, 0xae, 0x7e, 0x71, 0x45, 0xfe, 0x5f, 0xcf, 0xcd, 0x29, 0xc9, - 0xeb, 0x05, 0xd2, 0x2a, 0xb2, 0x77, 0x27, 0xd7, 0x29, 0x0f, 0xa1, 0x0b, 0x4e, 0xe7, 0xb1, 0x9d, - 0x69, 0xe6, 0xcb, 0x85, 0xcd, 0xe4, 0x39, 0x9a, 0x65, 0xe5, 0x35, 0x70, 0xbc, 0x4f, 0x22, 0x14, - 0x90, 0xc7, 0xd3, 0xea, 0x5f, 0x2d, 0xac, 0xbe, 0x5a, 0xf0, 0xcb, 0x4d, 0xfd, 0x03, 0x05, 0x54, - 0x44, 0x8b, 0x86, 0x97, 0xc1, 0x4a, 0x11, 0xad, 0x21, 0x4e, 0x18, 0xa1, 0x91, 0xaa, 0xc8, 0xfc, - 0xac, 0x4c, 0xe7, 0x67, 0x4b, 0xb7, 0xea, 0x39, 0xf2, 0x41, 0x0a, 0x84, 0x3b, 0xa0, 0x9e, 0x87, - 0x20, 0xe7, 0x2e, 0xcd, 0xe1, 0x2e, 0x67, 0xc0, 0x9c, 0x7a, 0x1c, 0xfc, 0x4f, 0x56, 0xa4, 0x7a, - 0x40, 0xb6, 0x91, 0x74, 0xa1, 0xbf, 0xb7, 0x04, 0xe0, 0xd3, 0x55, 0x07, 0x43, 0xb0, 0x82, 0x3c, - 0x2f, 0xc1, 0xde, 0x44, 0x15, 0xa5, 0x4e, 0x76, 0xa7, 0xea, 0xd1, 0xbc, 0xb0, 0xb5, 0x2d, 0xca, - 0xe8, 0xfc, 0xa2, 0x65, 0x14, 0x10, 0xc6, 0xad, 0xfa, 0x84, 0xb6, 0xac, 0xa0, 0x4b, 0xa0, 0x22, - 0x1b, 0xf1, 0x92, 0x0c, 0xf1, 0x99, 0x39, 0x21, 0x9e, 0x70, 0x50, 0xb6, 0x63, 0xc9, 0x81, 0x67, - 0x41, 0x9d, 0x44, 0x4e, 0x30, 0x10, 0x97, 0xb4, 0x5d, 0x1c, 0xa0, 0xbd, 0xec, 0x86, 0xcb, 0xc5, - 0xf6, 0x0d, 0xb1, 0x0b, 0x9f, 0x07, 0xcb, 0x71, 0x42, 0x63, 0xca, 0x70, 0x92, 0x75, 0xd4, 0x8a, - 0xc4, 0x1d, 0xcd, 0x77, 0x65, 0x37, 0xd5, 0xaf, 0x82, 0xd5, 0xa2, 0x47, 0xbe, 0x22, 0xdf, 0x3f, - 0xd1, 0x94, 0xcb, 0xf0, 0x29, 0x13, 0xe1, 0x83, 0x10, 0x54, 0xe4, 0x53, 0x2f, 0x93, 0x60, 0xc9, - 0x6f, 0xfd, 0x1d, 0x05, 0xd4, 0x6f, 0x15, 0xcf, 0x4d, 0x17, 0x71, 0xc7, 0x87, 0x9d, 0xe9, 0x67, - 0x53, 0x59, 0xf8, 0xd5, 0xec, 0x4c, 0xbf, 0x9a, 0x4b, 0x8b, 0x3e, 0x9a, 0x7a, 0x1b, 0xd4, 0xe4, - 0x10, 0x73, 0x7f, 0x10, 0x86, 0x28, 0xd9, 0x13, 0x9e, 0xca, 0xd9, 0x42, 0x99, 0x18, 0x2d, 0x66, - 0x79, 0x1f, 0x80, 0xea, 0x7d, 0xe2, 0x45, 0x24, 0xf2, 0xe4, 0x48, 0x62, 0x82, 0x2a, 0xed, 0x3d, - 0xc4, 0x0e, 0x4f, 0x47, 0x1a, 0x65, 0xde, 0x44, 0x03, 0x52, 0x94, 0xe4, 0xbc, 0x00, 0x0e, 0xba, - 0x34, 0x44, 0x24, 0xaf, 0xcd, 0x19, 0xf0, 0x0c, 0xa0, 0xbf, 0xaf, 0x80, 0xc3, 0xe2, 0xaf, 0x90, - 0x8f, 0xea, 0x8c, 0xe2, 0xae, 0x2c, 0x58, 0xdc, 0xb7, 0xe7, 0x4f, 0x61, 0x4b, 0xff, 0x6e, 0x08, - 0xd3, 0x3f, 0x54, 0x40, 0x43, 0x44, 0x00, 0xbb, 0xd7, 0xb2, 0x2a, 0xc5, 0xd7, 0x22, 0xf7, 0x5e, - 0x42, 0x69, 0x1f, 0xde, 0x05, 0x87, 0x42, 0xcc, 0x18, 0xf2, 0xb0, 0x8c, 0x44, 0xd5, 0xdc, 0x9c, - 0x57, 0xaa, 0x05, 0xb5, 0xac, 0xd9, 0x5c, 0xc5, 0xca, 0x35, 0x60, 0x0b, 0x1c, 0x61, 0xc4, 0x8b, - 0x10, 0x1f, 0x24, 0x78, 0xb6, 0x9f, 0xa2, 0xdb, 0x97, 0x98, 0x6e, 0xed, 0xeb, 0xfd, 0x35, 0xe5, - 0x9b, 0xfd, 0x35, 0xe5, 0xa7, 0xfd, 0x35, 0xa5, 0x77, 0x50, 0x4e, 0xad, 0x9b, 0x7f, 0x06, 0x00, - 0x00, 0xff, 0xff, 0x5d, 0x05, 0xc0, 0x7f, 0x7e, 0x0b, 0x00, 0x00, -} - -func (m *BeaconState) 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 *BeaconState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BeaconState) 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 m.FinalizedCheckpoint != nil { - { - size, err := m.FinalizedCheckpoint.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xf4 - i-- - dAtA[i] = 0xa2 - } - if m.CurrentJustifiedCheckpoint != nil { - { - size, err := m.CurrentJustifiedCheckpoint.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xf4 - i-- - dAtA[i] = 0x9a - } - if m.PreviousJustifiedCheckpoint != nil { - { - size, err := m.PreviousJustifiedCheckpoint.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xf4 - i-- - dAtA[i] = 0x92 - } - if len(m.JustificationBits) > 0 { - i -= len(m.JustificationBits) - copy(dAtA[i:], m.JustificationBits) - i = encodeVarintTypes(dAtA, i, uint64(len(m.JustificationBits))) - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xf4 - i-- - dAtA[i] = 0x8a - } - if len(m.CurrentEpochAttestations) > 0 { - for iNdEx := len(m.CurrentEpochAttestations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CurrentEpochAttestations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xb5 - i-- - dAtA[i] = 0xd2 - } - } - if len(m.PreviousEpochAttestations) > 0 { - for iNdEx := len(m.PreviousEpochAttestations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PreviousEpochAttestations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xb5 - i-- - dAtA[i] = 0xca - } - } - if len(m.Slashings) > 0 { - dAtA5 := make([]byte, len(m.Slashings)*10) - var j4 int - for _, num := range m.Slashings { - for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j4++ - } - dAtA5[j4] = uint8(num) - j4++ - } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintTypes(dAtA, i, uint64(j4)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xf7 - i-- - dAtA[i] = 0x8a - } - if len(m.RandaoMixes) > 0 { - for iNdEx := len(m.RandaoMixes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RandaoMixes[iNdEx]) - copy(dAtA[i:], m.RandaoMixes[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.RandaoMixes[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xb8 - i-- - dAtA[i] = 0xca - } - } - if len(m.Balances) > 0 { - dAtA7 := make([]byte, len(m.Balances)*10) - var j6 int - for _, num := range m.Balances { - for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j6++ - } - dAtA7[j6] = uint8(num) - j6++ - } - i -= j6 - copy(dAtA[i:], dAtA7[:j6]) - i = encodeVarintTypes(dAtA, i, uint64(j6)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - i-- - dAtA[i] = 0x92 - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - i-- - dAtA[i] = 0x8a - } - } - if m.Eth1DepositIndex != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Eth1DepositIndex)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xbb - i-- - dAtA[i] = 0xd8 - } - if len(m.Eth1DataVotes) > 0 { - for iNdEx := len(m.Eth1DataVotes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Eth1DataVotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xbb - i-- - dAtA[i] = 0xd2 - } - } - if m.Eth1Data != nil { - { - size, err := m.Eth1Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xbb - i-- - dAtA[i] = 0xca - } - if len(m.HistoricalRoots) > 0 { - for iNdEx := len(m.HistoricalRoots) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.HistoricalRoots[iNdEx]) - copy(dAtA[i:], m.HistoricalRoots[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.HistoricalRoots[iNdEx]))) - i-- - dAtA[i] = 0x7d - i-- - dAtA[i] = 0xa2 - } - } - if len(m.StateRoots) > 0 { - for iNdEx := len(m.StateRoots) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.StateRoots[iNdEx]) - copy(dAtA[i:], m.StateRoots[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.StateRoots[iNdEx]))) - i-- - dAtA[i] = 0x7d - i-- - dAtA[i] = 0x9a - } - } - if len(m.BlockRoots) > 0 { - for iNdEx := len(m.BlockRoots) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.BlockRoots[iNdEx]) - copy(dAtA[i:], m.BlockRoots[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BlockRoots[iNdEx]))) - i-- - dAtA[i] = 0x7d - i-- - dAtA[i] = 0x92 - } - } - if m.LatestBlockHeader != nil { - { - size, err := m.LatestBlockHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7d - i-- - dAtA[i] = 0x8a - } - if m.Fork != nil { - { - size, err := m.Fork.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xe2 - } - if m.Slot != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Slot)) - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xd8 - } - if len(m.GenesisValidatorsRoot) > 0 { - i -= len(m.GenesisValidatorsRoot) - copy(dAtA[i:], m.GenesisValidatorsRoot) - i = encodeVarintTypes(dAtA, i, uint64(len(m.GenesisValidatorsRoot))) - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xd2 - } - if m.GenesisTime != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GenesisTime)) - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc8 - } - return len(dAtA) - i, nil -} - -func (m *Fork) 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 *Fork) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Fork) 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 m.Epoch != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Epoch)) - i-- - dAtA[i] = 0x18 - } - if len(m.CurrentVersion) > 0 { - i -= len(m.CurrentVersion) - copy(dAtA[i:], m.CurrentVersion) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CurrentVersion))) - i-- - dAtA[i] = 0x12 - } - if len(m.PreviousVersion) > 0 { - i -= len(m.PreviousVersion) - copy(dAtA[i:], m.PreviousVersion) - i = encodeVarintTypes(dAtA, i, uint64(len(m.PreviousVersion))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PendingAttestation) 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 *PendingAttestation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PendingAttestation) 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 m.ProposerIndex != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ProposerIndex)) - i-- - dAtA[i] = 0x20 - } - if m.InclusionDelay != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.InclusionDelay)) - i-- - dAtA[i] = 0x18 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.AggregationBits) > 0 { - i -= len(m.AggregationBits) - copy(dAtA[i:], m.AggregationBits) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AggregationBits))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorLatestVote) 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 *ValidatorLatestVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorLatestVote) 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 = encodeVarintTypes(dAtA, i, uint64(len(m.Root))) - i-- - dAtA[i] = 0x12 - } - if m.Epoch != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Epoch)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *HistoricalBatch) 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 *HistoricalBatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistoricalBatch) 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.StateRoots) > 0 { - for iNdEx := len(m.StateRoots) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.StateRoots[iNdEx]) - copy(dAtA[i:], m.StateRoots[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.StateRoots[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.BlockRoots) > 0 { - for iNdEx := len(m.BlockRoots) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.BlockRoots[iNdEx]) - copy(dAtA[i:], m.BlockRoots[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BlockRoots[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *StateSummary) 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 *StateSummary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StateSummary) 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 = encodeVarintTypes(dAtA, i, uint64(len(m.Root))) - i-- - dAtA[i] = 0x12 - } - if m.Slot != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Slot)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SigningRoot) 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 *SigningRoot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SigningRoot) 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.Domain) > 0 { - i -= len(m.Domain) - copy(dAtA[i:], m.Domain) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Domain))) - i-- - dAtA[i] = 0x12 - } - if len(m.ObjectRoot) > 0 { - i -= len(m.ObjectRoot) - copy(dAtA[i:], m.ObjectRoot) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ObjectRoot))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ForkData) 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 *ForkData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ForkData) 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.CurrentVersion) > 0 { - i -= len(m.CurrentVersion) - copy(dAtA[i:], m.CurrentVersion) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CurrentVersion))) - i-- - dAtA[i] = 0x22 - } - if len(m.GenesisValidatorsRoot) > 0 { - i -= len(m.GenesisValidatorsRoot) - copy(dAtA[i:], m.GenesisValidatorsRoot) - i = encodeVarintTypes(dAtA, i, uint64(len(m.GenesisValidatorsRoot))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *SignedAggregateAndProof) 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 *SignedAggregateAndProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedAggregateAndProof) 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.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if m.Message != nil { - { - size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BeaconState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GenesisTime != 0 { - n += 2 + sovTypes(uint64(m.GenesisTime)) - } - l = len(m.GenesisValidatorsRoot) - if l > 0 { - n += 2 + l + sovTypes(uint64(l)) - } - if m.Slot != 0 { - n += 2 + sovTypes(uint64(m.Slot)) - } - if m.Fork != nil { - l = m.Fork.Size() - n += 2 + l + sovTypes(uint64(l)) - } - if m.LatestBlockHeader != nil { - l = m.LatestBlockHeader.Size() - n += 2 + l + sovTypes(uint64(l)) - } - if len(m.BlockRoots) > 0 { - for _, b := range m.BlockRoots { - l = len(b) - n += 2 + l + sovTypes(uint64(l)) - } - } - if len(m.StateRoots) > 0 { - for _, b := range m.StateRoots { - l = len(b) - n += 2 + l + sovTypes(uint64(l)) - } - } - if len(m.HistoricalRoots) > 0 { - for _, b := range m.HistoricalRoots { - l = len(b) - n += 2 + l + sovTypes(uint64(l)) - } - } - if m.Eth1Data != nil { - l = m.Eth1Data.Size() - n += 3 + l + sovTypes(uint64(l)) - } - if len(m.Eth1DataVotes) > 0 { - for _, e := range m.Eth1DataVotes { - l = e.Size() - n += 3 + l + sovTypes(uint64(l)) - } - } - if m.Eth1DepositIndex != 0 { - n += 3 + sovTypes(uint64(m.Eth1DepositIndex)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 3 + l + sovTypes(uint64(l)) - } - } - if len(m.Balances) > 0 { - l = 0 - for _, e := range m.Balances { - l += sovTypes(uint64(e)) - } - n += 3 + sovTypes(uint64(l)) + l - } - if len(m.RandaoMixes) > 0 { - for _, b := range m.RandaoMixes { - l = len(b) - n += 3 + l + sovTypes(uint64(l)) - } - } - if len(m.Slashings) > 0 { - l = 0 - for _, e := range m.Slashings { - l += sovTypes(uint64(e)) - } - n += 3 + sovTypes(uint64(l)) + l - } - if len(m.PreviousEpochAttestations) > 0 { - for _, e := range m.PreviousEpochAttestations { - l = e.Size() - n += 3 + l + sovTypes(uint64(l)) - } - } - if len(m.CurrentEpochAttestations) > 0 { - for _, e := range m.CurrentEpochAttestations { - l = e.Size() - n += 3 + l + sovTypes(uint64(l)) - } - } - l = len(m.JustificationBits) - if l > 0 { - n += 3 + l + sovTypes(uint64(l)) - } - if m.PreviousJustifiedCheckpoint != nil { - l = m.PreviousJustifiedCheckpoint.Size() - n += 3 + l + sovTypes(uint64(l)) - } - if m.CurrentJustifiedCheckpoint != nil { - l = m.CurrentJustifiedCheckpoint.Size() - n += 3 + l + sovTypes(uint64(l)) - } - if m.FinalizedCheckpoint != nil { - l = m.FinalizedCheckpoint.Size() - n += 3 + l + sovTypes(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Fork) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PreviousVersion) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CurrentVersion) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Epoch != 0 { - n += 1 + sovTypes(uint64(m.Epoch)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PendingAttestation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AggregationBits) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.InclusionDelay != 0 { - n += 1 + sovTypes(uint64(m.InclusionDelay)) - } - if m.ProposerIndex != 0 { - n += 1 + sovTypes(uint64(m.ProposerIndex)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ValidatorLatestVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != 0 { - n += 1 + sovTypes(uint64(m.Epoch)) - } - l = len(m.Root) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HistoricalBatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.BlockRoots) > 0 { - for _, b := range m.BlockRoots { - l = len(b) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.StateRoots) > 0 { - for _, b := range m.StateRoots { - l = len(b) - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StateSummary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Slot != 0 { - n += 1 + sovTypes(uint64(m.Slot)) - } - l = len(m.Root) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SigningRoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ObjectRoot) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Domain) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ForkData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.GenesisValidatorsRoot) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CurrentVersion) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SignedAggregateAndProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Message != nil { - l = m.Message.Size() - n += 1 + l + sovTypes(uint64(l)) - } - 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) { - return (math_bits.Len64(x|1) + 6) / 7 -} -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 1001: - 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 1002: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisValidatorsRoot", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GenesisValidatorsRoot = append(m.GenesisValidatorsRoot[:0], dAtA[iNdEx:postIndex]...) - if m.GenesisValidatorsRoot == nil { - m.GenesisValidatorsRoot = []byte{} - } - iNdEx = postIndex - case 1003: - 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 1004: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fork", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fork == nil { - m.Fork = &Fork{} - } - if err := m.Fork.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockHeader", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LatestBlockHeader == nil { - m.LatestBlockHeader = &v1alpha1.BeaconBlockHeader{} - } - if err := m.LatestBlockHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2002: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockRoots", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockRoots = append(m.BlockRoots, make([]byte, postIndex-iNdEx)) - copy(m.BlockRoots[len(m.BlockRoots)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2003: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateRoots", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StateRoots = append(m.StateRoots, make([]byte, postIndex-iNdEx)) - copy(m.StateRoots[len(m.StateRoots)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2004: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HistoricalRoots", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HistoricalRoots = append(m.HistoricalRoots, make([]byte, postIndex-iNdEx)) - copy(m.HistoricalRoots[len(m.HistoricalRoots)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Eth1Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Eth1Data == nil { - m.Eth1Data = &v1alpha1.Eth1Data{} - } - if err := m.Eth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3002: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Eth1DataVotes", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Eth1DataVotes = append(m.Eth1DataVotes, &v1alpha1.Eth1Data{}) - if err := m.Eth1DataVotes[len(m.Eth1DataVotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3003: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Eth1DepositIndex", wireType) - } - m.Eth1DepositIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Eth1DepositIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &v1alpha1.Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4002: - 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.Balances = append(m.Balances, 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Balances) == 0 { - m.Balances = make([]uint64, 0, elementCount) - } - 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.Balances = append(m.Balances, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) - } - case 5001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RandaoMixes", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RandaoMixes = append(m.RandaoMixes, make([]byte, postIndex-iNdEx)) - copy(m.RandaoMixes[len(m.RandaoMixes)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6001: - 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.Slashings = append(m.Slashings, 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Slashings) == 0 { - m.Slashings = make([]uint64, 0, elementCount) - } - 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.Slashings = append(m.Slashings, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Slashings", wireType) - } - case 7001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousEpochAttestations", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreviousEpochAttestations = append(m.PreviousEpochAttestations, &PendingAttestation{}) - if err := m.PreviousEpochAttestations[len(m.PreviousEpochAttestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7002: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochAttestations", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CurrentEpochAttestations = append(m.CurrentEpochAttestations, &PendingAttestation{}) - if err := m.CurrentEpochAttestations[len(m.CurrentEpochAttestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JustificationBits", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JustificationBits = append(m.JustificationBits[:0], dAtA[iNdEx:postIndex]...) - if m.JustificationBits == nil { - m.JustificationBits = []byte{} - } - iNdEx = postIndex - case 8002: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousJustifiedCheckpoint", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PreviousJustifiedCheckpoint == nil { - m.PreviousJustifiedCheckpoint = &v1alpha1.Checkpoint{} - } - if err := m.PreviousJustifiedCheckpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8003: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentJustifiedCheckpoint", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CurrentJustifiedCheckpoint == nil { - m.CurrentJustifiedCheckpoint = &v1alpha1.Checkpoint{} - } - if err := m.CurrentJustifiedCheckpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8004: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FinalizedCheckpoint", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FinalizedCheckpoint == nil { - m.FinalizedCheckpoint = &v1alpha1.Checkpoint{} - } - if err := m.FinalizedCheckpoint.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) < 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 *Fork) 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: Fork: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Fork: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousVersion", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreviousVersion = append(m.PreviousVersion[:0], dAtA[iNdEx:postIndex]...) - if m.PreviousVersion == nil { - m.PreviousVersion = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentVersion", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CurrentVersion = append(m.CurrentVersion[:0], dAtA[iNdEx:postIndex]...) - if m.CurrentVersion == nil { - m.CurrentVersion = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= 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) < 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 *PendingAttestation) 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: PendingAttestation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PendingAttestation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationBits", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AggregationBits = append(m.AggregationBits[:0], dAtA[iNdEx:postIndex]...) - if m.AggregationBits == nil { - m.AggregationBits = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &v1alpha1.AttestationData{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InclusionDelay", wireType) - } - m.InclusionDelay = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InclusionDelay |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - 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 |= 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) < 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 *ValidatorLatestVote) 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: ValidatorLatestVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorLatestVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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 < 0 { - return ErrInvalidLengthTypes - } - 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 := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + 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 *HistoricalBatch) 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: HistoricalBatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HistoricalBatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockRoots", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockRoots = append(m.BlockRoots, make([]byte, postIndex-iNdEx)) - copy(m.BlockRoots[len(m.BlockRoots)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateRoots", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StateRoots = append(m.StateRoots, make([]byte, postIndex-iNdEx)) - copy(m.StateRoots[len(m.StateRoots)-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) < 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 *StateSummary) 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: StateSummary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StateSummary: 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 Root", 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 < 0 { - return ErrInvalidLengthTypes - } - 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 := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + 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 *SigningRoot) 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: SigningRoot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SigningRoot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectRoot", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ObjectRoot = append(m.ObjectRoot[:0], dAtA[iNdEx:postIndex]...) - if m.ObjectRoot == nil { - m.ObjectRoot = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Domain", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Domain = append(m.Domain[:0], dAtA[iNdEx:postIndex]...) - if m.Domain == nil { - m.Domain = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + 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 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisValidatorsRoot", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GenesisValidatorsRoot = append(m.GenesisValidatorsRoot[:0], dAtA[iNdEx:postIndex]...) - if m.GenesisValidatorsRoot == nil { - m.GenesisValidatorsRoot = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentVersion", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CurrentVersion = append(m.CurrentVersion[:0], dAtA[iNdEx:postIndex]...) - if m.CurrentVersion == nil { - m.CurrentVersion = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + 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 *SignedAggregateAndProof) 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: SignedAggregateAndProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedAggregateAndProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", 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 < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Message == nil { - m.Message = &v1alpha1.AggregateAttestationAndProof{} - } - if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 < 0 { - return ErrInvalidLengthTypes - } - 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) < 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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/cluster/services.pb.go b/proto/cluster/services.pb.go deleted file mode 100755 index fb0235ebed4e..000000000000 --- a/proto/cluster/services.pb.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: proto/cluster/services.proto - -package prysm_internal_cluster - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - 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.ProtoPackageIsVersion3 // please upgrade the proto package - -type PrivateKeyRequest struct { - PodName string `protobuf:"bytes,1,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` - NumberOfKeys uint64 `protobuf:"varint,2,opt,name=number_of_keys,json=numberOfKeys,proto3" json:"number_of_keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PrivateKeyRequest) Reset() { *m = PrivateKeyRequest{} } -func (m *PrivateKeyRequest) String() string { return proto.CompactTextString(m) } -func (*PrivateKeyRequest) ProtoMessage() {} -func (*PrivateKeyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f118b0fcaa41cfbe, []int{0} -} - -func (m *PrivateKeyRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrivateKeyRequest.Unmarshal(m, b) -} -func (m *PrivateKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrivateKeyRequest.Marshal(b, m, deterministic) -} -func (m *PrivateKeyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrivateKeyRequest.Merge(m, src) -} -func (m *PrivateKeyRequest) XXX_Size() int { - return xxx_messageInfo_PrivateKeyRequest.Size(m) -} -func (m *PrivateKeyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PrivateKeyRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PrivateKeyRequest proto.InternalMessageInfo - -func (m *PrivateKeyRequest) GetPodName() string { - if m != nil { - return m.PodName - } - return "" -} - -func (m *PrivateKeyRequest) GetNumberOfKeys() uint64 { - if m != nil { - return m.NumberOfKeys - } - return 0 -} - -type PrivateKeyResponse struct { - PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // Deprecated: Do not use. - PrivateKeys *PrivateKeys `protobuf:"bytes,2,opt,name=private_keys,json=privateKeys,proto3" json:"private_keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PrivateKeyResponse) Reset() { *m = PrivateKeyResponse{} } -func (m *PrivateKeyResponse) String() string { return proto.CompactTextString(m) } -func (*PrivateKeyResponse) ProtoMessage() {} -func (*PrivateKeyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f118b0fcaa41cfbe, []int{1} -} - -func (m *PrivateKeyResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrivateKeyResponse.Unmarshal(m, b) -} -func (m *PrivateKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrivateKeyResponse.Marshal(b, m, deterministic) -} -func (m *PrivateKeyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrivateKeyResponse.Merge(m, src) -} -func (m *PrivateKeyResponse) XXX_Size() int { - return xxx_messageInfo_PrivateKeyResponse.Size(m) -} -func (m *PrivateKeyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PrivateKeyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PrivateKeyResponse proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *PrivateKeyResponse) GetPrivateKey() []byte { - if m != nil { - return m.PrivateKey - } - return nil -} - -func (m *PrivateKeyResponse) GetPrivateKeys() *PrivateKeys { - if m != nil { - return m.PrivateKeys - } - return nil -} - -type PrivateKeys struct { - PrivateKeys [][]byte `protobuf:"bytes,1,rep,name=private_keys,json=privateKeys,proto3" json:"private_keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PrivateKeys) Reset() { *m = PrivateKeys{} } -func (m *PrivateKeys) String() string { return proto.CompactTextString(m) } -func (*PrivateKeys) ProtoMessage() {} -func (*PrivateKeys) Descriptor() ([]byte, []int) { - return fileDescriptor_f118b0fcaa41cfbe, []int{2} -} - -func (m *PrivateKeys) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrivateKeys.Unmarshal(m, b) -} -func (m *PrivateKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrivateKeys.Marshal(b, m, deterministic) -} -func (m *PrivateKeys) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrivateKeys.Merge(m, src) -} -func (m *PrivateKeys) XXX_Size() int { - return xxx_messageInfo_PrivateKeys.Size(m) -} -func (m *PrivateKeys) XXX_DiscardUnknown() { - xxx_messageInfo_PrivateKeys.DiscardUnknown(m) -} - -var xxx_messageInfo_PrivateKeys proto.InternalMessageInfo - -func (m *PrivateKeys) GetPrivateKeys() [][]byte { - if m != nil { - return m.PrivateKeys - } - return nil -} - -func init() { - proto.RegisterType((*PrivateKeyRequest)(nil), "prysm.internal.cluster.PrivateKeyRequest") - proto.RegisterType((*PrivateKeyResponse)(nil), "prysm.internal.cluster.PrivateKeyResponse") - proto.RegisterType((*PrivateKeys)(nil), "prysm.internal.cluster.PrivateKeys") -} - -func init() { proto.RegisterFile("proto/cluster/services.proto", fileDescriptor_f118b0fcaa41cfbe) } - -var fileDescriptor_f118b0fcaa41cfbe = []byte{ - // 256 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xc3, 0x30, - 0x14, 0xc7, 0xc9, 0x14, 0xa7, 0xaf, 0x45, 0x30, 0x07, 0xa9, 0xe2, 0xa1, 0x76, 0x1e, 0xaa, 0x87, - 0x4c, 0xe6, 0x37, 0xf0, 0xe0, 0x65, 0xa0, 0x12, 0xbd, 0xd7, 0x6e, 0x7b, 0x83, 0xe2, 0x9a, 0xc4, - 0xbc, 0x74, 0xd0, 0xa3, 0xdf, 0x5c, 0x6c, 0xa6, 0x8d, 0x22, 0xb8, 0xeb, 0x3f, 0xbf, 0xf7, 0x4b, - 0xf2, 0x7f, 0x70, 0x66, 0xac, 0x76, 0x7a, 0x3c, 0x5f, 0x35, 0xe4, 0xd0, 0x8e, 0x09, 0xed, 0xba, - 0x9a, 0x23, 0x89, 0x2e, 0xe6, 0xc7, 0xc6, 0xb6, 0x54, 0x8b, 0x4a, 0x39, 0xb4, 0xaa, 0x5c, 0x89, - 0x0d, 0x96, 0x3d, 0xc3, 0xd1, 0xa3, 0xad, 0xd6, 0xa5, 0xc3, 0x29, 0xb6, 0x12, 0xdf, 0x1a, 0x24, - 0xc7, 0x4f, 0x60, 0xdf, 0xe8, 0x45, 0xa1, 0xca, 0x1a, 0x13, 0x96, 0xb2, 0xfc, 0x40, 0x0e, 0x8d, - 0x5e, 0xdc, 0x97, 0x35, 0xf2, 0x0b, 0x38, 0x54, 0x4d, 0x3d, 0x43, 0x5b, 0xe8, 0x65, 0xf1, 0x8a, - 0x2d, 0x25, 0x83, 0x94, 0xe5, 0xbb, 0x32, 0xf6, 0xe9, 0xc3, 0x72, 0x8a, 0x2d, 0x65, 0xef, 0x0c, - 0x78, 0xa8, 0x25, 0xa3, 0x15, 0x21, 0x1f, 0x41, 0x64, 0x7c, 0xfa, 0x39, 0xda, 0xa9, 0xe3, 0xdb, - 0x41, 0xc2, 0x24, 0x98, 0x6f, 0x98, 0xdf, 0x41, 0x1c, 0x40, 0xde, 0x1f, 0x4d, 0x46, 0xe2, 0xef, - 0x0f, 0x88, 0xfe, 0x1a, 0x92, 0x51, 0xaf, 0xa1, 0xec, 0x1a, 0xa2, 0xe0, 0x8c, 0x9f, 0xff, 0xd2, - 0xb2, 0x74, 0x27, 0x8f, 0x7f, 0x4c, 0x4c, 0x9a, 0xb0, 0x8b, 0x27, 0xdf, 0x1f, 0x7f, 0x81, 0xe1, - 0x57, 0x2d, 0x97, 0xff, 0xbf, 0x61, 0x83, 0x9e, 0x5e, 0x6d, 0x83, 0xfa, 0x56, 0x66, 0x7b, 0xdd, - 0x86, 0x6e, 0x3e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x28, 0x1a, 0xa8, 0xa6, 0xc1, 0x01, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// PrivateKeyServiceClient is the client API for PrivateKeyService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PrivateKeyServiceClient interface { - Request(ctx context.Context, in *PrivateKeyRequest, opts ...grpc.CallOption) (*PrivateKeyResponse, error) -} - -type privateKeyServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPrivateKeyServiceClient(cc grpc.ClientConnInterface) PrivateKeyServiceClient { - return &privateKeyServiceClient{cc} -} - -func (c *privateKeyServiceClient) Request(ctx context.Context, in *PrivateKeyRequest, opts ...grpc.CallOption) (*PrivateKeyResponse, error) { - out := new(PrivateKeyResponse) - err := c.cc.Invoke(ctx, "/prysm.internal.cluster.PrivateKeyService/Request", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PrivateKeyServiceServer is the server API for PrivateKeyService service. -type PrivateKeyServiceServer interface { - Request(context.Context, *PrivateKeyRequest) (*PrivateKeyResponse, error) -} - -// UnimplementedPrivateKeyServiceServer can be embedded to have forward compatible implementations. -type UnimplementedPrivateKeyServiceServer struct { -} - -func (*UnimplementedPrivateKeyServiceServer) Request(ctx context.Context, req *PrivateKeyRequest) (*PrivateKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Request not implemented") -} - -func RegisterPrivateKeyServiceServer(s *grpc.Server, srv PrivateKeyServiceServer) { - s.RegisterService(&_PrivateKeyService_serviceDesc, srv) -} - -func _PrivateKeyService_Request_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrivateKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PrivateKeyServiceServer).Request(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/prysm.internal.cluster.PrivateKeyService/Request", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PrivateKeyServiceServer).Request(ctx, req.(*PrivateKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _PrivateKeyService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "prysm.internal.cluster.PrivateKeyService", - HandlerType: (*PrivateKeyServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Request", - Handler: _PrivateKeyService_Request_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/cluster/services.proto", -} diff --git a/proto/faucet/faucet.pb.go b/proto/faucet/faucet.pb.go deleted file mode 100755 index e23193852047..000000000000 --- a/proto/faucet/faucet.pb.go +++ /dev/null @@ -1,808 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: src/proto/faucet.proto - -package faucet - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - proto "github.com/gogo/protobuf/proto" - 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 FundingRequest struct { - WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` - RecaptchaSiteKey string `protobuf:"bytes,2,opt,name=recaptcha_site_key,json=recaptchaSiteKey,proto3" json:"recaptcha_site_key,omitempty"` - RecaptchaResponse string `protobuf:"bytes,3,opt,name=recaptcha_response,json=recaptchaResponse,proto3" json:"recaptcha_response,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FundingRequest) Reset() { *m = FundingRequest{} } -func (m *FundingRequest) String() string { return proto.CompactTextString(m) } -func (*FundingRequest) ProtoMessage() {} -func (*FundingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4118183f16331b80, []int{0} -} -func (m *FundingRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FundingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FundingRequest.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 *FundingRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FundingRequest.Merge(m, src) -} -func (m *FundingRequest) XXX_Size() int { - return m.Size() -} -func (m *FundingRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FundingRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FundingRequest proto.InternalMessageInfo - -func (m *FundingRequest) GetWalletAddress() string { - if m != nil { - return m.WalletAddress - } - return "" -} - -func (m *FundingRequest) GetRecaptchaSiteKey() string { - if m != nil { - return m.RecaptchaSiteKey - } - return "" -} - -func (m *FundingRequest) GetRecaptchaResponse() string { - if m != nil { - return m.RecaptchaResponse - } - return "" -} - -type FundingResponse struct { - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - TransactionHash string `protobuf:"bytes,3,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FundingResponse) Reset() { *m = FundingResponse{} } -func (m *FundingResponse) String() string { return proto.CompactTextString(m) } -func (*FundingResponse) ProtoMessage() {} -func (*FundingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4118183f16331b80, []int{1} -} -func (m *FundingResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FundingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FundingResponse.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 *FundingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FundingResponse.Merge(m, src) -} -func (m *FundingResponse) XXX_Size() int { - return m.Size() -} -func (m *FundingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FundingResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FundingResponse proto.InternalMessageInfo - -func (m *FundingResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func (m *FundingResponse) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func (m *FundingResponse) GetTransactionHash() string { - if m != nil { - return m.TransactionHash - } - return "" -} - -func init() { - proto.RegisterType((*FundingRequest)(nil), "faucet.FundingRequest") - proto.RegisterType((*FundingResponse)(nil), "faucet.FundingResponse") -} - -func init() { proto.RegisterFile("src/proto/faucet.proto", fileDescriptor_4118183f16331b80) } - -var fileDescriptor_4118183f16331b80 = []byte{ - // 268 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x4d, 0x4a, 0xf4, 0x40, - 0x10, 0x86, 0xbf, 0xfe, 0xc4, 0x80, 0xcd, 0xfc, 0x68, 0x23, 0x31, 0xb8, 0x08, 0x32, 0x20, 0xcc, - 0x42, 0x67, 0x40, 0x4f, 0x30, 0x2e, 0x06, 0xc1, 0x5d, 0xe6, 0x00, 0xa1, 0xed, 0x94, 0x4e, 0xe3, - 0xd8, 0x1d, 0xab, 0x2a, 0xca, 0xdc, 0xc3, 0x43, 0xb9, 0xf4, 0x08, 0x92, 0x93, 0x88, 0xe9, 0x26, - 0xf8, 0xb3, 0x7c, 0x9f, 0x7a, 0xa1, 0x5e, 0x1e, 0x99, 0x12, 0x9a, 0x79, 0x8d, 0x9e, 0xfd, 0xfc, - 0x4e, 0x37, 0x06, 0x78, 0xd6, 0x05, 0x95, 0x84, 0x34, 0x79, 0x15, 0x72, 0xb4, 0x6c, 0x5c, 0x65, - 0xdd, 0x7d, 0x01, 0x4f, 0x0d, 0x10, 0xab, 0x53, 0x39, 0x7a, 0xd1, 0x9b, 0x0d, 0x70, 0xa9, 0xab, - 0x0a, 0x81, 0x28, 0x13, 0x27, 0x62, 0xba, 0x57, 0x0c, 0x03, 0x5d, 0x04, 0xa8, 0xce, 0xa4, 0x42, - 0x30, 0xba, 0x66, 0xb3, 0xd6, 0x25, 0x59, 0x86, 0xf2, 0x01, 0xb6, 0xd9, 0xff, 0xae, 0xba, 0xdf, - 0x5f, 0x56, 0x96, 0xe1, 0x06, 0xb6, 0xea, 0xfc, 0x7b, 0x1b, 0x81, 0x6a, 0xef, 0x08, 0xb2, 0x9d, - 0xae, 0x7d, 0xd0, 0x5f, 0x8a, 0x78, 0x98, 0x58, 0x39, 0xee, 0x57, 0x05, 0xa4, 0x0e, 0xe5, 0x2e, - 0x20, 0x7a, 0x8c, 0x6b, 0x42, 0x50, 0xa9, 0x4c, 0xf4, 0xa3, 0x6f, 0x1c, 0xc7, 0xcf, 0x31, 0xa9, - 0xa9, 0x1c, 0x33, 0x6a, 0x47, 0xda, 0xb0, 0xf5, 0xee, 0x5a, 0xd3, 0x3a, 0x3e, 0xfb, 0x8d, 0x2f, - 0x0a, 0x39, 0x5c, 0x76, 0x2e, 0x56, 0x80, 0xcf, 0xd6, 0x80, 0x5a, 0xc8, 0x41, 0x54, 0xf1, 0x35, - 0x81, 0x54, 0x3a, 0x8b, 0xe6, 0x7e, 0x7a, 0x3a, 0x3e, 0xfa, 0xc3, 0xe3, 0xf8, 0x7f, 0x57, 0x83, - 0xb7, 0x36, 0x17, 0xef, 0x6d, 0x2e, 0x3e, 0xda, 0x5c, 0xdc, 0x26, 0x9d, 0xf2, 0xcb, 0xcf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x9a, 0x27, 0xc6, 0x35, 0x8c, 0x01, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// FaucetServiceClient is the client API for FaucetService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type FaucetServiceClient interface { - RequestFunds(ctx context.Context, in *FundingRequest, opts ...grpc.CallOption) (*FundingResponse, error) -} - -type faucetServiceClient struct { - cc *grpc.ClientConn -} - -func NewFaucetServiceClient(cc *grpc.ClientConn) FaucetServiceClient { - return &faucetServiceClient{cc} -} - -func (c *faucetServiceClient) RequestFunds(ctx context.Context, in *FundingRequest, opts ...grpc.CallOption) (*FundingResponse, error) { - out := new(FundingResponse) - err := c.cc.Invoke(ctx, "/faucet.FaucetService/RequestFunds", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// FaucetServiceServer is the server API for FaucetService service. -type FaucetServiceServer interface { - RequestFunds(context.Context, *FundingRequest) (*FundingResponse, error) -} - -// UnimplementedFaucetServiceServer can be embedded to have forward compatible implementations. -type UnimplementedFaucetServiceServer struct { -} - -func (*UnimplementedFaucetServiceServer) RequestFunds(ctx context.Context, req *FundingRequest) (*FundingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestFunds not implemented") -} - -func RegisterFaucetServiceServer(s *grpc.Server, srv FaucetServiceServer) { - s.RegisterService(&_FaucetService_serviceDesc, srv) -} - -func _FaucetService_RequestFunds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FundingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FaucetServiceServer).RequestFunds(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/faucet.FaucetService/RequestFunds", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FaucetServiceServer).RequestFunds(ctx, req.(*FundingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _FaucetService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "faucet.FaucetService", - HandlerType: (*FaucetServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RequestFunds", - Handler: _FaucetService_RequestFunds_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "src/proto/faucet.proto", -} - -func (m *FundingRequest) 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 *FundingRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundingRequest) 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.RecaptchaResponse) > 0 { - i -= len(m.RecaptchaResponse) - copy(dAtA[i:], m.RecaptchaResponse) - i = encodeVarintFaucet(dAtA, i, uint64(len(m.RecaptchaResponse))) - i-- - dAtA[i] = 0x1a - } - if len(m.RecaptchaSiteKey) > 0 { - i -= len(m.RecaptchaSiteKey) - copy(dAtA[i:], m.RecaptchaSiteKey) - i = encodeVarintFaucet(dAtA, i, uint64(len(m.RecaptchaSiteKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.WalletAddress) > 0 { - i -= len(m.WalletAddress) - copy(dAtA[i:], m.WalletAddress) - i = encodeVarintFaucet(dAtA, i, uint64(len(m.WalletAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FundingResponse) 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 *FundingResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundingResponse) 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.TransactionHash) > 0 { - i -= len(m.TransactionHash) - copy(dAtA[i:], m.TransactionHash) - i = encodeVarintFaucet(dAtA, i, uint64(len(m.TransactionHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintFaucet(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintFaucet(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintFaucet(dAtA []byte, offset int, v uint64) int { - offset -= sovFaucet(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *FundingRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.WalletAddress) - if l > 0 { - n += 1 + l + sovFaucet(uint64(l)) - } - l = len(m.RecaptchaSiteKey) - if l > 0 { - n += 1 + l + sovFaucet(uint64(l)) - } - l = len(m.RecaptchaResponse) - if l > 0 { - n += 1 + l + sovFaucet(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FundingResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Error) - if l > 0 { - n += 1 + l + sovFaucet(uint64(l)) - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovFaucet(uint64(l)) - } - l = len(m.TransactionHash) - if l > 0 { - n += 1 + l + sovFaucet(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovFaucet(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFaucet(x uint64) (n int) { - return sovFaucet(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *FundingRequest) 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 ErrIntOverflowFaucet - } - 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: FundingRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FundingRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WalletAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFaucet - } - 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 ErrInvalidLengthFaucet - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFaucet - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WalletAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecaptchaSiteKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFaucet - } - 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 ErrInvalidLengthFaucet - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFaucet - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecaptchaSiteKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecaptchaResponse", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFaucet - } - 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 ErrInvalidLengthFaucet - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFaucet - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecaptchaResponse = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFaucet(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFaucet - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFaucet - } - 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 *FundingResponse) 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 ErrIntOverflowFaucet - } - 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: FundingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FundingResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFaucet - } - 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 ErrInvalidLengthFaucet - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFaucet - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFaucet - } - 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 ErrInvalidLengthFaucet - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFaucet - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFaucet - } - 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 ErrInvalidLengthFaucet - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFaucet - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TransactionHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFaucet(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthFaucet - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthFaucet - } - 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 skipFaucet(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, ErrIntOverflowFaucet - } - 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, ErrIntOverflowFaucet - } - 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, ErrIntOverflowFaucet - } - 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, ErrInvalidLengthFaucet - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFaucet - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFaucet - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFaucet = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFaucet = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFaucet = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/testing/test.pb.go b/proto/testing/test.pb.go deleted file mode 100755 index 7c91c458aa02..000000000000 --- a/proto/testing/test.pb.go +++ /dev/null @@ -1,1939 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/testing/test.proto - -package testing - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" -) - -// 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 Person_PhoneType int32 - -const ( - Person_MOBILE Person_PhoneType = 0 - Person_HOME Person_PhoneType = 1 - Person_WORK Person_PhoneType = 2 -) - -var Person_PhoneType_name = map[int32]string{ - 0: "MOBILE", - 1: "HOME", - 2: "WORK", -} - -var Person_PhoneType_value = map[string]int32{ - "MOBILE": 0, - "HOME": 1, - "WORK": 2, -} - -func (x Person_PhoneType) String() string { - return proto.EnumName(Person_PhoneType_name, int32(x)) -} - -func (Person_PhoneType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_1f902154cb7707ef, []int{3, 0} -} - -type TestMessage struct { - Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` - Bar string `protobuf:"bytes,2,opt,name=bar,proto3" json:"bar,omitempty" fizz:"buzz" spec-name:"baz"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -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_1f902154cb7707ef, []int{0} -} -func (m *TestMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestMessage.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 *TestMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestMessage.Merge(m, src) -} -func (m *TestMessage) XXX_Size() int { - return m.Size() -} -func (m *TestMessage) XXX_DiscardUnknown() { - xxx_messageInfo_TestMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_TestMessage proto.InternalMessageInfo - -func (m *TestMessage) GetFoo() string { - if m != nil { - return m.Foo - } - return "" -} - -func (m *TestMessage) GetBar() string { - if m != nil { - return m.Bar - } - return "" -} - -type TestNestedMessage struct { - Fuzz string `protobuf:"bytes,1,opt,name=fuzz,proto3" json:"fuzz,omitempty"` - Msg *TestMessage `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TestNestedMessage) Reset() { *m = TestNestedMessage{} } -func (m *TestNestedMessage) String() string { return proto.CompactTextString(m) } -func (*TestNestedMessage) ProtoMessage() {} -func (*TestNestedMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_1f902154cb7707ef, []int{1} -} -func (m *TestNestedMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestNestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestNestedMessage.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 *TestNestedMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestNestedMessage.Merge(m, src) -} -func (m *TestNestedMessage) XXX_Size() int { - return m.Size() -} -func (m *TestNestedMessage) XXX_DiscardUnknown() { - xxx_messageInfo_TestNestedMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_TestNestedMessage proto.InternalMessageInfo - -func (m *TestNestedMessage) GetFuzz() string { - if m != nil { - return m.Fuzz - } - return "" -} - -func (m *TestNestedMessage) GetMsg() *TestMessage { - if m != nil { - return m.Msg - } - return nil -} - -type Puzzle struct { - 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:"-"` -} - -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_1f902154cb7707ef, []int{2} -} -func (m *Puzzle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Puzzle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Puzzle.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 *Puzzle) XXX_Merge(src proto.Message) { - xxx_messageInfo_Puzzle.Merge(m, src) -} -func (m *Puzzle) XXX_Size() int { - return m.Size() -} -func (m *Puzzle) XXX_DiscardUnknown() { - xxx_messageInfo_Puzzle.DiscardUnknown(m) -} - -var xxx_messageInfo_Puzzle proto.InternalMessageInfo - -func (m *Puzzle) GetChallenge() string { - if m != nil { - return m.Challenge - } - return "" -} - -func (m *Puzzle) GetAnswer() string { - if m != nil { - return m.Answer - } - return "" -} - -type Person struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` - Phones []*Person_PhoneNumber `protobuf:"bytes,4,rep,name=phones,proto3" json:"phones,omitempty"` - LastUpdated *types.Timestamp `protobuf:"bytes,5,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Person) Reset() { *m = Person{} } -func (m *Person) String() string { return proto.CompactTextString(m) } -func (*Person) ProtoMessage() {} -func (*Person) Descriptor() ([]byte, []int) { - return fileDescriptor_1f902154cb7707ef, []int{3} -} -func (m *Person) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Person) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Person.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 *Person) XXX_Merge(src proto.Message) { - xxx_messageInfo_Person.Merge(m, src) -} -func (m *Person) XXX_Size() int { - return m.Size() -} -func (m *Person) XXX_DiscardUnknown() { - xxx_messageInfo_Person.DiscardUnknown(m) -} - -var xxx_messageInfo_Person proto.InternalMessageInfo - -func (m *Person) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Person) GetId() int32 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *Person) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *Person) GetPhones() []*Person_PhoneNumber { - if m != nil { - return m.Phones - } - return nil -} - -func (m *Person) GetLastUpdated() *types.Timestamp { - if m != nil { - return m.LastUpdated - } - return nil -} - -type Person_PhoneNumber struct { - Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` - Type Person_PhoneType `protobuf:"varint,2,opt,name=type,proto3,enum=testing.Person_PhoneType" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Person_PhoneNumber) Reset() { *m = Person_PhoneNumber{} } -func (m *Person_PhoneNumber) String() string { return proto.CompactTextString(m) } -func (*Person_PhoneNumber) ProtoMessage() {} -func (*Person_PhoneNumber) Descriptor() ([]byte, []int) { - return fileDescriptor_1f902154cb7707ef, []int{3, 0} -} -func (m *Person_PhoneNumber) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Person_PhoneNumber) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Person_PhoneNumber.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 *Person_PhoneNumber) XXX_Merge(src proto.Message) { - xxx_messageInfo_Person_PhoneNumber.Merge(m, src) -} -func (m *Person_PhoneNumber) XXX_Size() int { - return m.Size() -} -func (m *Person_PhoneNumber) XXX_DiscardUnknown() { - xxx_messageInfo_Person_PhoneNumber.DiscardUnknown(m) -} - -var xxx_messageInfo_Person_PhoneNumber proto.InternalMessageInfo - -func (m *Person_PhoneNumber) GetNumber() string { - if m != nil { - return m.Number - } - return "" -} - -func (m *Person_PhoneNumber) GetType() Person_PhoneType { - if m != nil { - return m.Type - } - return Person_MOBILE -} - -type AddressBook struct { - People []*Person `protobuf:"bytes,1,rep,name=people,proto3" json:"people,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddressBook) Reset() { *m = AddressBook{} } -func (m *AddressBook) String() string { return proto.CompactTextString(m) } -func (*AddressBook) ProtoMessage() {} -func (*AddressBook) Descriptor() ([]byte, []int) { - return fileDescriptor_1f902154cb7707ef, []int{4} -} -func (m *AddressBook) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressBook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressBook.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 *AddressBook) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressBook.Merge(m, src) -} -func (m *AddressBook) XXX_Size() int { - return m.Size() -} -func (m *AddressBook) XXX_DiscardUnknown() { - xxx_messageInfo_AddressBook.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressBook proto.InternalMessageInfo - -func (m *AddressBook) GetPeople() []*Person { - if m != nil { - return m.People - } - return nil -} - -type TestSimpleMessage struct { - Foo []byte `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` - Bar uint64 `protobuf:"varint,2,opt,name=bar,proto3" json:"bar,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TestSimpleMessage) Reset() { *m = TestSimpleMessage{} } -func (m *TestSimpleMessage) String() string { return proto.CompactTextString(m) } -func (*TestSimpleMessage) ProtoMessage() {} -func (*TestSimpleMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_1f902154cb7707ef, []int{5} -} -func (m *TestSimpleMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestSimpleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestSimpleMessage.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 *TestSimpleMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestSimpleMessage.Merge(m, src) -} -func (m *TestSimpleMessage) XXX_Size() int { - return m.Size() -} -func (m *TestSimpleMessage) XXX_DiscardUnknown() { - xxx_messageInfo_TestSimpleMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_TestSimpleMessage proto.InternalMessageInfo - -func (m *TestSimpleMessage) GetFoo() []byte { - if m != nil { - return m.Foo - } - return nil -} - -func (m *TestSimpleMessage) GetBar() uint64 { - if m != nil { - return m.Bar - } - return 0 -} - -func init() { - proto.RegisterEnum("testing.Person_PhoneType", Person_PhoneType_name, Person_PhoneType_value) - proto.RegisterType((*TestMessage)(nil), "testing.TestMessage") - proto.RegisterType((*TestNestedMessage)(nil), "testing.TestNestedMessage") - proto.RegisterType((*Puzzle)(nil), "testing.Puzzle") - proto.RegisterType((*Person)(nil), "testing.Person") - proto.RegisterType((*Person_PhoneNumber)(nil), "testing.Person.PhoneNumber") - proto.RegisterType((*AddressBook)(nil), "testing.AddressBook") - proto.RegisterType((*TestSimpleMessage)(nil), "testing.TestSimpleMessage") -} - -func init() { proto.RegisterFile("proto/testing/test.proto", fileDescriptor_1f902154cb7707ef) } - -var fileDescriptor_1f902154cb7707ef = []byte{ - // 500 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xed, 0x8a, 0xd3, 0x40, - 0x14, 0x35, 0xfd, 0x88, 0xf6, 0xa6, 0xac, 0x75, 0x58, 0x24, 0x76, 0xa5, 0x2d, 0xf3, 0x43, 0x17, - 0xa4, 0x29, 0x76, 0x41, 0x61, 0x41, 0xc1, 0xc2, 0x82, 0xa2, 0xdd, 0x96, 0xb1, 0xe2, 0x4f, 0x49, - 0x9a, 0xdb, 0x34, 0x98, 0x64, 0x42, 0x66, 0x82, 0x6c, 0xde, 0xcc, 0x37, 0xf0, 0xa7, 0x4f, 0x20, - 0xd2, 0x47, 0xf0, 0x09, 0x64, 0x26, 0xd3, 0xed, 0xb2, 0xec, 0xaf, 0x9c, 0x7b, 0xe6, 0xe4, 0xcc, - 0xb9, 0x73, 0x2f, 0xb8, 0x79, 0xc1, 0x25, 0x9f, 0x48, 0x14, 0x32, 0xce, 0x22, 0xfd, 0xf5, 0x34, - 0x45, 0xee, 0x1b, 0xae, 0x3f, 0x8c, 0x38, 0x8f, 0x12, 0x9c, 0x68, 0x3a, 0x28, 0x37, 0x13, 0x19, - 0xa7, 0x28, 0xa4, 0x9f, 0xe6, 0xb5, 0xb2, 0x3f, 0x8e, 0x62, 0xb9, 0x2d, 0x03, 0x6f, 0xcd, 0xd3, - 0x49, 0xc4, 0x23, 0x7e, 0x50, 0xaa, 0xaa, 0xbe, 0x40, 0xa1, 0x5a, 0x4e, 0x19, 0x38, 0x2b, 0x14, - 0x72, 0x8e, 0x42, 0xf8, 0x11, 0x92, 0x1e, 0x34, 0x37, 0x9c, 0xbb, 0xd6, 0xc8, 0x3a, 0xed, 0x30, - 0x05, 0xc9, 0x4b, 0x68, 0x06, 0x7e, 0xe1, 0x36, 0x14, 0x33, 0x1b, 0xfe, 0xfb, 0x33, 0x3c, 0xd9, - 0xc4, 0x55, 0x75, 0x4e, 0x83, 0xb2, 0xaa, 0xe8, 0x48, 0xe4, 0xb8, 0x1e, 0x67, 0x7e, 0x8a, 0xe7, - 0x34, 0xf0, 0x2b, 0xca, 0x94, 0x96, 0x2e, 0xe0, 0x91, 0xf2, 0xbc, 0x44, 0x21, 0x31, 0xdc, 0x3b, - 0x13, 0x68, 0x6d, 0xca, 0xaa, 0x32, 0xd6, 0x1a, 0x93, 0x67, 0xd0, 0x4c, 0x45, 0xa4, 0xbd, 0x9d, - 0xe9, 0xb1, 0x67, 0x7a, 0xf4, 0x6e, 0x04, 0x62, 0x4a, 0x40, 0xdf, 0x82, 0xbd, 0x2c, 0xab, 0x2a, - 0x41, 0xf2, 0x14, 0x3a, 0xeb, 0xad, 0x9f, 0x24, 0x98, 0x45, 0x68, 0xac, 0x0e, 0x04, 0x79, 0x0c, - 0xb6, 0x9f, 0x89, 0x1f, 0x68, 0xe2, 0x32, 0x53, 0xd1, 0x9f, 0x0d, 0xb0, 0x97, 0x58, 0x08, 0x9e, - 0xa9, 0x18, 0x2a, 0xee, 0x3e, 0x86, 0xc2, 0xe4, 0x08, 0x1a, 0x71, 0xa8, 0x7f, 0x69, 0xb3, 0x46, - 0x1c, 0x92, 0x63, 0x68, 0x63, 0xea, 0xc7, 0x89, 0xdb, 0xd4, 0xa2, 0xba, 0x20, 0x67, 0x60, 0xe7, - 0x5b, 0x9e, 0xa1, 0x70, 0x5b, 0xa3, 0xe6, 0xa9, 0x33, 0x3d, 0xb9, 0xce, 0x5b, 0x5b, 0x7b, 0x4b, - 0x75, 0x7a, 0x59, 0xa6, 0x01, 0x16, 0xcc, 0x48, 0xc9, 0x1b, 0xe8, 0x26, 0xbe, 0x90, 0xdf, 0xca, - 0x3c, 0xf4, 0x25, 0x86, 0x6e, 0x5b, 0xb7, 0xda, 0xf7, 0xea, 0x29, 0x7a, 0xfb, 0xd9, 0x78, 0xab, - 0xfd, 0x14, 0x99, 0xa3, 0xf4, 0x5f, 0x6a, 0x79, 0x7f, 0x05, 0xce, 0x0d, 0x57, 0xd5, 0x5f, 0xa6, - 0x91, 0x89, 0x6f, 0x2a, 0x32, 0x86, 0x96, 0xbc, 0xca, 0x51, 0xb7, 0x70, 0x34, 0x7d, 0x72, 0x67, - 0xb0, 0xd5, 0x55, 0x8e, 0x4c, 0xcb, 0xe8, 0x0b, 0xe8, 0x5c, 0x53, 0x04, 0xc0, 0x9e, 0x2f, 0x66, - 0x1f, 0x3e, 0x5d, 0xf4, 0xee, 0x91, 0x07, 0xd0, 0x7a, 0xbf, 0x98, 0x5f, 0xf4, 0x2c, 0x85, 0xbe, - 0x2e, 0xd8, 0xc7, 0x5e, 0x83, 0xbe, 0x02, 0xe7, 0x5d, 0x18, 0x16, 0x28, 0xc4, 0x8c, 0xf3, 0xef, - 0xe4, 0x39, 0xd8, 0x39, 0xf2, 0x3c, 0x51, 0x2f, 0xa8, 0x5e, 0xe1, 0xe1, 0xad, 0xcb, 0x98, 0x39, - 0xa6, 0xaf, 0xeb, 0x25, 0xf8, 0x1c, 0xa7, 0x79, 0x82, 0x77, 0xac, 0x57, 0xb7, 0x5e, 0xaf, 0xde, - 0x61, 0xbd, 0x5a, 0x7a, 0x7b, 0x66, 0xdd, 0x5f, 0xbb, 0x81, 0xf5, 0x7b, 0x37, 0xb0, 0xfe, 0xee, - 0x06, 0x56, 0x60, 0xeb, 0x27, 0x3a, 0xfb, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x27, 0xce, 0x0c, 0x3c, - 0x1b, 0x03, 0x00, 0x00, -} - -func (m *TestMessage) 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 *TestMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestMessage) 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.Bar) > 0 { - i -= len(m.Bar) - copy(dAtA[i:], m.Bar) - i = encodeVarintTest(dAtA, i, uint64(len(m.Bar))) - i-- - dAtA[i] = 0x12 - } - if len(m.Foo) > 0 { - i -= len(m.Foo) - copy(dAtA[i:], m.Foo) - i = encodeVarintTest(dAtA, i, uint64(len(m.Foo))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TestNestedMessage) 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 *TestNestedMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestNestedMessage) 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 m.Msg != nil { - { - size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTest(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Fuzz) > 0 { - i -= len(m.Fuzz) - copy(dAtA[i:], m.Fuzz) - i = encodeVarintTest(dAtA, i, uint64(len(m.Fuzz))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Puzzle) 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 *Puzzle) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Puzzle) 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.Answer) > 0 { - i -= len(m.Answer) - copy(dAtA[i:], m.Answer) - i = encodeVarintTest(dAtA, i, uint64(len(m.Answer))) - i-- - dAtA[i] = 0x12 - } - if len(m.Challenge) > 0 { - i -= len(m.Challenge) - copy(dAtA[i:], m.Challenge) - i = encodeVarintTest(dAtA, i, uint64(len(m.Challenge))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Person) 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 *Person) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Person) 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 m.LastUpdated != nil { - { - size, err := m.LastUpdated.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTest(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Phones) > 0 { - for iNdEx := len(m.Phones) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Phones[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTest(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Email) > 0 { - i -= len(m.Email) - copy(dAtA[i:], m.Email) - i = encodeVarintTest(dAtA, i, uint64(len(m.Email))) - i-- - dAtA[i] = 0x1a - } - if m.Id != 0 { - i = encodeVarintTest(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTest(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Person_PhoneNumber) 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 *Person_PhoneNumber) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Person_PhoneNumber) 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 m.Type != 0 { - i = encodeVarintTest(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x10 - } - if len(m.Number) > 0 { - i -= len(m.Number) - copy(dAtA[i:], m.Number) - i = encodeVarintTest(dAtA, i, uint64(len(m.Number))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddressBook) 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 *AddressBook) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressBook) 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.People) > 0 { - for iNdEx := len(m.People) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.People[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTest(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TestSimpleMessage) 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 *TestSimpleMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestSimpleMessage) 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 m.Bar != 0 { - i = encodeVarintTest(dAtA, i, uint64(m.Bar)) - i-- - dAtA[i] = 0x10 - } - if len(m.Foo) > 0 { - i -= len(m.Foo) - copy(dAtA[i:], m.Foo) - i = encodeVarintTest(dAtA, i, uint64(len(m.Foo))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTest(dAtA []byte, offset int, v uint64) int { - offset -= sovTest(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TestMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Foo) - if l > 0 { - n += 1 + l + sovTest(uint64(l)) - } - l = len(m.Bar) - if l > 0 { - n += 1 + l + sovTest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TestNestedMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Fuzz) - if l > 0 { - n += 1 + l + sovTest(uint64(l)) - } - if m.Msg != nil { - l = m.Msg.Size() - n += 1 + l + sovTest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Puzzle) Size() (n int) { - if m == nil { - return 0 - } - 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 (m *Person) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTest(uint64(l)) - } - if m.Id != 0 { - n += 1 + sovTest(uint64(m.Id)) - } - l = len(m.Email) - if l > 0 { - n += 1 + l + sovTest(uint64(l)) - } - if len(m.Phones) > 0 { - for _, e := range m.Phones { - l = e.Size() - n += 1 + l + sovTest(uint64(l)) - } - } - if m.LastUpdated != nil { - l = m.LastUpdated.Size() - n += 1 + l + sovTest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Person_PhoneNumber) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Number) - if l > 0 { - n += 1 + l + sovTest(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovTest(uint64(m.Type)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AddressBook) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.People) > 0 { - for _, e := range m.People { - l = e.Size() - n += 1 + l + sovTest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TestSimpleMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Foo) - if l > 0 { - n += 1 + l + sovTest(uint64(l)) - } - if m.Bar != 0 { - n += 1 + sovTest(uint64(m.Bar)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTest(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -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 < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Foo = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bar", 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 < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bar = 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) < 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 *TestNestedMessage) 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: TestNestedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TestNestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fuzz", 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 < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fuzz = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTest - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Msg == nil { - m.Msg = &TestMessage{} - } - if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTest(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTest - } - if (iNdEx + 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 < 0 { - return ErrInvalidLengthTest - } - 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 < 0 { - return ErrInvalidLengthTest - } - 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) < 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 *Person) 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: Person: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Person: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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 < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Email", 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 < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Email = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phones", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTest - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Phones = append(m.Phones, &Person_PhoneNumber{}) - if err := m.Phones[len(m.Phones)-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 LastUpdated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTest - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastUpdated == nil { - m.LastUpdated = &types.Timestamp{} - } - if err := m.LastUpdated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTest(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTest - } - if (iNdEx + 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 *Person_PhoneNumber) 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: PhoneNumber: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PhoneNumber: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", 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 < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Number = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= Person_PhoneType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTest(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTest - } - if (iNdEx + 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 *AddressBook) 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: AddressBook: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddressBook: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field People", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTest - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.People = append(m.People, &Person{}) - if err := m.People[len(m.People)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTest(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTest - } - if (iNdEx + 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 *TestSimpleMessage) 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: TestSimpleMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TestSimpleMessage: 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 byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTest - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTest - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Foo = append(m.Foo[:0], dAtA[iNdEx:postIndex]...) - if m.Foo == nil { - m.Foo = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) - } - m.Bar = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Bar |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTest(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTest - } - if (iNdEx + 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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthTest - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTest - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTest - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTest = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTest = fmt.Errorf("proto: unexpected end of group") -)