-
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
Change sdk.Msg.GetSigners() return type to []string #9239
Comments
In the last architecture call we agreed to do this. One note is that we want to make sure we are validating signers in CLI calls where we now call func ValidateMsg(msg sdk.Msg) error {
err := msg.ValidateBasic()
if err != nil {
return err
}
signers := msg.GetSigners()
for signer := range signers {
_, err = sdk.AccAddressFromBech32(signer)
if err != nil {
return err
}
}
} |
Is Edit: proposing to put ValidateMsg in the antehandlers: #9418 (comment) |
Removing "DO NOT MERGE" flag - |
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺ v ✰ Thanks for creating a PR! ✰ v Before smashing the submit button please review the checkboxes. v If a checkbox is n/a - please still include it but + a little note why ☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> ## Description <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> closes: #9239 --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`) - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [ ] Re-reviewed `Files changed` in the Github PR explorer - [ ] Review `Codecov Report` in the comment section below once CI passes
sdk.Msg.GetSigners()
currently returns[]sdk.AccAddress
which depends on global bech32 prefixes. Changing the return type to[]string
was already mentioned in #9011. This seems like low-hanging fruit and a pathway to #7448 (removing global bech32 prefixes).The text was updated successfully, but these errors were encountered: