diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 69f5edd725..b44bf145a5 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -54962,6 +54962,69 @@ definitions: type: array items: type: string + lavanet.lava.pairing.GenerateBadgeResponse: + type: object + properties: + badge: + type: object + properties: + cu_allocation: + type: string + format: uint64 + epoch: + type: string + format: uint64 + address: + type: string + lava_chain_id: + type: string + project_sig: + type: string + format: byte + pairing_list: + type: array + items: + type: object + properties: + stake: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + address: + type: string + stake_applied_block: + type: string + format: uint64 + endpoints: + type: array + items: + type: object + properties: + iPPORT: + type: string + useType: + type: string + geolocation: + type: string + format: uint64 + geolocation: + type: string + format: uint64 + chain: + type: string + moniker: + type: string lavanet.lava.pairing.Metadata: type: object properties: diff --git a/proto/pairing/badges.proto b/proto/pairing/badges.proto new file mode 100644 index 0000000000..a793856171 --- /dev/null +++ b/proto/pairing/badges.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package lavanet.lava.pairing; +import "gogoproto/gogo.proto"; +import "google/protobuf/wrappers.proto"; +import "epochstorage/stake_entry.proto"; + +option go_package = "github.com/lavanet/lava/x/pairing/types"; + +message Badge { + uint64 cu_allocation =1; + uint64 epoch = 2; + string address = 3; + string lava_chain_id = 4; + bytes project_sig = 5; +} + +message GenerateBadgeRequest { + string badge_address = 1; + string project_id = 2; + string spec_id = 3 [(gogoproto.nullable) = true]; +} + +message GenerateBadgeResponse { + Badge badge = 1; + repeated lavanet.lava.epochstorage.StakeEntry pairing_list = 2 [(gogoproto.nullable) = true]; +} + +service BadgeGenerator { + rpc GenerateBadge(GenerateBadgeRequest) returns (GenerateBadgeResponse) {} +} diff --git a/proto/pairing/relay.proto b/proto/pairing/relay.proto index 864a9b9fc8..14fa963d64 100644 --- a/proto/pairing/relay.proto +++ b/proto/pairing/relay.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package lavanet.lava.pairing; import "gogoproto/gogo.proto"; import "google/protobuf/wrappers.proto"; -import "epochstorage/stake_entry.proto"; +import "pairing/badges.proto"; option go_package = "github.com/lavanet/lava/x/pairing/types"; @@ -48,24 +48,8 @@ message RelayRequest { RelayPrivateData relay_data= 2; } -message Badge { - uint64 cu_allocation =1; - uint64 epoch = 2; - string address = 3; - string lava_chain_id = 4; - bytes project_sig = 5; -} -message GenerateBadgeRequest { - string badge_address = 1; - string project_id = 2; - string spec_id = 3 [(gogoproto.nullable) = true]; -} -message GenerateBadgeResponse { - Badge badge = 1; - repeated lavanet.lava.epochstorage.StakeEntry pairing_list = 2 [(gogoproto.nullable) = true]; -} message RelayReply { bytes data = 1; diff --git a/x/pairing/types/badges.pb.go b/x/pairing/types/badges.pb.go new file mode 100644 index 0000000000..a19bd8ed10 --- /dev/null +++ b/x/pairing/types/badges.pb.go @@ -0,0 +1,1108 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pairing/badges.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + types "github.com/lavanet/lava/x/epochstorage/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/wrapperspb" + io "io" + math "math" + math_bits "math/bits" +) + +// 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 Badge struct { + CuAllocation uint64 `protobuf:"varint,1,opt,name=cu_allocation,json=cuAllocation,proto3" json:"cu_allocation,omitempty"` + Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + LavaChainId string `protobuf:"bytes,4,opt,name=lava_chain_id,json=lavaChainId,proto3" json:"lava_chain_id,omitempty"` + ProjectSig []byte `protobuf:"bytes,5,opt,name=project_sig,json=projectSig,proto3" json:"project_sig,omitempty"` +} + +func (m *Badge) Reset() { *m = Badge{} } +func (m *Badge) String() string { return proto.CompactTextString(m) } +func (*Badge) ProtoMessage() {} +func (*Badge) Descriptor() ([]byte, []int) { + return fileDescriptor_fad72c0554b022ec, []int{0} +} +func (m *Badge) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Badge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Badge.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 *Badge) XXX_Merge(src proto.Message) { + xxx_messageInfo_Badge.Merge(m, src) +} +func (m *Badge) XXX_Size() int { + return m.Size() +} +func (m *Badge) XXX_DiscardUnknown() { + xxx_messageInfo_Badge.DiscardUnknown(m) +} + +var xxx_messageInfo_Badge proto.InternalMessageInfo + +func (m *Badge) GetCuAllocation() uint64 { + if m != nil { + return m.CuAllocation + } + return 0 +} + +func (m *Badge) GetEpoch() uint64 { + if m != nil { + return m.Epoch + } + return 0 +} + +func (m *Badge) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *Badge) GetLavaChainId() string { + if m != nil { + return m.LavaChainId + } + return "" +} + +func (m *Badge) GetProjectSig() []byte { + if m != nil { + return m.ProjectSig + } + return nil +} + +type GenerateBadgeRequest struct { + BadgeAddress string `protobuf:"bytes,1,opt,name=badge_address,json=badgeAddress,proto3" json:"badge_address,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + SpecId string `protobuf:"bytes,3,opt,name=spec_id,json=specId,proto3" json:"spec_id,omitempty"` +} + +func (m *GenerateBadgeRequest) Reset() { *m = GenerateBadgeRequest{} } +func (m *GenerateBadgeRequest) String() string { return proto.CompactTextString(m) } +func (*GenerateBadgeRequest) ProtoMessage() {} +func (*GenerateBadgeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fad72c0554b022ec, []int{1} +} +func (m *GenerateBadgeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenerateBadgeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenerateBadgeRequest.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 *GenerateBadgeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenerateBadgeRequest.Merge(m, src) +} +func (m *GenerateBadgeRequest) XXX_Size() int { + return m.Size() +} +func (m *GenerateBadgeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GenerateBadgeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GenerateBadgeRequest proto.InternalMessageInfo + +func (m *GenerateBadgeRequest) GetBadgeAddress() string { + if m != nil { + return m.BadgeAddress + } + return "" +} + +func (m *GenerateBadgeRequest) GetProjectId() string { + if m != nil { + return m.ProjectId + } + return "" +} + +func (m *GenerateBadgeRequest) GetSpecId() string { + if m != nil { + return m.SpecId + } + return "" +} + +type GenerateBadgeResponse struct { + Badge *Badge `protobuf:"bytes,1,opt,name=badge,proto3" json:"badge,omitempty"` + PairingList []*types.StakeEntry `protobuf:"bytes,2,rep,name=pairing_list,json=pairingList,proto3" json:"pairing_list,omitempty"` +} + +func (m *GenerateBadgeResponse) Reset() { *m = GenerateBadgeResponse{} } +func (m *GenerateBadgeResponse) String() string { return proto.CompactTextString(m) } +func (*GenerateBadgeResponse) ProtoMessage() {} +func (*GenerateBadgeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_fad72c0554b022ec, []int{2} +} +func (m *GenerateBadgeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenerateBadgeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenerateBadgeResponse.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 *GenerateBadgeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenerateBadgeResponse.Merge(m, src) +} +func (m *GenerateBadgeResponse) XXX_Size() int { + return m.Size() +} +func (m *GenerateBadgeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GenerateBadgeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GenerateBadgeResponse proto.InternalMessageInfo + +func (m *GenerateBadgeResponse) GetBadge() *Badge { + if m != nil { + return m.Badge + } + return nil +} + +func (m *GenerateBadgeResponse) GetPairingList() []*types.StakeEntry { + if m != nil { + return m.PairingList + } + return nil +} + +func init() { + proto.RegisterType((*Badge)(nil), "lavanet.lava.pairing.Badge") + proto.RegisterType((*GenerateBadgeRequest)(nil), "lavanet.lava.pairing.GenerateBadgeRequest") + proto.RegisterType((*GenerateBadgeResponse)(nil), "lavanet.lava.pairing.GenerateBadgeResponse") +} + +func init() { proto.RegisterFile("pairing/badges.proto", fileDescriptor_fad72c0554b022ec) } + +var fileDescriptor_fad72c0554b022ec = []byte{ + // 460 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xc1, 0x8e, 0xd3, 0x30, + 0x14, 0xac, 0xbb, 0xed, 0xae, 0xd6, 0x69, 0x39, 0x58, 0x41, 0x8a, 0x8a, 0x36, 0x5b, 0x05, 0x21, + 0x2a, 0x90, 0x12, 0x51, 0xbe, 0xa0, 0x45, 0x08, 0x55, 0x42, 0x1c, 0xb2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, 0x7e, 0xef, 0x42, 0xf4, 0x6d, 0x1f, 0xf6, 0x6e, 0xf7, 0x61, 0xef, + 0xe7, 0x3e, 0xec, 0xbd, 0x7d, 0xcc, 0xb8, 0xde, 0x34, 0xeb, 0x38, 0x17, 0x1f, 0x12, 0x27, 0x69, + 0xd7, 0xe4, 0x4b, 0xd2, 0xfd, 0x77, 0xbd, 0xad, 0x41, 0xad, 0x4f, 0xed, 0x1f, 0x7c, 0xfe, 0x27, + 0x00, 0x00, 0xff, 0xff, 0x94, 0xd5, 0xf4, 0x89, 0x07, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// BadgeGeneratorClient is the client API for BadgeGenerator service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type BadgeGeneratorClient interface { + GenerateBadge(ctx context.Context, in *GenerateBadgeRequest, opts ...grpc.CallOption) (*GenerateBadgeResponse, error) +} + +type badgeGeneratorClient struct { + cc grpc1.ClientConn +} + +func NewBadgeGeneratorClient(cc grpc1.ClientConn) BadgeGeneratorClient { + return &badgeGeneratorClient{cc} +} + +func (c *badgeGeneratorClient) GenerateBadge(ctx context.Context, in *GenerateBadgeRequest, opts ...grpc.CallOption) (*GenerateBadgeResponse, error) { + out := new(GenerateBadgeResponse) + err := c.cc.Invoke(ctx, "/lavanet.lava.pairing.BadgeGenerator/GenerateBadge", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BadgeGeneratorServer is the server API for BadgeGenerator service. +type BadgeGeneratorServer interface { + GenerateBadge(context.Context, *GenerateBadgeRequest) (*GenerateBadgeResponse, error) +} + +// UnimplementedBadgeGeneratorServer can be embedded to have forward compatible implementations. +type UnimplementedBadgeGeneratorServer struct { +} + +func (*UnimplementedBadgeGeneratorServer) GenerateBadge(ctx context.Context, req *GenerateBadgeRequest) (*GenerateBadgeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateBadge not implemented") +} + +func RegisterBadgeGeneratorServer(s grpc1.Server, srv BadgeGeneratorServer) { + s.RegisterService(&_BadgeGenerator_serviceDesc, srv) +} + +func _BadgeGenerator_GenerateBadge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateBadgeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BadgeGeneratorServer).GenerateBadge(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lavanet.lava.pairing.BadgeGenerator/GenerateBadge", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BadgeGeneratorServer).GenerateBadge(ctx, req.(*GenerateBadgeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _BadgeGenerator_serviceDesc = grpc.ServiceDesc{ + ServiceName: "lavanet.lava.pairing.BadgeGenerator", + HandlerType: (*BadgeGeneratorServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GenerateBadge", + Handler: _BadgeGenerator_GenerateBadge_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pairing/badges.proto", +} + +func (m *Badge) 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 *Badge) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Badge) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ProjectSig) > 0 { + i -= len(m.ProjectSig) + copy(dAtA[i:], m.ProjectSig) + i = encodeVarintBadges(dAtA, i, uint64(len(m.ProjectSig))) + i-- + dAtA[i] = 0x2a + } + if len(m.LavaChainId) > 0 { + i -= len(m.LavaChainId) + copy(dAtA[i:], m.LavaChainId) + i = encodeVarintBadges(dAtA, i, uint64(len(m.LavaChainId))) + i-- + dAtA[i] = 0x22 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintBadges(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if m.Epoch != 0 { + i = encodeVarintBadges(dAtA, i, uint64(m.Epoch)) + i-- + dAtA[i] = 0x10 + } + if m.CuAllocation != 0 { + i = encodeVarintBadges(dAtA, i, uint64(m.CuAllocation)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GenerateBadgeRequest) 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 *GenerateBadgeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenerateBadgeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SpecId) > 0 { + i -= len(m.SpecId) + copy(dAtA[i:], m.SpecId) + i = encodeVarintBadges(dAtA, i, uint64(len(m.SpecId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ProjectId) > 0 { + i -= len(m.ProjectId) + copy(dAtA[i:], m.ProjectId) + i = encodeVarintBadges(dAtA, i, uint64(len(m.ProjectId))) + i-- + dAtA[i] = 0x12 + } + if len(m.BadgeAddress) > 0 { + i -= len(m.BadgeAddress) + copy(dAtA[i:], m.BadgeAddress) + i = encodeVarintBadges(dAtA, i, uint64(len(m.BadgeAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GenerateBadgeResponse) 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 *GenerateBadgeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenerateBadgeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PairingList) > 0 { + for iNdEx := len(m.PairingList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PairingList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBadges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Badge != nil { + { + size, err := m.Badge.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBadges(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintBadges(dAtA []byte, offset int, v uint64) int { + offset -= sovBadges(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Badge) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CuAllocation != 0 { + n += 1 + sovBadges(uint64(m.CuAllocation)) + } + if m.Epoch != 0 { + n += 1 + sovBadges(uint64(m.Epoch)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovBadges(uint64(l)) + } + l = len(m.LavaChainId) + if l > 0 { + n += 1 + l + sovBadges(uint64(l)) + } + l = len(m.ProjectSig) + if l > 0 { + n += 1 + l + sovBadges(uint64(l)) + } + return n +} + +func (m *GenerateBadgeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BadgeAddress) + if l > 0 { + n += 1 + l + sovBadges(uint64(l)) + } + l = len(m.ProjectId) + if l > 0 { + n += 1 + l + sovBadges(uint64(l)) + } + l = len(m.SpecId) + if l > 0 { + n += 1 + l + sovBadges(uint64(l)) + } + return n +} + +func (m *GenerateBadgeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Badge != nil { + l = m.Badge.Size() + n += 1 + l + sovBadges(uint64(l)) + } + if len(m.PairingList) > 0 { + for _, e := range m.PairingList { + l = e.Size() + n += 1 + l + sovBadges(uint64(l)) + } + } + return n +} + +func sovBadges(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBadges(x uint64) (n int) { + return sovBadges(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Badge) 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 ErrIntOverflowBadges + } + 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: Badge: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Badge: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CuAllocation", wireType) + } + m.CuAllocation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CuAllocation |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + 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 ErrIntOverflowBadges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Epoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + 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 ErrInvalidLengthBadges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBadges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LavaChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + 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 ErrInvalidLengthBadges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBadges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LavaChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProjectSig", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBadges + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBadges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProjectSig = append(m.ProjectSig[:0], dAtA[iNdEx:postIndex]...) + if m.ProjectSig == nil { + m.ProjectSig = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBadges(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBadges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenerateBadgeRequest) 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 ErrIntOverflowBadges + } + 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: GenerateBadgeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenerateBadgeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BadgeAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + 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 ErrInvalidLengthBadges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBadges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BadgeAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProjectId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + 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 ErrInvalidLengthBadges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBadges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProjectId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpecId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + 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 ErrInvalidLengthBadges + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBadges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpecId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBadges(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBadges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenerateBadgeResponse) 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 ErrIntOverflowBadges + } + 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: GenerateBadgeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenerateBadgeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Badge", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBadges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBadges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Badge == nil { + m.Badge = &Badge{} + } + if err := m.Badge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PairingList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBadges + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBadges + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBadges + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PairingList = append(m.PairingList, &types.StakeEntry{}) + if err := m.PairingList[len(m.PairingList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBadges(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBadges + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBadges(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, ErrIntOverflowBadges + } + 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, ErrIntOverflowBadges + } + 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, ErrIntOverflowBadges + } + 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, ErrInvalidLengthBadges + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBadges + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBadges + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBadges = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBadges = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBadges = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/pairing/types/relay.pb.go b/x/pairing/types/relay.pb.go index 7d9ed98ced..56ba51e9e5 100644 --- a/x/pairing/types/relay.pb.go +++ b/x/pairing/types/relay.pb.go @@ -10,7 +10,6 @@ import ( _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - types "github.com/lavanet/lava/x/epochstorage/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -359,194 +358,6 @@ func (m *RelayRequest) GetRelayData() *RelayPrivateData { return nil } -type Badge struct { - CuAllocation uint64 `protobuf:"varint,1,opt,name=cu_allocation,json=cuAllocation,proto3" json:"cu_allocation,omitempty"` - Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - LavaChainId string `protobuf:"bytes,4,opt,name=lava_chain_id,json=lavaChainId,proto3" json:"lava_chain_id,omitempty"` - ProjectSig []byte `protobuf:"bytes,5,opt,name=project_sig,json=projectSig,proto3" json:"project_sig,omitempty"` -} - -func (m *Badge) Reset() { *m = Badge{} } -func (m *Badge) String() string { return proto.CompactTextString(m) } -func (*Badge) ProtoMessage() {} -func (*Badge) Descriptor() ([]byte, []int) { - return fileDescriptor_10cd1bfeb9978acf, []int{4} -} -func (m *Badge) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Badge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Badge.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 *Badge) XXX_Merge(src proto.Message) { - xxx_messageInfo_Badge.Merge(m, src) -} -func (m *Badge) XXX_Size() int { - return m.Size() -} -func (m *Badge) XXX_DiscardUnknown() { - xxx_messageInfo_Badge.DiscardUnknown(m) -} - -var xxx_messageInfo_Badge proto.InternalMessageInfo - -func (m *Badge) GetCuAllocation() uint64 { - if m != nil { - return m.CuAllocation - } - return 0 -} - -func (m *Badge) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *Badge) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *Badge) GetLavaChainId() string { - if m != nil { - return m.LavaChainId - } - return "" -} - -func (m *Badge) GetProjectSig() []byte { - if m != nil { - return m.ProjectSig - } - return nil -} - -type GenerateBadgeRequest struct { - BadgeAddress string `protobuf:"bytes,1,opt,name=badge_address,json=badgeAddress,proto3" json:"badge_address,omitempty"` - ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - SpecId string `protobuf:"bytes,3,opt,name=spec_id,json=specId,proto3" json:"spec_id,omitempty"` -} - -func (m *GenerateBadgeRequest) Reset() { *m = GenerateBadgeRequest{} } -func (m *GenerateBadgeRequest) String() string { return proto.CompactTextString(m) } -func (*GenerateBadgeRequest) ProtoMessage() {} -func (*GenerateBadgeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_10cd1bfeb9978acf, []int{5} -} -func (m *GenerateBadgeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenerateBadgeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenerateBadgeRequest.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 *GenerateBadgeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenerateBadgeRequest.Merge(m, src) -} -func (m *GenerateBadgeRequest) XXX_Size() int { - return m.Size() -} -func (m *GenerateBadgeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GenerateBadgeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GenerateBadgeRequest proto.InternalMessageInfo - -func (m *GenerateBadgeRequest) GetBadgeAddress() string { - if m != nil { - return m.BadgeAddress - } - return "" -} - -func (m *GenerateBadgeRequest) GetProjectId() string { - if m != nil { - return m.ProjectId - } - return "" -} - -func (m *GenerateBadgeRequest) GetSpecId() string { - if m != nil { - return m.SpecId - } - return "" -} - -type GenerateBadgeResponse struct { - Badge *Badge `protobuf:"bytes,1,opt,name=badge,proto3" json:"badge,omitempty"` - PairingList []*types.StakeEntry `protobuf:"bytes,2,rep,name=pairing_list,json=pairingList,proto3" json:"pairing_list,omitempty"` -} - -func (m *GenerateBadgeResponse) Reset() { *m = GenerateBadgeResponse{} } -func (m *GenerateBadgeResponse) String() string { return proto.CompactTextString(m) } -func (*GenerateBadgeResponse) ProtoMessage() {} -func (*GenerateBadgeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_10cd1bfeb9978acf, []int{6} -} -func (m *GenerateBadgeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenerateBadgeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenerateBadgeResponse.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 *GenerateBadgeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenerateBadgeResponse.Merge(m, src) -} -func (m *GenerateBadgeResponse) XXX_Size() int { - return m.Size() -} -func (m *GenerateBadgeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GenerateBadgeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GenerateBadgeResponse proto.InternalMessageInfo - -func (m *GenerateBadgeResponse) GetBadge() *Badge { - if m != nil { - return m.Badge - } - return nil -} - -func (m *GenerateBadgeResponse) GetPairingList() []*types.StakeEntry { - if m != nil { - return m.PairingList - } - return nil -} - type RelayReply struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` @@ -561,7 +372,7 @@ func (m *RelayReply) Reset() { *m = RelayReply{} } func (m *RelayReply) String() string { return proto.CompactTextString(m) } func (*RelayReply) ProtoMessage() {} func (*RelayReply) Descriptor() ([]byte, []int) { - return fileDescriptor_10cd1bfeb9978acf, []int{7} + return fileDescriptor_10cd1bfeb9978acf, []int{4} } func (m *RelayReply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -649,7 +460,7 @@ func (m *QualityOfServiceReport) Reset() { *m = QualityOfServiceReport{} func (m *QualityOfServiceReport) String() string { return proto.CompactTextString(m) } func (*QualityOfServiceReport) ProtoMessage() {} func (*QualityOfServiceReport) Descriptor() ([]byte, []int) { - return fileDescriptor_10cd1bfeb9978acf, []int{8} + return fileDescriptor_10cd1bfeb9978acf, []int{5} } func (m *QualityOfServiceReport) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -683,9 +494,6 @@ func init() { proto.RegisterType((*RelayPrivateData)(nil), "lavanet.lava.pairing.RelayPrivateData") proto.RegisterType((*Metadata)(nil), "lavanet.lava.pairing.Metadata") proto.RegisterType((*RelayRequest)(nil), "lavanet.lava.pairing.RelayRequest") - proto.RegisterType((*Badge)(nil), "lavanet.lava.pairing.Badge") - proto.RegisterType((*GenerateBadgeRequest)(nil), "lavanet.lava.pairing.GenerateBadgeRequest") - proto.RegisterType((*GenerateBadgeResponse)(nil), "lavanet.lava.pairing.GenerateBadgeResponse") proto.RegisterType((*RelayReply)(nil), "lavanet.lava.pairing.RelayReply") proto.RegisterType((*QualityOfServiceReport)(nil), "lavanet.lava.pairing.QualityOfServiceReport") } @@ -693,77 +501,66 @@ func init() { func init() { proto.RegisterFile("pairing/relay.proto", fileDescriptor_10cd1bfeb9978acf) } var fileDescriptor_10cd1bfeb9978acf = []byte{ - // 1120 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0xfa, 0x47, 0x6c, 0x8f, 0x37, 0xfd, 0x56, 0xd3, 0xa4, 0x5d, 0xa5, 0xdf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 0x8b, 0xa8, 0x26, 0x59, 0xe2, 0x75, 0x00, - 0x47, 0x2f, 0xf1, 0x87, 0xa8, 0x31, 0x21, 0x71, 0x42, 0x3d, 0x17, 0x52, 0xb9, 0x7a, 0x76, 0x2a, - 0x23, 0xed, 0x12, 0x18, 0x4f, 0xff, 0xc7, 0x2a, 0xba, 0x08, 0xf4, 0x3d, 0x11, 0x6c, 0x4e, 0x14, - 0xbd, 0x47, 0x14, 0xc1, 0x37, 0xd1, 0xff, 0x22, 0x9e, 0x65, 0x34, 0x52, 0x9a, 0x09, 0xb5, 0xc8, - 0xa9, 0xa5, 0xf2, 0xc2, 0xa9, 0xf9, 0xab, 0x45, 0x4e, 0x35, 0xd7, 0x24, 0x67, 0x61, 0x21, 0x52, - 0x60, 0xb3, 0x1d, 0xac, 0x90, 0x9c, 0x3d, 0x13, 0x29, 0xc6, 0xa8, 0x1e, 0x13, 0x45, 0x80, 0x42, - 0x37, 0x80, 0x35, 0xbe, 0x8e, 0x56, 0x05, 0x3d, 0x28, 0xa8, 0x54, 0xe1, 0x24, 0xe5, 0xd1, 0x3e, - 0x90, 0x58, 0x0b, 0x5c, 0x6b, 0x1c, 0x69, 0x9b, 0x76, 0xd2, 0x88, 0x2c, 0x53, 0x54, 0xec, 0x91, - 0x88, 0x5a, 0x42, 0x5d, 0x92, 0xb3, 0x71, 0x69, 0xd3, 0xe8, 0x92, 0xa4, 0x0a, 0xf8, 0x74, 0x03, - 0x58, 0xe3, 0x3b, 0xa8, 0x35, 0xa3, 0x8a, 0x40, 0xd4, 0x66, 0xaf, 0xd6, 0xef, 0x6c, 0x75, 0xcf, - 0x4e, 0xff, 0x4b, 0xeb, 0x35, 0xaa, 0x3f, 0x3f, 0xdc, 0xac, 0x04, 0x27, 0xb7, 0xfc, 0x5b, 0xa8, - 0x55, 0x9e, 0xe9, 0x08, 0x19, 0x99, 0x95, 0x69, 0xc3, 0x5a, 0x13, 0x3c, 0x27, 0x69, 0x41, 0x6d, - 0xaa, 0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, 0x02, 0x62, - 0x86, 0x5c, 0x32, 0x27, 0x2c, 0x25, 0x13, 0xa6, 0x43, 0x1b, 0x69, 0x8d, 0xb6, 0xdf, 0x38, 0xc0, - 0x25, 0x13, 0x60, 0x19, 0xcb, 0x0f, 0x5e, 0x82, 0xc6, 0x4f, 0x51, 0x5d, 0x2e, 0xb2, 0xc8, 0x2a, - 0xf4, 0xd3, 0x37, 0x0e, 0xd1, 0x31, 0x21, 0x34, 0x86, 0x1f, 0x00, 0xd4, 0xd6, 0x3f, 0x0e, 0x6a, - 0x82, 0x76, 0xa8, 0xc0, 0x8f, 0x51, 0x03, 0x96, 0xf8, 0xbc, 0x59, 0x64, 0x9b, 0x6e, 0xa3, 0x77, - 0xae, 0x4f, 0x9e, 0x2e, 0xfc, 0x0a, 0xde, 0x45, 0x17, 0xcc, 0xfc, 0x2a, 0x26, 0x32, 0x12, 0x6c, - 0x42, 0xdf, 0x16, 0xf2, 0x07, 0x0e, 0xde, 0x46, 0x8d, 0x27, 0x82, 0x4f, 0x28, 0xfe, 0xff, 0xc0, - 0xfc, 0xa1, 0x0c, 0xca, 0x3f, 0x94, 0xc1, 0xb3, 0x71, 0xa6, 0x6e, 0xdf, 0xfa, 0x5a, 0x8f, 0xdf, - 0x8d, 0x73, 0x4f, 0xfd, 0xca, 0xe8, 0xee, 0xf3, 0xa3, 0xae, 0xf3, 0xe2, 0xa8, 0xeb, 0xfc, 0x75, - 0xd4, 0x75, 0x7e, 0x3a, 0xee, 0x56, 0x5e, 0x1c, 0x77, 0x2b, 0x7f, 0x1c, 0x77, 0x2b, 0xbb, 0x37, - 0x97, 0xca, 0x6a, 0x1f, 0x04, 0xdf, 0xe1, 0x77, 0xc3, 0xf2, 0x9f, 0x0a, 0x6a, 0x3b, 0x59, 0x01, - 0xe8, 0x8f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x4f, 0x82, 0xba, 0x6b, 0x09, 0x00, 0x00, + // 934 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xfa, 0x4f, 0x6c, 0x3f, 0x6f, 0x42, 0x34, 0x75, 0xda, 0x95, 0x0b, 0x8e, 0x59, 0xa4, + 0xd6, 0x07, 0x58, 0x43, 0x28, 0x3d, 0x20, 0x21, 0x15, 0xd3, 0x88, 0x9a, 0x7f, 0x4d, 0x27, 0x94, + 0x43, 0x2e, 0xd6, 0x78, 0x3d, 0x59, 0x8f, 0xba, 0xde, 0xd9, 0xec, 0xec, 0x1a, 0xcc, 0x99, 0x03, + 0x47, 0x3e, 0x04, 0x9f, 0x80, 0x33, 0x1f, 0xa0, 0xc7, 0x1e, 0x11, 0x87, 0x08, 0x25, 0xdf, 0x80, + 0x3b, 0x12, 0x9a, 0x37, 0xe3, 0xd4, 0x20, 0x2b, 0x52, 0xa5, 0x9e, 0xf6, 0xfd, 0xfd, 0xbd, 0x79, + 0xef, 0xf7, 0x9e, 0x16, 0x6e, 0xa4, 0x4c, 0x64, 0x22, 0x89, 0x06, 0x19, 0x8f, 0xd9, 0x32, 0x48, + 0x33, 0x99, 0x4b, 0xd2, 0x8e, 0xd9, 0x82, 0x25, 0x3c, 0x0f, 0xf4, 0x37, 0xb0, 0x11, 0x9d, 0x76, + 0x24, 0x23, 0x89, 0x01, 0x03, 0x2d, 0x99, 0xd8, 0x4e, 0x37, 0x92, 0x32, 0x8a, 0xf9, 0x00, 0xb5, + 0x49, 0x71, 0x3a, 0xf8, 0x3e, 0x63, 0x69, 0xca, 0x33, 0x65, 0xfd, 0xed, 0x55, 0x81, 0x09, 0x9b, + 0x46, 0xdc, 0x5a, 0xfd, 0xdf, 0x2b, 0xe0, 0x52, 0x5d, 0xf1, 0x98, 0x2b, 0x25, 0x64, 0x42, 0x6e, + 0x41, 0x5d, 0xa5, 0x3c, 0x1c, 0x8b, 0xa9, 0xe7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67, 0x89, 0xb3, 0x9d, 0x6c, 0x21, 0xf4, 0x87, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa5, 0xd2, + 0x8d, 0x93, 0xa5, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1216,153 +1013,6 @@ func (m *RelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Badge) 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 *Badge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Badge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProjectSig) > 0 { - i -= len(m.ProjectSig) - copy(dAtA[i:], m.ProjectSig) - i = encodeVarintRelay(dAtA, i, uint64(len(m.ProjectSig))) - i-- - dAtA[i] = 0x2a - } - if len(m.LavaChainId) > 0 { - i -= len(m.LavaChainId) - copy(dAtA[i:], m.LavaChainId) - i = encodeVarintRelay(dAtA, i, uint64(len(m.LavaChainId))) - i-- - dAtA[i] = 0x22 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintRelay(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x1a - } - if m.Epoch != 0 { - i = encodeVarintRelay(dAtA, i, uint64(m.Epoch)) - i-- - dAtA[i] = 0x10 - } - if m.CuAllocation != 0 { - i = encodeVarintRelay(dAtA, i, uint64(m.CuAllocation)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenerateBadgeRequest) 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 *GenerateBadgeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenerateBadgeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpecId) > 0 { - i -= len(m.SpecId) - copy(dAtA[i:], m.SpecId) - i = encodeVarintRelay(dAtA, i, uint64(len(m.SpecId))) - i-- - dAtA[i] = 0x1a - } - if len(m.ProjectId) > 0 { - i -= len(m.ProjectId) - copy(dAtA[i:], m.ProjectId) - i = encodeVarintRelay(dAtA, i, uint64(len(m.ProjectId))) - i-- - dAtA[i] = 0x12 - } - if len(m.BadgeAddress) > 0 { - i -= len(m.BadgeAddress) - copy(dAtA[i:], m.BadgeAddress) - i = encodeVarintRelay(dAtA, i, uint64(len(m.BadgeAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenerateBadgeResponse) 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 *GenerateBadgeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenerateBadgeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PairingList) > 0 { - for iNdEx := len(m.PairingList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PairingList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRelay(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Badge != nil { - { - size, err := m.Badge.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRelay(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *RelayReply) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1627,94 +1277,27 @@ func (m *RelayRequest) Size() (n int) { return n } -func (m *Badge) Size() (n int) { +func (m *RelayReply) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.CuAllocation != 0 { - n += 1 + sovRelay(uint64(m.CuAllocation)) - } - if m.Epoch != 0 { - n += 1 + sovRelay(uint64(m.Epoch)) - } - l = len(m.Address) + l = len(m.Data) if l > 0 { n += 1 + l + sovRelay(uint64(l)) } - l = len(m.LavaChainId) + l = len(m.Sig) if l > 0 { n += 1 + l + sovRelay(uint64(l)) } - l = len(m.ProjectSig) - if l > 0 { - n += 1 + l + sovRelay(uint64(l)) + if m.Nonce != 0 { + n += 1 + sovRelay(uint64(m.Nonce)) } - return n -} - -func (m *GenerateBadgeRequest) Size() (n int) { - if m == nil { - return 0 + if m.LatestBlock != 0 { + n += 1 + sovRelay(uint64(m.LatestBlock)) } - var l int - _ = l - l = len(m.BadgeAddress) - if l > 0 { - n += 1 + l + sovRelay(uint64(l)) - } - l = len(m.ProjectId) - if l > 0 { - n += 1 + l + sovRelay(uint64(l)) - } - l = len(m.SpecId) - if l > 0 { - n += 1 + l + sovRelay(uint64(l)) - } - return n -} - -func (m *GenerateBadgeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Badge != nil { - l = m.Badge.Size() - n += 1 + l + sovRelay(uint64(l)) - } - if len(m.PairingList) > 0 { - for _, e := range m.PairingList { - l = e.Size() - n += 1 + l + sovRelay(uint64(l)) - } - } - return n -} - -func (m *RelayReply) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovRelay(uint64(l)) - } - l = len(m.Sig) - if l > 0 { - n += 1 + l + sovRelay(uint64(l)) - } - if m.Nonce != 0 { - n += 1 + sovRelay(uint64(m.Nonce)) - } - if m.LatestBlock != 0 { - n += 1 + sovRelay(uint64(m.LatestBlock)) - } - l = len(m.FinalizedBlocksHashes) + l = len(m.FinalizedBlocksHashes) if l > 0 { n += 1 + l + sovRelay(uint64(l)) } @@ -2651,458 +2234,6 @@ func (m *RelayRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *Badge) 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 ErrIntOverflowRelay - } - 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: Badge: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Badge: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CuAllocation", wireType) - } - m.CuAllocation = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CuAllocation |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - 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 ErrIntOverflowRelay - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - 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 ErrInvalidLengthRelay - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRelay - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LavaChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - 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 ErrInvalidLengthRelay - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRelay - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LavaChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectSig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRelay - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRelay - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectSig = append(m.ProjectSig[:0], dAtA[iNdEx:postIndex]...) - if m.ProjectSig == nil { - m.ProjectSig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRelay(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRelay - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenerateBadgeRequest) 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 ErrIntOverflowRelay - } - 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: GenerateBadgeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenerateBadgeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BadgeAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - 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 ErrInvalidLengthRelay - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRelay - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BadgeAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - 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 ErrInvalidLengthRelay - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRelay - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpecId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - 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 ErrInvalidLengthRelay - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRelay - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpecId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRelay(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRelay - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenerateBadgeResponse) 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 ErrIntOverflowRelay - } - 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: GenerateBadgeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenerateBadgeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Badge", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRelay - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRelay - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Badge == nil { - m.Badge = &Badge{} - } - if err := m.Badge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PairingList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRelay - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRelay - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRelay - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PairingList = append(m.PairingList, &types.StakeEntry{}) - if err := m.PairingList[len(m.PairingList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRelay(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRelay - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *RelayReply) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0