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

fix: Incorrect amino names provided in RegisterConcrete #80

Closed
wants to merge 2 commits into from

Conversation

poorphd
Copy link

@poorphd poorphd commented Jul 26, 2024

Description

  • The amino.name tags in .proto files do not match the names used in RegisterConcrete calls.
  • These discrepancies could lead to issues with JSON serialization/deserialization.
  • This patch is ensuring consistency between .proto tags and RegisterConcrete calls is crucial for correct behavior.
  • amino names follow canto/x/{module_name}/{msg name} convention except govshttle (too long to be registered with amino)

Closes: code-423n4/2024-05-canto-findings#2


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...

  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • included the necessary unit and integration tests
  • reviewed "Files changed" and left comments if necessary

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...

  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@poorphd poorphd requested review from dudong2 and zsystm July 26, 2024 04:47
@poorphd poorphd self-assigned this Jul 26, 2024
@dudong2
Copy link

dudong2 commented Jul 26, 2024

If the amino name is longer than 40 characters, there will be problems signing the ledger. For this reason, even in the cosmos-sdk, most msgs are registered in the form of cosmos-sdk/Msg..., except for those that need to be added in common for multiple modules, such as MsgUpdateParams. I think aligning with this convention is the right way to go, so I don't think this pr should be applied.

ref. cosmos/cosmos-sdk#10870

@poorphd poorphd closed this Jul 26, 2024
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.

Incorrect names provided in RegisterConcrete calls break LegacyAmino signing method
2 participants