Skip to content

Instantly share code, notes, and snippets.

@cdetrio
Last active May 26, 2018 04:48
Show Gist options
  • Save cdetrio/b46865ad3777b8b08cb8328af6751268 to your computer and use it in GitHub Desktop.
Save cdetrio/b46865ad3777b8b08cb8328af6751268 to your computer and use it in GitHub Desktop.
callcall_00-hera217-passing
(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.xGVVwK -o /tmp/hera.evm2wasm.wasm.6E0crl --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":2978997,"gasCost":3,"op":PUSH1,"pc":2,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2978994,"gasCost":6,"op":PUSH1,"pc":4,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2978991,"gasCost":9,"op":PUSH1,"pc":6,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2978988,"gasCost":12,"op":PUSH1,"pc":8,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2978985,"gasCost":15,"op":PUSH20,"pc":10,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2978982,"gasCost":18,"op":PUSH3,"pc":31,"stack":["0x0000000000000000000000001000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":0,"gas":2978979,"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.DSnBO4 -o /tmp/hera.evm2wasm.wasm.2YAZbO --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":352297,"gasCost":3,"op":PUSH1,"pc":2,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352294,"gasCost":6,"op":PUSH1,"pc":4,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352291,"gasCost":9,"op":PUSH1,"pc":6,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352288,"gasCost":12,"op":PUSH1,"pc":8,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352285,"gasCost":15,"op":PUSH20,"pc":10,"stack":["0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352282,"gasCost":18,"op":PUSH3,"pc":31,"stack":["0x0000000000000000000000001000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":1,"gas":352279,"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.vtqJaG -o /tmp/hera.evm2wasm.wasm.zF6s9x --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":252297,"gasCost":3,"op":PUSH1,"pc":2,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":2,"gas":252294,"gasCost":6,"op":SSTORE,"pc":4,"stack":["0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":232294,"gasCost":6,"op":CALLER,"pc":5,"stack":[]}
useGas 0
getCaller 0
evmTrace
{"depth":2,"gas":232292,"gasCost":6,"op":PUSH1,"pc":6,"stack":["0x0000000000000000000000001000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":2,"gas":232289,"gasCost":9,"op":SSTORE,"pc":8,"stack":["0x0000000000000000000000000000000000000000000000000000000000000004","0x0000000000000000000000001000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":212289,"gasCost":9,"op":CALLVALUE,"pc":9,"stack":[]}
useGas 0
getCallValue 0
evmTrace
{"depth":2,"gas":212287,"gasCost":9,"op":PUSH1,"pc":10,"stack":["0x0000000000000000000000000000000000000000000000000000000000000002"]}
useGas 3
evmTrace
{"depth":2,"gas":212284,"gasCost":12,"op":SSTORE,"pc":12,"stack":["0x0000000000000000000000000000000000000000000000000000000000000007","0x0000000000000000000000000000000000000000000000000000000000000002"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":192284,"gasCost":12,"op":ADDRESS,"pc":13,"stack":[]}
useGas 0
getAddress 0
evmTrace
{"depth":2,"gas":192282,"gasCost":12,"op":PUSH1,"pc":14,"stack":["0x0000000000000000000000001000000000000000000000000000000000000002"]}
useGas 3
evmTrace
{"depth":2,"gas":192279,"gasCost":15,"op":SSTORE,"pc":16,"stack":["0x00000000000000000000000000000000000000000000000000000000000000e6","0x0000000000000000000000001000000000000000000000000000000000000002"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":172279,"gasCost":15,"op":ORIGIN,"pc":17,"stack":[]}
useGas 0
getTxOrigin 0
evmTrace
{"depth":2,"gas":172277,"gasCost":15,"op":PUSH1,"pc":18,"stack":["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"]}
useGas 3
evmTrace
{"depth":2,"gas":172274,"gasCost":18,"op":SSTORE,"pc":20,"stack":["0x00000000000000000000000000000000000000000000000000000000000000e8","0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":152274,"gasCost":18,"op":CALLDATASIZE,"pc":21,"stack":[]}
useGas 0
callDataSize
evmTrace
{"depth":2,"gas":152272,"gasCost":18,"op":PUSH1,"pc":22,"stack":["0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 3
evmTrace
{"depth":2,"gas":152269,"gasCost":21,"op":SSTORE,"pc":24,"stack":["0x00000000000000000000000000000000000000000000000000000000000000ec","0x0000000000000000000000000000000000000000000000000000000000000040"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":132269,"gasCost":21,"op":CODESIZE,"pc":25,"stack":[]}
useGas 0
getCodeSize
evmTrace
{"depth":2,"gas":132267,"gasCost":21,"op":PUSH1,"pc":26,"stack":["0x0000000000000000000000000000000000000000000000000000000000000021"]}
useGas 3
evmTrace
{"depth":2,"gas":132264,"gasCost":24,"op":SSTORE,"pc":28,"stack":["0x00000000000000000000000000000000000000000000000000000000000000ee","0x0000000000000000000000000000000000000000000000000000000000000021"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":2,"gas":112264,"gasCost":24,"op":GASPRICE,"pc":29,"stack":[]}
useGas 0
getTxGasPrice 0
evmTrace
{"depth":2,"gas":112262,"gasCost":24,"op":PUSH1,"pc":30,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":2,"gas":112259,"gasCost":27,"op":SSTORE,"pc":32,"stack":["0x00000000000000000000000000000000000000000000000000000000000000f0","0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":1,"gas":184832,"gasCost":21,"op":PUSH1,"pc":36,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":1,"gas":184829,"gasCost":24,"op":SSTORE,"pc":38,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
evmTrace
{"depth":0,"gas":2784102,"gasCost":21,"op":PUSH1,"pc":36,"stack":["0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 3
evmTrace
{"depth":0,"gas":2784099,"gasCost":24,"op":SSTORE,"pc":38,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000001"]}
useGas 0
storageStore 20 0
postState:
--- 7ebd8fdaaeb5e96fd2ad3b11c675e3b16e5902ae4fe100710f39925e59ccd914
1000000000000000000000000000000000000000: 0 #:999999999999999999 @:821e2556a290c86405f8160a2d662042a431ba456b9db265c79bb837c04be5f0 $0ab85e2189a6a8f729b32cad84b88d2826b5c5623a8b815a6733d89ec41ed46b
0: 1
1000000000000000000000000000000000000001: 0 #:999999999999999999 @:f38f9f63c760d088d7dd04f743619b6291f63beebd8bdf530628f90e9cfa52d7 $9afca91c0774d3c1a72fd05c486e73e032444b843a9b111a20760f557ef55e7b
1: 1
1000000000000000000000000000000000000002: 0 #:2 @:bb1536372d31776731b19b5a7a9c4327601e9b5a51d74289bac9ee6497f8ed1b $11f8bf1536bfe341aec3f64cfd4fd81928acbb1575f5e4ea6737a150c180a5e2
2: 1
4: 1000000000000000000000000000000000000001
7: 2
E6: 1000000000000000000000000000000000000002
E8: A94F5374FCE5EDBC8E2A8697C15331677E6EBF0B
EC: 40
EE: 21
F0: 1
2adc25665018aa1fe0e6bc666dac8fc2697ff9ba: 0 #:235901 [SIMPLE]
a94f5374fce5edbc8e2a8697c15331677e6ebf0b: 1 #:999999999999764099 [SIMPLE]
*** No errors detected
commit 607921dd548c92e0b638195f33cbfc41e9ef05b1
Author: cdetrio <cdetrio@gmail.com>
Date: Tue May 22 14:32:54 2018 -0400
use 0 == success POSIX convention for CALL
commit 35fd2896f487a0b16bf49bf49f02942bf9b3234e
Author: cdetrio <cdetrio@gmail.com>
Date: Thu May 17 21:39:30 2018 -0400
fix CALL return vals
commit ccf40f48c2f374de209ede88484866f0696c88d6
Author: cdetrio <cdetrio@gmail.com>
Date: Thu May 17 19:09:08 2018 -0400
fix gas calc
commit 90275f859de6f71d56120b5693beee5de4c45a34
Author: cdetrio <cdetrio@gmail.com>
Date: Thu May 17 10:38:01 2018 -0400
gas subsidy and 63/64 rule for CALL
commit 6d1668e9dd34d4ac77b653b779ff44e9f5dda2f9
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Wed May 16 13:15:53 2018 +0200
Do not keep copy of local code in EthereumInterface
commit cd253506750c62616e8af38ebc678318beb09e8c
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Wed May 16 13:15:19 2018 +0200
Do not use local cache for codeCopy and getCodeSize
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
commit 59b14939f62f9287802ac29fa3a6c1fe2bc5658d
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Tue May 15 22:55:16 2018 +0200
Return EVM_INTERNAL_ERROR for InternalErrorException
Revert b6634e91 as the underlying checks return proper reasons now.
commit 8bf743c57b4b3e19e6f3892edcc749817068dd95
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Tue May 15 22:53:54 2018 +0200
Use OutOfGasException for all runtime-valid issues, which don't have a specific error code
commit 7002b6a1e31aaa0e8f5674113b720c28fe0a91e8
Merge: f4a85d9 d50882b
Author: Alex Beregszaszi <alex@rtfs.hu>
Date: Tue May 15 21:39:15 2018 +0100
Merge pull request #211 from ewasm/assert-argument-count
Assert argument counts in the EEI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment