Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Conversation

@kyteague
Copy link
Contributor

@kyteague kyteague commented Jun 7, 2018

This fix removes references to the deprecated callDataCopy256 EEI API and replaces them with callDataCopy, which allows evm2wasm to be used with the latest version of Hera.

I tried using the fix from #193 but 1) the fix didn't seem to work and 2) the fix is tied to a refactor that doesn't look like will be merged anytime soon.

@jwasinger
Copy link
Contributor

Thanks for the PR @kyteague. A good way to get the PR included is to make sure that it passes additional state tests.

A relevant test case here is https://github.com/ethereum/tests/blob/develop/GeneralStateTests/stMemoryTest/memReturn.json

@jwasinger
Copy link
Contributor

jwasinger commented Jun 7, 2018

This is the way to invoke testeth for CircleCI:

 testeth -t GeneralStateTests/stMemoryTest -- --testpath ~/tests --singlenet "Byzantium" --singletest "memReturn" --vm ~/libhera.so --evmc evm2wasm.js=true

@kyteague
Copy link
Contributor Author

kyteague commented Jun 7, 2018

Thanks for the info @jwasinger. I ran the memReturn test locally.

Here is the output. Let me know if I need to do something else. I also saw that CircleCI passed as well.

$ testeth -t GeneralStateTests -- --testpath $TEST_PATH --singlenet "Byzantium" --singletest "memReturn" --vm $HERA_PATH --evmc evm2wasm.js=true
Running tests using path: "../../tests"
Running 47 test cases...
Test Case "stCallCodes":
Test Case "stCallCreateCallCodeTest":
Test Case "stExample":
Test Case "stInitCodeTest":
Test Case "stLogTests":
Test Case "stMemoryTest":
100%
Calling evm2wasm.js (input 10 bytes)...
(Calling evm2wasm.js with command: evm2wasm -e /tmp/hera.evm2wasm.evm.Z0BKYq -o /tmp/hera.evm2wasm.wasm.MUUSpI --charge-per-op)
evm2wasm.js done (output 972 bytes)
Executing...
importGlobals
useGas 0
callDataSize
useGas 3
useGas 3
useGas 0
useGas 9
callDataCopy 8428 0 50
useGas 2
useGas 3
useGas 0
return 8428 60
Test Case "stPreCompiledContracts":
Test Case "stPreCompiledContracts2":
Test Case "stRandom":
Test Case "stRandom2":
Test Case "stRecursiveCreate":
Test Case "stRefundTest":
Test Case "stSolidityTest":
Test Case "stSpecialTest":
Test Case "stSystemOperationsTest":
Test Case "stTransactionTest":
Test Case "stTransitionTest":
Test Case "stWalletTest":
Test Case "stCallDelegateCodesCallCodeHomestead":
Test Case "stCallDelegateCodesHomestead":
Test Case "stHomesteadSpecific":
Test Case "stDelegatecallTestHomestead":
Test Case "stChangedEIP150":
Test Case "stEIP150singleCodeGasPrices":
Test Case "stMemExpandingEIP150Calls":
Test Case "stEIP150Specific":
Test Case "stEIP158Specific":
Test Case "stNonZeroCallsTest":
Test Case "stZeroCallsTest":
Test Case "stZeroCallsRevert":
Test Case "stCodeSizeLimit":
Test Case "stCreateTest":
Test Case "stRevertTest":
Test Case "stStackTests":
Test Case "stStaticCall":
Test Case "stReturnDataTest":
Test Case "stZeroKnowledge":
Test Case "stZeroKnowledge2":
Test Case "stCodeCopyTest":
Test Case "stBugs":
Test Case "stShift":
Test Case "stAttackTest":
Test Case "stMemoryStressTest":
Skipping stQuadraticComplexityTest because --all option is not specified.
Test Case "stBadOpcode":
Test Case "stArgsZeroOneBalance":
Test Case "stEWASMTests":

*** No errors detected

@kyteague
Copy link
Contributor Author

kyteague commented Jun 7, 2018

Added the memReturn test to circle.yml in 1603baa.

@kyteague kyteague force-pushed the fix-calldataload branch from 74c8892 to 1603baa Compare June 8, 2018 13:58
@axic
Copy link
Member

axic commented Jul 25, 2018

Thank you @kyteague, this is great!

@axic axic merged commit 859471d into ewasm:master Jul 25, 2018
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