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

[Bug]: bech32 should not be included in modules by default #20811

Closed
1 task done
islishude opened this issue Jun 28, 2024 · 3 comments
Closed
1 task done

[Bug]: bech32 should not be included in modules by default #20811

islishude opened this issue Jun 28, 2024 · 3 comments
Labels

Comments

@islishude
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

cosmos sdk can provide custom address codec, but there are too many bech32 verification in the modules.

// ValidateBasic - validate transaction input
func (in Input) ValidateBasic() error {
	if _, err := sdk.AccAddressFromBech32(in.Address); err != nil {
		return sdkerrors.ErrInvalidAddress.Wrapf("invalid input address: %s", err)
	}
// ValidateBasic does basic validation on group info.
func (g GroupInfo) ValidateBasic() error {
	if g.Id == 0 {
		return errorsmod.Wrap(errors.ErrEmpty, "group's GroupId")
	}

	_, err := sdk.AccAddressFromBech32(g.Admin)
	if err != nil {
		return errorsmod.Wrap(err, "admin")
	}

Cosmos SDK Version

0.50.x

How to reproduce?

No response

@islishude islishude changed the title [Bug]: bech32 should not be included in modules [Bug]: bech32 should not be included in modules by default Jun 28, 2024
@julienrbrt
Copy link
Member

Yeah, that's true for v0.50 and lower. On main (future 0.52) this shouldn't be the case any more (ref: #7448). The address codec should be used everywhere.

@islishude
Copy link
Contributor Author

Thanks for the heads up.

Where I can get the release plan?

I get the #20522 but it looks like the 0.51 will use the main branch

@julienrbrt
Copy link
Member

Sorry, 0.51 vs 0.52 can be used interchangeably. The release be tagged as v0.52, but we call it sometime v0.51 by habit.

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

No branches or pull requests

2 participants