diff --git a/proto/dymensionxyz/dymension/rollapp/query.proto b/proto/dymensionxyz/dymension/rollapp/query.proto index 9361fde6a..24dedab2d 100644 --- a/proto/dymensionxyz/dymension/rollapp/query.proto +++ b/proto/dymensionxyz/dymension/rollapp/query.proto @@ -59,6 +59,11 @@ service Query { rpc RegisteredDenoms(QueryRegisteredDenomsRequest) returns (QueryRegisteredDenomsResponse) { option (google.api.http).get = "/dymensionxyz/dymension/rollapp/registered_denoms"; } + + // Queries a list of obsolete DRS versions. + rpc ObsoleteDRSVersions(QueryObsoleteDRSVersionsRequest) returns (QueryObsoleteDRSVersionsResponse) { + option (google.api.http).get = "/dymensionxyz/dymension/rollapp/obsolete_drs_versions"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -136,3 +141,9 @@ message QueryRegisteredDenomsRequest { message QueryRegisteredDenomsResponse { repeated string denoms = 1; } + +message QueryObsoleteDRSVersionsRequest {} + +message QueryObsoleteDRSVersionsResponse { + repeated uint32 drs_versions = 1; +} diff --git a/x/rollapp/client/cli/query_obsolete_drs_versions.go b/x/rollapp/client/cli/query_obsolete_drs_versions.go new file mode 100644 index 000000000..edcd91c6a --- /dev/null +++ b/x/rollapp/client/cli/query_obsolete_drs_versions.go @@ -0,0 +1,35 @@ +package cli + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + + "github.com/dymensionxyz/dymension/v3/x/rollapp/types" +) + +func CmdQueryObsoleteDRSVersions() *cobra.Command { + cmd := &cobra.Command{ + Use: "obsolete-drs-versions", + Short: "shows the list of obsolete DRS versions", + 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.ObsoleteDRSVersions(cmd.Context(), &types.QueryObsoleteDRSVersionsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/rollapp/keeper/grpc_query_obsolete_drs_versions.go b/x/rollapp/keeper/grpc_query_obsolete_drs_versions.go new file mode 100644 index 000000000..156442b73 --- /dev/null +++ b/x/rollapp/keeper/grpc_query_obsolete_drs_versions.go @@ -0,0 +1,25 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/dymensionxyz/dymension/v3/x/rollapp/types" +) + +func (k Keeper) ObsoleteDRSVersions(goCtx context.Context, req *types.QueryObsoleteDRSVersionsRequest) (*types.QueryObsoleteDRSVersionsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + versions, err := k.GetAllVulnerableDRSVersions(ctx) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryObsoleteDRSVersionsResponse{DrsVersions: versions}, nil +} diff --git a/x/rollapp/keeper/grpc_query_obsolete_drs_versions_test.go b/x/rollapp/keeper/grpc_query_obsolete_drs_versions_test.go new file mode 100644 index 000000000..97f9856d6 --- /dev/null +++ b/x/rollapp/keeper/grpc_query_obsolete_drs_versions_test.go @@ -0,0 +1,27 @@ +package keeper_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + testkeeper "github.com/dymensionxyz/dymension/v3/testutil/keeper" + "github.com/dymensionxyz/dymension/v3/x/rollapp/types" +) + +func TestObsoleteDRSVersionsQuery(t *testing.T) { + keeper, ctx := testkeeper.RollappKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + + const obsoleteDRSVersion uint32 = 1234567890 + err := keeper.SetVulnerableDRSVersion(ctx, obsoleteDRSVersion) + require.NoError(t, err) + + response, err := keeper.ObsoleteDRSVersions(wctx, &types.QueryObsoleteDRSVersionsRequest{}) + require.NoError(t, err) + + expected, err := keeper.GetAllVulnerableDRSVersions(ctx) + require.NoError(t, err) + require.EqualValues(t, expected, response.DrsVersions) +} diff --git a/x/rollapp/types/query.pb.go b/x/rollapp/types/query.pb.go index c6b95fef1..f86e67779 100644 --- a/x/rollapp/types/query.pb.go +++ b/x/rollapp/types/query.pb.go @@ -777,6 +777,86 @@ func (m *QueryRegisteredDenomsResponse) GetDenoms() []string { return nil } +type QueryObsoleteDRSVersionsRequest struct { +} + +func (m *QueryObsoleteDRSVersionsRequest) Reset() { *m = QueryObsoleteDRSVersionsRequest{} } +func (m *QueryObsoleteDRSVersionsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryObsoleteDRSVersionsRequest) ProtoMessage() {} +func (*QueryObsoleteDRSVersionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00a0238fb38306fa, []int{15} +} +func (m *QueryObsoleteDRSVersionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryObsoleteDRSVersionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryObsoleteDRSVersionsRequest.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 *QueryObsoleteDRSVersionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryObsoleteDRSVersionsRequest.Merge(m, src) +} +func (m *QueryObsoleteDRSVersionsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryObsoleteDRSVersionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryObsoleteDRSVersionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryObsoleteDRSVersionsRequest proto.InternalMessageInfo + +type QueryObsoleteDRSVersionsResponse struct { + DrsVersions []uint32 `protobuf:"varint,1,rep,packed,name=drs_versions,json=drsVersions,proto3" json:"drs_versions,omitempty"` +} + +func (m *QueryObsoleteDRSVersionsResponse) Reset() { *m = QueryObsoleteDRSVersionsResponse{} } +func (m *QueryObsoleteDRSVersionsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryObsoleteDRSVersionsResponse) ProtoMessage() {} +func (*QueryObsoleteDRSVersionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00a0238fb38306fa, []int{16} +} +func (m *QueryObsoleteDRSVersionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryObsoleteDRSVersionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryObsoleteDRSVersionsResponse.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 *QueryObsoleteDRSVersionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryObsoleteDRSVersionsResponse.Merge(m, src) +} +func (m *QueryObsoleteDRSVersionsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryObsoleteDRSVersionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryObsoleteDRSVersionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryObsoleteDRSVersionsResponse proto.InternalMessageInfo + +func (m *QueryObsoleteDRSVersionsResponse) GetDrsVersions() []uint32 { + if m != nil { + return m.DrsVersions + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "dymensionxyz.dymension.rollapp.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "dymensionxyz.dymension.rollapp.QueryParamsResponse") @@ -793,6 +873,8 @@ func init() { proto.RegisterType((*QueryGetStateInfoResponse)(nil), "dymensionxyz.dymension.rollapp.QueryGetStateInfoResponse") proto.RegisterType((*QueryRegisteredDenomsRequest)(nil), "dymensionxyz.dymension.rollapp.QueryRegisteredDenomsRequest") proto.RegisterType((*QueryRegisteredDenomsResponse)(nil), "dymensionxyz.dymension.rollapp.QueryRegisteredDenomsResponse") + proto.RegisterType((*QueryObsoleteDRSVersionsRequest)(nil), "dymensionxyz.dymension.rollapp.QueryObsoleteDRSVersionsRequest") + proto.RegisterType((*QueryObsoleteDRSVersionsResponse)(nil), "dymensionxyz.dymension.rollapp.QueryObsoleteDRSVersionsResponse") } func init() { @@ -800,70 +882,75 @@ func init() { } var fileDescriptor_00a0238fb38306fa = []byte{ - // 999 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x38, 0xae, 0x13, 0xbf, 0x56, 0x22, 0x1a, 0xa2, 0x10, 0xdc, 0xe0, 0x5a, 0x8b, 0xd4, - 0xba, 0x05, 0xed, 0xc8, 0x31, 0x6e, 0x88, 0xd2, 0x96, 0x3a, 0x2a, 0x0d, 0xa9, 0xa0, 0x0a, 0x1b, - 0x10, 0x02, 0x84, 0xa2, 0x4d, 0x3d, 0xd9, 0x2c, 0x5a, 0xef, 0x6e, 0x3d, 0x9b, 0xca, 0x6e, 0x94, - 0x0b, 0xe2, 0x0f, 0x40, 0xe2, 0x2f, 0x40, 0xdc, 0xb9, 0x72, 0x46, 0x5c, 0x22, 0xc4, 0xa1, 0x12, - 0x17, 0x2e, 0x20, 0x94, 0xf0, 0x3f, 0x70, 0x45, 0x9e, 0x79, 0xbb, 0x5e, 0x6f, 0xe2, 0xec, 0xda, - 0xea, 0xc9, 0x9d, 0xe9, 0x7c, 0xdf, 0xfb, 0xbe, 0x99, 0xf7, 0x63, 0x03, 0xb7, 0x5a, 0xbd, 0x36, - 0x77, 0x85, 0xed, 0xb9, 0xdd, 0xde, 0x73, 0x16, 0x2d, 0x58, 0xc7, 0x73, 0x1c, 0xd3, 0xf7, 0xd9, - 0xd3, 0x03, 0xde, 0xe9, 0xe9, 0x7e, 0xc7, 0x0b, 0x3c, 0x5a, 0x8e, 0x9f, 0xd5, 0xa3, 0x85, 0x8e, - 0x67, 0x4b, 0xf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, 0xc5, 0xa8, 0x47, 0xd2, 0x77, - 0xb3, 0xea, 0x4a, 0x8e, 0x88, 0xd2, 0xea, 0x04, 0xc8, 0x71, 0xad, 0x0c, 0x3e, 0xd3, 0xe3, 0x16, - 0xd8, 0xa1, 0x74, 0x75, 0x44, 0x7f, 0x23, 0x30, 0x97, 0xec, 0xc6, 0x34, 0x5b, 0x02, 0x8d, 0x18, - 0x01, 0xa5, 0xbb, 0x13, 0xa2, 0xd1, 0xd9, 0xaa, 0x74, 0x56, 0xa7, 0xb5, 0xd4, 0xe2, 0x89, 0x18, - 0x76, 0xd4, 0x94, 0x58, 0x7f, 0x7c, 0x7c, 0x52, 0x26, 0x2f, 0x4e, 0xca, 0xe4, 0x9f, 0x93, 0x32, - 0xf9, 0xee, 0xb4, 0x3c, 0xf5, 0xe2, 0xb4, 0x3c, 0xf5, 0xe7, 0x69, 0x79, 0xea, 0x8b, 0x77, 0x2c, - 0x3b, 0xd8, 0x3f, 0xd8, 0xd5, 0x9f, 0x78, 0xed, 0x51, 0xb4, 0xcf, 0xea, 0xac, 0x1b, 0x71, 0x07, - 0x3d, 0x9f, 0x8b, 0xdd, 0x82, 0xfc, 0x73, 0xa5, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, - 0x80, 0x56, 0x57, 0x12, 0x0e, 0x00, 0x00, + // 1078 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x38, 0xae, 0x13, 0xbf, 0xb4, 0x22, 0x9a, 0x46, 0x21, 0xb8, 0xc1, 0x75, 0x17, 0xa9, + 0x75, 0x0b, 0xda, 0x95, 0x63, 0xdc, 0x10, 0xa5, 0x29, 0x75, 0x94, 0x36, 0xa4, 0x82, 0x12, 0x36, + 0xfc, 0x11, 0x20, 0x64, 0xad, 0xeb, 0x89, 0xb3, 0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xc3, 0x26, 0xb3, 0x31, 0xa1, 0x37, 0x2a, 0x5b, 0x13, 0xca, 0x8a, 0xb4, 0x10, 0x59, 0x3c, 0x01, + 0x42, 0x45, 0xce, 0x23, 0xfa, 0x1b, 0x81, 0xab, 0x03, 0x06, 0x4d, 0xcc, 0xd4, 0x1b, 0x3e, 0xc5, + 0x62, 0xa6, 0xde, 0x88, 0x19, 0xa7, 0x6c, 0x08, 0x55, 0xab, 0xb4, 0x14, 0xa5, 0xca, 0x41, 0x90, + 0x4a, 0x78, 0x24, 0x6e, 0x3e, 0x39, 0x3d, 0xcb, 0x92, 0x17, 0x67, 0x59, 0xf2, 0xd7, 0x59, 0x96, + 0x7c, 0x73, 0x9e, 0x9d, 0x7a, 0x71, 0x9e, 0x9d, 0xfa, 0xfd, 0x3c, 0x3b, 0xf5, 0xd9, 0x9b, 0x75, + 0xd3, 0x3b, 0x38, 0xac, 0xaa, 0x4f, 0x9d, 0xc6, 0x30, 0xe8, 0xa3, 0xa2, 0xd6, 0x0a, 0xf0, 0xbd, + 0xb6, 0xcb, 0x78, 0x35, 0x25, 0x3e, 0xf9, 0x8a, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xce, + 0xc4, 0xdb, 0x56, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -894,6 +981,8 @@ type QueryClient interface { StateInfo(ctx context.Context, in *QueryGetStateInfoRequest, opts ...grpc.CallOption) (*QueryGetStateInfoResponse, error) // Queries a list of registered denoms for the rollapp. RegisteredDenoms(ctx context.Context, in *QueryRegisteredDenomsRequest, opts ...grpc.CallOption) (*QueryRegisteredDenomsResponse, error) + // Queries a list of obsolete DRS versions. + ObsoleteDRSVersions(ctx context.Context, in *QueryObsoleteDRSVersionsRequest, opts ...grpc.CallOption) (*QueryObsoleteDRSVersionsResponse, error) } type queryClient struct { @@ -976,6 +1065,15 @@ func (c *queryClient) RegisteredDenoms(ctx context.Context, in *QueryRegisteredD return out, nil } +func (c *queryClient) ObsoleteDRSVersions(ctx context.Context, in *QueryObsoleteDRSVersionsRequest, opts ...grpc.CallOption) (*QueryObsoleteDRSVersionsResponse, error) { + out := new(QueryObsoleteDRSVersionsResponse) + err := c.cc.Invoke(ctx, "/dymensionxyz.dymension.rollapp.Query/ObsoleteDRSVersions", 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. @@ -994,6 +1092,8 @@ type QueryServer interface { StateInfo(context.Context, *QueryGetStateInfoRequest) (*QueryGetStateInfoResponse, error) // Queries a list of registered denoms for the rollapp. RegisteredDenoms(context.Context, *QueryRegisteredDenomsRequest) (*QueryRegisteredDenomsResponse, error) + // Queries a list of obsolete DRS versions. + ObsoleteDRSVersions(context.Context, *QueryObsoleteDRSVersionsRequest) (*QueryObsoleteDRSVersionsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1024,6 +1124,9 @@ func (*UnimplementedQueryServer) StateInfo(ctx context.Context, req *QueryGetSta func (*UnimplementedQueryServer) RegisteredDenoms(ctx context.Context, req *QueryRegisteredDenomsRequest) (*QueryRegisteredDenomsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisteredDenoms not implemented") } +func (*UnimplementedQueryServer) ObsoleteDRSVersions(ctx context.Context, req *QueryObsoleteDRSVersionsRequest) (*QueryObsoleteDRSVersionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ObsoleteDRSVersions not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1173,6 +1276,24 @@ func _Query_RegisteredDenoms_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Query_ObsoleteDRSVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryObsoleteDRSVersionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ObsoleteDRSVersions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dymensionxyz.dymension.rollapp.Query/ObsoleteDRSVersions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ObsoleteDRSVersions(ctx, req.(*QueryObsoleteDRSVersionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "dymensionxyz.dymension.rollapp.Query", HandlerType: (*QueryServer)(nil), @@ -1209,6 +1330,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "RegisteredDenoms", Handler: _Query_RegisteredDenoms_Handler, }, + { + MethodName: "ObsoleteDRSVersions", + Handler: _Query_ObsoleteDRSVersions_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "dymensionxyz/dymension/rollapp/query.proto", @@ -1785,6 +1910,70 @@ func (m *QueryRegisteredDenomsResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *QueryObsoleteDRSVersionsRequest) 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 *QueryObsoleteDRSVersionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryObsoleteDRSVersionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryObsoleteDRSVersionsResponse) 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 *QueryObsoleteDRSVersionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryObsoleteDRSVersionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DrsVersions) > 0 { + dAtA9 := make([]byte, len(m.DrsVersions)*10) + var j8 int + for _, num := range m.DrsVersions { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ + } + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintQuery(dAtA, i, uint64(j8)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2017,6 +2206,31 @@ func (m *QueryRegisteredDenomsResponse) Size() (n int) { return n } +func (m *QueryObsoleteDRSVersionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryObsoleteDRSVersionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DrsVersions) > 0 { + l = 0 + for _, e := range m.DrsVersions { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3466,6 +3680,182 @@ func (m *QueryRegisteredDenomsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryObsoleteDRSVersionsRequest) 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: QueryObsoleteDRSVersionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryObsoleteDRSVersionsRequest: 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 *QueryObsoleteDRSVersionsResponse) 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: QueryObsoleteDRSVersionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryObsoleteDRSVersionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DrsVersions = append(m.DrsVersions, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.DrsVersions) == 0 { + m.DrsVersions = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DrsVersions = append(m.DrsVersions, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field DrsVersions", wireType) + } + 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/rollapp/types/query.pb.gw.go b/x/rollapp/types/query.pb.gw.go index 026337926..75f1c81fd 100644 --- a/x/rollapp/types/query.pb.gw.go +++ b/x/rollapp/types/query.pb.gw.go @@ -505,6 +505,24 @@ func local_request_Query_RegisteredDenoms_0(ctx context.Context, marshaler runti } +func request_Query_ObsoleteDRSVersions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryObsoleteDRSVersionsRequest + var metadata runtime.ServerMetadata + + msg, err := client.ObsoleteDRSVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ObsoleteDRSVersions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryObsoleteDRSVersionsRequest + var metadata runtime.ServerMetadata + + msg, err := server.ObsoleteDRSVersions(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. @@ -695,6 +713,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_ObsoleteDRSVersions_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_ObsoleteDRSVersions_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_ObsoleteDRSVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -896,6 +937,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_ObsoleteDRSVersions_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_ObsoleteDRSVersions_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_ObsoleteDRSVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -915,6 +976,8 @@ var ( pattern_Query_StateInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"dymensionxyz", "dymension", "rollapp", "state_info", "rollappId", "index"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_RegisteredDenoms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"dymensionxyz", "dymension", "rollapp", "registered_denoms"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ObsoleteDRSVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"dymensionxyz", "dymension", "rollapp", "obsolete_drs_versions"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -933,4 +996,6 @@ var ( forward_Query_StateInfo_0 = runtime.ForwardResponseMessage forward_Query_RegisteredDenoms_0 = runtime.ForwardResponseMessage + + forward_Query_ObsoleteDRSVersions_0 = runtime.ForwardResponseMessage )