From 0ac650d23271e22b8390ce1bfb32cff615d2725b Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 12:20:38 +0200 Subject: 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. --- .../stReturnDataTest/returndatacopy_initial.json | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json new file mode 100644 index 000000000..dafb4a828 --- /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" + ] + } + } +} -- cgit v1.2.3 From f2e23c310ba47740e9e103a24ed81dfbec7c0916 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 12:31:00 +0200 Subject: Renaming a filter file with a suffix Filter.json --- .../stReturnDataTest/returndatacopy_initial.json | 74 ---------------------- .../returndatacopy_initialFilter.json | 74 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 74 deletions(-) delete mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json deleted file mode 100644 index dafb4a828..000000000 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initial.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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" - ] - } - } -} diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json new file mode 100644 index 000000000..dafb4a828 --- /dev/null +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.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" + ] + } + } +} -- cgit v1.2.3 From 00fd1fe8d0367a465ac4c420ff8adbd71575a832 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 12:38:59 +0200 Subject: Change the code into LLL --- .../stReturnDataTest/returndatacopy_initialFilter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json index dafb4a828..0c80170a9 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" -- cgit v1.2.3 From 89c3e4073d2f5379c788b5c33a2b84a2675bd54f Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 12:45:37 +0200 Subject: Fix LLL --- .../stReturnDataTest/returndatacopy_initialFilter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json index 0c80170a9..63e96a704 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" -- cgit v1.2.3 From ef8c548d79ce30ac93b6da5bc0656fc35cfb330d Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 13:56:35 +0200 Subject: Rename Filter.json into Filler.json --- .../returndatacopy_initialFiller.json | 74 ++++++++++++++++++++++ .../returndatacopy_initialFilter.json | 74 ---------------------- 2 files changed, 74 insertions(+), 74 deletions(-) create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json delete mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json new file mode 100644 index 000000000..63e96a704 --- /dev/null +++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.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" : "(MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (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" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json deleted file mode 100644 index 63e96a704..000000000 --- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFilter.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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" : "(MSTORE 0 0x112233445566778899aabbccddeeff) (RETURNDATACOPY 32 0 0) (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" - ] - } - } -} -- cgit v1.2.3 From fe4da95a7cf20beb151e28b767a774bd281a3304 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 14:01:04 +0200 Subject: The LLL code should be in braces --- .../stReturnDataTest/returndatacopy_initialFiller.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json index 63e96a704..4ac783505 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" -- cgit v1.2.3 From c9e430ae068b2ddea8135b97e4e33f81f84ea22c Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 12 May 2017 14:25:59 +0200 Subject: Fallback on the hex code while lllc implements RETURNDATACOPY --- .../stReturnDataTest/returndatacopy_initialFiller.json | 1 + 1 file changed, 1 insertion(+) (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_initialFiller.json index 4ac783505..ce2e8a0dc 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" -- cgit v1.2.3 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 --- .../returndatasize_initialFiller.json | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_initialFiller.json new file mode 100644 index 000000000..3086b9a5b --- /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" + ] + } + } +} -- cgit v1.2.3 From 07567bbe7f0d60b5086f38c5653a1598f0a6c9a0 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 16 May 2017 14:20:00 +0200 Subject: 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 (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json new file mode 100644 index 000000000..973740481 --- /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" + ] + } + } +} -- cgit v1.2.3 From 93145aac182224a4ebe9bde818e06accd4d2e2f8 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 16 May 2017 19:35:20 +0200 Subject: Add a test for RETURNDATACOPY following a successful CALL --- .../returndatacopy_following_callFiller.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json index 973740481..6d0e4e009 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" -- cgit v1.2.3 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 --- .../stReturnDataTest/returndatacopy_following_callFiller.json | 2 +- .../stReturnDataTest/returndatacopy_initialFiller.json | 4 ++-- .../stReturnDataTest/returndatasize_initialFiller.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_callFiller.json index 6d0e4e009..2a226f29d 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 ce2e8a0dc..872f609b1 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 3086b9a5b..95fb6a6ad 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" -- cgit v1.2.3 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 --- .../returndatacopy_overrunFiller.json | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_overrunFiller.json (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_overrunFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_overrunFiller.json new file mode 100644 index 000000000..e4cc87fbd --- /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" + ] + } + } +} -- cgit v1.2.3 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_createFiller.json | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_createFiller.json (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_createFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_following_createFiller.json new file mode 100644 index 000000000..14d0a9e04 --- /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" + ] + } + } +} -- cgit v1.2.3