From eeadf5729d45e8682a808d8ce496e4ca9f8d3ff4 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Mon, 26 Jun 2017 17:54:02 +0200 Subject: Fix a test case that expected staticcall to return successfully even when an SSTORE is attempted --- .../stStaticCall/static_callToStaticOpCodeCheck.json | 17 +++++++++++------ .../static_callToStaticOpCodeCheckFiller.json | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/GeneralStateTests/stStaticCall/static_callToStaticOpCodeCheck.json b/GeneralStateTests/stStaticCall/static_callToStaticOpCodeCheck.json index 3b8cfe53d..c833728e3 100644 --- a/GeneralStateTests/stStaticCall/static_callToStaticOpCodeCheck.json +++ b/GeneralStateTests/stStaticCall/static_callToStaticOpCodeCheck.json @@ -1,5 +1,10 @@ { "static_callToStaticOpCodeCheck" : { + "_info" : { + "comment" : "", + "filledwith" : "cpp-1.3.0+commit.53be05a3.Linux.g++", + "source" : "/src/GeneralStateTestsFiller/stStaticCall/static_callToStaticOpCodeCheckFiller.json" + }, "env" : { "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x20000", @@ -11,7 +16,7 @@ "post" : { "EIP150" : [ { - "hash" : "0x51908849a3a398fb5c365a5fab81558e355499bc37386550e7681bbc0a939a90", + "hash" : "0xf4fae6c9153d7bc9db07d90c1481e2d04fee420a1f5ce32eeeed2480907f7b1c", "indexes" : { "data" : 0, "gas" : 0, @@ -21,7 +26,7 @@ ], "EIP158" : [ { - "hash" : "0x51908849a3a398fb5c365a5fab81558e355499bc37386550e7681bbc0a939a90", + "hash" : "0xf4fae6c9153d7bc9db07d90c1481e2d04fee420a1f5ce32eeeed2480907f7b1c", "indexes" : { "data" : 0, "gas" : 0, @@ -31,7 +36,7 @@ ], "Frontier" : [ { - "hash" : "0x51908849a3a398fb5c365a5fab81558e355499bc37386550e7681bbc0a939a90", + "hash" : "0xf4fae6c9153d7bc9db07d90c1481e2d04fee420a1f5ce32eeeed2480907f7b1c", "indexes" : { "data" : 0, "gas" : 0, @@ -41,7 +46,7 @@ ], "Homestead" : [ { - "hash" : "0x51908849a3a398fb5c365a5fab81558e355499bc37386550e7681bbc0a939a90", + "hash" : "0xf4fae6c9153d7bc9db07d90c1481e2d04fee420a1f5ce32eeeed2480907f7b1c", "indexes" : { "data" : 0, "gas" : 0, @@ -51,7 +56,7 @@ ], "Metropolis" : [ { - "hash" : "0xc7bfb8eee1d22e9f35f09a52d4c3bc927661eedd062495e607caa89404cc677d", + "hash" : "0x84398cb8003abdfdfe57ab2377b14dbd83e4f7633e04f72784e45a387d5998c7", "indexes" : { "data" : 0, "gas" : 0, @@ -77,7 +82,7 @@ }, "0x1000000000000000000000000000000000000002" : { "balance" : "0x0de0b6b3a7640000", - "code" : "0x3273a94f5374fce5edbc8e2a8697c15331677e6ebf0b1460225760026001556028565b60016001525b3373100000000000000000000000000000000000000114604b5760026001556051565b60016001525b30731000000000000000000000000000000000000002146074576002600155607a565b60016001525b34620186a014608c5760026001556092565b60016001525b", + "code" : "0x3273a94f5374fce5edbc8e2a8697c15331677e6ebf0b1460225760026001556028565b60016001525b3373100000000000000000000000000000000000000114604b5760026001556051565b60016001525b30731000000000000000000000000000000000000002146074576002600155607a565b60016001525b34600014608a5760026001556090565b60016001525b", "nonce" : "0x00", "storage" : { } diff --git a/src/GeneralStateTestsFiller/stStaticCall/static_callToStaticOpCodeCheckFiller.json b/src/GeneralStateTestsFiller/stStaticCall/static_callToStaticOpCodeCheckFiller.json index 4e1bf5c1b..7c8537f05 100644 --- a/src/GeneralStateTestsFiller/stStaticCall/static_callToStaticOpCodeCheckFiller.json +++ b/src/GeneralStateTestsFiller/stStaticCall/static_callToStaticOpCodeCheckFiller.json @@ -40,7 +40,7 @@ }, "1000000000000000000000000000000000000002" : { "balance" : "1000000000000000000", - "code" : "{ (if (= 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b (ORIGIN)) (MSTORE 1 1) (SSTORE 1 2) ) (if (= 0x1000000000000000000000000000000000000001 (CALLER)) (MSTORE 1 1) (SSTORE 1 2) ) (if (= 0x1000000000000000000000000000000000000002 (ADDRESS)) (MSTORE 1 1) (SSTORE 1 2) ) (if (= 0x0186a0 (CALLVALUE)) (MSTORE 1 1) (SSTORE 1 2) ) }", + "code" : "{ (if (= 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b (ORIGIN)) (MSTORE 1 1) (SSTORE 1 2) ) (if (= 0x1000000000000000000000000000000000000001 (CALLER)) (MSTORE 1 1) (SSTORE 1 2) ) (if (= 0x1000000000000000000000000000000000000002 (ADDRESS)) (MSTORE 1 1) (SSTORE 1 2) ) (if (= 0 (CALLVALUE)) (MSTORE 1 1) (SSTORE 1 2) ) }", "nonce" : "0", "storage" : { } -- cgit v1.2.3