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

Assembly instruction invalid() was not behaving correctly #274

Closed
yijiasu-crypto opened this issue Jul 13, 2021 · 1 comment · Fixed by #276
Closed

Assembly instruction invalid() was not behaving correctly #274

yijiasu-crypto opened this issue Jul 13, 2021 · 1 comment · Fixed by #276

Comments

@yijiasu-crypto
Copy link
Contributor

System info: [Include Ethermint commit, operating system name, and other relevant details]

0.0.0-295-g74b7eaf
OS: macOS 11.2.3 (20D91)
go version go1.16.5 darwin/amd64

Steps to reproduce:

  1. Pull this PR: Add opcode test to suites #273
  2. cd tests/solidity and yarn install
  3. Run opcode tests on Ethermint: yarn test --network ethermint opcode
  4. Run opcode tests on Ganache: yarn test --network ganache opcode

Expected behavior: [What you expected to happen]

Expect tests all passed

Actual behavior: [What actually happened]

  1. Tests on Ethermint keep stuck at test case 2#
  2. Tests on Ganache passed

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

The test code here:

  function test_invalid() public {

    //revert
    assembly{ invalid() }
  }

According to the Solidity assembly: https://docs.soliditylang.org/en/v0.5.3/assembly.html#opcodes

This instruction invalid() should end the execution and throw an exception.

@yijiasu-crypto yijiasu-crypto changed the title assembly code invalid() was not behaving correctly Assembly instruction invalid() was not behaving correctly Jul 13, 2021
@yijiasu-crypto
Copy link
Contributor Author

Confirmed PR #272 will fix this issue. The PR will consider all VM error as failure and produce a failed tx receipt.

yihuang referenced this issue in yihuang/ethermint Jul 13, 2021
yihuang referenced this issue in yihuang/ethermint Jul 15, 2021
Closes: #274

evm: fix `ExtraEIP` activation (#288)

Closes: #287

Update x/evm/types/utils.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Add `Failed` utility function and changelog
fedekunze pushed a commit that referenced this issue Jul 15, 2021
Closes: #274

evm: fix `ExtraEIP` activation (#288)

Closes: #287

Update x/evm/types/utils.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Add `Failed` utility function and changelog
mmsqe added a commit to mmsqe/ethermint that referenced this issue Jun 14, 2023
…kport: evmos#1773) (evmos#274)

* fix: avoid channel get changed when concurrent subscribe happens (backport: evmos#1773)  (#247)

* fix leveldb

for more info, syndtr/goleveldb@afa5311

* avoid channel get changed when concurrent subscribe happens

* add test

* add change doc

* update tm-db

* fix err msg due to empty version check fix

for more info, see https://github.com/cosmos/cosmos-sdk/pull/13355/files

* fix test
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.

1 participant