diff options
author | Dimitry <winsvega@mail.ru> | 2017-01-17 08:48:22 +0800 |
---|---|---|
committer | Dimitry <winsvega@mail.ru> | 2017-01-17 08:48:22 +0800 |
commit | 616d2c8e53aa45ede68eb09a5fa27446a82cd15a (patch) | |
tree | 4bd0392adfa11cbd03e665f5d290482cf3d53b29 /src/GeneralStateTestsFiller/stRevertTest | |
parent | 3770ef5f234ec7837015e6717715bfa82131bc5b (diff) | |
download | dexon-tests-616d2c8e53aa45ede68eb09a5fa27446a82cd15a.tar dexon-tests-616d2c8e53aa45ede68eb09a5fa27446a82cd15a.tar.gz dexon-tests-616d2c8e53aa45ede68eb09a5fa27446a82cd15a.tar.bz2 dexon-tests-616d2c8e53aa45ede68eb09a5fa27446a82cd15a.tar.lz dexon-tests-616d2c8e53aa45ede68eb09a5fa27446a82cd15a.tar.xz dexon-tests-616d2c8e53aa45ede68eb09a5fa27446a82cd15a.tar.zst dexon-tests-616d2c8e53aa45ede68eb09a5fa27446a82cd15a.zip |
Revert Tests
Create in subcall with OOG (in and after subcall)
Create is a collision with address
Create is not a collision with address
Diffstat (limited to 'src/GeneralStateTestsFiller/stRevertTest')
-rw-r--r-- | src/GeneralStateTestsFiller/stRevertTest/RevertDepthCreateAddressCollisionFiller.json | 219 | ||||
-rw-r--r-- | src/GeneralStateTestsFiller/stRevertTest/RevertDepthCreateOOGFiller.json | 178 |
2 files changed, 397 insertions, 0 deletions
diff --git a/src/GeneralStateTestsFiller/stRevertTest/RevertDepthCreateAddressCollisionFiller.json b/src/GeneralStateTestsFiller/stRevertTest/RevertDepthCreateAddressCollisionFiller.json new file mode 100644 index 000000000..64555a54a --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/RevertDepthCreateAddressCollisionFiller.json @@ -0,0 +1,219 @@ +{ + "RevertDepthCreateAddressCollision" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "comment" : "NO OOG", + "indexes" : { + "data" : 1, + "gas" : 1, + "value" : 0 + }, + "network" : ["EIP158"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "balance" : "0x06", + "code" : "0x", + "nonce" : "0x01", + "storage" : { + "0x01" : "0x01", + "0x04" : "0x0c" + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + "0x02" : "0x08", + "0x03" : "0x0c" + } + } + } + }, + { + "comment" : "NO OOG", + "indexes" : { + "data" : 1, + "gas" : 1, + "value" : 0 + }, + "network" : ["EIP150"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "balance" : "0x06", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + "0x01" : "0x01", + "0x04" : "0x0c" + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + "0x02" : "0x08", + "0x03" : "0x0c" + } + } + } + }, + { + "comment" : "NO OOG", + "indexes" : { + "data" : 1, + "gas" : 1, + "value" : 0 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "balance" : "0x05", + "code" : "0x60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c600455", + "nonce" : "0x36", + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + } + } + } + }, + { + "comment" : "OOG in subcall", + "indexes" : { + "data" : 0, + "gas" : 1, + "value" : 0 + }, + "network" : ["ALL"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "balance" : "0x06", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + "0x04" : "0x0c" + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + } + } + } + }, + { + "comment" : "OOG after subcall", + "indexes" : { + "data" : 1, + "gas" : 0, + "value" : 0 + }, + "network" : ["EIP158", "EIP150"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "balance" : "0x05", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + } + } + } + }, + { + "comment" : "OOG after subcall", + "indexes" : { + "data" : 1, + "gas" : 0, + "value" : 0 + }, + "network" : ["Homestead", "Frontier"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "balance" : "0x05", + "code" : "0x60016000556000600060006000600073b000000000000000000000000000000000000000600035f1600155600c600455", + "nonce" : "0x36", + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + } + } + } + }, + { + "comment" : "double OOG", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "network" : ["ALL"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "balance" : "0x05", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "balance" : "5", + "code" : "{ [[0]] 1 [[1]] (CALL (CALLDATALOAD 0) 0xb000000000000000000000000000000000000000 0 0 0 0 0) [[4]] 12 }", + "nonce" : "54", + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "{ [[2]] 8 (CREATE 0 0 0) [[3]] 12}", + "nonce" : "", + "storage" : { + } + } + }, + "transaction" : { + "data" : "Call with value to address A, then another call X, in the call X CREATE of account A, OOG -> revert call X.", + "data" : "d0g0 - double OOG, d0g1 - OOG inside subcall, d1g0 - OOG after subcall, d1g1 - no OOG", + "data" : [ + "000000000000000000000000000000000000000000000000000000000000ea60", + "000000000000000000000000000000000000000000000000000000000001ea60" + ], + "gasLimit" : [ + "110000", "160000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "3e180b1862f9d158abb5e519a6d8605540c23682", + "value" : [ + "1", "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/RevertDepthCreateOOGFiller.json b/src/GeneralStateTestsFiller/stRevertTest/RevertDepthCreateOOGFiller.json new file mode 100644 index 000000000..79f7d3ce0 --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/RevertDepthCreateOOGFiller.json @@ -0,0 +1,178 @@ +{ + "RevertDepthCreateOOG" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "comment" : "NO OOG", + "indexes" : { + "data" : 1, + "gas" : 1, + "value" : 0 + }, + "network" : ["EIP158"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "nonce" : "1" + }, + "a000000000000000000000000000000000000000" : { + "storage" : { + "0x00" : "0x01", + "0x01" : "0x01", + "0x04" : "0x0c" + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + "0x02" : "0x08", + "0x03" : "0x0c" + } + } + } + }, + { + "comment" : "NO OOG", + "indexes" : { + "data" : 1, + "gas" : 1, + "value" : 0 + }, + "network" : ["EIP150"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "nonce" : "0" + }, + "a000000000000000000000000000000000000000" : { + "storage" : { + "0x00" : "0x01", + "0x01" : "0x01", + "0x04" : "0x0c" + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + "0x02" : "0x08", + "0x03" : "0x0c" + } + } + } + }, + { + "comment" : "NO OOG", + "indexes" : { + "data" : 1, + "gas" : 1, + "value" : 0 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "shouldnotexist" : "1" + }, + "a000000000000000000000000000000000000000" : { + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + } + } + } + }, + { + "comment" : "OOG in subcall", + "indexes" : { + "data" : 0, + "gas" : 1, + "value" : 0 + }, + "network" : ["ALL"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "shouldnotexist" : "1" + }, + "a000000000000000000000000000000000000000" : { + "storage" : { + "0x00" : "0x01", + "0x04" : "0x0c" + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + } + } + } + }, + { + "comment" : "OOG after subcall / double OOG", + "indexes" : { + "data" : [1, 0], + "gas" : 0, + "value" : 0 + }, + "network" : ["ALL"], + "result" : { + "3e180b1862f9d158abb5e519a6d8605540c23682" : { + "shouldnotexist" : "1" + }, + "a000000000000000000000000000000000000000" : { + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "a000000000000000000000000000000000000000" : { + "balance" : "5", + "code" : "{ [[0]] 1 [[1]] (CALL (CALLDATALOAD 0) 0xb000000000000000000000000000000000000000 0 0 0 0 0) [[4]] 12 }", + "nonce" : "54", + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "{ [[2]] 8 (CREATE 0 0 0) [[3]] 12}", + "nonce" : "", + "storage" : { + } + } + }, + "transaction" : { + "data" : "Call with value to address A, then another call X, in the call X CREATE of account A, OOG -> revert call X.", + "data" : "d0g0 - double OOG, d0g1 - OOG inside subcall, d1g0 - OOG after subcall, d1g1 - no OOG", + "data" : [ + "000000000000000000000000000000000000000000000000000000000000ea60", + "000000000000000000000000000000000000000000000000000000000001ea60" + ], + "gasLimit" : [ + "110000", "160000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a000000000000000000000000000000000000000", + "value" : [ + "1", "0" + ] + } + } +} |