diff --git a/x/auth/CHANGELOG.md b/x/auth/CHANGELOG.md index ffd25882fa..9c7dbacbd0 100644 --- a/x/auth/CHANGELOG.md +++ b/x/auth/CHANGELOG.md @@ -48,3 +48,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#18817](https://github.com/cosmos/cosmos-sdk/pull/18817) SigVerification, GasConsumption, IncreaseSequence ante decorators have all been joined into one SigVerification decorator. Gas consumption during TX validation flow has reduced. * [#19093](https://github.com/cosmos/cosmos-sdk/pull/19093) SetPubKeyDecorator was merged into SigVerification, gas consumption is almost halved for a simple tx. + +### Bug Fixes + +* [#19099](https://github.com/cosmos/cosmos-sdk/pull/19099) `verifyIsOnCurve` now checks if we are simulating to avoid malformed public key error. + diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go index 4a9109ff6b..99fe0da3f1 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -95,6 +95,11 @@ func OnlyLegacyAminoSigners(sigData signing.SignatureData) bool { } func verifyIsOnCurve(pubKey cryptotypes.PubKey) (err error) { + // when simulating pubKey.Key will always be nil + if pubKey.Bytes() == nil { + return nil + } + switch typedPubKey := pubKey.(type) { case *secp256k1.PubKey: pubKeyObject, err := secp256k1dcrd.ParsePubKey(typedPubKey.Bytes())