// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/sharding/p2p/v1/messages.proto package ethereum_sharding_p2p_v1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Topic int32 const ( Topic_UNKNOWN Topic = 0 Topic_COLLATION_BODY_REQUEST Topic = 1 Topic_COLLATION_BODY_RESPONSE Topic = 2 Topic_TRANSACTIONS Topic = 3 ) var Topic_name = map[int32]string{ 0: "UNKNOWN", 1: "COLLATION_BODY_REQUEST", 2: "COLLATION_BODY_RESPONSE", 3: "TRANSACTIONS", } var Topic_value = map[string]int32{ "UNKNOWN": 0, "COLLATION_BODY_REQUEST": 1, "COLLATION_BODY_RESPONSE": 2, "TRANSACTIONS": 3, } func (x Topic) String() string { return proto.EnumName(Topic_name, int32(x)) } func (Topic) EnumDescriptor() ([]byte, []int) { return fileDescriptor_messages_378f1318ba5b4c6a, []int{0} } type CollationBodyRequest struct { ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` ChunkRoot []byte `protobuf:"bytes,3,opt,name=chunk_root,json=chunkRoot,proto3" json:"chunk_root,omitempty"` ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CollationBodyRequest) Reset() { *m = CollationBodyRequest{} } func (m *CollationBodyRequest) String() string { return proto.CompactTextString(m) } func (*CollationBodyRequest) ProtoMessage() {} func (*CollationBodyRequest) Descriptor() ([]byte, []int) { return fileDescriptor_messages_378f1318ba5b4c6a, []int{0} } func (m *CollationBodyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CollationBodyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CollationBodyRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (dst *CollationBodyRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_CollationBodyRequest.Merge(dst, src) } func (m *CollationBodyRequest) XXX_Size() int { return m.Size() } func (m *CollationBodyRequest) XXX_DiscardUnknown() { xxx_messageInfo_CollationBodyRequest.DiscardUnknown(m) } var xxx_messageInfo_CollationBodyRequest proto.InternalMessageInfo func (m *CollationBodyRequest) GetShardId() uint64 { if m != nil { return m.ShardId } return 0 } func (m *CollationBodyRequest) GetPeriod() uint64 { if m != nil { return m.Period } return 0 } func (m *CollationBodyRequest) GetChunkRoot() []byte { if m != nil { return m.ChunkRoot } return nil } func (m *CollationBodyRequest) GetProposerAddress() []byte { if m != nil { return m.ProposerAddress } return nil } func (m *CollationBodyRequest) GetSignature() []byte { if m != nil { return m.Signature } return nil } type CollationBodyResponse struct { HeaderHash []byte `protobuf:"bytes,1,opt,name=header_hash,json=headerHash,proto3" json:"header_hash,omitempty"` Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CollationBodyResponse) Reset() { *m = CollationBodyResponse{} } func (m *CollationBodyResponse) String() string { return proto.CompactTextString(m) } func (*CollationBodyResponse) ProtoMessage() {} func (*CollationBodyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_messages_378f1318ba5b4c6a, []int{1} } func (m *CollationBodyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CollationBodyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CollationBodyResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (dst *CollationBodyResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_CollationBodyResponse.Merge(dst, src) } func (m *CollationBodyResponse) XXX_Size() int { return m.Size() } func (m *CollationBodyResponse) XXX_DiscardUnknown() { xxx_messageInfo_CollationBodyResponse.DiscardUnknown(m) } var xxx_messageInfo_CollationBodyResponse proto.InternalMessageInfo func (m *CollationBodyResponse) GetHeaderHash() []byte { if m != nil { return m.HeaderHash } return nil } func (m *CollationBodyResponse) GetBody() []byte { if m != nil { return m.Body } return nil } type Transaction struct { Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` GasPrice uint64 `protobuf:"varint,2,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` GasLimit uint64 `protobuf:"varint,3,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` Recipient []byte `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` Value uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` Input []byte `protobuf:"bytes,6,opt,name=input,proto3" json:"input,omitempty"` Signature *Signature `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Transaction) Reset() { *m = Transaction{} } func (m *Transaction) String() string { return proto.CompactTextString(m) } func (*Transaction) ProtoMessage() {} func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor_messages_378f1318ba5b4c6a, []int{2} } func (m *Transaction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (dst *Transaction) XXX_Merge(src proto.Message) { xxx_messageInfo_Transaction.Merge(dst, src) } func (m *Transaction) XXX_Size() int { return m.Size() } func (m *Transaction) XXX_DiscardUnknown() { xxx_messageInfo_Transaction.DiscardUnknown(m) } var xxx_messageInfo_Transaction proto.InternalMessageInfo func (m *Transaction) GetNonce() uint64 { if m != nil { return m.Nonce } return 0 } func (m *Transaction) GetGasPrice() uint64 { if m != nil { return m.GasPrice } return 0 } func (m *Transaction) GetGasLimit() uint64 { if m != nil { return m.GasLimit } return 0 } func (m *Transaction) GetRecipient() []byte { if m != nil { return m.Recipient } return nil } func (m *Transaction) GetValue() uint64 { if m != nil { return m.Value } return 0 } func (m *Transaction) GetInput() []byte { if m != nil { return m.Input } return nil } func (m *Transaction) GetSignature() *Signature { if m != nil { return m.Signature } return nil } type Signature struct { V uint64 `protobuf:"varint,1,opt,name=v,proto3" json:"v,omitempty"` R uint64 `protobuf:"varint,2,opt,name=r,proto3" json:"r,omitempty"` S uint64 `protobuf:"varint,3,opt,name=s,proto3" json:"s,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Signature) Reset() { *m = Signature{} } func (m *Signature) String() string { return proto.CompactTextString(m) } func (*Signature) ProtoMessage() {} func (*Signature) Descriptor() ([]byte, []int) { return fileDescriptor_messages_378f1318ba5b4c6a, []int{3} } func (m *Signature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Signature.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (dst *Signature) XXX_Merge(src proto.Message) { xxx_messageInfo_Signature.Merge(dst, src) } func (m *Signature) XXX_Size() int { return m.Size() } func (m *Signature) XXX_DiscardUnknown() { xxx_messageInfo_Signature.DiscardUnknown(m) } var xxx_messageInfo_Signature proto.InternalMessageInfo func (m *Signature) GetV() uint64 { if m != nil { return m.V } return 0 } func (m *Signature) GetR() uint64 { if m != nil { return m.R } return 0 } func (m *Signature) GetS() uint64 { if m != nil { return m.S } return 0 } func init() { proto.RegisterType((*CollationBodyRequest)(nil), "ethereum.sharding.p2p.v1.CollationBodyRequest") proto.RegisterType((*CollationBodyResponse)(nil), "ethereum.sharding.p2p.v1.CollationBodyResponse") proto.RegisterType((*Transaction)(nil), "ethereum.sharding.p2p.v1.Transaction") proto.RegisterType((*Signature)(nil), "ethereum.sharding.p2p.v1.Signature") proto.RegisterEnum("ethereum.sharding.p2p.v1.Topic", Topic_name, Topic_value) } func (m *CollationBodyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CollationBodyRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.ShardId != 0 { dAtA[i] = 0x8 i++ i = encodeVarintMessages(dAtA, i, uint64(m.ShardId)) } if m.Period != 0 { dAtA[i] = 0x10 i++ i = encodeVarintMessages(dAtA, i, uint64(m.Period)) } if len(m.ChunkRoot) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintMessages(dAtA, i, uint64(len(m.ChunkRoot))) i += copy(dAtA[i:], m.ChunkRoot) } if len(m.ProposerAddress) > 0 { dAtA[i] = 0x22 i++ i = encodeVarintMessages(dAtA, i, uint64(len(m.ProposerAddress))) i += copy(dAtA[i:], m.ProposerAddress) } if len(m.Signature) > 0 { dAtA[i] = 0x2a i++ i = encodeVarintMessages(dAtA, i, uint64(len(m.Signature))) i += copy(dAtA[i:], m.Signature) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CollationBodyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CollationBodyResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.HeaderHash) > 0 { dAtA[i] = 0xa i++ i = encodeVarintMessages(dAtA, i, uint64(len(m.HeaderHash))) i += copy(dAtA[i:], m.HeaderHash) } if len(m.Body) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintMessages(dAtA, i, uint64(len(m.Body))) i += copy(dAtA[i:], m.Body) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *Transaction) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Transaction) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Nonce != 0 { dAtA[i] = 0x8 i++ i = encodeVarintMessages(dAtA, i, uint64(m.Nonce)) } if m.GasPrice != 0 { dAtA[i] = 0x10 i++ i = encodeVarintMessages(dAtA, i, uint64(m.GasPrice)) } if m.GasLimit != 0 { dAtA[i] = 0x18 i++ i = encodeVarintMessages(dAtA, i, uint64(m.GasLimit)) } if len(m.Recipient) > 0 { dAtA[i] = 0x22 i++ i = encodeVarintMessages(dAtA, i, uint64(len(m.Recipient))) i += copy(dAtA[i:], m.Recipient) } if m.Value != 0 { dAtA[i] = 0x28 i++ i = encodeVarintMessages(dAtA, i, uint64(m.Value)) } if len(m.Input) > 0 { dAtA[i] = 0x32 i++ i = encodeVarintMessages(dAtA, i, uint64(len(m.Input))) i += copy(dAtA[i:], m.Input) } if m.Signature != nil { dAtA[i] = 0x3a i++ i = encodeVarintMessages(dAtA, i, uint64(m.Signature.Size())) n1, err := m.Signature.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *Signature) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Signature) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.V != 0 { dAtA[i] = 0x8 i++ i = encodeVarintMessages(dAtA, i, uint64(m.V)) } if m.R != 0 { dAtA[i] = 0x10 i++ i = encodeVarintMessages(dAtA, i, uint64(m.R)) } if m.S != 0 { dAtA[i] = 0x18 i++ i = encodeVarintMessages(dAtA, i, uint64(m.S)) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func encodeVarintMessages(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *CollationBodyRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ShardId != 0 { n += 1 + sovMessages(uint64(m.ShardId)) } if m.Period != 0 { n += 1 + sovMessages(uint64(m.Period)) } l = len(m.ChunkRoot) if l > 0 { n += 1 + l + sovMessages(uint64(l)) } l = len(m.ProposerAddress) if l > 0 { n += 1 + l + sovMessages(uint64(l)) } l = len(m.Signature) if l > 0 { n += 1 + l + sovMessages(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CollationBodyResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.HeaderHash) if l > 0 { n += 1 + l + sovMessages(uint64(l)) } l = len(m.Body) if l > 0 { n += 1 + l + sovMessages(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *Transaction) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Nonce != 0 { n += 1 + sovMessages(uint64(m.Nonce)) } if m.GasPrice != 0 { n += 1 + sovMessages(uint64(m.GasPrice)) } if m.GasLimit != 0 { n += 1 + sovMessages(uint64(m.GasLimit)) } l = len(m.Recipient) if l > 0 { n += 1 + l + sovMessages(uint64(l)) } if m.Value != 0 { n += 1 + sovMessages(uint64(m.Value)) } l = len(m.Input) if l > 0 { n += 1 + l + sovMessages(uint64(l)) } if m.Signature != nil { l = m.Signature.Size() n += 1 + l + sovMessages(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *Signature) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.V != 0 { n += 1 + sovMessages(uint64(m.V)) } if m.R != 0 { n += 1 + sovMessages(uint64(m.R)) } if m.S != 0 { n += 1 + sovMessages(uint64(m.S)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovMessages(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozMessages(x uint64) (n int) { return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *CollationBodyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CollationBodyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CollationBodyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ShardId", wireType) } m.ShardId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ShardId |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } m.Period = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Period |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ChunkRoot", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthMessages } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.ChunkRoot = append(m.ChunkRoot[:0], dAtA[iNdEx:postIndex]...) if m.ChunkRoot == nil { m.ChunkRoot = []byte{} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthMessages } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) if m.ProposerAddress == nil { m.ProposerAddress = []byte{} } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthMessages } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) if m.Signature == nil { m.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMessages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CollationBodyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CollationBodyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CollationBodyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HeaderHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthMessages } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.HeaderHash = append(m.HeaderHash[:0], dAtA[iNdEx:postIndex]...) if m.HeaderHash == nil { m.HeaderHash = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthMessages } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Body = append(m.Body[:0], dAtA[iNdEx:postIndex]...) if m.Body == nil { m.Body = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMessages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Transaction) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Transaction: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Transaction: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) } m.Nonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Nonce |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) } m.GasPrice = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.GasPrice |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) } m.GasLimit = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.GasLimit |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthMessages } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Recipient = append(m.Recipient[:0], dAtA[iNdEx:postIndex]...) if m.Recipient == nil { m.Recipient = []byte{} } iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } m.Value = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Value |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthMessages } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Input = append(m.Input[:0], dAtA[iNdEx:postIndex]...) if m.Input == nil { m.Input = []byte{} } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthMessages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Signature == nil { m.Signature = &Signature{} } if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMessages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Signature) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Signature: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) } m.V = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.V |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) } m.R = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.R |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } m.S = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.S |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipMessages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipMessages(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMessages } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMessages } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMessages } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthMessages } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMessages } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipMessages(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("proto/sharding/p2p/v1/messages.proto", fileDescriptor_messages_378f1318ba5b4c6a) } var fileDescriptor_messages_378f1318ba5b4c6a = []byte{ // 479 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xdf, 0x6e, 0xd3, 0x3c, 0x18, 0xc6, 0x3f, 0x6f, 0xfd, 0xb3, 0xbe, 0x8d, 0xf4, 0x45, 0xd6, 0x18, 0x81, 0x41, 0xa9, 0x0a, 0x07, 0x85, 0x83, 0x54, 0x2b, 0xe2, 0x02, 0xda, 0x52, 0x89, 0x89, 0x2a, 0x19, 0x49, 0x26, 0xc4, 0x51, 0xe4, 0x25, 0x56, 0x62, 0xd1, 0xda, 0xc6, 0x4e, 0x22, 0xed, 0xb2, 0xb8, 0x0b, 0x0e, 0xb9, 0x04, 0xd4, 0x43, 0xae, 0x02, 0xc5, 0x49, 0xc7, 0x04, 0xe2, 0x2c, 0xbf, 0xe7, 0x79, 0xe5, 0xbc, 0x3f, 0x27, 0xf0, 0x42, 0x2a, 0x51, 0x88, 0x99, 0xce, 0x89, 0x4a, 0x19, 0xcf, 0x66, 0x72, 0x2e, 0x67, 0xd5, 0xc5, 0x6c, 0x47, 0xb5, 0x26, 0x19, 0xd5, 0xae, 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