From 6f30e6afa00e15b35b91cc9fd1971984f6584051 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 11 Aug 2021 10:54:49 +0530 Subject: [PATCH 1/6] make UpgradeConsensusState deprecated --- docs/core/proto-docs.md | 6 +- proto/cosmos/upgrade/v1beta1/query.proto | 5 +- x/auth/types/query.pb.go | 4 +- x/group/types.pb.go | 6 +- x/upgrade/types/query.pb.go | 83 ++++++++++++------------ 5 files changed, 54 insertions(+), 50 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 6b68c21ae23..6af086c65e4 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -966,7 +966,7 @@ Query defines the gRPC querier service. | `Accounts` | [QueryAccountsRequest](#cosmos.auth.v1beta1.QueryAccountsRequest) | [QueryAccountsResponse](#cosmos.auth.v1beta1.QueryAccountsResponse) | Accounts returns all the existing accounts | GET|/cosmos/auth/v1beta1/accounts| | `Account` | [QueryAccountRequest](#cosmos.auth.v1beta1.QueryAccountRequest) | [QueryAccountResponse](#cosmos.auth.v1beta1.QueryAccountResponse) | Account returns account details based on address. | GET|/cosmos/auth/v1beta1/accounts/{address}| | `Params` | [QueryParamsRequest](#cosmos.auth.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.auth.v1beta1.QueryParamsResponse) | Params queries all parameters. | GET|/cosmos/auth/v1beta1/params| -| `ModuleAccounts` | [QueryModuleAccountsRequest](#cosmos.auth.v1beta1.QueryModuleAccountsRequest) | [QueryModuleAccountsResponse](#cosmos.auth.v1beta1.QueryModuleAccountsResponse) | ModuleAccounts returns all the existing Module Accounts. | GET|/cosmos/auth/v1beta1/module_accounts| +| `ModuleAccounts` | [QueryModuleAccountsRequest](#cosmos.auth.v1beta1.QueryModuleAccountsRequest) | [QueryModuleAccountsResponse](#cosmos.auth.v1beta1.QueryModuleAccountsResponse) | ModuleAccounts returns all the existing module accounts. | GET|/cosmos/auth/v1beta1/module_accounts| @@ -9188,7 +9188,7 @@ RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `last_height` | [int64](#int64) | | last height of the current chain must be sent in request as this is the height under which next consensus state is stored | +| `last_height` | [int64](#int64) | | **Deprecated.** last height of the current chain must be sent in request as this is the height under which next consensus state is stored | @@ -9204,7 +9204,7 @@ RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `upgraded_consensus_state` | [bytes](#bytes) | | | +| `upgraded_consensus_state` | [bytes](#bytes) | | **Deprecated.** | diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index 166a22406e9..b2f17f06dcd 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -24,6 +24,7 @@ service Query { // stored at the last height of this chain. // UpgradedConsensusState RPC not supported with legacy querier rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { + option deprecated=true; option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; } @@ -63,7 +64,7 @@ message QueryAppliedPlanResponse { message QueryUpgradedConsensusStateRequest { // last height of the current chain must be sent in request // as this is the height under which next consensus state is stored - int64 last_height = 1; + int64 last_height = 1 [deprecated=true]; } // QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState @@ -71,7 +72,7 @@ message QueryUpgradedConsensusStateRequest { message QueryUpgradedConsensusStateResponse { reserved 1; - bytes upgraded_consensus_state = 2; + bytes upgraded_consensus_state = 2 [deprecated=true]; } // QueryModuleVersionsRequest is the request type for the Query/ModuleVersions diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 61c7041a6a9..c3712a26cf7 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -456,7 +456,7 @@ type QueryClient interface { Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) // Params queries all parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing Module Accounts. + // ModuleAccounts returns all the existing module accounts. ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) } @@ -512,7 +512,7 @@ type QueryServer interface { Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing Module Accounts. + // ModuleAccounts returns all the existing module accounts. ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) } diff --git a/x/group/types.pb.go b/x/group/types.pb.go index 56fbe2286f4..c0e5cf2d5e7 100644 --- a/x/group/types.pb.go +++ b/x/group/types.pb.go @@ -567,9 +567,9 @@ type Proposal struct { Result Proposal_Result `protobuf:"varint,9,opt,name=result,proto3,enum=cosmos.group.v1beta1.Proposal_Result" json:"result,omitempty"` // vote_state contains the sums of all weighted votes for this proposal. VoteState Tally `protobuf:"bytes,10,opt,name=vote_state,json=voteState,proto3" json:"vote_state"` - // timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and execution messages - // must be before this end time to be included in the election. After the timeout timestamp the proposal can not be - // executed anymore and should be considered pending delete. + // timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and + // execution messages must be before this end time to be included in the election. After the timeout timestamp the + // proposal can not be executed anymore and should be considered pending delete. Timeout time.Time `protobuf:"bytes,11,opt,name=timeout,proto3,stdtime" json:"timeout"` // executor_result is the final result based on the votes and election rule. Initial value is NotRun. ExecutorResult Proposal_ExecutorResult `protobuf:"varint,12,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1beta1.Proposal_ExecutorResult" json:"executor_result,omitempty"` diff --git a/x/upgrade/types/query.pb.go b/x/upgrade/types/query.pb.go index 4f5c22a8767..df70f5a7914 100644 --- a/x/upgrade/types/query.pb.go +++ b/x/upgrade/types/query.pb.go @@ -213,7 +213,7 @@ func (m *QueryAppliedPlanResponse) GetHeight() int64 { type QueryUpgradedConsensusStateRequest struct { // last height of the current chain must be sent in request // as this is the height under which next consensus state is stored - LastHeight int64 `protobuf:"varint,1,opt,name=last_height,json=lastHeight,proto3" json:"last_height,omitempty"` + LastHeight int64 `protobuf:"varint,1,opt,name=last_height,json=lastHeight,proto3" json:"last_height,omitempty"` // Deprecated: Do not use. } func (m *QueryUpgradedConsensusStateRequest) Reset() { *m = QueryUpgradedConsensusStateRequest{} } @@ -249,6 +249,7 @@ func (m *QueryUpgradedConsensusStateRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUpgradedConsensusStateRequest proto.InternalMessageInfo +// Deprecated: Do not use. func (m *QueryUpgradedConsensusStateRequest) GetLastHeight() int64 { if m != nil { return m.LastHeight @@ -259,7 +260,7 @@ func (m *QueryUpgradedConsensusStateRequest) GetLastHeight() int64 { // QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState // RPC method. type QueryUpgradedConsensusStateResponse struct { - UpgradedConsensusState []byte `protobuf:"bytes,2,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"` + UpgradedConsensusState []byte `protobuf:"bytes,2,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"` // Deprecated: Do not use. } func (m *QueryUpgradedConsensusStateResponse) Reset() { *m = QueryUpgradedConsensusStateResponse{} } @@ -295,6 +296,7 @@ func (m *QueryUpgradedConsensusStateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUpgradedConsensusStateResponse proto.InternalMessageInfo +// Deprecated: Do not use. func (m *QueryUpgradedConsensusStateResponse) GetUpgradedConsensusState() []byte { if m != nil { return m.UpgradedConsensusState @@ -414,44 +416,44 @@ func init() { } var fileDescriptor_4a334d07ad8374f0 = []byte{ - // 578 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00,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, 0x28, 0xcb, 0xfd, 0x80, 0x89, 0xee, - 0x92, 0xfa, 0xa4, 0xb6, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x02, 0x71, 0xd9, 0xc3, 0xef, 0x05, - 0x00, 0x00, + // 588 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xee, 0xa5, 0x69, 0x05, 0x67, 0x54, 0xd0, 0x0d, 0xc1, 0x35, 0x95, 0x89, 0xdc, 0x02, 0x41, + 0x34, 0xbe, 0x36, 0xd9, 0xf8, 0x12, 0xb4, 0x12, 0xa2, 0x08, 0x2a, 0x08, 0x82, 0x81, 0x25, 0xba, + 0xc4, 0x47, 0x62, 0x61, 0xfb, 0x5c, 0xdf, 0xb9, 0xa2, 0xaa, 0xba, 0x30, 0x31, 0x22, 0xb1, 0xb3, + 0xb1, 0xf0, 0x4b, 0x18, 0x2b, 0xb1, 0x30, 0x74, 0x40, 0x09, 0x3f, 0x04, 0xf9, 0x7c, 0x41, 0x0e, + 0xb1, 0x5d, 0x60, 0x6a, 0xe3, 0xf7, 0xf9, 0x7a, 0x7d, 0xcf, 0x19, 0x5a, 0x7d, 0xc6, 0x7d, 0xc6, + 0x71, 0x1c, 0x0e, 0x22, 0xe2, 0x50, 0xbc, 0xbf, 0xd9, 0xa3, 0x82, 0x6c, 0xe2, 0xbd, 0x98, 0x46, + 0x07, 0x76, 0x18, 0x31, 0xc1, 0x50, 0x2d, 0xc5, 0xd8, 0x0a, 0x63, 0x2b, 0x8c, 0xb1, 0x3c, 0x60, + 0x6c, 0xe0, 0x51, 0x2c, 0x51, 0xbd, 0xf8, 0x35, 0x26, 0x81, 0xa2, 0x18, 0x2b, 0x6a, 0x44, 0x42, + 0x17, 0x93, 0x20, 0x60, 0x82, 0x08, 0x97, 0x05, 0x5c, 0x4d, 0xd7, 0x0a,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, 0x6c, 0x3d, 0xf8, 0x3a, 0x32, 0xc1, 0xf1, + 0xc8, 0x04, 0x3f, 0x46, 0x26, 0xf8, 0x30, 0x36, 0xe7, 0x8e, 0xc7, 0xe6, 0xdc, 0xf7, 0xb1, 0x39, + 0xf7, 0x6a, 0x7d, 0xe0, 0x8a, 0x61, 0xdc, 0xb3, 0xfb, 0xcc, 0x9f, 0x88, 0xa5, 0x7f, 0x9a, 0xdc, + 0x79, 0x83, 0xdf, 0xfe, 0x56, 0x16, 0x07, 0x21, 0xe5, 0xbd, 0x45, 0xf9, 0x75, 0x6d, 0xff, 0x0a, + 0x00, 0x00, 0xff, 0xff, 0x64, 0xfa, 0x5f, 0x69, 0xfa, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -505,6 +507,7 @@ func (c *queryClient) AppliedPlan(ctx context.Context, in *QueryAppliedPlanReque return out, nil } +// Deprecated: Do not use. func (c *queryClient) UpgradedConsensusState(ctx context.Context, in *QueryUpgradedConsensusStateRequest, opts ...grpc.CallOption) (*QueryUpgradedConsensusStateResponse, error) { out := new(QueryUpgradedConsensusStateResponse) err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", in, out, opts...) From 440c7e295bade3932c8ddeac720f7f8f9a6dba87 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 11 Aug 2021 14:56:30 +0530 Subject: [PATCH 2/6] deprecate whole QueryConsensusStates --- docs/core/proto-docs.md | 4 +- proto/cosmos/upgrade/v1beta1/query.proto | 9 ++- x/upgrade/types/query.pb.go | 84 ++++++++++++------------ 3 files changed, 51 insertions(+), 46 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 6af086c65e4..4b7ef4373e2 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -9188,7 +9188,7 @@ RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `last_height` | [int64](#int64) | | **Deprecated.** last height of the current chain must be sent in request as this is the height under which next consensus state is stored | +| `last_height` | [int64](#int64) | | last height of the current chain must be sent in request as this is the height under which next consensus state is stored | @@ -9204,7 +9204,7 @@ RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `upgraded_consensus_state` | [bytes](#bytes) | | **Deprecated.** | +| `upgraded_consensus_state` | [bytes](#bytes) | | | diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index b2f17f06dcd..b8c35c8c749 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -24,7 +24,7 @@ service Query { // stored at the last height of this chain. // UpgradedConsensusState RPC not supported with legacy querier rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { - option deprecated=true; + option deprecated = true; option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; } @@ -62,17 +62,20 @@ message QueryAppliedPlanResponse { // QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState // RPC method. message QueryUpgradedConsensusStateRequest { + option deprecated = true; + // last height of the current chain must be sent in request // as this is the height under which next consensus state is stored - int64 last_height = 1 [deprecated=true]; + int64 last_height = 1; } // QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState // RPC method. message QueryUpgradedConsensusStateResponse { + option deprecated = true; reserved 1; - bytes upgraded_consensus_state = 2 [deprecated=true]; + bytes upgraded_consensus_state = 2; } // QueryModuleVersionsRequest is the request type for the Query/ModuleVersions diff --git a/x/upgrade/types/query.pb.go b/x/upgrade/types/query.pb.go index df70f5a7914..1f6688bdb84 100644 --- a/x/upgrade/types/query.pb.go +++ b/x/upgrade/types/query.pb.go @@ -210,10 +210,12 @@ func (m *QueryAppliedPlanResponse) GetHeight() int64 { // QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState // RPC method. +// +// Deprecated: Do not use. type QueryUpgradedConsensusStateRequest struct { // last height of the current chain must be sent in request // as this is the height under which next consensus state is stored - LastHeight int64 `protobuf:"varint,1,opt,name=last_height,json=lastHeight,proto3" json:"last_height,omitempty"` // Deprecated: Do not use. + LastHeight int64 `protobuf:"varint,1,opt,name=last_height,json=lastHeight,proto3" json:"last_height,omitempty"` } func (m *QueryUpgradedConsensusStateRequest) Reset() { *m = QueryUpgradedConsensusStateRequest{} } @@ -249,7 +251,6 @@ func (m *QueryUpgradedConsensusStateRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUpgradedConsensusStateRequest proto.InternalMessageInfo -// Deprecated: Do not use. func (m *QueryUpgradedConsensusStateRequest) GetLastHeight() int64 { if m != nil { return m.LastHeight @@ -259,8 +260,10 @@ func (m *QueryUpgradedConsensusStateRequest) GetLastHeight() int64 { // QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState // RPC method. +// +// Deprecated: Do not use. type QueryUpgradedConsensusStateResponse struct { - UpgradedConsensusState []byte `protobuf:"bytes,2,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"` // Deprecated: Do not use. + UpgradedConsensusState []byte `protobuf:"bytes,2,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"` } func (m *QueryUpgradedConsensusStateResponse) Reset() { *m = QueryUpgradedConsensusStateResponse{} } @@ -296,7 +299,6 @@ func (m *QueryUpgradedConsensusStateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUpgradedConsensusStateResponse proto.InternalMessageInfo -// Deprecated: Do not use. func (m *QueryUpgradedConsensusStateResponse) GetUpgradedConsensusState() []byte { if m != nil { return m.UpgradedConsensusState @@ -417,43 +419,43 @@ func init() { var fileDescriptor_4a334d07ad8374f0 = []byte{ // 588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x3d, 0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c, - 0x79, 0x83, 0xdf, 0xfe, 0x56, 0x16, 0x07, 0x21, 0xe5, 0xbd, 0x45, 0xf9, 0x75, 0x6d, 0xff, 0x0a, - 0x00, 0x00, 0xff, 0xff, 0x64, 0xfa, 0x5f, 0x69, 0xfa, 0x05, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6f, 0xd3, 0x3c, + 0x1c, 0xae, 0xbb, 0x6e, 0x7a, 0x5f, 0x17, 0x0d, 0xe4, 0x43, 0xc9, 0xc2, 0x14, 0x2a, 0x33, 0xa0, + 0x88, 0x35, 0xde, 0xda, 0x0b, 0x1a, 0x02, 0x01, 0x93, 0x10, 0x43, 0x30, 0x41, 0x11, 0x1c, 0xb8, + 0x54, 0x6e, 0x63, 0xda, 0x88, 0x24, 0xce, 0x62, 0x67, 0x62, 0x9a, 0x76, 0xe1, 0xc4, 0x11, 0x89, + 0x3b, 0x37, 0x2e, 0x7c, 0x12, 0x8e, 0x93, 0xb8, 0x70, 0xd8, 0x01, 0xb5, 0x7c, 0x10, 0x14, 0xc7, + 0x45, 0x29, 0x4d, 0x3a, 0xe0, 0xd4, 0xc6, 0x7e, 0xfe, 0xfd, 0xe2, 0xc7, 0x81, 0xb8, 0xcf, 0x85, + 0xcf, 0x05, 0x89, 0xc3, 0x41, 0x44, 0x1d, 0x46, 0xf6, 0x37, 0x7b, 0x4c, 0xd2, 0x4d, 0xb2, 0x17, + 0xb3, 0xe8, 0xc0, 0x0e, 0x23, 0x2e, 0x39, 0xaa, 0xa5, 0x18, 0x5b, 0x63, 0x6c, 0x8d, 0x31, 0x57, + 0x06, 0x9c, 0x0f, 0x3c, 0x46, 0x14, 0xaa, 0x17, 0xbf, 0x22, 0x34, 0xd0, 0x14, 0x73, 0x55, 0x6f, + 0xd1, 0xd0, 0x25, 0x34, 0x08, 0xb8, 0xa4, 0xd2, 0xe5, 0x81, 0xd0, 0xbb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0xbd, 0xfb, 0x5f, 0x46, 0x16, 0x38, + 0x1e, 0x59, 0xe0, 0xfb, 0xc8, 0x02, 0xef, 0xc7, 0x56, 0xe9, 0x78, 0x6c, 0x95, 0xbe, 0x8d, 0xad, + 0xd2, 0xcb, 0xf5, 0x81, 0x2b, 0x87, 0x71, 0xcf, 0xee, 0x73, 0x7f, 0x22, 0x96, 0xfe, 0x34, 0x85, + 0xf3, 0x9a, 0xbc, 0xf9, 0xa5, 0x2c, 0x0f, 0x42, 0x26, 0x7a, 0x4b, 0xea, 0xeb, 0xda, 0xfe, 0x19, + 0x00, 0x00, 0xff, 0xff, 0x80, 0xcd, 0x5d, 0xc6, 0xfa, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 231bd85365bff54f150460d0411b863482993279 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 11 Aug 2021 15:39:24 +0530 Subject: [PATCH 3/6] add changelog and comment for deprecated rpc --- CHANGELOG.md | 5 +++++ proto/cosmos/upgrade/v1beta1/query.proto | 1 + 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82101c10339..4f092bcfd1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,6 +97,11 @@ Ref: https://keepachangelog.com/en/1.0.0/ token holders of a specific denomination. `DenomOwners` is updated to use the new reverse index. * (x/bank) [\#9832] (https://github.com/cosmos/cosmos-sdk/pull/9832) Account balance is stored as `sdk.Int` rather than `sdk.Coin`. + ### Deprecated + +* [\#9906](https://github.com/cosmos/cosmos-sdk/pull/9906) Deprecate `UpgradeConsensusState` since this functionality is only used for IBC, which now has its own [IBC replacement](https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + + ## [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0) - 2021-08-10 ### Features diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index b8c35c8c749..9cb57a3cd0e 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -23,6 +23,7 @@ service Query { // as a trusted kernel for the next version of this chain. It will only be // stored at the last height of this chain. // UpgradedConsensusState RPC not supported with legacy querier + // This rpc is deprecated now that IBC has its own replacement (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { option deprecated = true; option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; From 928393f0f0f52613ff986ddf562b743e821bc98e Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 11 Aug 2021 15:44:20 +0530 Subject: [PATCH 4/6] make proto-gen --- CHANGELOG.md | 1 - docs/core/proto-docs.md | 2 +- proto/cosmos/upgrade/v1beta1/query.proto | 3 ++- x/upgrade/types/query.pb.go | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9be05731149..0777fbfee14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,7 +102,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#9906](https://github.com/cosmos/cosmos-sdk/pull/9906) Deprecate `UpgradeConsensusState` since this functionality is only used for IBC, which now has its own [IBC replacement](https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - ## [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0) - 2021-08-10 ### Features diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index b9d5372e35a..d1f4245d0cb 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -9274,7 +9274,7 @@ Query defines the gRPC upgrade querier service. | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `CurrentPlan` | [QueryCurrentPlanRequest](#cosmos.upgrade.v1beta1.QueryCurrentPlanRequest) | [QueryCurrentPlanResponse](#cosmos.upgrade.v1beta1.QueryCurrentPlanResponse) | CurrentPlan queries the current upgrade plan. | GET|/cosmos/upgrade/v1beta1/current_plan| | `AppliedPlan` | [QueryAppliedPlanRequest](#cosmos.upgrade.v1beta1.QueryAppliedPlanRequest) | [QueryAppliedPlanResponse](#cosmos.upgrade.v1beta1.QueryAppliedPlanResponse) | AppliedPlan queries a previously applied upgrade plan by its name. | GET|/cosmos/upgrade/v1beta1/applied_plan/{name}| -| `UpgradedConsensusState` | [QueryUpgradedConsensusStateRequest](#cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest) | [QueryUpgradedConsensusStateResponse](#cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse) | UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. UpgradedConsensusState RPC not supported with legacy querier | GET|/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}| +| `UpgradedConsensusState` | [QueryUpgradedConsensusStateRequest](#cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest) | [QueryUpgradedConsensusStateResponse](#cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse) | UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. UpgradedConsensusState RPC not supported with legacy querier This rpc is deprecated now that IBC has its own replacement (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) | GET|/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}| | `ModuleVersions` | [QueryModuleVersionsRequest](#cosmos.upgrade.v1beta1.QueryModuleVersionsRequest) | [QueryModuleVersionsResponse](#cosmos.upgrade.v1beta1.QueryModuleVersionsResponse) | ModuleVersions queries the list of module versions from state. | GET|/cosmos/upgrade/v1beta1/module_versions| diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index 9cb57a3cd0e..0703ef347b8 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -23,7 +23,8 @@ service Query { // as a trusted kernel for the next version of this chain. It will only be // stored at the last height of this chain. // UpgradedConsensusState RPC not supported with legacy querier - // This rpc is deprecated now that IBC has its own replacement (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + // This rpc is deprecated now that IBC has its own replacement + // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { option deprecated = true; option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; diff --git a/x/upgrade/types/query.pb.go b/x/upgrade/types/query.pb.go index 1f6688bdb84..1f3acb80843 100644 --- a/x/upgrade/types/query.pb.go +++ b/x/upgrade/types/query.pb.go @@ -478,6 +478,8 @@ type QueryClient interface { // as a trusted kernel for the next version of this chain. It will only be // stored at the last height of this chain. // UpgradedConsensusState RPC not supported with legacy querier + // This rpc is deprecated now that IBC has its own replacement + // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) UpgradedConsensusState(ctx context.Context, in *QueryUpgradedConsensusStateRequest, opts ...grpc.CallOption) (*QueryUpgradedConsensusStateResponse, error) // ModuleVersions queries the list of module versions from state. ModuleVersions(ctx context.Context, in *QueryModuleVersionsRequest, opts ...grpc.CallOption) (*QueryModuleVersionsResponse, error) @@ -538,6 +540,8 @@ type QueryServer interface { // as a trusted kernel for the next version of this chain. It will only be // stored at the last height of this chain. // UpgradedConsensusState RPC not supported with legacy querier + // This rpc is deprecated now that IBC has its own replacement + // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) UpgradedConsensusState(context.Context, *QueryUpgradedConsensusStateRequest) (*QueryUpgradedConsensusStateResponse, error) // ModuleVersions queries the list of module versions from state. ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) From b0464206f35ce84d912814c0df35faa87c838f48 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 11 Aug 2021 15:59:41 +0530 Subject: [PATCH 5/6] fix lint issue --- x/upgrade/keeper/grpc_query.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/upgrade/keeper/grpc_query.go b/x/upgrade/keeper/grpc_query.go index 6a9fd4d5137..fe6ec3b5127 100644 --- a/x/upgrade/keeper/grpc_query.go +++ b/x/upgrade/keeper/grpc_query.go @@ -35,6 +35,7 @@ func (k Keeper) AppliedPlan(c context.Context, req *types.QueryAppliedPlanReques } // UpgradedConsensusState implements the Query/UpgradedConsensusState gRPC method +// nolint: staticcheck func (k Keeper) UpgradedConsensusState(c context.Context, req *types.QueryUpgradedConsensusStateRequest) (*types.QueryUpgradedConsensusStateResponse, error) { ctx := sdk.UnwrapSDKContext(c) From 0356f690af2639fffde0f9d5035d511424726578 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 11 Aug 2021 16:52:12 +0530 Subject: [PATCH 6/6] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0777fbfee14..c0f0905793d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,7 +100,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Deprecated -* [\#9906](https://github.com/cosmos/cosmos-sdk/pull/9906) Deprecate `UpgradeConsensusState` since this functionality is only used for IBC, which now has its own [IBC replacement](https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) +* (x/upgrade) [\#9906](https://github.com/cosmos/cosmos-sdk/pull/9906) Deprecate `UpgradeConsensusState` gRPC query since this functionality is only used for IBC, which now has its own [IBC replacement](https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) ## [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0) - 2021-08-10