Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: Mark upgrade query field as deprecated instead of reserved #9847

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|

<!-- end services -->

Expand Down Expand Up @@ -9204,7 +9204,8 @@ RPC method.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `upgraded_consensus_state` | [bytes](#bytes) | | |
| `upgraded_consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | **Deprecated.** Deprecated: Please use the bytes field instead. This field will always be empty in v0.43+. |
| `upgraded_consensus_state_bytes` | [bytes](#bytes) | | |



Expand Down
6 changes: 4 additions & 2 deletions proto/cosmos/upgrade/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ message QueryUpgradedConsensusStateRequest {
// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState
// RPC method.
message QueryUpgradedConsensusStateResponse {
reserved 1;
// Deprecated: Please use the bytes field instead. This field will always be
// empty in v0.43+.
google.protobuf.Any upgraded_consensus_state = 1 [deprecated = true];

bytes upgraded_consensus_state = 2;
bytes upgraded_consensus_state_bytes = 2;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot have two fields with same name. I propose to:

  • keep upgraded_consensus_state for the Any field, same as in 0.42
  • rename to new bytes field to upgraded_consensus_state_bytes.

This would be a breaking change in the RCs, and ibc-go might need to change some code. cc @colin-axner

Copy link
Collaborator

@robert-zaremba robert-zaremba Aug 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change in 0.43.0-RC -> 0.43.0-RC3.

I know it sounds "hacky" - but this thing was only added for IBC fix and only IBC uses it. So maybe we can keep the original breaking change (from https://github.com/cosmos/cosmos-sdk/pull/8673/files#r682168269)?

Copy link
Contributor

@colin-axner colin-axner Aug 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fairly certain ibc-go doesn't rely on this gRPC and relayers don't either. Relayers use ABCI queries since they need proof of the consensus state. To the best of my knowledge, it is unused

}

// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions
Expand Down
4 changes: 2 additions & 2 deletions x/auth/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions x/group/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

164 changes: 114 additions & 50 deletions x/upgrade/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.