Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Problem: reverted contract deployment transaction don't increase sender's nonce #808

Closed
yihuang opened this issue Dec 3, 2021 · 1 comment · Fixed by #809
Closed

Problem: reverted contract deployment transaction don't increase sender's nonce #808

yihuang opened this issue Dec 3, 2021 · 1 comment · Fixed by #809

Comments

@yihuang
Copy link
Contributor

yihuang commented Dec 3, 2021

System info: ethermint main

Steps to reproduce:

  1. start a devnet
  2. deploy a contract without providing enough gas, it's executed but fails with out-of-gas error
  3. sender's nonce is not increased

This means we can have two transactions with the same ethereum tx hash.

Expected behavior: should increase nonce in such case

Actual behavior: nonce not increased

Additional info: [Include gist of relevant config, logs, etc.]

@leejw51crypto
Copy link
Contributor

nice catch

yihuang added a commit to yihuang/ethermint that referenced this issue Dec 3, 2021
Closes: evmos#808

Solution:
- Move nonce increaesment from ante handler into `ApplyMessage`.
- Handle state revert correct.
- More sophsticated unit test for transaction revert behaviour.
yihuang added a commit to yihuang/ethermint that referenced this issue Dec 10, 2021
Closes: evmos#808
Solution:
- move nonce increment to ante handler
- revert nonce increment in apply message
yihuang added a commit to yihuang/ethermint that referenced this issue Dec 14, 2021
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] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

fix: remove unused code (evmos#834)

Co-authored-by: Marko Baricevic <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

rm

rm pkg
fedekunze added a commit that referenced this issue Dec 16, 2021
Closes: #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 (#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] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

fix: remove unused code (#834)

Co-authored-by: Marko Baricevic <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

rm

rm pkg

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants