evm2wasm
evm2wasm copied to clipboard
[ORPHANED] Transcompiles EVM code to eWASM
I spent quite some time on this the past couple of days, along with @jwasinger @hugo-dc @cdetrio @jakelang. The expected behavior of this test (https://github.com/ethereum/tests/blob/develop/src/GeneralStateTestsFiller/stCallCodes/call_OOG_additionalGasCosts1Filler.json#L47) changed with EIP158, from: ```...
- [x] callOutput2 - [x] callOutput3 - [x] callOutput3partial - [x] callOutput3partialFail - [x] callOutput3Fail - [ ] Call1024OOG - [ ] Call1024PreCall - [x] CallcodeLoseGasOOG - [ ] callWithHighValueAndGasOOG...
- [x] codeCopyOffset - [x] callDataCopyOffset - [x] codecopy_dejavu2 - [x] calldatacopy_dejavu2 - [x] mem32kb_singleByte - [x] mem32kb_singleByte+31 - [x] mem32kb_singleByte-1 - [x] mem32kb_singleByte-33 - [x] mem64kb_singleByte - [x] mem64kb_singleByte-32...
See https://github.com/ewasm/hera/pull/222 . This functionality should be implemented in evm2wasm to keep the EEI spec cleaner.
Here is a full trace of the test case `callcall_00`: ``` jwasinger@certification-hive-test03:~/projects/cpp-ethereum/build$ ETHEREUM_TEST_PATH="../../tests" test/testeth -t GeneralStateTests/stCallCodes -- --vm hera --singlenet "Byzantium" --singletest 'callcall_00' --evmc evm2wasm.js=true --evmc fallback=false Running 1 test...
Logging this to track the conversation yesterday in gitter: > @axic Mar 21 18:38 very likely evm2was has endianess issues > @hugo-dc Mar 21 18:52 i’ve just confirmed storage is...
This one test is failing in the current `master` branch (https://github.com/ewasm/evm2wasm/commit/e050d24f9d930cb963d25470490bae6b019a29ab): ``` evm2wasm/ master> npm run vmTests > [email protected] vmTests /Users/lanerettig/wip/eth/evm2wasm > node --expose-wasm --harmony ./tests/runVmTests.js TAP version 13 #...
VM tests have been temporarily [turned off](https://github.com/ewasm/evm2wasm/blob/9349fbfa07fbc4113eec489c6b72b03b5ae7f2f6/circle.yml#L109) in CI. Turn them back on once ewasm-kernel is fixed (with correct endianness in EEI methods) and passing again.
It would be really nice to have some unit tests for these to improve our test coverage. a basic test case for each option would suffice.
This should be good enough to determine that all code paths of the transcompiler are used.