From c20ade0cabba0753de84e6881881527ac20a6a9f Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Tue, 14 Feb 2023 09:20:27 +1100 Subject: [PATCH] init --- client/docs/swagger-ui/swagger.yaml | 20 --- proto/babylon/btccheckpoint/query.proto | 5 +- proto/babylon/epoching/v1/query.proto | 5 +- x/btccheckpoint/keeper/grpc_query.go | 13 -- x/btccheckpoint/types/query.pb.go | 156 +++++------------- x/epoching/keeper/grpc_query.go | 14 -- x/epoching/keeper/grpc_query_test.go | 37 ----- x/epoching/types/query.pb.go | 211 ++++++++---------------- 8 files changed, 114 insertions(+), 347 deletions(-) diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index a4c2ae549..5cba57a67 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -110,16 +110,6 @@ paths: type: string format: byte parameters: - - name: start_epoch - in: query - required: false - type: string - format: uint64 - - name: end_epoch - in: query - required: false - type: string - format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -1875,16 +1865,6 @@ paths: "value": "1.212s" } parameters: - - name: start_epoch - in: query - required: false - type: string - format: uint64 - - name: end_epoch - in: query - required: false - type: string - format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin diff --git a/proto/babylon/btccheckpoint/query.proto b/proto/babylon/btccheckpoint/query.proto index 6cad44bab..8788178be 100644 --- a/proto/babylon/btccheckpoint/query.proto +++ b/proto/babylon/btccheckpoint/query.proto @@ -52,11 +52,8 @@ message QueryBtcCheckpointInfoResponse { // QueryBtcCheckpointsInfoRequest is request type for the Query/BtcCheckpointsInfo RPC method message QueryBtcCheckpointsInfoRequest { - uint64 start_epoch = 1; - uint64 end_epoch = 2; - // pagination defines whether to have the pagination in the request - cosmos.base.query.v1beta1.PageRequest pagination = 3; + cosmos.base.query.v1beta1.PageRequest pagination = 1; } // QueryBtcCheckpointsInfoResponse is response type for the Query/BtcCheckpointsInfo RPC method diff --git a/proto/babylon/epoching/v1/query.proto b/proto/babylon/epoching/v1/query.proto index 18fcead52..7a8f01d87 100644 --- a/proto/babylon/epoching/v1/query.proto +++ b/proto/babylon/epoching/v1/query.proto @@ -77,11 +77,8 @@ message QueryEpochInfoResponse { } message QueryEpochsInfoRequest { - uint64 start_epoch = 1; - uint64 end_epoch = 2; - // pagination defines whether to have the pagination in the request - cosmos.base.query.v1beta1.PageRequest pagination = 3; + cosmos.base.query.v1beta1.PageRequest pagination = 1; } message QueryEpochsInfoResponse { diff --git a/x/btccheckpoint/keeper/grpc_query.go b/x/btccheckpoint/keeper/grpc_query.go index 3b1834d51..1c7108809 100644 --- a/x/btccheckpoint/keeper/grpc_query.go +++ b/x/btccheckpoint/keeper/grpc_query.go @@ -121,19 +121,6 @@ func (k Keeper) BtcCheckpointsInfo(c context.Context, req *types.QueryBtcCheckpo ctx := sdk.UnwrapSDKContext(c) - // parse start_epoch and end_epoch and forward to the pagination request - if req.EndEpoch > 0 { - // this query uses start_epoch and end_epoch to specify range - if req.StartEpoch > req.EndEpoch { - return nil, fmt.Errorf("StartEpoch (%d) should not be larger than EndEpoch (%d)", req.StartEpoch, req.EndEpoch) - } - req.Pagination = &query.PageRequest{ - Key: sdk.Uint64ToBigEndian(req.StartEpoch), - Limit: req.EndEpoch - req.StartEpoch + 1, - Reverse: false, - } - } - store := ctx.KVStore(k.storeKey) epochDataStore := prefix.NewStore(store, types.EpochDataPrefix) diff --git a/x/btccheckpoint/types/query.pb.go b/x/btccheckpoint/types/query.pb.go index c1227dbfd..f5a98260e 100644 --- a/x/btccheckpoint/types/query.pb.go +++ b/x/btccheckpoint/types/query.pb.go @@ -205,10 +205,8 @@ func (m *QueryBtcCheckpointInfoResponse) GetInfo() *BTCCheckpointInfo { // QueryBtcCheckpointsInfoRequest is request type for the Query/BtcCheckpointsInfo RPC method 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 request - Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryBtcCheckpointsInfoRequest) Reset() { *m = QueryBtcCheckpointsInfoRequest{} } @@ -244,20 +242,6 @@ func (m *QueryBtcCheckpointsInfoRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryBtcCheckpointsInfoRequest proto.InternalMessageInfo -func (m *QueryBtcCheckpointsInfoRequest) GetStartEpoch() uint64 { - if m != nil { - return m.StartEpoch - } - return 0 -} - -func (m *QueryBtcCheckpointsInfoRequest) GetEndEpoch() uint64 { - if m != nil { - return m.EndEpoch - } - return 0 -} - func (m *QueryBtcCheckpointsInfoRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -439,48 +423,46 @@ func init() { func init() { proto.RegisterFile("babylon/btccheckpoint/query.proto", fileDescriptor_009c1165ec392ace) } var fileDescriptor_009c1165ec392ace = []byte{ - // 653 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4d, 0x6f, 0xd3, 0x30, - 0x18, 0xc7, 0xeb, 0xae, 0x9b, 0x36, 0xef, 0x02, 0x66, 0x87, 0x92, 0x8d, 0xac, 0x8b, 0x04, 0x1d, - 0x2f, 0x4b, 0xd4, 0x4d, 0x30, 0x26, 0x10, 0x48, 0x9d, 0x78, 0x13, 0x08, 0x46, 0x81, 0x0b, 0x97, - 0xca, 0xc9, 0xbc, 0x34, 0x5a, 0x63, 0x67, 0xb5, 0x53, 0x51, 0x21, 0x2e, 0xf0, 0x01, 0x40, 0xe2, - 0x33, 0xc0, 0x89, 0x23, 0x5c, 0x91, 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0xd7, 0x13, 0x95, 0xd0, 0x36, 0x1d, 0xe6, 0x1f, 0x6f, 0xeb, 0x54, 0xb0, - 0x47, 0xdb, 0x1e, 0xaf, 0xfa, 0x5c, 0x44, 0x23, 0x20, 0xdc, 0x9e, 0x91, 0xff, 0x5b, 0x1b, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x86, 0x0a, 0xe9, 0xa5, 0x07, 0x00, 0x00, + // 623 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x3d, 0x6f, 0xd3, 0x40, + 0x1c, 0xc6, 0x73, 0x21, 0x8d, 0xda, 0x63, 0x81, 0xa3, 0x43, 0x70, 0x8b, 0x9b, 0x5a, 0x82, 0x94, + 0x97, 0xda, 0x4a, 0x2b, 0x28, 0x15, 0x08, 0xa4, 0x54, 0xbc, 0x09, 0x04, 0x25, 0xc0, 0xc2, 0x52, + 0x9d, 0xad, 0xab, 0x63, 0x35, 0xbe, 0x73, 0x73, 0xe7, 0x88, 0x08, 0xb1, 0xc0, 0x07, 0x00, 0x89, + 0xcf, 0xc0, 0xc6, 0x08, 0x2b, 0x12, 0x5b, 0xc7, 0x4a, 0x2c, 0x4c, 0x08, 0x25, 0x7c, 0x10, 0xe4, + 0xf3, 0x35, 0x89, 0x93, 0x58, 0x49, 0xaa, 0x6e, 0x95, 0xfb, 0x3c, 0xff, 0xe7, 0xe7, 0xff, 0x8b, + 0x03, 0x97, 0x6d, 0x6c, 0xb7, 0xea, 0x8c, 0x5a, 0xb6, 0x70, 0x9c, 0x1a, 0x71, 0xf6, 0x02, 0xe6, + 0x51, 0x61, 0xed, 0x87, 0xa4, 0xd1, 0x32, 0x83, 0x06, 0x13, 0x0c, 0x15, 0x94, 0xc4, 0x4c, 0x48, + 0xcc, 0x66, 0x59, 0x9b, 0x77, 0x99, 0xcb, 0xa4, 0xc8, 0x8a, 0xfe, 0x8a,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 0xaf, 0x00, 0xa2, 0xe1, 0x9b, 0x41, 0x53, 0xe5, + 0xf7, 0x5f, 0xb4, 0xb6, 0x79, 0x0c, 0xa7, 0x42, 0x5f, 0x96, 0xe8, 0x0b, 0xe8, 0x7c, 0x2a, 0x3a, + 0xfa, 0x01, 0xe0, 0x99, 0xc1, 0x2d, 0x45, 0x37, 0xc6, 0x44, 0xa6, 0x1c, 0x97, 0xb6, 0x31, 0xb5, + 0x4f, 0x81, 0x6e, 0x4a, 0xd0, 0x75, 0x54, 0x9e, 0xa8, 0xc7, 0x16, 0xef, 0x95, 0xa8, 0x3c, 0x3b, + 0x68, 0xeb, 0xe0, 0xb0, 0xad, 0x83, 0xbf, 0x6d, 0x1d, 0x7c, 0xea, 0xe8, 0x99, 0xc3, 0x8e, 0x9e, + 0xf9, 0xdd, 0xd1, 0x33, 0xaf, 0xaf, 0xbb, 0x9e, 0xa8, 0x85, 0xb6, 0xe9, 0x30, 0xff, 0xa8, 0xac, + 0x53, 0xc3, 0x1e, 0xed, 0x66, 0xbc, 0x19, 0x48, 0x11, 0xad, 0x80, 0x70, 0x3b, 0x2f, 0x7f, 0x78, + 0xd6, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x85, 0x8a, 0x90, 0xbc, 0x66, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -826,17 +808,7 @@ func (m *QueryBtcCheckpointsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if m.EndEpoch != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EndEpoch)) - i-- - dAtA[i] = 0x10 - } - if m.StartEpoch != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.StartEpoch)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1041,12 +1013,6 @@ func (m *QueryBtcCheckpointsInfoRequest) Size() (n int) { } var l int _ = l - if m.StartEpoch != 0 { - n += 1 + sovQuery(uint64(m.StartEpoch)) - } - if m.EndEpoch != 0 { - n += 1 + sovQuery(uint64(m.EndEpoch)) - } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) @@ -1432,44 +1398,6 @@ func (m *QueryBtcCheckpointsInfoRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartEpoch", wireType) - } - m.StartEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndEpoch", wireType) - } - m.EndEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } diff --git a/x/epoching/keeper/grpc_query.go b/x/epoching/keeper/grpc_query.go index f76c5f81a..270018ebc 100644 --- a/x/epoching/keeper/grpc_query.go +++ b/x/epoching/keeper/grpc_query.go @@ -3,7 +3,6 @@ package keeper import ( "context" "errors" - "fmt" "cosmossdk.io/math" @@ -59,19 +58,6 @@ func (k Keeper) EpochInfo(c context.Context, req *types.QueryEpochInfoRequest) ( func (k Keeper) EpochsInfo(c context.Context, req *types.QueryEpochsInfoRequest) (*types.QueryEpochsInfoResponse, error) { ctx := sdk.UnwrapSDKContext(c) - // parse start_epoch and end_epoch and forward to the pagination request - if req.EndEpoch > 0 { - // this query uses start_epoch and end_epoch to specify range - if req.StartEpoch > req.EndEpoch { - return nil, fmt.Errorf("StartEpoch (%d) should not be larger than EndEpoch (%d)", req.StartEpoch, req.EndEpoch) - } - req.Pagination = &query.PageRequest{ - Key: sdk.Uint64ToBigEndian(req.StartEpoch), - Limit: req.EndEpoch - req.StartEpoch + 1, - Reverse: false, - } - } - epochInfoStore := k.epochInfoStore(ctx) epochs := []*types.Epoch{} pageRes, err := query.Paginate(epochInfoStore, req.Pagination, func(key, value []byte) error { diff --git a/x/epoching/keeper/grpc_query_test.go b/x/epoching/keeper/grpc_query_test.go index 2f3f2a10e..663b0aeea 100644 --- a/x/epoching/keeper/grpc_query_test.go +++ b/x/epoching/keeper/grpc_query_test.go @@ -124,43 +124,6 @@ func FuzzEpochsInfo(f *testing.F) { }) } -func FuzzEpochsInfo_QueryParams(f *testing.F) { - datagen.AddRandomSeedsToFuzzer(f, 10) - - f.Fuzz(func(t *testing.T, seed int64) { - rand.Seed(seed) - numEpochs := datagen.RandomInt(10) + 2 - - endEpoch := rand.Uint64()%(numEpochs-1) + 1 - startEpoch := rand.Uint64() % endEpoch - - helper := testepoching.NewHelper(t) - ctx, keeper, queryClient := helper.Ctx, helper.EpochingKeeper, helper.QueryClient - wctx := sdk.WrapSDKContext(ctx) - - // enque the first block of the numEpochs'th epoch - epochInterval := keeper.GetParams(ctx).EpochInterval - for i := uint64(0); i < numEpochs-1; i++ { - for j := uint64(0); j < epochInterval; j++ { - helper.GenAndApplyEmptyBlock() - } - } - - // get epoch msgs - req := types.QueryEpochsInfoRequest{ - StartEpoch: startEpoch, - EndEpoch: endEpoch, - } - resp, err := queryClient.EpochsInfo(wctx, &req) - require.NoError(t, err) - - require.Equal(t, endEpoch-startEpoch+1, uint64(len(resp.Epochs))) - for i, epoch := range resp.Epochs { - require.Equal(t, uint64(i)+startEpoch, epoch.EpochNumber) - } - }) -} - // FuzzEpochMsgsQuery fuzzes queryClient.EpochMsgs // 1. randomly generate msgs and limit in pagination // 2. check the returned msg was previously enqueued diff --git a/x/epoching/types/query.pb.go b/x/epoching/types/query.pb.go index 8d90b59d9..798a86562 100644 --- a/x/epoching/types/query.pb.go +++ b/x/epoching/types/query.pb.go @@ -202,10 +202,8 @@ 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 request - Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryEpochsInfoRequest) Reset() { *m = QueryEpochsInfoRequest{} } @@ -241,20 +239,6 @@ func (m *QueryEpochsInfoRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryEpochsInfoRequest proto.InternalMessageInfo -func (m *QueryEpochsInfoRequest) GetStartEpoch() uint64 { - if m != nil { - return m.StartEpoch - } - return 0 -} - -func (m *QueryEpochsInfoRequest) GetEndEpoch() uint64 { - if m != nil { - return m.EndEpoch - } - return 0 -} - func (m *QueryEpochsInfoRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -948,75 +932,74 @@ func init() { func init() { proto.RegisterFile("babylon/epoching/v1/query.proto", fileDescriptor_1821b530f2ec2711) } var fileDescriptor_1821b530f2ec2711 = []byte{ - // 1088 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xcd, 0x6f, 0xdc, 0x44, - 0x14, 0xc0, 0xe3, 0x24, 0x0d, 0xed, 0x4b, 0x4b, 0x61, 0x52, 0x20, 0x75, 0xca, 0x26, 0x72, 0xa1, - 0x09, 0x49, 0x63, 0x67, 0x93, 0xb4, 0xa8, 0x1f, 0x80, 0x48, 0xf8, 0x10, 0x55, 0x8a, 0x52, 0x23, - 0xe5, 0xc0, 0x65, 0x35, 0xbb, 0x9e, 0x38, 0x96, 0xbc, 0x9e, 0xad, 0xc7, 0x5e, 0x58, 0x95, 0x20, - 0xc4, 0x99, 0x03, 0x12, 0x12, 0xa8, 0x17, 0x84, 0xc4, 0x91, 0x3f, 0x01, 0x0e, 0x1c, 0x7b, 0x0c, - 0xe2, 0xc2, 0x09, 0xa1, 0x84, 0x3f, 0x04, 0xf9, 0xcd, 0x78, 0xd7, 0xde, 0xda, 0xd9, 0x4d, 0x15, - 0x71, 0x4b, 0x66, 0xde, 0xc7, 0xef, 0x7d, 0xf8, 0xbd, 0x59, 0x98, 0xad, 0xd3, 0x7a, 0xc7, 0xe7, - 0x81, 0xc5, 0x5a, 0xbc, 0xb1, 0xe7, 0x05, 0xae, 0xd5, 0xae, 0x5a, 0x0f, 0x63, 0x16, 0x76, 0xcc, - 0x56, 0xc8, 0x23, 0x4e, 0xa6, 0x94, 0x80, 0x99, 0x0a, 0x98, 0xed, 0xaa, 0x7e, 0xc9, 0xe5, 0x2e, - 0xc7, 0x7b, 0x2b, 0xf9, 0x4b, 0x8a, 0xea, 0x57, 0x5c, 0xce, 0x5d, 0x9f, 0x59, 0xb4, 0xe5, 0x59, - 0x34, 0x08, 0x78, 0x44, 0x23, 0x8f, 0x07, 0x42, 0xdd, 0x2e, 0x36, 0xb8, 0x68, 0x72, 0x61, 0xd5, - 0xa9, 0x60, 0xd2, 0x83, 0xd5, 0xae, 0xd6, 0x59, 0x44, 0xab, 0x56, 0x8b, 0xba, 0x5e, 0x80, 0xc2, - 0x4a, 0x76, 0xae, 0x88, 0xaa, 0x45, 0x43, 0xda, 0x4c, 0xad, 0x19, 0x45, 0x12, 0x5d, 0x44, 0x94, - 0x31, 0x2e, 0x01, 0x79, 0x90, 0xf8, 0xd9, 0x46, 0x45, 0x9b, 0x3d, 0x8c, 0x99, 0x88, 0x8c, 0x6d, - 0x98, 0xca, 0x9d, 0x8a, 0x16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x49, 0x3e, 0x67, 0x3f, 0xd7, 0xa6, 0xfe, 0xbb, 0x8e, 0x13, 0x1a, 0x0c, 0x66, 0x4b, 0x95, - 0x55, 0xf0, 0x1b, 0x52, 0xdb, 0xf7, 0x76, 0x99, 0x9a, 0x68, 0xf3, 0x85, 0x31, 0x17, 0x98, 0x48, - 0xdc, 0x24, 0xff, 0x19, 0x77, 0x95, 0x9b, 0xf7, 0x98, 0xcf, 0x5c, 0xc4, 0x2e, 0x82, 0x74, 0x58, - 0x1e, 0xd2, 0x61, 0x12, 0xd2, 0x85, 0xb9, 0x72, 0x6d, 0x45, 0xb9, 0x29, 0xd5, 0x33, 0x94, 0x0b, - 0x85, 0x94, 0x45, 0x36, 0x12, 0x47, 0x88, 0xf9, 0x65, 0x76, 0xca, 0xed, 0x50, 0xff, 0x13, 0x16, - 0xfd, 0xaf, 0x9f, 0xf2, 0x1f, 0x9a, 0x1a, 0x67, 0x39, 0x00, 0x15, 0xe1, 0xdb, 0x00, 0xed, 0x34, - 0xc5, 0x69, 0xf7, 0x55, 0x8e, 0xaf, 0x84, 0x9d, 0xd1, 0x20, 0xd7, 0x81, 0x44, 0x3c, 0xa2, 0x7e, - 0xad, 0xcd, 0x23, 0x2f, 0x70, 0x6b, 0x2d, 0xfe, 0x19, 0x0b, 0x11, 0x76, 0xcc, 0x7e, 0x01, 0x6f, - 0x76, 0xf0, 0x62, 0x3b, 0x39, 0xef, 0x6b, 0xcf, 0xb1, 0x67, 0x6e, 0xcf, 0xd5, 0x83, 0x49, 0x38, - 0x83, 0x31, 0x91, 0xaf, 0x34, 0x98, 0x90, 0x0b, 0x98, 0xcc, 0x97, 0x7d, 0x35, 0x7d, 0xdb, 0x5e, - 0x5f, 0x18, 0x2c, 0x28, 0x7d, 0x1a, 0x57, 0xbf, 0xfe, 0xf3, 0xdf, 0xef, 0x46, 0x5f, 0x25, 0x33, - 0x56, 0xf9, 0xe3, 0x83, 0xfc, 0xa0, 0xc1, 0xb9, 0xee, 0xc2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- 0xc9, 0x31, 0x28, 0xe5, 0x7b, 0x48, 0xbf, 0x71, 0x42, 0x2d, 0x15, 0xc1, 0x5d, 0x8c, 0xe0, 0x26, - 0x59, 0x2f, 0x8c, 0xc0, 0xe9, 0x6a, 0x66, 0x43, 0x48, 0xf7, 0xdd, 0x7e, 0xd2, 0x2f, 0x93, 0x99, - 0x99, 0x4f, 0x06, 0x7d, 0xd1, 0xb9, 0xdd, 0xa4, 0x2f, 0x0f, 0x29, 0xad, 0x50, 0xdf, 0x41, 0xd4, - 0x5b, 0xe4, 0xcd, 0xe1, 0x1b, 0xbb, 0x57, 0x01, 0xc1, 0xa2, 0x8d, 0x7b, 0x4f, 0x0e, 0x2b, 0xda, - 0xc1, 0x61, 0x45, 0xfb, 0xe7, 0xb0, 0xa2, 0x7d, 0x7b, 0x54, 0x19, 0x39, 0x38, 0xaa, 0x8c, 0xfc, - 0x75, 0x54, 0x19, 0xf9, 0x74, 0xc5, 0xf5, 0xa2, 0xbd, 0xb8, 0x6e, 0x36, 0x78, 0x33, 0x35, 0xde, - 0xd8, 0xa3, 0x5e, 0xd0, 0xf5, 0xf4, 0x79, 0xcf, 0x57, 0xd4, 0x69, 0x31, 0x51, 0x9f, 0xc0, 0xdf, - 0x7a, 0x6b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x45, 0xf9, 0x53, 0x14, 0xc9, 0x0e, 0x00, 0x00, + // 1071 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0xb3, 0x89, 0x1b, 0x92, 0x97, 0x96, 0xc2, 0xa4, 0x40, 0xbb, 0x29, 0x4e, 0xb4, 0x85, + 0x26, 0x24, 0xcd, 0x6e, 0x9c, 0xa4, 0x45, 0xfd, 0x01, 0x88, 0x84, 0x1f, 0xa2, 0x4a, 0x51, 0xba, + 0x48, 0x39, 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x75, + 0x65, 0x05, 0x4e, 0xc7, 0x33, 0x5f, 0x42, 0xa6, 0x77, 0xfb, 0xe9, 0x7b, 0x99, 0xca, 0xed, 0x7c, + 0x32, 0xe8, 0x8b, 0xee, 0xd1, 0x26, 0x7d, 0x79, 0x48, 0x6b, 0x89, 0xfa, 0x0e, 0xa2, 0xde, 0x26, + 0x6f, 0x0e, 0xff, 0xb0, 0xbb, 0x13, 0x88, 0x58, 0xbc, 0x71, 0xff, 0xe9, 0x61, 0x59, 0x3b, 0x38, + 0x2c, 0x6b, 0xff, 0x1c, 0x96, 0xb5, 0xef, 0x8e, 0xca, 0x23, 0x07, 0x47, 0xe5, 0x91, 0xbf, 0x8e, + 0xca, 0x23, 0x9f, 0xae, 0xb8, 0x5e, 0xbc, 0x97, 0xd4, 0xcc, 0x3a, 0x6f, 0x64, 0xc1, 0xeb, 0x7b, + 0xd4, 0x0b, 0x3a, 0x99, 0xbe, 0xe8, 0xe6, 0x8a, 0xdb, 0x4d, 0x16, 0xd5, 0xc6, 0xf1, 0x8f, 0xb5, + 0xb5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x76, 0x01, 0x0c, 0x73, 0x8a, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1558,17 +1541,7 @@ func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if m.EndEpoch != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EndEpoch)) - i-- - dAtA[i] = 0x10 - } - if m.StartEpoch != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.StartEpoch)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -2147,12 +2120,6 @@ func (m *QueryEpochsInfoRequest) Size() (n int) { } var l int _ = l - if m.StartEpoch != 0 { - n += 1 + sovQuery(uint64(m.StartEpoch)) - } - if m.EndEpoch != 0 { - n += 1 + sovQuery(uint64(m.EndEpoch)) - } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) @@ -2690,44 +2657,6 @@ func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartEpoch", wireType) - } - m.StartEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndEpoch", wireType) - } - m.EndEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) }