etclabscore / core-geth

A highly configurable Go implementation of the Ethereum protocol.
https://etclabscore.github.io/core-geth
GNU Lesser General Public License v3.0
268 stars 147 forks source link

add custom interpreter to t8n evm config #505

Closed theshoe1029 closed 1 year ago

meowsbits commented 1 year ago

Hey @theshoe1029, great idea! Thanks for taking this on. I've pulled your patch for review and have made a few additions, PTAL. Generally, I made sure that the flag is

Here's an example with an EVMOne external EVM.

./build/bin/evm statetest --vm.evm build/_workspace/evmone/lib/libevmone.so ./tests/testdata/LegacyTests/Constantinople/GeneralStateTests/stExample/add11.json 
[
  {
    "name": "add11",
    "pass": true,
    "fork": "Byzantium"
  },
  {
    "name": "add11",
    "pass": true,
    "fork": "Constantinople"
  },
  {
    "name": "add11",
    "pass": true,
    "fork": "EIP158"
  },
  {
    "name": "add11",
    "pass": true,
    "fork": "Homestead"
  },
  {
    "name": "add11",
    "pass": true,
    "fork": "ConstantinopleFix"
  },
  {
    "name": "add11",
    "pass": true,
    "fork": "EIP150"
  },
  {
    "name": "add11",
    "pass": true,
    "fork": "ETC_Agharta"
  },
  {
    "name": "add11",
    "pass": true,
    "fork": "ETC_Atlantis"
  },
  {
    "name": "add11",
    "pass": true,
    "fork": "Frontier"
  }
]
meowsbits commented 1 year ago

Note that the EVMC binding that core-geth currently uses is limited to Version 7, which is not the latest version, and does not provide support for EVM upgrades from Berlin onward yet, so its a little outdated at this point. If you're interested in helping move that further, your help would be very welcome; see https://github.com/etclabscore/core-geth/issues/506 for reference and further discussion if you intend to start in this direction. Cheers!

theshoe1029 commented 1 year ago

Thanks for the additions, I saw you started working on #507 but I'd be happy to help in any way I can.