-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat(client/v2): support consensus address decoding #16927
Conversation
fa8d0a0
to
3dd1fab
Compare
@julienrbrt your pull request is missing a changelog! |
client/v2 has never been released yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be a non bech32 encoded string as well right?
Yes, you just inject/pass an address codec (in client/v2). |
(cherry picked from commit 90b3907) # Conflicts: # client/v2/go.mod # client/v2/go.sum # tools/hubl/go.mod # tools/hubl/go.sum # tools/hubl/internal/remote.go
…#16997) Co-authored-by: Julien Robert <[email protected]>
Description
Found while working on #16659.
Currently, consensus address or pubkey aren't supported by client/v2.
For instance, in the CLI of slashing the following command is currently supported:
$ simd q slashing signing-info '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"j8qdbR+AlH/V6aBTCSWXRvX3JUESF2bV+SEzndBhF0o="}'
However, because there is a (wrong) proto annotation in the protofile (fixed in #16945), client/v2 will attempt to decode this as a bech32 address.
Additionally, the gRPC endpoint expects a bech32 consensus address (like
cosmosvalcons1nrqsld3aw6lh6t082frdqc84uwxn0t958c
).This means, for backward compatibility, we should allow passing interchangeably a pubkey and a bech32 valcons for consistency with gRPC.
Both are currently not supported by autocli. This PR aims to solve that.
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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change