-
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
fix(crypto): fix nested multisigs fail to marshal #20404
fix(crypto): fix nested multisigs fail to marshal #20404
Conversation
WalkthroughThe changes primarily address a regression issue with nested multisigs in the Cosmos SDK. The Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 1
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (3)
- client/keys/output_test.go (1 hunks)
- crypto/keys/multisig/multisig.go (1 hunks)
- crypto/keys/multisig/multisig_test.go (1 hunks)
Files skipped from review due to trivial changes (1)
- crypto/keys/multisig/multisig_test.go
Additional Context Used
Path-based Instructions (2)
client/keys/output_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"crypto/keys/multisig/multisig.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (2)
client/keys/output_test.go (1)
69-69
: LGTM! The test function is well-implemented and covers the necessary cases.crypto/keys/multisig/multisig.go (1)
44-44
: LGTM! Ensure this change does not introduce any unintended side effects in other parts of the codebase.
…bs/cosmos-sdk into tuan/fix-nested-marshal-msig
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.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- client/keys/output_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- client/keys/output_test.go
crypto/keys/multisig/multisig.go
Outdated
@@ -41,7 +41,7 @@ func (m *LegacyAminoPubKey) Address() cryptotypes.Address { | |||
|
|||
// Bytes returns the proto encoded version of the LegacyAminoPubKey | |||
func (m *LegacyAminoPubKey) Bytes() []byte { | |||
return AminoCdc.MustMarshal(m) | |||
return AminoCdc.MustMarshalJSON(m) |
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.
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.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- crypto/keys/multisig/amino.go (1 hunks)
Files not reviewed due to errors (1)
- crypto/keys/multisig/amino.go (no review received)
Additional Context Used
Path-based Instructions (1)
crypto/keys/multisig/amino.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
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.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- crypto/keys/multisig/multisig_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- crypto/keys/multisig/multisig_test.go
This looks like a fix to me, I've seen something similar with other types, secp256k1 keys iirc |
Description
Closes: #20382
Issue appears after #19869, but I am unable to find the root of cause.
For now workaroundMarshal -> MarshalJSON
seems to fix the bugFixes the issue by overriding the
MarshalAmino
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...
!
in 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...
Summary by CodeRabbit
Bug Fixes
Tests