Skip to content

Commit 0bcce5d

Browse files
authored
chore: Deprecate QueryUpgradedConsensusState (cosmos#9906)
## Description Closes: cosmos#9855 Deprecate `QueryUpgradedConsensusState` from x/upgrade --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
1 parent 69b4935 commit 0bcce5d

File tree

5 files changed

+59
-39
lines changed

5 files changed

+59
-39
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
9898
* (x/bank) [\#9832] (https://github.com/cosmos/cosmos-sdk/pull/9832) Account balance is stored as `sdk.Int` rather than `sdk.Coin`.
9999
* (x/bank) [\#9890] (https://github.com/cosmos/cosmos-sdk/pull/9890) Remove duplicate denom from denom metadata key.
100100

101+
### Deprecated
102+
103+
* (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)
104+
101105
## [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0) - 2021-08-10
102106

103107
### Features

docs/core/proto-docs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9315,7 +9315,7 @@ Query defines the gRPC upgrade querier service.
93159315
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
93169316
| `CurrentPlan` | [QueryCurrentPlanRequest](#cosmos.upgrade.v1beta1.QueryCurrentPlanRequest) | [QueryCurrentPlanResponse](#cosmos.upgrade.v1beta1.QueryCurrentPlanResponse) | CurrentPlan queries the current upgrade plan. | GET|/cosmos/upgrade/v1beta1/current_plan|
93179317
| `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}|
9318-
| `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}|
9318+
| `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}|
93199319
| `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|
93209320

93219321
<!-- end services -->

proto/cosmos/upgrade/v1beta1/query.proto

+6
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ service Query {
2323
// as a trusted kernel for the next version of this chain. It will only be
2424
// stored at the last height of this chain.
2525
// UpgradedConsensusState RPC not supported with legacy querier
26+
// This rpc is deprecated now that IBC has its own replacement
27+
// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)
2628
rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) {
29+
option deprecated = true;
2730
option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}";
2831
}
2932

@@ -61,6 +64,8 @@ message QueryAppliedPlanResponse {
6164
// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState
6265
// RPC method.
6366
message QueryUpgradedConsensusStateRequest {
67+
option deprecated = true;
68+
6469
// last height of the current chain must be sent in request
6570
// as this is the height under which next consensus state is stored
6671
int64 last_height = 1;
@@ -69,6 +74,7 @@ message QueryUpgradedConsensusStateRequest {
6974
// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState
7075
// RPC method.
7176
message QueryUpgradedConsensusStateResponse {
77+
option deprecated = true;
7278
reserved 1;
7379

7480
bytes upgraded_consensus_state = 2;

x/upgrade/keeper/grpc_query.go

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func (k Keeper) AppliedPlan(c context.Context, req *types.QueryAppliedPlanReques
3535
}
3636

3737
// UpgradedConsensusState implements the Query/UpgradedConsensusState gRPC method
38+
// nolint: staticcheck
3839
func (k Keeper) UpgradedConsensusState(c context.Context, req *types.QueryUpgradedConsensusStateRequest) (*types.QueryUpgradedConsensusStateResponse, error) {
3940
ctx := sdk.UnwrapSDKContext(c)
4041

x/upgrade/types/query.pb.go

+47-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)