Skip to content
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

TOMO + EVMC6 + HERA #9

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

TOMO + EVMC6 + HERA #9

wants to merge 20 commits into from

Conversation

thanhnguyennguyen
Copy link
Owner

@thanhnguyennguyen thanhnguyennguyen commented Jun 6, 2019

Ref: ethereum#17954

  • Building HERA from ewasm repository
$ git clone https://github.com/ewasm/hera
$ cd hera
$ git submodule update --init
$ mkdir build
$ cd build
$ cmake -DBUILD_SHARED_LIBS=ON ..
$ cmake --build .

In this case the built library will be placed at build/src/libhera/libhera.so on Linux or build/src/libhera/libhera.dylib on MacOS.

  • Making tomo compatible with EVMC: checkout latest code from this PR
  • Running TOMO + EVMC + HERA
tomo --vm.ewasm path/to/libhera.so,engine=<engine>,evm1mode=<evm1mode>
  • engine=<engine> will select the underlying WebAssembly engine, where the only accepted values currently are binaryen, wabt, and wavm
  • evm1mode
    • reject will reject any EVM1 bytecode with an error (the default setting)
    • fallback will allow EVM1 bytecode to be passed through to the client for execution
    • evm2wasm will enable transformation of bytecode using the EVM Transcompiler
    • runevm will transform EVM1 bytecode using runevm

Additional EVMC options can be provided after a comma. Hera options are documented here

Repository owner locked as off-topic and limited conversation to collaborators Jun 6, 2019
@thanhnguyennguyen thanhnguyennguyen changed the title Evmc support EVMC support Jun 6, 2019
@thanhnguyennguyen thanhnguyennguyen changed the title EVMC support TOMO + HERA with EVMC support Jun 6, 2019
@thanhnguyennguyen thanhnguyennguyen changed the title TOMO + HERA with EVMC support TOMO + HERA with EVMC-v6 support Jun 10, 2019
@thanhnguyennguyen thanhnguyennguyen changed the title TOMO + HERA with EVMC-v6 support TOMO + EVMC6 + HERA Jun 12, 2019
gballet and others added 20 commits September 29, 2019 10:27
 - Define an Interpreter interface
 - One contract can call contracts from other interpreter types.
 - Pass the interpreter to the operands instead of the evm.
   This is meant to prevent type assertions in operands.
Interpreter initialization is left to the PRs implementing them.
Options for external interpreters are passed after a colon in the
`--vm.ewasm` and `--vm.evm` switches.
govendor fetch github.com/ethereum/evmc/bindings/go/evmc@=v6.0.2
Makes Interface interface a bit more stateless and abstract.

Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
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 this pull request may close these issues.

3 participants