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

cosmrs: cosmos.crypto.multisig.LegacyAminoPubKey support #147

Merged
merged 3 commits into from
Oct 28, 2021

Conversation

tony-iqlusion
Copy link
Member

Adds support for this key type when used as the public_key field of SignerInfo.

To accommodate this, a new SignerPublicKey enum was added with variants for a single PublicKey or a LegacyAminoMultisig key.

Decodes a test vector from cosmoshub-4 (sdk@v0.42.10)

Closes #143

Adds support for this key type when used as the `public_key` field of
`SignerInfo`.

To accomodate this, a new `SignerPublicKey` enum was added with variants
for a single `PublicKey` or a `LegacyAminoMultisig` key.

Decodes a test vector from `cosmoshub-4` (sdk@v0.42.10)

Closes #143
@tony-iqlusion tony-iqlusion requested a review from andynog October 28, 2021 16:32
Adds a catch-all variant for unrecognized public key types, which
enables parsing transaction types which use public keys with algorithms
unknown to `cosmrs` itself.
Copy link

@andynog andynog left a comment

Choose a reason for hiding this comment

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

I think this overall looks. Had one minor comment on a test. I like the approach with the From and TryFrom to handle the variants of SignerPublicKey and PublicKey.

But I've noticed some changes to other logic that I'm not sure if affects existing code or might be breaking changes. It'd be nice to get another review with more insights on that.

@tony-iqlusion
Copy link
Member Author

Going to go ahead and merge this, then cut a release PR, but I'll leave that open for final review in case anyone has remaining concerns about this PR.

@tony-iqlusion tony-iqlusion merged commit 2b4d19b into main Oct 28, 2021
@tony-iqlusion tony-iqlusion deleted the cosmrs/legacy-amino-multisig branch October 28, 2021 18:19
@tony-iqlusion tony-iqlusion mentioned this pull request Oct 28, 2021
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 this pull request may close these issues.

Panic when parsing a tx with cosmos.crypto.multisig.LegacyAminoPubKey
2 participants