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

Account Pubkey Encoding #5677

Closed
4 tasks
alexanderbez opened this issue Feb 19, 2020 · 1 comment · Fixed by #5682
Closed
4 tasks

Account Pubkey Encoding #5677

alexanderbez opened this issue Feb 19, 2020 · 1 comment · Fixed by #5682
Assignees

Comments

@alexanderbez
Copy link
Contributor

alexanderbez commented Feb 19, 2020

Due to x/auth Protobuf encoding migration via #5533, Account.Pubkey was refactored to be a bech32-encoded string instead of crypto.Pubkey, where we convert when we need to. However, this is problematic when the pubkey is a multisig because bech32 limits the decoding to 90 characters which a multisig can exceed 90 chars (amino encoded).

Until Tendermint allows pubkeys to be just []byte slices, we must either:

  1. Revert to crypto.Pubkey and use an adhoc oneof in the SDK.
  2. Use Amino and keep the type as a string.

I propose we go with option (2) as its the easiest. Note, this is also only temporary, as the next major release of Tendermint will allow us to use []byte in conjunction with interface_type.

/cc @marbar3778 @zmanian


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@zmanian
Copy link
Member

zmanian commented Feb 20, 2020

Here is what the Tink(Google's core cryptography library) project is thinking for their protobuf key encodings.

https://github.com/google/tink/blob/master/docs/WIRE-FORMAT.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants