aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitry <dimitry@ethereum.org>2018-10-18 20:08:14 +0800
committerDimitry <dimitry@ethereum.org>2018-10-18 20:08:14 +0800
commitc9cabfdf75ce9b2e81a57b009d8e7505eae1eded (patch)
treed7655ed87d9c3aedf35025b47204e94d37b96a28 /src
parent262f787d154bf35625a3b87f31c4132567a79456 (diff)
downloaddexon-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar
dexon-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.gz
dexon-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.bz2
dexon-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.lz
dexon-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.xz
dexon-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.zst
dexon-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.zip
sstore xxx tests
Diffstat (limited to 'src')
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json163
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json164
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0Filler.json163
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0toXFiller.json161
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json154
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json154
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0to0Filler.json156
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json153
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXto0Filler.json160
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json153
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXto0Filler.json204
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXtoXFiller.json207
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXtoYFiller.json207
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json156
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoXFiller.json207
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoYFiller.json207
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoZFiller.json207
17 files changed, 2701 insertions, 275 deletions
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json
index b1b835bc0..84fbc4e90 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json
@@ -1,5 +1,5 @@
{
- "sstore_0to0to0" : {
+ "sstore_0to0to0" : {
"_info" : {
"comment" : "change 0 -> 0 -> 0"
},
@@ -13,34 +13,130 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "5ab0be3fbe4aaa2f3ca318e8b0db57a1dd2439ce" : {
- "storage" : {
- "0x00" : "0x01",
- "0x01" : "0x00"
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x00",
- "0x01" : "0x00",
- "0x02" : "0x01"
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
- "0x01" : "0x00",
- "0x02" : "0x01"
}
},
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999780967"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "5486501a7e3b1b272dad4be3c87a0d9388a00562" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -54,42 +150,49 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 0 [[0]] 0 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 0) (SSTORE 1 0) (SSTORE 1 0) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x00"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[1]] 0 [[1]] 0 [[2]] 1 }",
+ "code" : "{ [[1]] 0 [[1]] 0 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
},
"c000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[1]] 0 [[1]] 0 }",
+ "code" : "{ [[1]] 0 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 0) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 0) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json
index 2d2460df5..d5b0c56bc 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json
@@ -1,5 +1,5 @@
{
- "sstore_0to0toX" : {
+ "sstore_0to0toX" : {
"_info" : {
"comment" : "change 0 -> 0 -> X"
},
@@ -13,34 +13,133 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "321cffa8e30eb2ac4ca65a883168da43dd28b786" : {
- "storage" : {
- "0x00" : "0x01",
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
"0x01" : "0x01"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x01",
- "0x01" : "0x01",
- "0x02" : "0x01"
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
- "0x01" : "0x01",
- "0x02" : "0x01"
}
},
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999702385"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "2ecb1801090f875d34cf5315af3eccb7db4b5794" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -54,42 +153,49 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 0 [[0]] 1 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 0) (SSTORE 1 0) (SSTORE 1 1) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x00"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[1]] 1 [[2]] 1 }",
+ "code" : "{ [[1]] 0 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
},
"c000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[1]] 1 [[1]] 0 }",
+ "code" : "{ [[1]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 0) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 0) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0Filler.json
index 796d38b37..fd05f6944 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0Filler.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0Filler.json
@@ -1,5 +1,5 @@
{
- "sstore_0toXto0" : {
+ "sstore_0toXto0" : {
"_info" : {
"comment" : "change 0 -> X -> 0"
},
@@ -13,34 +13,130 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "8bd338f565efe2625da6de13233722ec91cbf03c" : {
- "storage" : {
- "0x00" : "0x01",
- "0x01" : "0x00"
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x00",
- "0x01" : "0x00",
- "0x02" : "0x01"
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
- "0x01" : "0x00",
- "0x02" : "0x01"
}
},
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999781585"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "24406c20149d7dc74e360dbce32250be9450a0e4" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -54,42 +150,49 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 1 [[0]] 0 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 0) (SSTORE 1 1) (SSTORE 1 0) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x00"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 }",
+ "code" : "{ [[1]] 1 [[1]] 0 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
},
"c000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 1 [[1]] 0 }",
+ "code" : "{ [[1]] 1 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0toXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0toXFiller.json
index bea507cdd..29602bd87 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0toXFiller.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0toXFiller.json
@@ -13,30 +13,132 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "ed443bcd15fddef7ad2771e49b6cd6e2927e3c6a" : {
- "storage" : {
- "0x00" : "0x01",
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
"0x01" : "0x01"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "092ce10b2baf6c340022c704c6aca987aef73ada" : {
"storage" : {
"0x00" : "0x01",
- "0x01" : "0x01",
- "0x02" : "0x01"
+ "0x01" : "0x01"
}
},
- "b000000000000000000000000000000000000000" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
"storage" : {
- "0x01" : "0x01",
- "0x02" : "0x01"
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
}
}
}
@@ -51,42 +153,49 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 1 [[0]] 0 [[0]] 1 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 0) (SSTORE 1 1) (SSTORE 1 0) (SSTORE 1 1) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x00"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 1 [[1]] 0 [[1]] 1 [[2]] 1 }",
+ "code" : "{ [[1]] 1 [[1]] 0 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
},
"c000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[1]] 0 [[1]] 0 [[1]] 0 }",
+ "code" : "{ [[1]] 1 [[1]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 0) (SSTORE 0 1) (SSTORE 0 0) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 0) (SSTORE 0 1) (SSTORE 0 0) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json
index 5a0583d68..64458d5ed 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json
@@ -1,5 +1,5 @@
{
- "sstore_0toXtoX" : {
+ "sstore_0toXtoX" : {
"_info" : {
"comment" : "change 0 -> X -> X"
},
@@ -13,32 +13,133 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "bea68285f4933bcb3b0ac2270b297fb4edd5628f" : {
- "storage" : {
- "0x00" : "0x01",
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
"0x01" : "0x01"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x01",
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
"0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
"0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999742603"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "850b017c6bb3aad857eed6dff7f6a9287e80855e" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -52,20 +153,11 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 1 [[0]] 1 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 0) (SSTORE 1 1) (SSTORE 1 1) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x00"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
"code" : "{ [[1]] 1 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
},
"c000000000000000000000000000000000000000" : {
@@ -73,21 +165,37 @@
"code" : "{ [[1]] 1 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
}
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json
index bce6d5bb7..e289b3887 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json
@@ -1,5 +1,5 @@
{
- "sstore_0toXtoY" : {
+ "sstore_0toXtoY" : {
"_info" : {
"comment" : "change 0 -> X -> Y"
},
@@ -13,32 +13,133 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "6b5e6e5ec91c07a55c8604277b4c57c2dcf41da6" : {
- "storage" : {
- "0x00" : "0x01",
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
"0x01" : "0x01"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x01",
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
"0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
"0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999742603"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b75147f95c818aa6d7db3e8dd61e746a7b936797" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -52,20 +153,11 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 2 [[0]] 1 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 0) (SSTORE 1 2) (SSTORE 1 1) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x00"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
"code" : "{ [[1]] 2 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
}
},
"c000000000000000000000000000000000000000" : {
@@ -73,21 +165,37 @@
"code" : "{ [[1]] 2 [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x01" : "0x00"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
}
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 2) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 2) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0to0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0to0Filler.json
index 219c8b995..734bd0c64 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0to0Filler.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0to0Filler.json
@@ -1,5 +1,5 @@
{
- "sstore_Xto0to0" : {
+ "sstore_Xto0to0" : {
"_info" : {
"comment" : "change X -> 0 -> 0"
},
@@ -13,32 +13,131 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "1b07b38c1bf235e65f935925b085a83e45e307f0" : {
- "storage" : {
- "0x00" : "0x01",
- "0x01" : "0x00"
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x00",
- "0x01" : "0x00"
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
- "0x01" : "0x00"
+ "0x01" : "0x01"
}
},
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999842203"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "f10986dcfe5433397011ba045bd8c2d9e3e6ad2a" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -52,14 +151,6 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 0 [[0]] 0 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 1) (SSTORE 1 0) (SSTORE 1 0) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x01"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
"code" : "{ [[1]] 0 [[1]] 0 }",
@@ -75,19 +166,36 @@
"storage" : {
"0x01" : "0x01"
}
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 0) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 0) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json
index 6096727bf..e8d53659c 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json
@@ -1,5 +1,5 @@
{
- "sstore_Xto0toX" : {
+ "sstore_Xto0toX" : {
"_info" : {
"comment" : "change X -> 0 -> X"
},
@@ -13,32 +13,134 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "0fefbd69274fc334faf14093f3d8c59d21389669" : {
- "storage" : {
- "0x00" : "0x01",
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
"0x01" : "0x01"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x01",
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
"0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
"0x01" : "0x01"
}
},
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999782203"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "10873bc2361905c64bf1b5f92b7550d0d2e3759f" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -52,14 +154,6 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 0 [[0]] 1 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 1) (SSTORE 1 0) (SSTORE 1 1) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x01"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
"code" : "{ [[1]] 0 [[1]] 1 }",
@@ -75,19 +169,36 @@
"storage" : {
"0x01" : "0x01"
}
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 0) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 0) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXto0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXto0Filler.json
index 7d809e393..c63c98835 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXto0Filler.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXto0Filler.json
@@ -13,30 +13,133 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "bf97a5dea408a053b51a91d7a8051c0f04652d44" : {
- "storage" : {
- "0x00" : "0x01",
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
"0x01" : "0x00"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b55b6d7f3b82825568ac1b9cd094794183285e6a" : {
"storage" : {
"0x00" : "0x00",
- "0x01" : "0x00",
- "0x02" : "0x01"
+ "0x01" : "0x01"
}
},
- "b000000000000000000000000000000000000000" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
"storage" : {
- "0x01" : "0x00",
- "0x02" : "0x01"
+ "0x01" : "0x00"
}
}
}
@@ -51,17 +154,9 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 0 [[0]] 1 [[0]] 0 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 1) (SSTORE 1 0) (SSTORE 1 1) (SSTORE 1 0) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x01"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[1]] 1 [[1]] 0 [[2]] 1 }",
+ "code" : "{ [[1]] 0 [[1]] 1 [[1]] 0 }",
"nonce" : "",
"storage" : {
"0x01" : "0x01"
@@ -69,24 +164,41 @@
},
"c000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 1 [[1]] 1 [[1]] 1 [[1]] 1 }",
+ "code" : "{ [[1]] 0 [[1]] 1 [[1]] 0 }",
"nonce" : "",
"storage" : {
"0x01" : "0x01"
}
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 0) (SSTORE 0 1) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 0) (SSTORE 0 1) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json
index e07036415..4f35abd3c 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json
@@ -1,5 +1,5 @@
{
- "sstore_Xto0toY" : {
+ "sstore_Xto0toY" : {
"_info" : {
"comment" : "change X -> 0 -> Y"
},
@@ -13,32 +13,134 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "637fed3a4de7b0eb32b55bd96fcf7e8971cd3233" : {
- "storage" : {
- "0x00" : "0x01",
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
"0x01" : "0x01"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x01",
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
"0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
"0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999772603"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "f99c9da054422594d548f9ef3150a9d90b61d43e" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -52,14 +154,6 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 0 [[0]] 1 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 2) (SSTORE 1 0) (SSTORE 1 1) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x02"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
"code" : "{ [[1]] 0 [[1]] 1 }",
@@ -75,19 +169,36 @@
"storage" : {
"0x01" : "0x02"
}
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 2) (SSTORE 0 0) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 2) (SSTORE 0 0) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXto0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXto0Filler.json
new file mode 100644
index 000000000..3f4681853
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXto0Filler.json
@@ -0,0 +1,204 @@
+{
+ "sstore_XtoXto0" : {
+ "_info" : {
+ "comment" : "change X -> X -> 0"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "//comment" : "CALL to a contract",
+ "indexes" : {
+ "data" : [0],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "2f9b8d1b7797cbdc2dc59637b9d460f37a5fc125" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 1) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 1) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
+ ],
+ "gasLimit" : [
+ "1000000", "400000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXtoXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXtoXFiller.json
new file mode 100644
index 000000000..74b2f04a6
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXtoXFiller.json
@@ -0,0 +1,207 @@
+{
+ "sstore_XtoXtoX" : {
+ "_info" : {
+ "comment" : "change X -> X -> X"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "//comment" : "CALL to a contract",
+ "indexes" : {
+ "data" : [0],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "214da9ac65caedaaa7154dd9d6be7e0d69ca0e7a" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 1) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 1) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
+ ],
+ "gasLimit" : [
+ "1000000", "400000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXtoYFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXtoYFiller.json
new file mode 100644
index 000000000..7fc2d3282
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXtoYFiller.json
@@ -0,0 +1,207 @@
+{
+ "sstore_XtoXtoY" : {
+ "_info" : {
+ "comment" : "change X -> X -> Y"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "//comment" : "CALL to a contract",
+ "indexes" : {
+ "data" : [0],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "8efd7905e127e6d05c095caab375a90d3900057a" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 2 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 2 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 2) (SSTORE 0 2) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 2) (SSTORE 0 2) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
+ ],
+ "gasLimit" : [
+ "1000000", "400000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json
index 70c235c3c..4ff82f8de 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json
@@ -1,5 +1,5 @@
{
- "sstore_XtoYto0" : {
+ "sstore_XtoYto0" : {
"_info" : {
"comment" : "change X -> Y -> 0"
},
@@ -13,32 +13,131 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "6bdbbfc8cd6551bf543e231885418dc866dfb290" : {
- "storage" : {
- "0x00" : "0x01",
- "0x01" : "0x00"
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "storage" : {
- "0x00" : "0x00",
- "0x01" : "0x00"
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
}
},
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"b000000000000000000000000000000000000000" : {
"storage" : {
- "0x01" : "0x00"
+ "0x01" : "0x01"
}
},
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
- "balance" : "999999842203"
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "3f3035e2b0b80a87a4c7b8bfdc61b93dbcc27f61" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
}
}
}
@@ -52,14 +151,6 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 2 [[0]] 0 (CALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALLCODE 100000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (DELEGATECALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (STATICCALL 100000 0xb000000000000000000000000000000000000000 0 0 0 0) (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 1 1) (SSTORE 1 2) (SSTORE 1 0) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x01"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
"code" : "{ [[1]] 2 [[1]] 0 }",
@@ -75,19 +166,36 @@
"storage" : {
"0x01" : "0x01"
}
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
}
},
"transaction" : {
"data" : [
- ""
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 2) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 2) (SSTORE 0 0) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "660000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoXFiller.json
new file mode 100644
index 000000000..54b7b5db5
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoXFiller.json
@@ -0,0 +1,207 @@
+{
+ "sstore_XtoYtoX" : {
+ "_info" : {
+ "comment" : "change X -> Y -> X"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "//comment" : "CALL to a contract",
+ "indexes" : {
+ "data" : [0],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "3ff7cbb76c13fabdfff02a378af54cf9dd66df9b" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 2 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 2 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 2) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 2) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
+ ],
+ "gasLimit" : [
+ "1000000", "400000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoYFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoYFiller.json
new file mode 100644
index 000000000..f4996f170
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoYFiller.json
@@ -0,0 +1,207 @@
+{
+ "sstore_XtoYtoY" : {
+ "_info" : {
+ "comment" : "change X -> Y -> Y"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "//comment" : "CALL to a contract",
+ "indexes" : {
+ "data" : [0],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a86d4f97c96456300b79da71b19791f58922855b" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 2) (SSTORE 0 1) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 2) (SSTORE 0 1) (SSTORE 0 1) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
+ ],
+ "gasLimit" : [
+ "1000000", "400000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoZFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoZFiller.json
new file mode 100644
index 000000000..fbcd71291
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYtoZFiller.json
@@ -0,0 +1,207 @@
+{
+ "sstore_XtoYtoZ" : {
+ "_info" : {
+ "comment" : "change X -> Y -> Z"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "//comment" : "CALL to a contract",
+ "indexes" : {
+ "data" : [0],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x03"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "CALLCODE AND DELEGATECALL",
+ "indexes" : {
+ "data" : [1, 2],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x03"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "STATICCALL, fails on storage change",
+ "indexes" : {
+ "data" : 3,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999617076"
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "0a7b3c8e4bf391a37ed7cce5d6a394c1aaf34faa" : {
+ "storage" : {
+ "0x00" : "0x03",
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but going OOG",
+ "indexes" : {
+ "data" : -1,
+ "gas" : 1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "ALL of above but REVERT at the end",
+ "indexes" : {
+ "data" : [5,6,7,8],
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 2 [[1]] 3 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 2 [[1]] 3 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "dea0000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 [[2]] 1 [[2]] 0 [[3]] 1 [[3]] 0 [[4]] 1 [[4]] 0 [[5]] 1 [[5]] 0 [[6]] 1 [[6]] 0 [[7]] 1 [[7]] 0 [[8]] 1 [[8]] 0 [[9]] 1 [[9]] 0 [[10]] 1 [[10]] 0 [[11]] 1 [[11]] 0 [[12]] 1 [[12]] 0 [[13]] 1 [[13]] 0 [[14]] 1 [[14]] 0 [[15]] 1 [[15]] 0 [[16]] 1 [[16]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 2) (SSTORE 0 3) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (STOP) ) }",
+ "{ (CALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (CALLCODE 300000 0xb000000000000000000000000000000000000000 0 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (DELEGATECALL 300000 0xb000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (STATICCALL 300000 0xc000000000000000000000000000000000000000 0 0 0 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32)}",
+ "{ (seq (CREATE2 0 0 (lll (seq (SSTORE 0 1) (SSTORE 0 2) (SSTORE 0 3) (SSTORE 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
+ ],
+ "gasLimit" : [
+ "1000000", "400000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}