-
Notifications
You must be signed in to change notification settings - Fork 561
fix: increase nonce in ante handler for contract creation tx #809
Conversation
20a8720
to
12acbe4
Compare
@yihuang tests are failing |
The ante handler testing fails because nonce doesn't increase now, there are some implications of this change in real-world too, for example, a sequence of transactions in mempool might run checkTx successfully before but fail now because of nonce mismatch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
because when tx is reverted in evm, nonce will increase. |
Head branch was pushed to by a user without write access
9284c50
to
7537e9e
Compare
I added back nonce increasing in ante handler, but only for (re)check tx mode, to keep mempool behavior the same as before. |
Codecov Report
@@ Coverage Diff @@
## main #809 +/- ##
==========================================
- Coverage 56.70% 56.70% -0.01%
==========================================
Files 72 72
Lines 6059 6051 -8
==========================================
- Hits 3436 3431 -5
+ Misses 2424 2422 -2
+ Partials 199 198 -1
|
64b1f28
to
d0f4589
Compare
d0f4589
to
767244a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
@yihuang seems that tests are failing |
Closes: evmos#808 Solution: - move nonce increment to ante handler - revert nonce increment in apply message build(deps): bump github.com/spf13/viper from 1.9.0 to 1.10.0 (evmos#833) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](spf13/viper@v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix: remove unused code (evmos#834) Co-authored-by: Marko Baricevic <markobaricevic3778@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> rm rm pkg
e9af252
to
db53c6c
Compare
The unit test failure happens in main branch too. |
@yihuang yes please 🙏 |
Closes: #808
Description
Solution:
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)