From c960956de6bdb8d3faf624b641c0107e23584855 Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Fri, 3 Feb 2023 14:52:02 +1100 Subject: [PATCH] zoneconcierge API: pagtinating chain IDs API (#300) --- client/docs/swagger-ui/swagger.yaml | 117 ++++++++++ proto/babylon/btccheckpoint/query.proto | 2 +- proto/babylon/epoching/v1/query.proto | 4 +- proto/babylon/zoneconcierge/query.proto | 10 +- x/btccheckpoint/types/query.pb.go | 2 +- x/epoching/types/query.pb.go | 4 +- x/zoneconcierge/keeper/grpc_query.go | 19 +- x/zoneconcierge/keeper/grpc_query_test.go | 29 +-- x/zoneconcierge/types/query.pb.go | 272 ++++++++++++++++------ x/zoneconcierge/types/query.pb.gw.go | 18 ++ 10 files changed, 379 insertions(+), 98 deletions(-) diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index df090159d..a4c2ae549 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -6740,6 +6740,38 @@ paths: type: array items: type: string + title: >- + chain_ids are IDs of the chains in ascending alphabetical + order + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } title: >- QueryChainListResponse is response type for the Query/ChainList RPC method @@ -6935,6 +6967,63 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query /babylon/zoneconcierge/v1/finalized_chain_info/{chain_id}: @@ -15289,6 +15378,34 @@ definitions: type: array items: type: string + title: chain_ids are IDs of the chains in ascending alphabetical order + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } title: QueryChainListResponse is response type for the Query/ChainList RPC method babylon.zoneconcierge.v1.QueryEpochChainInfoResponse: type: object diff --git a/proto/babylon/btccheckpoint/query.proto b/proto/babylon/btccheckpoint/query.proto index 763f6640c..6cad44bab 100644 --- a/proto/babylon/btccheckpoint/query.proto +++ b/proto/babylon/btccheckpoint/query.proto @@ -55,7 +55,7 @@ message QueryBtcCheckpointsInfoRequest { uint64 start_epoch = 1; uint64 end_epoch = 2; - // pagination defines whether to have the pagination in the response + // pagination defines whether to have the pagination in the request cosmos.base.query.v1beta1.PageRequest pagination = 3; } diff --git a/proto/babylon/epoching/v1/query.proto b/proto/babylon/epoching/v1/query.proto index e28bf5d01..18fcead52 100644 --- a/proto/babylon/epoching/v1/query.proto +++ b/proto/babylon/epoching/v1/query.proto @@ -80,7 +80,7 @@ message QueryEpochsInfoRequest { uint64 start_epoch = 1; uint64 end_epoch = 2; - // pagination defines whether to have the pagination in the response + // pagination defines whether to have the pagination in the request cosmos.base.query.v1beta1.PageRequest pagination = 3; } @@ -107,7 +107,7 @@ message QueryEpochMsgsRequest { // epoch_num is the number of epoch of the requested msg queue uint64 epoch_num = 1; - // pagination defines whether to have the pagination in the response + // pagination defines whether to have the pagination in the request cosmos.base.query.v1beta1.PageRequest pagination = 2; } diff --git a/proto/babylon/zoneconcierge/query.proto b/proto/babylon/zoneconcierge/query.proto index 400f94053..92d755eb6 100644 --- a/proto/babylon/zoneconcierge/query.proto +++ b/proto/babylon/zoneconcierge/query.proto @@ -76,11 +76,17 @@ message QueryHeaderResponse { } // QueryChainListRequest is request type for the Query/ChainList RPC method -message QueryChainListRequest {} +message QueryChainListRequest { + // pagination defines whether to have the pagination in the request + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} // QueryChainListResponse is response type for the Query/ChainList RPC method message QueryChainListResponse { + // chain_ids are IDs of the chains in ascending alphabetical order repeated string chain_ids = 1; + // pagination defines the pagination in the response + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryChainInfoRequest is request type for the Query/ChainInfo RPC method. @@ -109,7 +115,7 @@ message QueryEpochChainInfoResponse { // QueryListHeadersRequest is request type for the Query/ListHeaders RPC method. message QueryListHeadersRequest { string chain_id = 1; - // pagination defines whether to have the pagination in the response + // pagination defines whether to have the pagination in the request cosmos.base.query.v1beta1.PageRequest pagination = 2; } diff --git a/x/btccheckpoint/types/query.pb.go b/x/btccheckpoint/types/query.pb.go index d7ccced04..c1227dbfd 100644 --- a/x/btccheckpoint/types/query.pb.go +++ b/x/btccheckpoint/types/query.pb.go @@ -207,7 +207,7 @@ func (m *QueryBtcCheckpointInfoResponse) GetInfo() *BTCCheckpointInfo { type QueryBtcCheckpointsInfoRequest struct { StartEpoch uint64 `protobuf:"varint,1,opt,name=start_epoch,json=startEpoch,proto3" json:"start_epoch,omitempty"` EndEpoch uint64 `protobuf:"varint,2,opt,name=end_epoch,json=endEpoch,proto3" json:"end_epoch,omitempty"` - // pagination defines whether to have the pagination in the response + // pagination defines whether to have the pagination in the request Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } diff --git a/x/epoching/types/query.pb.go b/x/epoching/types/query.pb.go index 4285d57a6..8d90b59d9 100644 --- a/x/epoching/types/query.pb.go +++ b/x/epoching/types/query.pb.go @@ -204,7 +204,7 @@ func (m *QueryEpochInfoResponse) GetEpoch() *Epoch { type QueryEpochsInfoRequest struct { StartEpoch uint64 `protobuf:"varint,1,opt,name=start_epoch,json=startEpoch,proto3" json:"start_epoch,omitempty"` EndEpoch uint64 `protobuf:"varint,2,opt,name=end_epoch,json=endEpoch,proto3" json:"end_epoch,omitempty"` - // pagination defines whether to have the pagination in the response + // pagination defines whether to have the pagination in the request Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -411,7 +411,7 @@ func (m *QueryCurrentEpochResponse) GetEpochBoundary() uint64 { type QueryEpochMsgsRequest struct { // epoch_num is the number of epoch of the requested msg queue EpochNum uint64 `protobuf:"varint,1,opt,name=epoch_num,json=epochNum,proto3" json:"epoch_num,omitempty"` - // pagination defines whether to have the pagination in the response + // pagination defines whether to have the pagination in the request Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } diff --git a/x/zoneconcierge/keeper/grpc_query.go b/x/zoneconcierge/keeper/grpc_query.go index 057e79bed..e1aac72ff 100644 --- a/x/zoneconcierge/keeper/grpc_query.go +++ b/x/zoneconcierge/keeper/grpc_query.go @@ -18,9 +18,22 @@ func (k Keeper) ChainList(c context.Context, req *types.QueryChainListRequest) ( } ctx := sdk.UnwrapSDKContext(c) - chainIDs := k.GetAllChainIDs(ctx) - // TODO: pagination for this API - resp := &types.QueryChainListResponse{ChainIds: chainIDs} + + chainIDs := []string{} + store := k.chainInfoStore(ctx) + pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { + chainID := string(key) + chainIDs = append(chainIDs, chainID) + return nil + }) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + resp := &types.QueryChainListResponse{ + ChainIds: chainIDs, + Pagination: pageRes, + } return resp, nil } diff --git a/x/zoneconcierge/keeper/grpc_query_test.go b/x/zoneconcierge/keeper/grpc_query_test.go index b787dfc32..cb910ebfa 100644 --- a/x/zoneconcierge/keeper/grpc_query_test.go +++ b/x/zoneconcierge/keeper/grpc_query_test.go @@ -2,7 +2,6 @@ package keeper_test import ( "math/rand" - "sort" "testing" "github.com/babylonchain/babylon/testutil/datagen" @@ -20,7 +19,7 @@ import ( ) func FuzzChainList(f *testing.F) { - datagen.AddRandomSeedsToFuzzer(f, 100) + datagen.AddRandomSeedsToFuzzer(f, 10) f.Fuzz(func(t *testing.T, seed int64) { rand.Seed(seed) @@ -32,32 +31,36 @@ func FuzzChainList(f *testing.F) { hooks := zcKeeper.Hooks() // invoke the hook a random number of times with random chain IDs - numHeaders := datagen.RandomInt(100) - expectedChainIDs := []string{} + numHeaders := datagen.RandomInt(100) + 1 + allChainIDs := []string{} for i := uint64(0); i < numHeaders; i++ { var chainID string // simulate the scenario that some headers belong to the same chain if i > 0 && datagen.OneInN(2) { - chainID = expectedChainIDs[rand.Intn(len(expectedChainIDs))] + chainID = allChainIDs[rand.Intn(len(allChainIDs))] } else { chainID = datagen.GenRandomHexStr(30) - expectedChainIDs = append(expectedChainIDs, chainID) + allChainIDs = append(allChainIDs, chainID) } header := datagen.GenRandomIBCTMHeader(chainID, 0) hooks.AfterHeaderWithValidCommit(ctx, datagen.GenRandomByteArray(32), header, false) } + limit := datagen.RandomInt(len(allChainIDs)) + 1 + // make query to get actual chain IDs - resp, err := zcKeeper.ChainList(ctx, &zctypes.QueryChainListRequest{}) + resp, err := zcKeeper.ChainList(ctx, &zctypes.QueryChainListRequest{ + Pagination: &query.PageRequest{ + Limit: limit, + }, + }) require.NoError(t, err) actualChainIDs := resp.ChainIds - // sort them and assert equality - sort.Strings(expectedChainIDs) - sort.Strings(actualChainIDs) - require.Equal(t, len(expectedChainIDs), len(actualChainIDs)) - for i := 0; i < len(expectedChainIDs); i++ { - require.Equal(t, expectedChainIDs[i], actualChainIDs[i]) + require.Equal(t, limit, uint64(len(actualChainIDs))) + allChainIDs = zcKeeper.GetAllChainIDs(ctx) + for i := uint64(0); i < limit; i++ { + require.Equal(t, allChainIDs[i], actualChainIDs[i]) } }) } diff --git a/x/zoneconcierge/types/query.pb.go b/x/zoneconcierge/types/query.pb.go index c0bd55bdb..aa2c0e391 100644 --- a/x/zoneconcierge/types/query.pb.go +++ b/x/zoneconcierge/types/query.pb.go @@ -224,6 +224,8 @@ func (m *QueryHeaderResponse) GetForkHeaders() *Forks { // QueryChainListRequest is request type for the Query/ChainList RPC method type QueryChainListRequest struct { + // pagination defines whether to have the pagination in the request + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryChainListRequest) Reset() { *m = QueryChainListRequest{} } @@ -259,9 +261,19 @@ func (m *QueryChainListRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryChainListRequest proto.InternalMessageInfo +func (m *QueryChainListRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + // QueryChainListResponse is response type for the Query/ChainList RPC method type QueryChainListResponse struct { + // chain_ids are IDs of the chains in ascending alphabetical order ChainIds []string `protobuf:"bytes,1,rep,name=chain_ids,json=chainIds,proto3" json:"chain_ids,omitempty"` + // pagination defines the pagination in the response + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryChainListResponse) Reset() { *m = QueryChainListResponse{} } @@ -304,6 +316,13 @@ func (m *QueryChainListResponse) GetChainIds() []string { return nil } +func (m *QueryChainListResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + // QueryChainInfoRequest is request type for the Query/ChainInfo RPC method. type QueryChainInfoRequest struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -497,7 +516,7 @@ func (m *QueryEpochChainInfoResponse) GetChainInfo() *ChainInfo { // QueryListHeadersRequest is request type for the Query/ListHeaders RPC method. type QueryListHeadersRequest struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // pagination defines whether to have the pagination in the response + // pagination defines whether to have the pagination in the request Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -1018,79 +1037,80 @@ func init() { func init() { proto.RegisterFile("babylon/zoneconcierge/query.proto", fileDescriptor_2caab7ee15063236) } var fileDescriptor_2caab7ee15063236 = []byte{ - // 1146 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x5f, 0x6f, 0xdb, 0x54, - 0x14, 0xaf, 0x9b, 0x36, 0x6b, 0x4e, 0xd9, 0x34, 0x5d, 0xca, 0x16, 0xdc, 0x2d, 0x2d, 0x46, 0xda, - 0xba, 0x69, 0xd8, 0x38, 0xac, 0x8c, 0x0a, 0x89, 0xa9, 0xe9, 0x68, 0x57, 0x86, 0xc6, 0x6a, 0x28, - 0x0f, 0x08, 0x29, 0xb2, 0x9d, 0x1b, 0xc7, 0x6a, 0xe3, 0x9b, 0xd9, 0x4e, 0xd6, 0xac, 0xf4, 0x85, - 0x2f, 0x00, 0x12, 0x2f, 0x88, 0x57, 0xa4, 0x21, 0xf1, 0xb0, 0xcf, 0x31, 0xa4, 0x3d, 0x4c, 0xe2, - 0x85, 0x27, 0x84, 0x5a, 0xbe, 0x06, 0x12, 0xf2, 0xbd, 0xd7, 0x8e, 0x9d, 0xd8, 0xcb, 0x1f, 0xfa, - 0xc0, 0xc3, 0xde, 0x72, 0x7d, 0xcf, 0xf9, 0x9d, 0xdf, 0xf9, 0x73, 0xcf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0xff, 0x5c, 0x00, 0x34, 0xd8, 0xf7, 0xd0, 0x07, 0x43, 0x88, 0x65, - 0x2e, 0x4a, 0xe2, 0xda, 0x04, 0x9a, 0xdc, 0xa9, 0x75, 0xea, 0xd4, 0x87, 0x68, 0x2d, 0xdb, 0xa9, - 0xb4, 0x39, 0x18, 0xcf, 0xce, 0x3f, 0x02, 0x5c, 0x7e, 0xe9, 0x50, 0x45, 0x1b, 0x63, 0xf3, 0x1b, - 0xdc, 0x04, 0xc4, 0x3b, 0xff, 0x0d, 0x84, 0xfb, 0xbb, 0x43, 0xfd, 0xbd, 0x87, 0xb6, 0x27, 0xf6, - 0x57, 0x61, 0x3d, 0x35, 0xea, 0xad, 0x95, 0xcf, 0x9e, 0x1d, 0x97, 0x84, 0x17, 0xc7, 0x25, 0xe1, - 0xaf, 0xe3, 0x92, 0xf0, 0xfd, 0x49, 0x69, 0xea, 0xc5, 0x49, 0x69, 0xea, 0x8f, 0x93, 0xd2, 0xd4, - 0x57, 0xab, 0x96, 0xed, 0x37, 0xda, 0x86, 0x6c, 0x92, 0x66, 0x68, 0x8e, 0xc2, 0x44, 0xb6, 0x0f, - 0xfa, 0xac, 0xfb, 0xdd, 0x16, 0xf6, 0x8c, 0x3c, 0xfd, 0xc7, 0xff, 0xde, 0xbf, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x12, 0x48, 0x53, 0xd4, 0x99, 0x11, 0x00, 0x00, + // 1155 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x8f, 0xf3, 0xaf, 0xc9, 0x0b, 0xad, 0xaa, 0x21, 0x94, 0xc5, 0x69, 0x37, 0xc1, 0x48, 0x25, + 0xad, 0x8a, 0x8d, 0x97, 0x96, 0x12, 0x21, 0x51, 0x65, 0x53, 0x92, 0x86, 0xa2, 0xd2, 0x18, 0xc2, + 0x01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9, 0x55, 0xdc, 0xe7, 0x70, 0x31, 0xe6, 0xc9, 0xb2, 0xd1, 0x13, 0xab, 0x71, 0x33, 0x6c, + 0xc1, 0xa5, 0x1c, 0xdc, 0x53, 0x0b, 0x82, 0xb2, 0x03, 0x45, 0x66, 0x63, 0xd3, 0xf5, 0xcc, 0x7d, + 0xf7, 0x11, 0xae, 0x8e, 0xd0, 0x36, 0x68, 0x11, 0x66, 0x9a, 0x3e, 0x69, 0x63, 0x46, 0x7c, 0xce, + 0xe0, 0x07, 0xe5, 0xa7, 0x29, 0x58, 0xce, 0xc5, 0x14, 0xcc, 0x77, 0x61, 0xb1, 0x16, 0xdd, 0x56, + 0xc6, 0xab, 0x53, 0x54, 0xeb, 0x83, 0x47, 0x6b, 0x00, 0x3c, 0xd2, 0x0c, 0x8c, 0xa7, 0x54, 0x8e, + 0xc1, 0xe2, 0x59, 0xd5, 0xd6, 0x55, 0x16, 0x4f, 0x83, 0xe7, 0x85, 0xa9, 0xde, 0x83, 0x73, 0xbe, + 0xf9, 0xb0, 0xd2, 0x9d, 0x7a, 0x85, 0xa9, 0x9e, 0x47, 0x3a, 0x35, 0x1e, 0x43, 0x0c, 0xc3, 0x7c, + 0xb8, 0x11, 0x7f, 0x33, 0xce, 0xfa, 0xc9, 0x23, 0xda, 0x05, 0x64, 0x05, 0x76, 0x85, 0xb6, 0xac, + 0x86, 0x4b, 0xa9, 0x4b, 0xbc, 0xca, 0x1e, 0xee, 0x14, 0xa6, 0x7b, 0x30, 0xd3, 0x23, 0xbb, 0xad, + 0xab, 0x9f, 0xc6, 0xf2, 0x77, 0x71, 0xc7, 0x38, 0x6f, 0x05, 0x76, 0xea, 0x0b, 0xda, 0x62, 0x21, + 0x27, 0xb5, 0xc2, 0x0c, 0x43, 0xd2, 0x5f, 0x30, 0xe3, 0x42, 0xb1, 0x8c, 0x14, 0x70, 0x7d, 0x25, + 0x80, 0x2b, 0x39, 0x49, 0xda, 0xf5, 0x02, 0x77, 0xff, 0x0e,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cd, 0xb2, 0xbf, 0x20, 0xde, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x1f, 0xf5, 0xc1, 0xb9, 0x2a, + 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1637,6 +1657,18 @@ func (m *QueryChainListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.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 } @@ -1660,6 +1692,18 @@ func (m *QueryChainListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if len(m.ChainIds) > 0 { for iNdEx := len(m.ChainIds) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ChainIds[iNdEx]) @@ -2291,6 +2335,10 @@ func (m *QueryChainListRequest) Size() (n int) { } var l int _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2306,6 +2354,10 @@ func (m *QueryChainListResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2915,6 +2967,42 @@ func (m *QueryChainListRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryChainListRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2997,6 +3085,42 @@ func (m *QueryChainListResponse) Unmarshal(dAtA []byte) error { } m.ChainIds = append(m.ChainIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/zoneconcierge/types/query.pb.gw.go b/x/zoneconcierge/types/query.pb.gw.go index 5ffdf1014..4a9974981 100644 --- a/x/zoneconcierge/types/query.pb.gw.go +++ b/x/zoneconcierge/types/query.pb.gw.go @@ -127,10 +127,21 @@ func local_request_Query_Header_0(ctx context.Context, marshaler runtime.Marshal } +var ( + filter_Query_ChainList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Query_ChainList_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryChainListRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ChainList_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.ChainList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -140,6 +151,13 @@ func local_request_Query_ChainList_0(ctx context.Context, marshaler runtime.Mars var protoReq QueryChainListRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ChainList_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.ChainList(ctx, &protoReq) return msg, metadata, err