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

Remove module_query_safe for x/auth's bech32 grpc queries #13625

Closed
Tracked by #13041
amaury1093 opened this issue Oct 24, 2022 · 0 comments · Fixed by #13642
Closed
Tracked by #13041

Remove module_query_safe for x/auth's bech32 grpc queries #13625

amaury1093 opened this issue Oct 24, 2022 · 0 comments · Fixed by #13642
Assignees

Comments

@amaury1093
Copy link
Contributor

Summary

Remove module_query_safe annotations for these 3 queries:

// Bech32Prefix queries bech32Prefix
//
// Since: cosmos-sdk 0.46
rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32";
}
// AddressBytesToString converts Account Address bytes to string
//
// Since: cosmos-sdk 0.46
rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}";
}
// AddressStringToBytes converts Address string to bytes
//
// Since: cosmos-sdk 0.46
rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}";
}

Problem Definition

The 3 queries are state-machine safe only if the app developer doesn't change the bech32 prefix argument passed into NewAccountKeeper in their app.go.

Tthere's a tiny chance it breaks consensus.

Proposal

  • Remove the annotations
  • Remove deterministic tests
@amaury1093 amaury1093 moved this to 📝 Todo in Cosmos-SDK Oct 24, 2022
@amaury1093 amaury1093 changed the title Remove module_query_safe for x/auth's grpc queries Remove module_query_safe for x/auth's bech32 grpc queries Oct 24, 2022
@atheeshp atheeshp self-assigned this Oct 25, 2022
Repository owner moved this from 📝 Todo to 👏 Done in Cosmos-SDK Oct 25, 2022
@tac0turtle tac0turtle removed this from Cosmos-SDK Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants