From 22558f3be8542021415ba94b9474618f6efc09a1 Mon Sep 17 00:00:00 2001 From: Dimitry Date: Tue, 4 Sep 2018 13:57:15 +0300 Subject: create2 bounds + yoichi tests --- .../stCreate2/CREATE2_Bounds2Filler.json | 63 ++++++++++++++++ .../stCreate2/CREATE2_Bounds3Filler.json | 61 +++++++++++++++ .../stCreate2/CREATE2_BoundsFiller.json | 66 +++++++++++++++++ ...eate2_successful_then_returndatasizeFiller.json | 83 +++++++++++++++++++++ ...eate2_successful_then_returndatasizeFiller.json | 86 ++++++++++++++++++++++ 5 files changed, 359 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stCreate2/CREATE2_Bounds2Filler.json create mode 100644 src/GeneralStateTestsFiller/stCreate2/CREATE2_Bounds3Filler.json create mode 100644 src/GeneralStateTestsFiller/stCreate2/CREATE2_BoundsFiller.json create mode 100644 src/GeneralStateTestsFiller/stCreate2/call_outsize_then_create2_successful_then_returndatasizeFiller.json create mode 100644 src/GeneralStateTestsFiller/stCreate2/call_then_create2_successful_then_returndatasizeFiller.json (limited to 'src/GeneralStateTestsFiller/stCreate2') diff --git a/src/GeneralStateTestsFiller/stCreate2/CREATE2_Bounds2Filler.json b/src/GeneralStateTestsFiller/stCreate2/CREATE2_Bounds2Filler.json new file mode 100644 index 000000000..6d8fd45be --- /dev/null +++ b/src/GeneralStateTestsFiller/stCreate2/CREATE2_Bounds2Filler.json @@ -0,0 +1,63 @@ +{ + "CREATE2_Bounds2" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "// currentGasLimit" : "2^63-1", + "currentGasLimit" : "0x7fffffffffffffff", + "currentNumber" : "1", + "currentTimestamp" : "1000", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "1000000000000000000000000000000000000000" : { + "balance" : "100" + }, + "13136008b64ff592819b2fa6d43f2835c452020e" : { + "shouldnotexist" : "1" + } + } + } + ], + "pre" : + { + "1000000000000000000000000000000000000000" : { + "balance" : "100", + "code" : "{ (MSTORE 0 0x6001600155601080600c6000396000f3006000355415600957005b6020356000 ) (MSTORE8 32 0x35) (MSTORE8 33 0x55) (CREATE2 1 0 0xffffffff 0) }", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0xfffffffffffffffffffffffffffffffffffffffffffffffff", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "150000", "250000000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "1000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stCreate2/CREATE2_Bounds3Filler.json b/src/GeneralStateTestsFiller/stCreate2/CREATE2_Bounds3Filler.json new file mode 100644 index 000000000..f2c708cb8 --- /dev/null +++ b/src/GeneralStateTestsFiller/stCreate2/CREATE2_Bounds3Filler.json @@ -0,0 +1,61 @@ +{ + "CREATE2_Bounds3" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x7fffffffffffffff", + "currentNumber" : "1", + "currentTimestamp" : "1000", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "1000000000000000000000000000000000000000" : { + "balance" : "100" + }, + "13136008b64ff592819b2fa6d43f2835c452020e" : { + "shouldnotexist" : "1" + } + } + } + ], + "pre" : { + "1000000000000000000000000000000000000000" : { + "balance" : "100", + "code" : "{ (MSTORE 0 0x6001600155601080600c6000396000f3006000355415600957005b6020356000 ) (MSTORE8 32 0x35) (MSTORE8 33 0x55) (CREATE2 1 0 0xffffffffffffffff 0) (CREATE2 1 0 0xffffffffffffffffffffffffffffffff 0) (CREATE2 1 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0) (CREATE2 1 0xfffffff 0 0) (CREATE2 1 0xffffffff 0 0) (CREATE2 1 0xffffffffffffffff 0 0) (CREATE2 1 0xffffffffffffffffffffffffffffffff 0 0) (CREATE2 1 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0 0) (CREATE2 1 0xfffffff 0xfffffff 0) (CREATE2 1 0xffffffff 0xffffffff 0) (CREATE2 1 0xffffffffffffffff 0xffffffffffffffff 0) (CREATE2 1 0xffffffffffffffffffffffffffffffff 0xffffffffffffffffffffffffffffffff 0) (CREATE2 1 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0)}", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0xfffffffffffffffffffffffffffffffffffffffffffffffff", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "150000", "1000000", "250000000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "1000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stCreate2/CREATE2_BoundsFiller.json b/src/GeneralStateTestsFiller/stCreate2/CREATE2_BoundsFiller.json new file mode 100644 index 000000000..e8a8c0617 --- /dev/null +++ b/src/GeneralStateTestsFiller/stCreate2/CREATE2_BoundsFiller.json @@ -0,0 +1,66 @@ +{ + "CREATE2_Bounds" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "// currentGasLimit" : "2^63-1", + "currentGasLimit" : "0x7fffffffffffffff", + "currentNumber" : "1", + "currentTimestamp" : "1000", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "1000000000000000000000000000000000000000" : { + "balance" : "100" + }, + "13136008b64ff592819b2fa6d43f2835c452020e" : { + "shouldnotexist" : "1" + }, + "7c5a2c91b22d7a9226523d4ba717db6afb741ebd" : { + "shouldnotexist" : "1" + } + } + } + ], + "pre" : + { + "1000000000000000000000000000000000000000" : { + "balance" : "100", + "code" : "{ (MSTORE 0 0x6001600155601080600c6000396000f3006000355415600957005b6020356000 ) (MSTORE8 32 0x35) (MSTORE8 33 0x55) (CREATE2 1 0 0 0) (CREATE2 1 0 0xfffffff 0) }", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0xfffffffffffffffffffffffffffffffffffffffffffffffff", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "150000", "250000000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "1000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stCreate2/call_outsize_then_create2_successful_then_returndatasizeFiller.json b/src/GeneralStateTestsFiller/stCreate2/call_outsize_then_create2_successful_then_returndatasizeFiller.json new file mode 100644 index 000000000..b68e09125 --- /dev/null +++ b/src/GeneralStateTestsFiller/stCreate2/call_outsize_then_create2_successful_then_returndatasizeFiller.json @@ -0,0 +1,83 @@ +{ + "call_outsize_then_create2_successful_then_returndatasize" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Byzantium"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x01" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x00" + } + } + } + } + ], + "pre" : { + "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "{ (seq (MSTORE 0 0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff) (RETURN 0 32)) }", + "nonce" : "0x00", + "storage" : { + } + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "{ (seq (CALL 0x0900000000 0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 0x20) (CREATE2 0 0 (lll (seq (mstore 0 0x112233) (RETURN 0 32)) 0) 0) (SSTORE 0 (RETURNDATASIZE)) )}", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01" + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x6400000000", + "code" : "", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "0x0a00000000" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "value" : [ + "0x00" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stCreate2/call_then_create2_successful_then_returndatasizeFiller.json b/src/GeneralStateTestsFiller/stCreate2/call_then_create2_successful_then_returndatasizeFiller.json new file mode 100644 index 000000000..5ede8fe2d --- /dev/null +++ b/src/GeneralStateTestsFiller/stCreate2/call_then_create2_successful_then_returndatasizeFiller.json @@ -0,0 +1,86 @@ +{ + "call_then_create2_successful_then_returndatasize" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Byzantium"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x01" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "5355afe749918b112bf6385abc4525f74c7c6c60" : { + "code" : "0x0000000000000000000000000000000000000000000000000000000000112233" + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x00" + } + } + } + } + ], + "pre" : { + "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "{ (seq (MSTORE 0 0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff) (RETURN 0 32)) }", + "nonce" : "0x00", + "storage" : { + } + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "{ (seq (CALL 0x0900000000 0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 0) (CREATE2 0 0 (lll (seq (mstore 0 0x112233) (RETURN 0 32)) 0) 0) (SSTORE 0 (RETURNDATASIZE)) )}", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01" + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x6400000000", + "code" : "", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "0x0a00000000" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "value" : [ + "0x00" + ] + } + } +} -- cgit