From b9b9141b3cdd9f72dc5b59bd00f04339290df10c Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 12:20:38 +0200 Subject: [PATCH 01/14] Add a test filter for RETURNDATACOPY initially copying zeros ; hex description ;; store some non-zero word into memory [0..31] 30 ADDRESS 6000 PUSH1 [0] 52 MSTORE ;; RETURNDATACOPY should copy the first word into memory [0..31] 6020 PUSH1 [32] 6000 PUSH1 [0] 6000 PUSH1 [0] 0e RETURNDATACOPY ;; load memory[0..31] onto stack 6000 PUSH1 [0] 51 MLOAD ;; store the topmost stack into storage [0] 6000 PUSH1 [0] 55 SSTORE ;; an implicit `STOP` follows. --- .../returndatacopy_initial.json | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json new file mode 100644 index 00000000000..dafb4a828a6 --- /dev/null +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json @@ -0,0 +1,74 @@ +{ + "returndatacopy_initial" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150", "EIP158", "Frontier", "Homestead"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x01" + } + } + } + }, + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Metropolis"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x00" + } + } + } + } + ], + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x306000526020600060000e600051600055", + "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" + ] + } + } +} From 48287dd9830481b5eaf026320115753a356123e0 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 12:31:00 +0200 Subject: [PATCH 02/14] Renaming a filter file with a suffix Filter.json --- ...urndatacopy_initial.json => returndatacopy_initialFilter.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/GeneralStateTestsFiller/stReturnDataTest/{returndatacopy_initial.json => returndatacopy_initialFilter.json} (100%) diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json similarity index 100% rename from src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json rename to src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json From daa5c6950e08cf9f5585044d5695d64f7b1c90de Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 12:38:59 +0200 Subject: [PATCH 03/14] Change the code into LLL --- .../stReturnDataTest/returndatacopy_initialFilter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json index dafb4a828a6..0c80170a9d6 100644 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json @@ -41,7 +41,7 @@ "pre" : { "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", - "code" : "0x306000526020600060000e600051600055", + "code" : "(MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (MLOAD 0) (SSTORE 0)", "nonce" : "0x00", "storage" : { "0x00" : "0x01" From 2ecd8da9f603d709a3182bfd4e9b3959b6449587 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 12:45:37 +0200 Subject: [PATCH 04/14] Fix LLL --- .../stReturnDataTest/returndatacopy_initialFilter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json index 0c80170a9d6..63e96a7046d 100644 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json @@ -41,7 +41,7 @@ "pre" : { "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", - "code" : "(MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (MLOAD 0) (SSTORE 0)", + "code" : "(MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (SSTORE 0 (MLOAD 0))", "nonce" : "0x00", "storage" : { "0x00" : "0x01" From 44ef5c1a14820a8fb1aed2211f560760d3641406 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 13:56:35 +0200 Subject: [PATCH 05/14] Rename Filter.json into Filler.json --- ...acopy_initialFilter.json => returndatacopy_initialFiller.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/GeneralStateTestsFiller/stReturnDataTest/{returndatacopy_initialFilter.json => returndatacopy_initialFiller.json} (100%) diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json similarity index 100% rename from src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json rename to src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json From 1c7c27d51392dd0172035f245ce71055d3f1cb11 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 14:01:04 +0200 Subject: [PATCH 06/14] The LLL code should be in braces --- .../stReturnDataTest/returndatacopy_initialFiller.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json index 63e96a7046d..4ac7835051d 100644 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json @@ -41,7 +41,7 @@ "pre" : { "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", - "code" : "(MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (SSTORE 0 (MLOAD 0))", + "code" : "{ (MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (SSTORE 0 (MLOAD 0)) }", "nonce" : "0x00", "storage" : { "0x00" : "0x01" From 7349f268624c4da0e9fef42c89a6f159ba9b7767 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 14:25:59 +0200 Subject: [PATCH 07/14] Fallback on the hex code while lllc implements RETURNDATACOPY --- .../stReturnDataTest/returndatacopy_initialFiller.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json index 4ac7835051d..ce2e8a0dce0 100644 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json @@ -42,6 +42,7 @@ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", "code" : "{ (MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (SSTORE 0 (MLOAD 0)) }", + "code" : "0x306000526020600060000e600051600055", "nonce" : "0x00", "storage" : { "0x00" : "0x01" From daad4766c611c03ee521c36225961dfdbc099f1b Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 15:43:23 +0200 Subject: [PATCH 08/14] Add the filled test --- .../returndatacopy_initial.json | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 GeneralStateTests/stReturnDataTest/returndatacopy_initial.json diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json b/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json new file mode 100644 index 00000000000..2c85216d126 --- /dev/null +++ b/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json @@ -0,0 +1,96 @@ +{ + "returndatacopy_initial" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "EIP150" : [ + { + "hash" : "0x4baeeffbe9c16ad39612809ecc9b3b4a770457fda21fc53a2d4f0421be8bdc0d", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "EIP158" : [ + { + "hash" : "0x4baeeffbe9c16ad39612809ecc9b3b4a770457fda21fc53a2d4f0421be8bdc0d", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Frontier" : [ + { + "hash" : "0x4baeeffbe9c16ad39612809ecc9b3b4a770457fda21fc53a2d4f0421be8bdc0d", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Homestead" : [ + { + "hash" : "0x4baeeffbe9c16ad39612809ecc9b3b4a770457fda21fc53a2d4f0421be8bdc0d", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Metropolis" : [ + { + "hash" : "0x8663facd02a82a5cc12e5cdc13e1f71d588f3879e5e112599f2c4d5eb0d76048", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ] + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x306000526020600060000e600051600055", + "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" + ] + } + } +} \ No newline at end of file From b7dbd8c298156f24d5809c5f8e2f6ed43ae3e01e Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 16 May 2017 13:15:35 +0200 Subject: [PATCH 09/14] Add a test case about RETURNDATASIZE returning zero after initialization --- .../returndatasize_initial.json | 96 +++++++++++++++++++ .../returndatasize_initialFiller.json | 75 +++++++++++++++ 2 files changed, 171 insertions(+) create mode 100644 GeneralStateTests/stReturnDataTest/returndatasize_initial.json create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json diff --git a/GeneralStateTests/stReturnDataTest/returndatasize_initial.json b/GeneralStateTests/stReturnDataTest/returndatasize_initial.json new file mode 100644 index 00000000000..70568e72b88 --- /dev/null +++ b/GeneralStateTests/stReturnDataTest/returndatasize_initial.json @@ -0,0 +1,96 @@ +{ + "returndatacopy_initial" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "EIP150" : [ + { + "hash" : "0x1b8b9fece92a631df1c3b962b8844eb113d9152b2c36f16cd918a767bfb97853", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "EIP158" : [ + { + "hash" : "0x1b8b9fece92a631df1c3b962b8844eb113d9152b2c36f16cd918a767bfb97853", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Frontier" : [ + { + "hash" : "0x1b8b9fece92a631df1c3b962b8844eb113d9152b2c36f16cd918a767bfb97853", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Homestead" : [ + { + "hash" : "0x1b8b9fece92a631df1c3b962b8844eb113d9152b2c36f16cd918a767bfb97853", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Metropolis" : [ + { + "hash" : "0x20af5710d071e985daf5441dc6b85fd1cdd3f70187fcc87ab15b3824420e5bff", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ] + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x0d600055", + "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" + ] + } + } +} \ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json new file mode 100644 index 00000000000..3086b9a5b78 --- /dev/null +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json @@ -0,0 +1,75 @@ +{ + "returndatacopy_initial" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150", "EIP158", "Frontier", "Homestead"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x01" + } + } + } + }, + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Metropolis"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x00" + } + } + } + } + ], + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "{ (SSTORE 0 (RETURNDATASIZE)) }", + "code" : "0x0d600055", + "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" + ] + } + } +} From 8b8332f89553f03439b357240bd0b680d7618ffc Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 16 May 2017 14:20:00 +0200 Subject: [PATCH 10/14] WIP: hand-assembling this code seems like too much work --- .../returndatacopy_following_callFiller.json | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json new file mode 100644 index 00000000000..97374048195 --- /dev/null +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json @@ -0,0 +1,79 @@ +{ + "returndatacopy_initial" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150", "EIP158", "Frontier", "Homestead"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x01" + } + } + } + }, + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Metropolis"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x00" + } + } + } + } + ], + "pre" : { + "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { + "code" : "{ (MSTORE 0 0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff) (RETURN 0 32) }", + "nonce" : "0x00", + "storage" : { + } + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "code" : "{ (CALL 0x0900000000 0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 32) (RETURNDATACOPY 0 0 32) (SSTORE 0 (MLOAD 0)) }", + "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" + ] + } + } +} From 70d3297b1e37b6c3895bcfee432f71d04ad2316a Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 16 May 2017 19:35:20 +0200 Subject: [PATCH 11/14] Add a test for RETURNDATACOPY following a successful CALL --- .../returndatacopy_following_callFiller.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json index 97374048195..6d0e4e009a3 100644 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json @@ -1,5 +1,5 @@ { - "returndatacopy_initial" : { + "returndatacopy_following_call" : { "env" : { "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x20000", @@ -32,7 +32,7 @@ "result" : { "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "storage" : { - "0x00" : "0x00" + "0x00" : "0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" } } } @@ -40,13 +40,17 @@ ], "pre" : { "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { - "code" : "{ (MSTORE 0 0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff) (RETURN 0 32) }", + "balance" : "0x00", + "code" : "{ (seq (MSTORE 0 0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff) (RETURN 0 32)) }", + "code" : "0x7d111122223333444455556666777788889999aaaabbbbccccddddeeeeffff60005260206000f3", "nonce" : "0x00", "storage" : { } }, "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "code" : "{ (CALL 0x0900000000 0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 32) (RETURNDATACOPY 0 0 32) (SSTORE 0 (MLOAD 0)) }", + "balance" : "0x00", + "code" : "{ (seq (CALL 0x0900000000 0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 0) (RETURNDATACOPY 0 0 32) (SSTORE 0 (MLOAD 0)) )}", + "code" : "0x60206000600060006000730aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6640900000000f1506020600060000e600051600055", "nonce" : "0x00", "storage" : { "0x00" : "0x01" From 0d2c7affb9e6d92960beb5dc4c1940c58b70ecb5 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Wed, 17 May 2017 15:49:08 +0200 Subject: [PATCH 12/14] Updated the opcodes of RETURNDATA instructions --- .../returndatacopy_following_call.json | 103 ++++++++++++++++++ .../returndatacopy_initial.json | 12 +- .../returndatasize_initial.json | 14 +-- .../returndatacopy_following_callFiller.json | 2 +- .../returndatacopy_initialFiller.json | 4 +- .../returndatasize_initialFiller.json | 4 +- 6 files changed, 121 insertions(+), 18 deletions(-) create mode 100644 GeneralStateTests/stReturnDataTest/returndatacopy_following_call.json diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_following_call.json b/GeneralStateTests/stReturnDataTest/returndatacopy_following_call.json new file mode 100644 index 00000000000..9550268d3ac --- /dev/null +++ b/GeneralStateTests/stReturnDataTest/returndatacopy_following_call.json @@ -0,0 +1,103 @@ +{ + "returndatacopy_following_call" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "EIP150" : [ + { + "hash" : "0x061f5bb243c3e77ee12372acc7b2cf560126330c6088354f095250cd63d49e55", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "EIP158" : [ + { + "hash" : "0x061f5bb243c3e77ee12372acc7b2cf560126330c6088354f095250cd63d49e55", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Frontier" : [ + { + "hash" : "0x061f5bb243c3e77ee12372acc7b2cf560126330c6088354f095250cd63d49e55", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Homestead" : [ + { + "hash" : "0x061f5bb243c3e77ee12372acc7b2cf560126330c6088354f095250cd63d49e55", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Metropolis" : [ + { + "hash" : "0xd22ea08bfc615bf36895e7dd11f6ee3008478804a753b6e054313dfba40e3e89", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ] + }, + "pre" : { + "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "0x7d111122223333444455556666777788889999aaaabbbbccccddddeeeeffff60005260206000f3", + "nonce" : "0x00", + "storage" : { + } + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "0x60206000600060006000730aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6640900000000f1506020600060003e600051600055", + "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" + ] + } + } +} \ No newline at end of file diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json b/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json index 2c85216d126..5a66b171258 100644 --- a/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json +++ b/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json @@ -11,7 +11,7 @@ "post" : { "EIP150" : [ { - "hash" : "0x4baeeffbe9c16ad39612809ecc9b3b4a770457fda21fc53a2d4f0421be8bdc0d", + "hash" : "0x51fa6c22b1b427de2747dacac21004dd65d69e8e117fdbeee5163f66b25c5e91", "indexes" : { "data" : 0, "gas" : 0, @@ -21,7 +21,7 @@ ], "EIP158" : [ { - "hash" : "0x4baeeffbe9c16ad39612809ecc9b3b4a770457fda21fc53a2d4f0421be8bdc0d", + "hash" : "0x51fa6c22b1b427de2747dacac21004dd65d69e8e117fdbeee5163f66b25c5e91", "indexes" : { "data" : 0, "gas" : 0, @@ -31,7 +31,7 @@ ], "Frontier" : [ { - "hash" : "0x4baeeffbe9c16ad39612809ecc9b3b4a770457fda21fc53a2d4f0421be8bdc0d", + "hash" : "0x51fa6c22b1b427de2747dacac21004dd65d69e8e117fdbeee5163f66b25c5e91", "indexes" : { "data" : 0, "gas" : 0, @@ -41,7 +41,7 @@ ], "Homestead" : [ { - "hash" : "0x4baeeffbe9c16ad39612809ecc9b3b4a770457fda21fc53a2d4f0421be8bdc0d", + "hash" : "0x51fa6c22b1b427de2747dacac21004dd65d69e8e117fdbeee5163f66b25c5e91", "indexes" : { "data" : 0, "gas" : 0, @@ -51,7 +51,7 @@ ], "Metropolis" : [ { - "hash" : "0x8663facd02a82a5cc12e5cdc13e1f71d588f3879e5e112599f2c4d5eb0d76048", + "hash" : "0x9dd2a23ed077511b9f432902b87cbaae380db486d3ac001a430e2909e9dea5d8", "indexes" : { "data" : 0, "gas" : 0, @@ -63,7 +63,7 @@ "pre" : { "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", - "code" : "0x306000526020600060000e600051600055", + "code" : "0x306000526020600060003e600051600055", "nonce" : "0x00", "storage" : { "0x00" : "0x01" diff --git a/GeneralStateTests/stReturnDataTest/returndatasize_initial.json b/GeneralStateTests/stReturnDataTest/returndatasize_initial.json index 70568e72b88..f2b2c050775 100644 --- a/GeneralStateTests/stReturnDataTest/returndatasize_initial.json +++ b/GeneralStateTests/stReturnDataTest/returndatasize_initial.json @@ -1,5 +1,5 @@ { - "returndatacopy_initial" : { + "returndatasize_initial" : { "env" : { "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x20000", @@ -11,7 +11,7 @@ "post" : { "EIP150" : [ { - "hash" : "0x1b8b9fece92a631df1c3b962b8844eb113d9152b2c36f16cd918a767bfb97853", + "hash" : "0x9b8c375714148b298ab9ddfb4fa982bf0a5b6e6055a2d3cc2380282f962a4993", "indexes" : { "data" : 0, "gas" : 0, @@ -21,7 +21,7 @@ ], "EIP158" : [ { - "hash" : "0x1b8b9fece92a631df1c3b962b8844eb113d9152b2c36f16cd918a767bfb97853", + "hash" : "0x9b8c375714148b298ab9ddfb4fa982bf0a5b6e6055a2d3cc2380282f962a4993", "indexes" : { "data" : 0, "gas" : 0, @@ -31,7 +31,7 @@ ], "Frontier" : [ { - "hash" : "0x1b8b9fece92a631df1c3b962b8844eb113d9152b2c36f16cd918a767bfb97853", + "hash" : "0x9b8c375714148b298ab9ddfb4fa982bf0a5b6e6055a2d3cc2380282f962a4993", "indexes" : { "data" : 0, "gas" : 0, @@ -41,7 +41,7 @@ ], "Homestead" : [ { - "hash" : "0x1b8b9fece92a631df1c3b962b8844eb113d9152b2c36f16cd918a767bfb97853", + "hash" : "0x9b8c375714148b298ab9ddfb4fa982bf0a5b6e6055a2d3cc2380282f962a4993", "indexes" : { "data" : 0, "gas" : 0, @@ -51,7 +51,7 @@ ], "Metropolis" : [ { - "hash" : "0x20af5710d071e985daf5441dc6b85fd1cdd3f70187fcc87ab15b3824420e5bff", + "hash" : "0x5d0ec58a88cf3f6d6f3c7fd229003c587b7f1811e4b0471c588b8a65f0ced347", "indexes" : { "data" : 0, "gas" : 0, @@ -63,7 +63,7 @@ "pre" : { "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", - "code" : "0x0d600055", + "code" : "0x3d600055", "nonce" : "0x00", "storage" : { "0x00" : "0x01" diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json index 6d0e4e009a3..2a226f29dcc 100644 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json @@ -50,7 +50,7 @@ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x00", "code" : "{ (seq (CALL 0x0900000000 0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 0) (RETURNDATACOPY 0 0 32) (SSTORE 0 (MLOAD 0)) )}", - "code" : "0x60206000600060006000730aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6640900000000f1506020600060000e600051600055", + "code" : "0x60206000600060006000730aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6640900000000f1506020600060003e600051600055", "nonce" : "0x00", "storage" : { "0x00" : "0x01" diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json index ce2e8a0dce0..872f609b1b0 100644 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json @@ -41,8 +41,8 @@ "pre" : { "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", - "code" : "{ (MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (SSTORE 0 (MLOAD 0)) }", - "code" : "0x306000526020600060000e600051600055", + "code" : "{ (MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 0 0 32) (SSTORE 0 (MLOAD 0)) }", + "code" : "0x306000526020600060003e600051600055", "nonce" : "0x00", "storage" : { "0x00" : "0x01" diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json index 3086b9a5b78..95fb6a6ad92 100644 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json @@ -1,5 +1,5 @@ { - "returndatacopy_initial" : { + "returndatasize_initial" : { "env" : { "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x20000", @@ -42,7 +42,7 @@ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", "code" : "{ (SSTORE 0 (RETURNDATASIZE)) }", - "code" : "0x0d600055", + "code" : "0x3d600055", "nonce" : "0x00", "storage" : { "0x00" : "0x01" From 4cf3d6659ff8b6b86311387e7a27fee1694e0e41 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Wed, 17 May 2017 17:06:33 +0200 Subject: [PATCH 13/14] Add a test case for a RETURNDATACOPY from an overrunning range --- .../returndatacopy_overrun.json | 103 ++++++++++++++++++ .../returndatacopy_overrunFiller.json | 82 ++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 GeneralStateTests/stReturnDataTest/returndatacopy_overrun.json create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_overrunFiller.json diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_overrun.json b/GeneralStateTests/stReturnDataTest/returndatacopy_overrun.json new file mode 100644 index 00000000000..2050e6a820f --- /dev/null +++ b/GeneralStateTests/stReturnDataTest/returndatacopy_overrun.json @@ -0,0 +1,103 @@ +{ + "returndatacopy_overrun" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "EIP150" : [ + { + "hash" : "0xb313ca207736a8149d8c25df1c1735bdecbaf9b58b17065dab26e7e95b6cf7ff", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "EIP158" : [ + { + "hash" : "0xb313ca207736a8149d8c25df1c1735bdecbaf9b58b17065dab26e7e95b6cf7ff", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Frontier" : [ + { + "hash" : "0xb313ca207736a8149d8c25df1c1735bdecbaf9b58b17065dab26e7e95b6cf7ff", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Homestead" : [ + { + "hash" : "0xb313ca207736a8149d8c25df1c1735bdecbaf9b58b17065dab26e7e95b6cf7ff", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Metropolis" : [ + { + "hash" : "0xdd6f5af19886871166abcdf0fb36e713d2ace0dad4b41039f3dce49875c574fc", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ] + }, + "pre" : { + "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "0x7d111122223333444455556666777788889999aaaabbbbccccddddeeeeffff60005260206000f3", + "nonce" : "0x00", + "storage" : { + } + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "0x60006000600060006000730aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6640900000000f15060647ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60003e600051600055", + "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" + ] + } + } +} \ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_overrunFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_overrunFiller.json new file mode 100644 index 00000000000..e4cc87fbdfb --- /dev/null +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_overrunFiller.json @@ -0,0 +1,82 @@ +{ + "returndatacopy_overrun" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150", "EIP158", "Frontier", "Homestead"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x01" + } + } + } + }, + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Metropolis"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + } + } + ], + "pre" : { + "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "{ (seq (MSTORE 0 0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff) (RETURN 0 32)) }", + "code" : "0x7d111122223333444455556666777788889999aaaabbbbccccddddeeeeffff60005260206000f3", + "nonce" : "0x00", + "storage" : { + } + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "{ (seq (CALL 0x0900000000 0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 0) (RETURNDATACOPY 0 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc 100) (SSTORE 0 (MLOAD 0)) )}", + "code" : "0x60006000600060006000730aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6640900000000f15060647ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60003e600051600055", + "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" + ] + } + } +} From 0f016efe0167b85a2fe8611d1af1f3d11809529e Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Wed, 17 May 2017 17:21:26 +0200 Subject: [PATCH 14/14] Add tests for RETURNDATACOPY after CREATE --- .../returndatacopy_following_create.json | 103 ++++++++++++++++++ ...returndatacopy_following_createFiller.json | 82 ++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 GeneralStateTests/stReturnDataTest/returndatacopy_following_create.json create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_createFiller.json diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_following_create.json b/GeneralStateTests/stReturnDataTest/returndatacopy_following_create.json new file mode 100644 index 00000000000..0f592feb954 --- /dev/null +++ b/GeneralStateTests/stReturnDataTest/returndatacopy_following_create.json @@ -0,0 +1,103 @@ +{ + "returndatacopy_following_create" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "EIP150" : [ + { + "hash" : "0xf7b621e953cb638b315fa40cb8a978a4b99c727e701a12cea0de5f298e3c01c8", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "EIP158" : [ + { + "hash" : "0xf7b621e953cb638b315fa40cb8a978a4b99c727e701a12cea0de5f298e3c01c8", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Frontier" : [ + { + "hash" : "0xf7b621e953cb638b315fa40cb8a978a4b99c727e701a12cea0de5f298e3c01c8", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Homestead" : [ + { + "hash" : "0xf7b621e953cb638b315fa40cb8a978a4b99c727e701a12cea0de5f298e3c01c8", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ], + "Metropolis" : [ + { + "hash" : "0x76dd41a43dfc39fe6cafe9bfaa661783235929e3716b5bd9fa2f590454474033", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + } + } + ] + }, + "pre" : { + "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "0x7d111122223333444455556666777788889999aaaabbbbccccddddeeeeffff60005260206000f3", + "nonce" : "0x00", + "storage" : { + } + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "0x596000526001806022600051396000516000f0506020600060003e6000516000550000", + "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" + ] + } + } +} \ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_createFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_createFiller.json new file mode 100644 index 00000000000..14d0a9e04ad --- /dev/null +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_createFiller.json @@ -0,0 +1,82 @@ +{ + "returndatacopy_following_create" : { + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "0x0a00000000", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150", "EIP158", "Frontier", "Homestead"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x00" : "0x01" + } + } + } + }, + { "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Metropolis"], + "result" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + } + } + ], + "pre" : { + "0x0aabbccdd5c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "{ (seq (MSTORE 0 0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff) (RETURN 0 32)) }", + "code" : "0x7d111122223333444455556666777788889999aaaabbbbccccddddeeeeffff60005260206000f3", + "nonce" : "0x00", + "storage" : { + } + }, + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x00", + "code" : "{ (seq (create (STOP)) (RETURNDATACOPY 0 0 32) (SSTORE 0 (MLOAD 0)) )}", + "code" : "0x596000526001806022600051396000516000f0506020600060003e6000516000550000", + "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" + ] + } + } +}