Skip to content

Instantly share code, notes, and snippets.

@cdetrio
Last active May 26, 2018 05:03
Show Gist options
  • Save cdetrio/a6f0832426ab4833a7fa7c76bee25403 to your computer and use it in GitHub Desktop.
Save cdetrio/a6f0832426ab4833a7fa7c76bee25403 to your computer and use it in GitHub Desktop.
callcall_00-hera225-postbalance-bug
(ewasm-dump-state)ewasm@13:~/hugo-dc/cpp-ethereum/build$ test/testeth -t GeneralStateTests/stCallCodes -- --testpath /home/ewasm/hugo-dc/cpp-ethereum/test/jsontests --singlenet "Byzantium" --vm hera --evmc evm2wasm=true --evmc evm2wasm.js=true --evmc evm2wasm.js-trace=true --evmc fallback=false --singletest callcall_00
Running tests using path: "/home/ewasm/hugo-dc/cpp-ethereum/test/jsontests"
Running 1 test case...
Test Case "stCallCodes":
100%
[Executive.cpp] creating vm...
Calling evm2wasm.js (input 39 bytes)...
(Calling evm2wasm.js with command: evm2wasm.js -e /tmp/hera.evm2wasm.evm.XzLq4i -o /tmp/hera.evm2wasm.wasm.KYbOby --charge-per-op --trace)
evm2wasm.js done (output 1448 bytes)
Executing...
importGlobals
evmTrace
{"depth":0,"gas":2979000,"gasCost":0,"op":PUSH1,"pc":0,"stack":[]}
useGas 3
evmTrace
{"depth":0,"gas":2979000,"gasCost":3,"op":PUSH1,"pc":2,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2979000,"gasCost":6,"op":PUSH1,"pc":4,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2979000,"gasCost":9,"op":PUSH1,"pc":6,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2979000,"gasCost":12,"op":PUSH1,"pc":8,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2979000,"gasCost":15,"op":PUSH20,"pc":10,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2979000,"gasCost":18,"op":PUSH3,"pc":31,"stack":["0x0000000000000000000000001000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2979000,"gasCost":21,"op":CALL,"pc":35,"stack":["0x0000000000000000000000000000000000000000000000000000000000055730","0x0000000000000000000000001000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 0
useGas 6
$call 55730 a0 80 8428 40
[Executive.cpp] creating vm...
Calling evm2wasm.js (input 39 bytes)...
(Calling evm2wasm.js with command: evm2wasm.js -e /tmp/hera.evm2wasm.evm.24DyWV -o /tmp/hera.evm2wasm.wasm.3eTjHj --charge-per-op --trace)
evm2wasm.js done (output 1448 bytes)
Executing...
importGlobals
evmTrace
{"depth":1,"gas":352300,"gasCost":0,"op":PUSH1,"pc":0,"stack":[]}
useGas 3
evmTrace
{"depth":1,"gas":352300,"gasCost":3,"op":PUSH1,"pc":2,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352300,"gasCost":6,"op":PUSH1,"pc":4,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352300,"gasCost":9,"op":PUSH1,"pc":6,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352300,"gasCost":12,"op":PUSH1,"pc":8,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352300,"gasCost":15,"op":PUSH20,"pc":10,"stack":["0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352300,"gasCost":18,"op":PUSH3,"pc":31,"stack":["0x0000000000000000000000001000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352300,"gasCost":21,"op":CALL,"pc":35,"stack":["0x000000000000000000000000000000000000000000000000000000000003d090","0x0000000000000000000000001000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 0
useGas 6
$call 3d090 a0 80 8428 40
[Executive.cpp] creating vm...
Calling evm2wasm.js (input 33 bytes)...
(Calling evm2wasm.js with command: evm2wasm.js -e /tmp/hera.evm2wasm.evm.mrerBQ -o /tmp/hera.evm2wasm.wasm.A9uyvn --charge-per-op --trace)
.
evm2wasm.js done (output 1799 bytes)
Executing...
importGlobals
evmTrace
{"depth":2,"gas":252300,"gasCost":0,"op":PUSH1,"pc":0,"stack":[]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":3,"op":PUSH1,"pc":2,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":6,"op":SSTORE,"pc":4,"stack":["0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":252300,"gasCost":6,"op":CALLER,"pc":5,"stack":[]}
useGas 0
getCaller 0
evmTrace
{"depth":2,"gas":252300,"gasCost":6,"op":PUSH1,"pc":6,"stack":["0x0000000000000000000000001000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":9,"op":SSTORE,"pc":8,"stack":["0x0000000000000000000000000000000000000000000000000000000000000004","0x0000000000000000000000001000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":252300,"gasCost":9,"op":CALLVALUE,"pc":9,"stack":[]}
useGas 0
getCallValue 0
evmTrace
{"depth":2,"gas":252300,"gasCost":9,"op":PUSH1,"pc":10,"stack":["0x0000000000000000000000000000000000000000000000000000000000000002"]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":12,"op":SSTORE,"pc":12,"stack":["0x0000000000000000000000000000000000000000000000000000000000000007","0x0000000000000000000000000000000000000000000000000000000000000002"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":252300,"gasCost":12,"op":ADDRESS,"pc":13,"stack":[]}
useGas 0
getAddress 0
evmTrace
{"depth":2,"gas":252300,"gasCost":12,"op":PUSH1,"pc":14,"stack":["0x0000000000000000000000001000000000000000000000000000000000000002"]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":15,"op":SSTORE,"pc":16,"stack":["0x00000000000000000000000000000000000000000000000000000000000000e6","0x0000000000000000000000001000000000000000000000000000000000000002"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":252300,"gasCost":15,"op":ORIGIN,"pc":17,"stack":[]}
useGas 0
getTxOrigin 0
evmTrace
{"depth":2,"gas":252300,"gasCost":15,"op":PUSH1,"pc":18,"stack":["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":18,"op":SSTORE,"pc":20,"stack":["0x00000000000000000000000000000000000000000000000000000000000000e8","0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":252300,"gasCost":18,"op":CALLDATASIZE,"pc":21,"stack":[]}
useGas 0
callDataSize
evmTrace
{"depth":2,"gas":252300,"gasCost":18,"op":PUSH1,"pc":22,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":21,"op":SSTORE,"pc":24,"stack":["0x00000000000000000000000000000000000000000000000000000000000000ec","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":252300,"gasCost":21,"op":CODESIZE,"pc":25,"stack":[]}
useGas 0
getCodeSize
evmTrace
{"depth":2,"gas":252300,"gasCost":21,"op":PUSH1,"pc":26,"stack":["0x0000000000000000000000000000000000000000000000000000000000000021"]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":24,"op":SSTORE,"pc":28,"stack":["0x00000000000000000000000000000000000000000000000000000000000000ee","0x0000000000000000000000000000000000000000000000000000000000000021"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":252300,"gasCost":24,"op":GASPRICE,"pc":29,"stack":[]}
useGas 0
getTxGasPrice 0
evmTrace
{"depth":2,"gas":252300,"gasCost":24,"op":PUSH1,"pc":30,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":2,"gas":252300,"gasCost":27,"op":SSTORE,"pc":32,"stack":["0x00000000000000000000000000000000000000000000000000000000000000f0","0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":1,"gas":604600,"gasCost":21,"op":PUSH1,"pc":36,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":1,"gas":604600,"gasCost":24,"op":SSTORE,"pc":38,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":0,"gas":3583600,"gasCost":21,"op":PUSH1,"pc":36,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":0,"gas":3583600,"gasCost":24,"op":SSTORE,"pc":38,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
/home/ewasm/hugo-dc/cpp-ethereum/test/tools/libtesteth/ImportTest.cpp(257): fatal error: in "GeneralStateTests/stCallCodes": Error when comparing states: preBalance + miningReward < postBalance (3000000000000000000 < 115792089237316195423570985008687907853269984665640564039460584007913129639936) callcall_00
*** 1 failure is detected (5 failures are expected) in the test module "Master Test Suite"
commit e547a49250d2aec8e2b62cb3874d3473b0699d19
Author: cdetrio <cdetrio@gmail.com>
Date: Tue May 22 14:32:54 2018 -0400
use 0 == success POSIX convention for CALL
commit d09d585f0fcab73f600c822dd6164b02f559ea26
Author: cdetrio <cdetrio@gmail.com>
Date: Thu May 17 21:39:30 2018 -0400
fix CALL return vals
commit b584bd877f70816506756f235e40d78563792ac0
Author: cdetrio <cdetrio@gmail.com>
Date: Thu May 17 19:09:08 2018 -0400
fix gas calc
commit c0163ab20acc5a948a9de8524ee15467712d03c1
Author: cdetrio <cdetrio@gmail.com>
Date: Thu May 17 10:38:01 2018 -0400
gas subsidy and 63/64 rule for CALL
commit 3c80e23f6fcc269e3847e74fde53f12ed6cfc5ed
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Thu May 24 00:03:35 2018 +0100
Always pass original input code to the interface
commit abdf5bde3db623dae890a7dd7fb00e4e90450e94
Merge: 6e972ba f4e880a
Author: Paweł Bylica <chfast@gmail.com>
Date: Tue May 22 10:34:58 2018 +0200
Merge pull request #214 from ewasm/metering-off
Disable interface gas metering if evm2wasm is used
commit f4e880a428dc7965ef60d4dbc3580711364b62a4
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Wed May 16 13:29:39 2018 +0200
Use meterInterfaceGas
commit 3af4c1d59d52afc6233dd41f15cd8cf18b174672
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Tue May 15 18:01:32 2018 +0200
Disable interface gas metering if evm2wasm is used
commit 50ea2127a9cdeb0c3bbb5f230676ec336d20741c
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Mon Mar 26 15:19:09 2018 +0100
Add option to disable interface metering in EEI
commit 6e972bac67f14bc518551c5709a1c0f89a85236e
Merge: 218b2e9 35ac626
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Wed May 16 12:27:36 2018 +0100
Merge pull request #213 from ewasm/evm-mode
Replace bools with evm_mode enum
commit 35ac62666102a123db67b46f28252e0240b0066f
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Tue May 15 16:27:08 2018 +0200
Replace bools with evm_mode enum
commit 218b2e9fa444686a9b607f2f005c62937fed591f
Merge: 5f8914b f1ba1e8
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Wed May 16 12:07:07 2018 +0100
Merge pull request #216 from ewasm/exception-namespace
Use proper namespace in heraAssert and ensureCondition
commit f1ba1e87f5477a8186431ea8c48b7af77749ab18
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Tue May 15 22:44:26 2018 +0200
Use proper namespace in heraAssert and ensureCondition
commit 5f8914b37265864cd01524f1c705fbdcb8025175
Merge: 7002b6a 59b1493
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Wed May 16 11:39:08 2018 +0100
Merge pull request #215 from ewasm/exception-cleanup
Return EVM_INTERNAL_ERROR for InternalErrorException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment