-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Signatures converted from LegacyAmino to SignaturesV2 fail on sequence number other than 0 #7229
Comments
on possible suggestion is that we skip |
From Zaki: Okay so this fix didn't actually work. What happened is that When the anteHandler calls GetSignatureV2(), it gets back a Signature with SkipSequenceCheck as false. |
So do we need to instead add |
I will try to look at it. @zmanian , @amaurymartiny - do we have some test cases for this? How can I replicate? Or I just need to dive in the code and guess what's wrong? |
I just discussed this with @amaurymartiny. I don't think we actually need |
https://github.com/cosmos/cosmos-sdk/blob/master/x/auth/types/stdtx.go#L381-L393
This converts legacy amino signatures to the new SignaturesV2. This always sets SignaturesV2 Sequence to 0.
Here we check if the account sequence matches matches the onchain sequence number.
https://github.com/cosmos/cosmos-sdk/blob/master/x/auth/ante/sigverify.go#L210-L215
This means signatures from that are converted from LegacyAmino will always fail in the ante handler except for the 1st tx from an account.
For Admin Use
The text was updated successfully, but these errors were encountered: