From 9f137694b7e203d61a5430b941b9de9e0431d1cd Mon Sep 17 00:00:00 2001 From: oren-lava Date: Wed, 11 Oct 2023 11:42:19 +0300 Subject: [PATCH 1/4] CNS-640:: scaffoled and implemented ConsumerConflicts query --- proto/lavanet/lava/conflict/query.proto | 13 + x/conflict/client/cli/query.go | 1 + .../client/cli/query_consumer_conflicts.go | 36 ++ .../keeper/grpc_query_consumer_conflicts.go | 28 ++ x/conflict/types/query.pb.go | 453 ++++++++++++++++-- x/conflict/types/query.pb.gw.go | 101 ++++ x/dualstaking/types/query.pb.go | 4 +- x/pairing/types/relay.pb.go | 149 +++--- 8 files changed, 676 insertions(+), 109 deletions(-) create mode 100644 x/conflict/client/cli/query_consumer_conflicts.go create mode 100644 x/conflict/keeper/grpc_query_consumer_conflicts.go diff --git a/proto/lavanet/lava/conflict/query.proto b/proto/lavanet/lava/conflict/query.proto index 922ec62757..5d273887bc 100644 --- a/proto/lavanet/lava/conflict/query.proto +++ b/proto/lavanet/lava/conflict/query.proto @@ -26,6 +26,11 @@ service Query { option (google.api.http).get = "/lavanet/lava/conflict/conflict_vote"; } + // Gets a consumer's conflict list (active and resolved). + rpc ConsumerConflicts(QueryConsumerConflictsRequest) returns (QueryConsumerConflictsResponse) { + option (google.api.http).get = "/lavanet/lava/conflict/consumer_conflicts/{consumer}"; + } + // this line is used by starport scaffolding # 2 } @@ -56,4 +61,12 @@ message QueryAllConflictVoteResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } +message QueryConsumerConflictsRequest { + string consumer = 1; +} + +message QueryConsumerConflictsResponse { + repeated string conflicts = 1; +} + // this line is used by starport scaffolding # 3 diff --git a/x/conflict/client/cli/query.go b/x/conflict/client/cli/query.go index eb107ad359..4b98818dbc 100644 --- a/x/conflict/client/cli/query.go +++ b/x/conflict/client/cli/query.go @@ -27,6 +27,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdQueryParams()) cmd.AddCommand(CmdListConflictVote()) cmd.AddCommand(CmdShowConflictVote()) + cmd.AddCommand(CmdConsumerConflicts()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/conflict/client/cli/query_consumer_conflicts.go b/x/conflict/client/cli/query_consumer_conflicts.go new file mode 100644 index 0000000000..8b6b1db781 --- /dev/null +++ b/x/conflict/client/cli/query_consumer_conflicts.go @@ -0,0 +1,36 @@ +package cli + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/lavanet/lava/x/conflict/types" + "github.com/spf13/cobra" +) + +func CmdConsumerConflicts() *cobra.Command { + cmd := &cobra.Command{ + Use: "consumer-conflicts ", + Short: "Gets a consumer's conflict list (active and resolved)", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryConsumerConflictsRequest{ + Consumer: args[0], + } + + res, err := queryClient.ConsumerConflicts(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/conflict/keeper/grpc_query_consumer_conflicts.go b/x/conflict/keeper/grpc_query_consumer_conflicts.go new file mode 100644 index 0000000000..6a49893d17 --- /dev/null +++ b/x/conflict/keeper/grpc_query_consumer_conflicts.go @@ -0,0 +1,28 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/lavanet/lava/x/conflict/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) ConsumerConflicts(c context.Context, req *types.QueryConsumerConflictsRequest) (*types.QueryConsumerConflictsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var conflictIndices []string + + ctx := sdk.UnwrapSDKContext(c) + conflicts := k.GetAllConflictVote(ctx) + for _, conflict := range conflicts { + if conflict.ClientAddress == req.Consumer { + conflictIndices = append(conflictIndices, conflict.Index) + } + } + + return &types.QueryConsumerConflictsResponse{Conflicts: conflictIndices}, nil +} diff --git a/x/conflict/types/query.pb.go b/x/conflict/types/query.pb.go index 57f8d71b03..db7bcee8e6 100644 --- a/x/conflict/types/query.pb.go +++ b/x/conflict/types/query.pb.go @@ -297,6 +297,94 @@ func (m *QueryAllConflictVoteResponse) GetPagination() *query.PageResponse { return nil } +type QueryConsumerConflictsRequest struct { + Consumer string `protobuf:"bytes,1,opt,name=consumer,proto3" json:"consumer,omitempty"` +} + +func (m *QueryConsumerConflictsRequest) Reset() { *m = QueryConsumerConflictsRequest{} } +func (m *QueryConsumerConflictsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryConsumerConflictsRequest) ProtoMessage() {} +func (*QueryConsumerConflictsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1179eb365bacd460, []int{6} +} +func (m *QueryConsumerConflictsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryConsumerConflictsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryConsumerConflictsRequest.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 *QueryConsumerConflictsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConsumerConflictsRequest.Merge(m, src) +} +func (m *QueryConsumerConflictsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryConsumerConflictsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConsumerConflictsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryConsumerConflictsRequest proto.InternalMessageInfo + +func (m *QueryConsumerConflictsRequest) GetConsumer() string { + if m != nil { + return m.Consumer + } + return "" +} + +type QueryConsumerConflictsResponse struct { + Conflicts []string `protobuf:"bytes,1,rep,name=conflicts,proto3" json:"conflicts,omitempty"` +} + +func (m *QueryConsumerConflictsResponse) Reset() { *m = QueryConsumerConflictsResponse{} } +func (m *QueryConsumerConflictsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryConsumerConflictsResponse) ProtoMessage() {} +func (*QueryConsumerConflictsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1179eb365bacd460, []int{7} +} +func (m *QueryConsumerConflictsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryConsumerConflictsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryConsumerConflictsResponse.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 *QueryConsumerConflictsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConsumerConflictsResponse.Merge(m, src) +} +func (m *QueryConsumerConflictsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryConsumerConflictsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConsumerConflictsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryConsumerConflictsResponse proto.InternalMessageInfo + +func (m *QueryConsumerConflictsResponse) GetConflicts() []string { + if m != nil { + return m.Conflicts + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "lavanet.lava.conflict.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "lavanet.lava.conflict.QueryParamsResponse") @@ -304,44 +392,51 @@ func init() { proto.RegisterType((*QueryGetConflictVoteResponse)(nil), "lavanet.lava.conflict.QueryGetConflictVoteResponse") proto.RegisterType((*QueryAllConflictVoteRequest)(nil), "lavanet.lava.conflict.QueryAllConflictVoteRequest") proto.RegisterType((*QueryAllConflictVoteResponse)(nil), "lavanet.lava.conflict.QueryAllConflictVoteResponse") + proto.RegisterType((*QueryConsumerConflictsRequest)(nil), "lavanet.lava.conflict.QueryConsumerConflictsRequest") + proto.RegisterType((*QueryConsumerConflictsResponse)(nil), "lavanet.lava.conflict.QueryConsumerConflictsResponse") } func init() { proto.RegisterFile("lavanet/lava/conflict/query.proto", fileDescriptor_1179eb365bacd460) } var fileDescriptor_1179eb365bacd460 = []byte{ - // 505 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x41, 0x6b, 0x14, 0x31, - 0x18, 0x86, 0x37, 0xad, 0x5d, 0x30, 0x16, 0x84, 0xb8, 0x82, 0xac, 0xed, 0x54, 0xa3, 0xd6, 0xb6, - 0x94, 0x84, 0xee, 0x7a, 0xf3, 0xd4, 0x15, 0xec, 0x49, 0xa8, 0x73, 0xf0, 0xe0, 0x45, 0x32, 0x63, - 0x1c, 0x07, 0x66, 0x92, 0xe9, 0x26, 0xbb, 0xb4, 0x88, 0x17, 0x0f, 0x9e, 0x05, 0xff, 0x84, 0x17, - 0xaf, 0xfe, 0x86, 0x1e, 0x0b, 0x5e, 0x3c, 0x89, 0xec, 0x7a, 0xf3, 0x4f, 0xc8, 0x24, 0x19, 0x3a, - 0x43, 0x67, 0xc6, 0x95, 0x9e, 0x26, 0x1b, 0xde, 0xf7, 0xfd, 0x9e, 0xe4, 0xfb, 0xb2, 0xf0, 0x6e, - 0xc2, 0xa6, 0x4c, 0x70, 0x4d, 0xf3, 0x2f, 0x0d, 0xa5, 0x78, 0x93, 0xc4, 0xa1, 0xa6, 0x47, 0x13, - 0x3e, 0x3e, 0x21, 0xd9, 0x58, 0x6a, 0x89, 0x6e, 0x3a, 0x09, 0xc9, 0xbf, 0xa4, 0x90, 0xf4, 0xd7, - 0x22, 0x29, 0xa3, 0x84, 0x53, 0x96, 0xc5, 0x94, 0x09, 0x21, 0x35, 0xd3, 0xb1, 0x14, 0xca, 0x9a, - 0xfa, 0x3b, 0xa1, 0x54, 0xa9, 0x54, 0x34, 0x60, 0x8a, 0xdb, 0x34, 0x3a, 0xdd, 0x0b, 0xb8, 0x66, - 0x7b, 0x34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 0xbd, 0x64, 0xb8, 0x1f, 0xfe, 0x93, 0xdb, 0xb2, 0x94, 0xc1, 0x07, 0x7f, - 0x96, 0xe1, 0x8a, 0x01, 0x47, 0x1f, 0x01, 0xec, 0xda, 0x36, 0xa3, 0xed, 0x06, 0xac, 0x8b, 0x73, - 0xd5, 0xdf, 0x59, 0x44, 0x6a, 0xeb, 0xe2, 0x07, 0x1f, 0xbe, 0xff, 0xfe, 0xbc, 0xb4, 0x81, 0xd6, - 0x69, 0xdb, 0x3b, 0x40, 0x5f, 0x01, 0x5c, 0x2d, 0x5f, 0x00, 0x1a, 0xb4, 0xd5, 0xa8, 0x1f, 0xbe, - 0xfe, 0xf0, 0xbf, 0x3c, 0x0e, 0xf0, 0x91, 0x01, 0x24, 0x68, 0x97, 0x2e, 0xf0, 0x08, 0xe9, 0x3b, - 0x33, 0xd0, 0xef, 0xd1, 0x17, 0x00, 0xaf, 0x97, 0xe3, 0xf6, 0x93, 0xa4, 0x1d, 0xb9, 0x7e, 0x16, - 0xdb, 0x91, 0x1b, 0xe6, 0x0a, 0xef, 0x1a, 0xe4, 0x4d, 0x74, 0x7f, 0x11, 0xe4, 0xd1, 0xe8, 0x74, - 0xe6, 0x81, 0xb3, 0x99, 0x07, 0x7e, 0xcd, 0x3c, 0xf0, 0x69, 0xee, 0x75, 0xce, 0xe6, 0x5e, 0xe7, - 0xc7, 0xdc, 0xeb, 0xbc, 0xdc, 0x8a, 0x62, 0xfd, 0x76, 0x12, 0x90, 0x50, 0xa6, 0xd5, 0xa4, 0xe3, - 0xf3, 0x2c, 0x7d, 0x92, 0x71, 0x15, 0x74, 0xcd, 0xdf, 0xcc, 0xf0, 0x6f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x90, 0x50, 0xda, 0xeb, 0x51, 0x05, 0x00, 0x00, + // 587 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xb1, 0x6f, 0x13, 0x3f, + 0x14, 0xc7, 0xe3, 0xfe, 0x7e, 0x89, 0x88, 0xa9, 0x84, 0x30, 0x41, 0x42, 0x47, 0x72, 0x05, 0x03, + 0xa5, 0xad, 0x2a, 0x5b, 0x4d, 0x02, 0x4b, 0x11, 0x52, 0x53, 0x89, 0x4e, 0x48, 0xe5, 0x06, 0x06, + 0x96, 0xca, 0x39, 0xcc, 0x71, 0xd2, 0xe5, 0x7c, 0x8d, 0x9d, 0xa8, 0x55, 0xd5, 0x85, 0x81, 0x19, + 0x89, 0x7f, 0x82, 0x01, 0x56, 0x46, 0xe6, 0x8e, 0x95, 0x58, 0x98, 0x10, 0x4a, 0xf8, 0x43, 0x50, + 0x6c, 0x5f, 0x93, 0x28, 0x77, 0x21, 0x15, 0xd3, 0xf9, 0x7c, 0xef, 0xfb, 0x7d, 0x9f, 0xe7, 0xf7, + 0x7c, 0xf0, 0x6e, 0xc4, 0xfa, 0x2c, 0xe6, 0x8a, 0x8e, 0x9e, 0xd4, 0x17, 0xf1, 0x9b, 0x28, 0xf4, + 0x15, 0x3d, 0xec, 0xf1, 0xee, 0x31, 0x49, 0xba, 0x42, 0x09, 0x74, 0xd3, 0x86, 0x90, 0xd1, 0x93, + 0xa4, 0x21, 0x4e, 0x35, 0x10, 0x22, 0x88, 0x38, 0x65, 0x49, 0x48, 0x59, 0x1c, 0x0b, 0xc5, 0x54, + 0x28, 0x62, 0x69, 0x44, 0xce, 0x86, 0x2f, 0x64, 0x47, 0x48, 0xda, 0x66, 0x92, 0x1b, 0x37, 0xda, + 0xdf, 0x6a, 0x73, 0xc5, 0xb6, 0x68, 0xc2, 0x82, 0x30, 0xd6, 0xc1, 0x36, 0x16, 0x67, 0x33, 0x24, + 0xac, 0xcb, 0x3a, 0xa9, 0xdf, 0x7a, 0x76, 0x4c, 0xba, 0x38, 0xe8, 0x0b, 0xc5, 0x6d, 0x68, 0x25, + 0x10, 0x81, 0xd0, 0x4b, 0x3a, 0x5a, 0x99,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 0xda, 0xf9, 0x68, 0xec, 0xad, 0x8e, 0x13, 0x2e, 0xdb, 0x25, 0xfd, 0x93, 0x6e, 0xfc, 0x09, 0x00, + 0x00, 0xff, 0xff, 0xcc, 0xe9, 0x34, 0x02, 0x8f, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -362,6 +457,8 @@ type QueryClient interface { ConflictVote(ctx context.Context, in *QueryGetConflictVoteRequest, opts ...grpc.CallOption) (*QueryGetConflictVoteResponse, error) // Queries a list of ConflictVote items. ConflictVoteAll(ctx context.Context, in *QueryAllConflictVoteRequest, opts ...grpc.CallOption) (*QueryAllConflictVoteResponse, error) + // Gets a consumer's conflict list (active and resolved). + ConsumerConflicts(ctx context.Context, in *QueryConsumerConflictsRequest, opts ...grpc.CallOption) (*QueryConsumerConflictsResponse, error) } type queryClient struct { @@ -399,6 +496,15 @@ func (c *queryClient) ConflictVoteAll(ctx context.Context, in *QueryAllConflictV return out, nil } +func (c *queryClient) ConsumerConflicts(ctx context.Context, in *QueryConsumerConflictsRequest, opts ...grpc.CallOption) (*QueryConsumerConflictsResponse, error) { + out := new(QueryConsumerConflictsResponse) + err := c.cc.Invoke(ctx, "/lavanet.lava.conflict.Query/ConsumerConflicts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -407,6 +513,8 @@ type QueryServer interface { ConflictVote(context.Context, *QueryGetConflictVoteRequest) (*QueryGetConflictVoteResponse, error) // Queries a list of ConflictVote items. ConflictVoteAll(context.Context, *QueryAllConflictVoteRequest) (*QueryAllConflictVoteResponse, error) + // Gets a consumer's conflict list (active and resolved). + ConsumerConflicts(context.Context, *QueryConsumerConflictsRequest) (*QueryConsumerConflictsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -422,6 +530,9 @@ func (*UnimplementedQueryServer) ConflictVote(ctx context.Context, req *QueryGet func (*UnimplementedQueryServer) ConflictVoteAll(ctx context.Context, req *QueryAllConflictVoteRequest) (*QueryAllConflictVoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConflictVoteAll not implemented") } +func (*UnimplementedQueryServer) ConsumerConflicts(ctx context.Context, req *QueryConsumerConflictsRequest) (*QueryConsumerConflictsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConsumerConflicts not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -481,6 +592,24 @@ func _Query_ConflictVoteAll_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Query_ConsumerConflicts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryConsumerConflictsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ConsumerConflicts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lavanet.lava.conflict.Query/ConsumerConflicts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ConsumerConflicts(ctx, req.(*QueryConsumerConflictsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "lavanet.lava.conflict.Query", HandlerType: (*QueryServer)(nil), @@ -497,6 +626,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ConflictVoteAll", Handler: _Query_ConflictVoteAll_Handler, }, + { + MethodName: "ConsumerConflicts", + Handler: _Query_ConsumerConflicts_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "lavanet/lava/conflict/query.proto", @@ -705,6 +838,68 @@ func (m *QueryAllConflictVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *QueryConsumerConflictsRequest) 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 *QueryConsumerConflictsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryConsumerConflictsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Consumer) > 0 { + i -= len(m.Consumer) + copy(dAtA[i:], m.Consumer) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Consumer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryConsumerConflictsResponse) 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 *QueryConsumerConflictsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryConsumerConflictsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Conflicts) > 0 { + for iNdEx := len(m.Conflicts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Conflicts[iNdEx]) + copy(dAtA[i:], m.Conflicts[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Conflicts[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -792,6 +987,34 @@ func (m *QueryAllConflictVoteResponse) Size() (n int) { return n } +func (m *QueryConsumerConflictsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Consumer) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryConsumerConflictsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Conflicts) > 0 { + for _, s := range m.Conflicts { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1302,6 +1525,170 @@ func (m *QueryAllConflictVoteResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryConsumerConflictsRequest) 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 ErrIntOverflowQuery + } + 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: QueryConsumerConflictsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryConsumerConflictsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Consumer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Consumer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryConsumerConflictsResponse) 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 ErrIntOverflowQuery + } + 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: QueryConsumerConflictsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryConsumerConflictsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conflicts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conflicts = append(m.Conflicts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/conflict/types/query.pb.gw.go b/x/conflict/types/query.pb.gw.go index 6eb79f7670..4776ac58ff 100644 --- a/x/conflict/types/query.pb.gw.go +++ b/x/conflict/types/query.pb.gw.go @@ -141,6 +141,60 @@ func local_request_Query_ConflictVoteAll_0(ctx context.Context, marshaler runtim } +func request_Query_ConsumerConflicts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryConsumerConflictsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["consumer"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "consumer") + } + + protoReq.Consumer, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "consumer", err) + } + + msg, err := client.ConsumerConflicts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ConsumerConflicts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryConsumerConflictsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["consumer"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "consumer") + } + + protoReq.Consumer, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "consumer", err) + } + + msg, err := server.ConsumerConflicts(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -216,6 +270,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_ConsumerConflicts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ConsumerConflicts_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ConsumerConflicts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -317,6 +394,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_ConsumerConflicts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ConsumerConflicts_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ConsumerConflicts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -326,6 +423,8 @@ var ( pattern_Query_ConflictVote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"lavanet", "lava", "conflict", "conflict_vote", "index"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ConflictVoteAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lavanet", "lava", "conflict", "conflict_vote"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ConsumerConflicts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"lavanet", "lava", "conflict", "consumer_conflicts", "consumer"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -334,4 +433,6 @@ var ( forward_Query_ConflictVote_0 = runtime.ForwardResponseMessage forward_Query_ConflictVoteAll_0 = runtime.ForwardResponseMessage + + forward_Query_ConsumerConflicts_0 = runtime.ForwardResponseMessage ) diff --git a/x/dualstaking/types/query.pb.go b/x/dualstaking/types/query.pb.go index ebcc00d672..57e725dcc6 100644 --- a/x/dualstaking/types/query.pb.go +++ b/x/dualstaking/types/query.pb.go @@ -550,7 +550,7 @@ type QueryClient interface { DelegatorProviders(ctx context.Context, in *QueryDelegatorProvidersRequest, opts ...grpc.CallOption) (*QueryDelegatorProvidersResponse, error) // Queries a provider for all its delegators. ProviderDelegators(ctx context.Context, in *QueryProviderDelegatorsRequest, opts ...grpc.CallOption) (*QueryProviderDelegatorsResponse, error) - // Queries a provider for all its delegators. + // Queries a the unclaimed rewards of a delegator. DelegatorRewards(ctx context.Context, in *QueryDelegatorRewardsRequest, opts ...grpc.CallOption) (*QueryDelegatorRewardsResponse, error) } @@ -606,7 +606,7 @@ type QueryServer interface { DelegatorProviders(context.Context, *QueryDelegatorProvidersRequest) (*QueryDelegatorProvidersResponse, error) // Queries a provider for all its delegators. ProviderDelegators(context.Context, *QueryProviderDelegatorsRequest) (*QueryProviderDelegatorsResponse, error) - // Queries a provider for all its delegators. + // Queries a the unclaimed rewards of a delegator. DelegatorRewards(context.Context, *QueryDelegatorRewardsRequest) (*QueryDelegatorRewardsResponse, error) } diff --git a/x/pairing/types/relay.pb.go b/x/pairing/types/relay.pb.go index 04be35516b..38f2a0190e 100644 --- a/x/pairing/types/relay.pb.go +++ b/x/pairing/types/relay.pb.go @@ -802,80 +802,81 @@ func init() { func init() { proto.RegisterFile("lavanet/lava/pairing/relay.proto", fileDescriptor_a61d253b10eeeb9e) } var fileDescriptor_a61d253b10eeeb9e = []byte{ - // 1165 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcb, 0x6e, 0x23, 0x45, - 0x17, 0x76, 0xfb, 0x12, 0xdb, 0xc7, 0x9d, 0xfc, 0x51, 0x4d, 0x92, 0xb1, 0x32, 0xfa, 0x1d, 0x4f, - 0x23, 0x65, 0xb2, 0x00, 0x1b, 0x02, 0x62, 0x81, 0x84, 0x34, 0x63, 0x26, 0x82, 0x70, 0x9b, 0x4c, - 0x07, 0x36, 0x91, 0x50, 0x4f, 0xb9, 0xbb, 0xd2, 0x29, 0xa6, 0xdd, 0xd5, 0xa9, 0xaa, 0x36, 0x31, - 0x2f, 0xc0, 0x0a, 0x89, 0x35, 0x3b, 0x24, 0x9e, 0x80, 0x07, 0x60, 0x89, 0x66, 0x39, 0x4b, 0xc4, - 0x22, 0x42, 0xc9, 0x1b, 0x20, 0x1e, 0x00, 0xd5, 0xc5, 0x97, 0x24, 0x4e, 0x50, 0x80, 0x55, 0x57, - 0x9d, 0x3a, 0xf5, 0x9d, 0xaa, 0xef, 0x7c, 0xe7, 0x74, 0x41, 0x3b, 0xc1, 0x43, 0x9c, 0x12, 0xd9, - 0x55, 0xdf, 0x6e, 0x86, 0x29, 0xa7, 0x69, 0xdc, 0xe5, 0x24, 0xc1, 0xa3, 0x4e, 0xc6, 0x99, 0x64, - 0x68, 0xc5, 0x7a, 0x74, 0xd4, 0xb7, 0x63, 0x3d, 0xd6, 0x57, 0x62, 0x16, 0x33,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 0xb5, 0x56, - 0x08, 0x47, 0x4f, 0xa0, 0xa2, 0x87, 0xe8, 0x26, 0xfd, 0x5a, 0xe9, 0xaf, 0xb7, 0x6f, 0xf4, 0xc9, - 0x92, 0x91, 0x57, 0x40, 0x07, 0xb0, 0x64, 0x34, 0x9f, 0xf7, 0x45, 0xc8, 0x69, 0x9f, 0xfc, 0x57, - 0xc8, 0xaf, 0x3b, 0xea, 0xb0, 0xfa, 0x6d, 0x74, 0x1d, 0xe4, 0xec, 0xdb, 0xec, 0x3a, 0xc8, 0xe9, - 0xe3, 0xca, 0x2b, 0xf4, 0x1e, 0xbd, 0x38, 0x6b, 0x39, 0x2f, 0xcf, 0x5a, 0xce, 0xef, 0x67, 0x2d, - 0xe7, 0xbb, 0xf3, 0x56, 0xe1, 0xe5, 0x79, 0xab, 0xf0, 0xeb, 0x79, 0xab, 0x70, 0xf0, 0x60, 0x86, - 0xe0, 0x0b, 0x6f, 0xd0, 0x93, 0xc9, 0x2b, 0x54, 0xb3, 0xdc, 0x5f, 0xd0, 0x2f, 0xc3, 0x37, 0xff, - 0x0a, 0x00, 0x00, 0xff, 0xff, 0x27, 0x08, 0x16, 0x43, 0xaa, 0x0a, 0x00, 0x00, + // 1183 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x6e, 0x1b, 0xc5, + 0x17, 0xf7, 0xfa, 0x23, 0xb6, 0x8f, 0xb7, 0x69, 0xff, 0xd3, 0xa6, 0xb5, 0x52, 0xfd, 0x1d, 0x77, + 0x91, 0xd2, 0x08, 0x81, 0x0d, 0x01, 0x71, 0x81, 0x84, 0xd4, 0x9a, 0x46, 0x10, 0x28, 0x34, 0xdd, + 0xc0, 0x4d, 0x24, 0xb4, 0x1d, 0xef, 0x4e, 0x36, 0x43, 0xd7, 0x3b, 0x9b, 0x99, 0x59, 0x13, 0xf3, + 0x02, 0x5c, 0x21, 0x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0xd5, 0x2c, 0xf7, 0x97, 0xf4, 0x5f, 0xe4, + 0x3b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x89, 0x57, 0xca, 0xfa, 0xd6, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 5cab2af2c9b844ff80cbc44e2620153f21e89992 Mon Sep 17 00:00:00 2001 From: oren-lava Date: Wed, 11 Oct 2023 12:18:48 +0300 Subject: [PATCH 2/4] CNS-640: added query test --- .../grpc_query_consumer_conflicts_test.go | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 x/conflict/keeper/grpc_query_consumer_conflicts_test.go diff --git a/x/conflict/keeper/grpc_query_consumer_conflicts_test.go b/x/conflict/keeper/grpc_query_consumer_conflicts_test.go new file mode 100644 index 0000000000..ad58640567 --- /dev/null +++ b/x/conflict/keeper/grpc_query_consumer_conflicts_test.go @@ -0,0 +1,52 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + keepertest "github.com/lavanet/lava/testutil/keeper" + "github.com/lavanet/lava/x/conflict/types" + "github.com/stretchr/testify/require" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestConsumerConflicts(t *testing.T) { + keeper, ctx := keepertest.ConflictKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNConflictVote(keeper, ctx, 10) + for i, msg := range msgs { + msg.ClientAddress = "client" + strconv.Itoa(i%2) + keeper.SetConflictVote(ctx, msg) + } + + for _, tc := range []struct { + desc string + client string + expectedConflicts []string + }{ + { + desc: "client0 conflicts", + client: "client0", + expectedConflicts: []string{"0", "2", "4", "6", "8"}, + }, + { + desc: "client1 conflicts", + client: "client1", + expectedConflicts: []string{"1", "3", "5", "7", "9"}, + }, + { + desc: "invalid client", + client: "dummy", + expectedConflicts: []string{}, + }, + } { + t.Run(tc.desc, func(t *testing.T) { + res, err := keeper.ConsumerConflicts(wctx, &types.QueryConsumerConflictsRequest{Consumer: tc.client}) + require.Nil(t, err) + require.ElementsMatch(t, res.Conflicts, tc.expectedConflicts) + }) + } +} From fdf4d3a4f592f3dba14b15a4eed044098055ac9c Mon Sep 17 00:00:00 2001 From: oren-lava Date: Wed, 11 Oct 2023 13:45:11 +0300 Subject: [PATCH 3/4] CNS-640: fix comments --- proto/lavanet/lava/conflict/query.proto | 2 +- x/conflict/client/cli/query_consumer_conflicts.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/lavanet/lava/conflict/query.proto b/proto/lavanet/lava/conflict/query.proto index 5d273887bc..5552ff3e95 100644 --- a/proto/lavanet/lava/conflict/query.proto +++ b/proto/lavanet/lava/conflict/query.proto @@ -26,7 +26,7 @@ service Query { option (google.api.http).get = "/lavanet/lava/conflict/conflict_vote"; } - // Gets a consumer's conflict list (active and resolved). + // Gets a consumer's active conflict list. rpc ConsumerConflicts(QueryConsumerConflictsRequest) returns (QueryConsumerConflictsResponse) { option (google.api.http).get = "/lavanet/lava/conflict/consumer_conflicts/{consumer}"; } diff --git a/x/conflict/client/cli/query_consumer_conflicts.go b/x/conflict/client/cli/query_consumer_conflicts.go index 8b6b1db781..e949403bb6 100644 --- a/x/conflict/client/cli/query_consumer_conflicts.go +++ b/x/conflict/client/cli/query_consumer_conflicts.go @@ -10,7 +10,7 @@ import ( func CmdConsumerConflicts() *cobra.Command { cmd := &cobra.Command{ Use: "consumer-conflicts ", - Short: "Gets a consumer's conflict list (active and resolved)", + Short: "Gets a consumer's active conflict list", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) From a3215c3f4b8eda056ddf43fe8e1c2d4eff5239f1 Mon Sep 17 00:00:00 2001 From: oren-lava Date: Thu, 12 Oct 2023 13:16:24 +0300 Subject: [PATCH 4/4] CNS-640: added the query to the cli tests --- scripts/cli_test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/cli_test.sh b/scripts/cli_test.sh index aa102e7bce..44f557df1d 100755 --- a/scripts/cli_test.sh +++ b/scripts/cli_test.sh @@ -49,6 +49,7 @@ trace lavad q protocol params >/dev/null echo "Testing conflict q commands" trace lavad q conflict params >/dev/null trace lavad q conflict list-conflict-vote >/dev/null +trace lavad q conflict consumer-conflicts $(lavad keys show user1 -a) >/dev/null # trace lavad q conflict show-conflict-vote stam >/dev/null ## canot test that here echo "Testing downtime q commands"