From 0e1f9dccc0903fd1add00ed73f046827b21774ef Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 15:43:23 +0200 Subject: Add the filled test --- .../stReturnDataTest/returndatacopy_initial.json | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 GeneralStateTests/stReturnDataTest/returndatacopy_initial.json (limited to 'GeneralStateTests') diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json b/GeneralStateTests/stReturnDataTest/returndatacopy_initial.json new file mode 100644 index 000000000..2c85216d1 --- /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 -- cgit From 6bbd11b0206aa913c6393f6ac33a205853a11588 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 16 May 2017 13:15:35 +0200 Subject: Add a test case about RETURNDATASIZE returning zero after initialization --- .../stReturnDataTest/returndatasize_initial.json | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 GeneralStateTests/stReturnDataTest/returndatasize_initial.json (limited to 'GeneralStateTests') diff --git a/GeneralStateTests/stReturnDataTest/returndatasize_initial.json b/GeneralStateTests/stReturnDataTest/returndatasize_initial.json new file mode 100644 index 000000000..70568e72b --- /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 -- cgit From 016a937813e1ce3c90159bd13abf2d1801c942a5 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Wed, 17 May 2017 15:49:08 +0200 Subject: Updated the opcodes of RETURNDATA instructions --- .../returndatacopy_following_call.json | 103 +++++++++++++++++++++ .../stReturnDataTest/returndatacopy_initial.json | 12 +-- .../stReturnDataTest/returndatasize_initial.json | 14 +-- 3 files changed, 116 insertions(+), 13 deletions(-) create mode 100644 GeneralStateTests/stReturnDataTest/returndatacopy_following_call.json (limited to 'GeneralStateTests') diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_following_call.json b/GeneralStateTests/stReturnDataTest/returndatacopy_following_call.json new file mode 100644 index 000000000..9550268d3 --- /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 2c85216d1..5a66b1712 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 70568e72b..f2b2c0507 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" -- cgit From ff74cc8adc44313d94370bbaba9f4f7cb43a8f8c Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Wed, 17 May 2017 17:06:33 +0200 Subject: Add a test case for a RETURNDATACOPY from an overrunning range --- .../stReturnDataTest/returndatacopy_overrun.json | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 GeneralStateTests/stReturnDataTest/returndatacopy_overrun.json (limited to 'GeneralStateTests') diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_overrun.json b/GeneralStateTests/stReturnDataTest/returndatacopy_overrun.json new file mode 100644 index 000000000..2050e6a82 --- /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 -- cgit From 481198be6ddfcf75de33b9b46171ab91f82e71d3 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Wed, 17 May 2017 17:21:26 +0200 Subject: Add tests for RETURNDATACOPY after CREATE --- .../returndatacopy_following_create.json | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 GeneralStateTests/stReturnDataTest/returndatacopy_following_create.json (limited to 'GeneralStateTests') diff --git a/GeneralStateTests/stReturnDataTest/returndatacopy_following_create.json b/GeneralStateTests/stReturnDataTest/returndatacopy_following_create.json new file mode 100644 index 000000000..0f592feb9 --- /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 -- cgit