From ccb2d9df94de8499f2daeb02e29ab312aea7a905 Mon Sep 17 00:00:00 2001 From: Bernd Mueller Date: Wed, 31 Jan 2024 11:21:20 +0100 Subject: [PATCH] Added query for provider parameters --- .../1445-query-provider-parameters.md | 2 + .../ccv/provider/v1/query.proto | 16 +- x/ccv/provider/client/cli/query.go | 37 +- x/ccv/provider/keeper/grpc_query.go | 8 + x/ccv/provider/types/query.pb.go | 503 +++++++++++++++--- x/ccv/provider/types/query.pb.gw.go | 65 +++ 6 files changed, 544 insertions(+), 87 deletions(-) create mode 100644 .changelog/unreleased/improvements/provider/1445-query-provider-parameters.md diff --git a/.changelog/unreleased/improvements/provider/1445-query-provider-parameters.md b/.changelog/unreleased/improvements/provider/1445-query-provider-parameters.md new file mode 100644 index 0000000000..f7ec62399d --- /dev/null +++ b/.changelog/unreleased/improvements/provider/1445-query-provider-parameters.md @@ -0,0 +1,2 @@ +- Added query for current values of all provider parameters + ([\#1605](https://github.com/cosmos/interchain-security/pull/1605)) \ No newline at end of file diff --git a/proto/interchain_security/ccv/provider/v1/query.proto b/proto/interchain_security/ccv/provider/v1/query.proto index 807049a355..56b06a42c3 100644 --- a/proto/interchain_security/ccv/provider/v1/query.proto +++ b/proto/interchain_security/ccv/provider/v1/query.proto @@ -91,7 +91,14 @@ service Query { returns (QueryAllPairsValConAddrByConsumerChainIDResponse) { option (google.api.http).get = "/interchain_security/ccv/provider/consumer_chain_id"; - } + } + + // QueryParams returns all current values of provider parameters + rpc QueryParams(QueryParamsRequest) + returns (QueryParamsResponse) { + option (google.api.http).get = + "/interchain_security/ccv/provider/params"; + } } message QueryConsumerGenesisRequest { string chain_id = 1; } @@ -198,3 +205,10 @@ message PairValConAddrProviderAndConsumer { string consumer_address = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ]; tendermint.crypto.PublicKey consumer_key = 3; } + +message QueryParamsRequest {} + +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + diff --git a/x/ccv/provider/client/cli/query.go b/x/ccv/provider/client/cli/query.go index 2547add3f8..f554ed6a8e 100644 --- a/x/ccv/provider/client/cli/query.go +++ b/x/ccv/provider/client/cli/query.go @@ -34,7 +34,7 @@ func NewQueryCmd() *cobra.Command { cmd.AddCommand(CmdRegisteredConsumerRewardDenoms()) cmd.AddCommand(CmdProposedConsumerChains()) cmd.AddCommand(CmdAllPairsValConAddrByConsumerChainID()) - + cmd.AddCommand(CmdProviderParameters()) return cmd } @@ -375,3 +375,38 @@ func CmdAllPairsValConAddrByConsumerChainID() *cobra.Command { return cmd } + +// Command to query provider parameters +func CmdProviderParameters() *cobra.Command { + cmd := &cobra.Command{ + Use: "params", + Short: "Query provider parameters information", + Long: strings.TrimSpace( + fmt.Sprintf(`Query parameter values of provider. +Example: +$ %s query provider params + `, version.AppName), + ), + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.QueryParams(cmd.Context(), + &types.QueryParamsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(&res.Params) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd + +} diff --git a/x/ccv/provider/keeper/grpc_query.go b/x/ccv/provider/keeper/grpc_query.go index 80e72ef778..d190a5f8b0 100644 --- a/x/ccv/provider/keeper/grpc_query.go +++ b/x/ccv/provider/keeper/grpc_query.go @@ -213,3 +213,11 @@ func (k Keeper) QueryAllPairsValConAddrByConsumerChainID(goCtx context.Context, PairValConAddr: pairValConAddrs, }, nil } + +// QueryParams returns all parameters and current values of provider +func (k Keeper) QueryParams(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + params := k.GetParams(ctx) + + return &types.QueryParamsResponse{Params: params}, nil +} diff --git a/x/ccv/provider/types/query.pb.go b/x/ccv/provider/types/query.pb.go index e0f043c33a..13f100c7ca 100644 --- a/x/ccv/provider/types/query.pb.go +++ b/x/ccv/provider/types/query.pb.go @@ -1073,6 +1073,86 @@ func (m *PairValConAddrProviderAndConsumer) GetConsumerKey() *crypto.PublicKey { return nil } +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_422512d7b7586cd7, []int{23} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_422512d7b7586cd7, []int{24} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + func init() { proto.RegisterType((*QueryConsumerGenesisRequest)(nil), "interchain_security.ccv.provider.v1.QueryConsumerGenesisRequest") proto.RegisterType((*QueryConsumerGenesisResponse)(nil), "interchain_security.ccv.provider.v1.QueryConsumerGenesisResponse") @@ -1097,6 +1177,8 @@ func init() { proto.RegisterType((*QueryAllPairsValConAddrByConsumerChainIDRequest)(nil), "interchain_security.ccv.provider.v1.QueryAllPairsValConAddrByConsumerChainIDRequest") proto.RegisterType((*QueryAllPairsValConAddrByConsumerChainIDResponse)(nil), "interchain_security.ccv.provider.v1.QueryAllPairsValConAddrByConsumerChainIDResponse") proto.RegisterType((*PairValConAddrProviderAndConsumer)(nil), "interchain_security.ccv.provider.v1.PairValConAddrProviderAndConsumer") + proto.RegisterType((*QueryParamsRequest)(nil), "interchain_security.ccv.provider.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "interchain_security.ccv.provider.v1.QueryParamsResponse") } func init() { @@ -1104,91 +1186,95 @@ func init() { } var fileDescriptor_422512d7b7586cd7 = []byte{ - // 1338 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x73, 0xdb, 0xc4, - 0x17, 0x8f, 0x92, 0xb6, 0xdf, 0x64, 0xd3, 0x5f, 0xdf, 0x6d, 0x29, 0xa9, 0x1a, 0xec, 0x56, 0x1d, - 0x20, 0x2d,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, 0xe6, 0xbb, 0xc6, - 0xfd, 0xae, 0xdb, 0xd7, 0x0a, 0x30, 0xdb, 0xd8, 0x23, 0x3e, 0xb5, 0xce, 0xfc, 0x17, 0x00, 0x00, - 0xff, 0xff, 0x55, 0x0c, 0x00, 0xc5, 0x1c, 0x14, 0x00, 0x00, + // 1403 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4f, 0x73, 0x14, 0xc5, + 0x1b, 0xce, 0x24, 0x90, 0x5f, 0xd2, 0xe1, 0xdf, 0xaf, 0x89, 0x18, 0x86, 0xb8, 0x0b, 0x43, 0xa9, + 0x01, 0x74, 0x26, 0x59, 0xb4, 0xe4, 0x8f, 0x21, 0xec, 0x26, 0x80, 0x5b, 0x81, 0x22, 0x0e, 0x88, + 0x55, 0x6a, 0xb9, 0x74, 0x66, 0xda, 0xcd, 0x14, 0xb3, 0xd3, 0x43, 0x77, 0xef, 0xc2, 0x16, 0xe5, + 0x01, 0x0f, 0xca, 0x91, 0x2a, 0xf5, 0xce, 0xc5, 0x2f, 0xe0, 0xa7, 0xe0, 0x06, 0x16, 0x17, 0x4f, + 0x68, 0x05, 0x0f, 0x96, 0x27, 0xcb, 0xbb, 0x55, 0xd6, 0xf4, 0xf4, 0xcc, 0xee, 0xec, 0x4e, 0x76, + 0x67, 0x37, 0xb9, 0x65, 0xbb, 0xfb, 0x7d, 0xde, 0xe7, 0x79, 0xbb, 0xfb, 0xed, 0x67, 0x02, 0x0c, + 0xc7, 0xe3, 0x98, 0x5a, 0x1b, 0xc8, 0xf1, 0x2a, 0x0c, 0x5b, 0x75, 0xea, 0xf0, 0xa6, 0x61, 0x59, + 0x0d, 0xc3, 0xa7, 0xa4, 0xe1, 0xd8, 0x98, 0x1a, 0x8d, 0x05, 0xe3, 0x6e, 0x1d, 0xd3, 0xa6, 0xee, + 0x53, 0xc2, 0x09, 0x3c, 0x9e, 0x12,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, 0x45, 0x7f, 0x24, 0x44, 0x97, 0xe0, 0xc5, 0x41, 0x45, 0x07, 0x9e, 0x9c, + 0xf2, 0x4a, 0xec, 0xb3, 0xe0, 0xbf, 0x0a, 0x78, 0x3d, 0xdd, 0xf0, 0x31, 0xb8, 0x3a, 0x34, 0xe9, + 0x6e, 0x67, 0xa9, 0x5e, 0xdd, 0x19, 0x30, 0x59, 0x80, 0x2b, 0xa2, 0x00, 0x45, 0xb8, 0x34, 0x44, + 0x01, 0x88, 0xdf, 0xa6, 0xff, 0xef, 0xc8, 0x53, 0xa4, 0xba, 0x33, 0x78, 0x39, 0x3b, 0xeb, 0x5e, + 0x3e, 0x53, 0xbd, 0xb2, 0x6d, 0x1c, 0x29, 0xbc, 0x28, 0x84, 0x9f, 0x87, 0x67, 0x33, 0x7c, 0x17, + 0x47, 0x40, 0x95, 0x44, 0x8b, 0x4e, 0x91, 0xdc, 0xee, 0xda, 0x86, 0x92, 0x9c, 0xe2, 0x3f, 0x87, + 0x92, 0x9c, 0x66, 0x1f, 0x87, 0x93, 0x9c, 0x78, 0xd4, 0xe0, 0x33, 0x45, 0xbe, 0x13, 0x09, 0xe7, + 0x08, 0x2f, 0x64, 0xa7, 0x98, 0x66, 0x48, 0xd5, 0xa5, 0xa1, 0xe3, 0xa5, 0xb4, 0x33, 0x42, 0x5a, + 0x01, 0xce, 0xf7, 0x97, 0xc6, 0x25, 0x40, 0xf8, 0x55, 0x0d, 0x7f, 0x1c, 0x05, 0xc7, 0x33, 0x58, + 0x41, 0x78, 0x3d, 0x3b, 0xc5, 0x4c, 0x16, 0x54, 0x5d, 0xdb, 0x39, 0x40, 0x59, 0x84, 0x55, 0x51, + 0x84, 0x4b, 0x70, 0xb9, 0x7f, 0x11, 0x68, 0x8c, 0xd8, 0x3a, 0xd3, 0x54, 0x60, 0x56, 0x42, 0x6b, + 0x0b, 0xff, 0xea, 0xb2, 0xae, 0x49, 0x47, 0xc6, 0xe0, 0x00, 0xaf, 0xea, 0x16, 0xfe, 0x58, 0x2d, + 0x6d, 0x07, 0x42, 0xaa, 0x2e, 0x09, 0xd5, 0x1f, 0xc2, 0x73, 0xfd, 0x55, 0x47, 0xce, 0xb8, 0xd2, + 0xf9, 0x80, 0xfd, 0x30, 0x2a, 0xff, 0xc5, 0x90, 0xc1, 0x8a, 0xc2, 0x9b, 0xd9, 0x49, 0x67, 0x37, + 0xca, 0xea, 0x27, 0x3b, 0x8c, 0x2a, 0xab, 0x73, 0x5e, 0x54, 0xe7, 0x7d, 0x78, 0x7a, 0xe0, 0xfe, + 0xee, 0xd8, 0xf0, 0x67, 0x05, 0x4c, 0xb5, 0xf9, 0x3f, 0xf8, 0xc1, 0x00, 0xdb, 0xd5, 0xee, 0x23, + 0xd5, 0x33, 0x83, 0x07, 0x4a, 0xfe, 0xf3, 0x82, 0xff, 0x49, 0x38, 0x97, 0x61, 0x77, 0x43, 0x7f, + 0xf9, 0xe9, 0xd3, 0xcd, 0x9c, 0xf2, 0x7c, 0x33, 0xa7, 0xfc, 0xbe, 0x99, 0x53, 0x1e, 0xbf, 0xca, + 0x8d, 0x3c, 0x7f, 0x95, 0x1b, 0xf9, 0xf5, 0x55, 0x6e, 0xe4, 0xb3, 0xc5, 0xaa, 0xc3, 0x37, 0xea, + 0xeb, 0xba, 0x45, 0x6a, 0x86, 0x45, 0x58, 0x8d, 0xb0, 0x36, 0xd0, 0x77, 0x63, 0xd0, 0xc6, 0x7b, + 0xc6, 0xfd, 0x8e, 0x96, 0xd1, 0xf4, 0x31, 0x5b, 0x1f, 0x17, 0xdf, 0xa5, 0xa7, 0xff, 0x0b, 0x00, + 0x00, 0xff, 0xff, 0x67, 0x8a, 0xee, 0xb2, 0x49, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1231,6 +1317,8 @@ type QueryClient interface { // QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address // between provider and consumer chain QueryAllPairsValConAddrByConsumerChainID(ctx context.Context, in *QueryAllPairsValConAddrByConsumerChainIDRequest, opts ...grpc.CallOption) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) + // QueryParams returns all current values of provider parameters + QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } type queryClient struct { @@ -1331,6 +1419,15 @@ func (c *queryClient) QueryAllPairsValConAddrByConsumerChainID(ctx context.Conte return out, nil } +func (c *queryClient) QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Query/QueryParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // ConsumerGenesis queries the genesis state needed to start a consumer chain @@ -1361,6 +1458,8 @@ type QueryServer interface { // QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address // between provider and consumer chain QueryAllPairsValConAddrByConsumerChainID(context.Context, *QueryAllPairsValConAddrByConsumerChainIDRequest) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) + // QueryParams returns all current values of provider parameters + QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1397,6 +1496,9 @@ func (*UnimplementedQueryServer) QueryProposedConsumerChainIDs(ctx context.Conte func (*UnimplementedQueryServer) QueryAllPairsValConAddrByConsumerChainID(ctx context.Context, req *QueryAllPairsValConAddrByConsumerChainIDRequest) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryAllPairsValConAddrByConsumerChainID not implemented") } +func (*UnimplementedQueryServer) QueryParams(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryParams not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1582,6 +1684,24 @@ func _Query_QueryAllPairsValConAddrByConsumerChainID_Handler(srv interface{}, ct return interceptor(ctx, in, info, handler) } +func _Query_QueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/interchain_security.ccv.provider.v1.Query/QueryParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryParams(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "interchain_security.ccv.provider.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1626,6 +1746,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryAllPairsValConAddrByConsumerChainID", Handler: _Query_QueryAllPairsValConAddrByConsumerChainID_Handler, }, + { + MethodName: "QueryParams", + Handler: _Query_QueryParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "interchain_security/ccv/provider/v1/query.proto", @@ -2371,6 +2495,62 @@ func (m *PairValConAddrProviderAndConsumer) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2690,6 +2870,26 @@ func (m *PairValConAddrProviderAndConsumer) Size() (n int) { return n } +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4627,6 +4827,139 @@ func (m *PairValConAddrProviderAndConsumer) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryParamsRequest) 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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/ccv/provider/types/query.pb.gw.go b/x/ccv/provider/types/query.pb.gw.go index a3ded021ed..bc37627c52 100644 --- a/x/ccv/provider/types/query.pb.gw.go +++ b/x/ccv/provider/types/query.pb.gw.go @@ -303,6 +303,24 @@ func local_request_Query_QueryAllPairsValConAddrByConsumerChainID_0(ctx context. } +func request_Query_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryParams(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. @@ -539,6 +557,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QueryParams_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_QueryParams_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_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -780,6 +821,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QueryParams_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_QueryParams_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_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -803,6 +864,8 @@ var ( pattern_Query_QueryProposedConsumerChainIDs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "proposed_consumer_chains"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QueryAllPairsValConAddrByConsumerChainID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "consumer_chain_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -825,4 +888,6 @@ var ( forward_Query_QueryProposedConsumerChainIDs_0 = runtime.ForwardResponseMessage forward_Query_QueryAllPairsValConAddrByConsumerChainID_0 = runtime.ForwardResponseMessage + + forward_Query_QueryParams_0 = runtime.ForwardResponseMessage )