aboutsummaryrefslogtreecommitdiffstats
path: root/src/GeneralStateTestsFiller
diff options
context:
space:
mode:
authorwinsvega <winsvega@mail.ru>2018-10-17 21:30:06 +0800
committerGitHub <noreply@github.com>2018-10-17 21:30:06 +0800
commit262f787d154bf35625a3b87f31c4132567a79456 (patch)
tree6ffde8f473a7d450228be005829a5ec5405a1f94 /src/GeneralStateTestsFiller
parente9d998ff7a5e71679ce02f21583dc89df4a87c13 (diff)
parent08f02b246475be9e7955bd2eb7aad9315f2acb75 (diff)
downloaddexon-tests-262f787d154bf35625a3b87f31c4132567a79456.tar.gz
dexon-tests-262f787d154bf35625a3b87f31c4132567a79456.tar.zst
dexon-tests-262f787d154bf35625a3b87f31c4132567a79456.zip
Merge pull request #528 from ethereum/moresstore
More sstore XX
Diffstat (limited to 'src/GeneralStateTestsFiller')
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0Filler.json150
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json98
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json98
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXFiller.json203
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0Filler.json98
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json96
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json96
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0Filler.json155
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0to0Filler.json96
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json96
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json96
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXFiller.json160
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYFiller.json158
-rw-r--r--src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json96
14 files changed, 1614 insertions, 82 deletions
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0Filler.json
index a5486e398..d88e527c6 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0Filler.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0Filler.json
@@ -13,21 +13,129 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "80cdc4cd8b9517daba0a771f92dcaaa677707eb9" : {
- "storage" : {
+ "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" : {
- "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" : "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" : {
+ "74274e431d0e36559a7062fa474e0838325176e1" : {
+ "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"
}
}
}
@@ -42,16 +150,9 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[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 0) (SSTORE 1 1) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[2]] 1 }",
+ "code" : "{ [[1]] 0 }",
"nonce" : "",
"storage" : {
}
@@ -62,19 +163,36 @@
"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" : {
+ }
}
},
"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 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 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "260000"
+ "1000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json
new file mode 100644
index 000000000..b1b835bc0
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0to0Filler.json
@@ -0,0 +1,98 @@
+{
+ "sstore_0to0to0" : {
+ "_info" : {
+ "comment" : "change 0 -> 0 -> 0"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "5ab0be3fbe4aaa2f3ca318e8b0db57a1dd2439ce" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x00"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x00",
+ "0x01" : "0x00",
+ "0x02" : "0x01"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x00",
+ "0x02" : "0x01"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999780967"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 0 [[1]] 0 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json
new file mode 100644
index 000000000..2d2460df5
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0to0toXFiller.json
@@ -0,0 +1,98 @@
+{
+ "sstore_0to0toX" : {
+ "_info" : {
+ "comment" : "change 0 -> 0 -> X"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "321cffa8e30eb2ac4ca65a883168da43dd28b786" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01",
+ "0x02" : "0x01"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01",
+ "0x02" : "0x01"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999702385"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 0 [[1]] 1 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXFiller.json
new file mode 100644
index 000000000..1b469c5d4
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXFiller.json
@@ -0,0 +1,203 @@
+{
+ "sstore_0toX" : {
+ "_info" : {
+ "comment" : "change 0 -> 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" : {
+ }
+ },
+ "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" : {
+ "74274e431d0e36559a7062fa474e0838325176e1" : {
+ "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 }",
+ "nonce" : "",
+ "storage" : {
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[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" : {
+ }
+ }
+ },
+ "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 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 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_0toXto0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0Filler.json
new file mode 100644
index 000000000..796d38b37
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXto0Filler.json
@@ -0,0 +1,98 @@
+{
+ "sstore_0toXto0" : {
+ "_info" : {
+ "comment" : "change 0 -> X -> 0"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "8bd338f565efe2625da6de13233722ec91cbf03c" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x00"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x00",
+ "0x01" : "0x00",
+ "0x02" : "0x01"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x00",
+ "0x02" : "0x01"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999781585"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json
new file mode 100644
index 000000000..5a0583d68
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoXFiller.json
@@ -0,0 +1,96 @@
+{
+ "sstore_0toXtoX" : {
+ "_info" : {
+ "comment" : "change 0 -> X -> X"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "bea68285f4933bcb3b0ac2270b297fb4edd5628f" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999742603"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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" : {
+ "balance" : "",
+ "code" : "{ [[1]] 1 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json
new file mode 100644
index 000000000..bce6d5bb7
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_0toXtoYFiller.json
@@ -0,0 +1,96 @@
+{
+ "sstore_0toXtoY" : {
+ "_info" : {
+ "comment" : "change 0 -> X -> Y"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "6b5e6e5ec91c07a55c8604277b4c57c2dcf41da6" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999742603"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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" : {
+ "balance" : "",
+ "code" : "{ [[1]] 2 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0Filler.json
index 6090e71a3..34f54eee9 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0Filler.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0Filler.json
@@ -13,21 +13,133 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "f9367adbf6e8547983533b5c1111c729e0aa2179" : {
- "storage" : {
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
"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" : {
- "0x02" : "0x01"
+ "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" : {
+ "24406c20149d7dc74e360dbce32250be9450a0e4" : {
+ "storage" : {
+ "0x00" : "0x00",
+ "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"
}
}
}
@@ -42,17 +154,9 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[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 0) (SSTORE 1 1) (SSTORE 1 0) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x00" : "0x01"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[2]] 1 }",
+ "code" : "{ [[1]] 0 }",
"nonce" : "",
"storage" : {
"0x01" : "0x01"
@@ -65,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 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" : [
- "260000"
+ "3000000", "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
new file mode 100644
index 000000000..219c8b995
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0to0Filler.json
@@ -0,0 +1,96 @@
+{
+ "sstore_Xto0to0" : {
+ "_info" : {
+ "comment" : "change X -> 0 -> 0"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "1b07b38c1bf235e65f935925b085a83e45e307f0" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x00"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x00",
+ "0x01" : "0x00"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999842203"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 0 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json
new file mode 100644
index 000000000..6096727bf
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXFiller.json
@@ -0,0 +1,96 @@
+{
+ "sstore_Xto0toX" : {
+ "_info" : {
+ "comment" : "change X -> 0 -> X"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "0fefbd69274fc334faf14093f3d8c59d21389669" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999782203"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json
new file mode 100644
index 000000000..e07036415
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toYFiller.json
@@ -0,0 +1,96 @@
+{
+ "sstore_Xto0toY" : {
+ "_info" : {
+ "comment" : "change X -> 0 -> Y"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "637fed3a4de7b0eb32b55bd96fcf7e8971cd3233" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999772603"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 0 [[1]] 1 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXFiller.json
index 3bd4c1741..eddd8c623 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXFiller.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoXFiller.json
@@ -13,32 +13,133 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "72cd8e726891a610b7c2103e6f6b173d2affd716" : {
- "storage" : {
+ "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" : {
- "0x02" : "0x01"
+ "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"
},
- "c000000000000000000000000000000000000000" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
"storage" : {
- "0x01" : "0x02"
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "850b017c6bb3aad857eed6dff7f6a9287e80855e" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x01"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "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" : {
- "0x02" : "0x01",
- "0x03" : "0x03"
+ "0x01" : "0x00"
}
}
}
@@ -53,42 +154,51 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 0 [[3]] 3 (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 0) (SSTORE 1 1) (SSTORE 1 1) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x03" : "0x03"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[2]] 1 }",
+ "code" : "{ [[1]] 1 }",
"nonce" : "",
"storage" : {
- "0x02" : "0x01"
+ "0x01" : "0x01"
}
},
"c000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 2 }",
+ "code" : "{ [[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" : {
- "0x01" : "0x02"
}
}
},
"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" : [
- "260000"
+ "3000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYFiller.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYFiller.json
index 33ccf23a9..7ef376a29 100644
--- a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYFiller.json
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYFiller.json
@@ -13,32 +13,133 @@
},
"expect" : [
{
+ "//comment" : "CALL to a contract",
"indexes" : {
- "data" : -1,
- "gas" : -1,
+ "data" : [0],
+ "gas" : 0,
"value" : -1
},
"network" : [">=Constantinople"],
"result" : {
- "99abdddfad0c5cc6aa06772e0eb85613ec0abd2d" : {
- "storage" : {
- "0x01" : "0x04"
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ },
+ "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" : {
- "0x02" : "0x01"
+ "0x01" : "0x01"
}
},
- "c000000000000000000000000000000000000000" : {
+ "dea0000000000000000000000000000000000000" : {
+ "//comment" : "indicates that call finished without OOG",
"storage" : {
"0x01" : "0x01"
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : {
+ "nonce" : "1",
+ "storage" : {
+ "0x01" : "0x02"
+ }
+ }
+ }
+ },
+ {
+ "//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" : {
- "0x02" : "0x01",
- "0x03" : "0x02"
+ "0x01" : "0x01"
+ }
+ }
+ }
+ },
+ {
+ "//comment" : "inside CREATE2 init code",
+ "indexes" : {
+ "data" : 4,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "48c84e75e41c7d6629e7a38b1edcb8f0789e85a8" : {
+ "storage" : {
+ "0x00" : "0x02",
+ "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"
}
}
}
@@ -53,42 +154,51 @@
"storage" : {
}
},
- "3e180b1862f9d158abb5e519a6d8605540c23682" : {
- "balance" : "5",
- "code" : "{ (seq [[0]] 0 [[3]] 2 (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 0) (SSTORE 1 1) (SSTORE 1 4) ) 0) 0) (STOP) ) }",
- "nonce" : "0",
- "storage" : {
- "0x03" : "0x03"
- }
- },
"b000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 [[2]] 1 }",
+ "code" : "{ [[1]] 2 }",
"nonce" : "",
"storage" : {
- "0x02" : "0x02"
+ "0x01" : "0x01"
}
},
"c000000000000000000000000000000000000000" : {
"balance" : "",
- "code" : "{ [[1]] 0 }",
+ "code" : "{ [[1]] 2 }",
"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 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 1 1) ) 0) 0) (CALL 600000 0xdea0000000000000000000000000000000000000 0 0 0 0 0) (REVERT 0 32) (STOP) ) }"
+
],
"gasLimit" : [
- "260000"
+ "3000000", "400000"
],
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
- "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "to" : "",
"value" : [
"1"
]
diff --git a/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json
new file mode 100644
index 000000000..70c235c3c
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSStoreTest/sstore_XtoYto0Filler.json
@@ -0,0 +1,96 @@
+{
+ "sstore_XtoYto0" : {
+ "_info" : {
+ "comment" : "change X -> Y -> 0"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : [">=Constantinople"],
+ "result" : {
+ "6bdbbfc8cd6551bf543e231885418dc866dfb290" : {
+ "storage" : {
+ "0x00" : "0x01",
+ "0x01" : "0x00"
+ }
+ },
+ "3e180b1862f9d158abb5e519a6d8605540c23682" : {
+ "storage" : {
+ "0x00" : "0x00",
+ "0x01" : "0x00"
+ }
+ },
+ "b000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x00"
+ }
+ },
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "999999842203"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "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 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ },
+ "c000000000000000000000000000000000000000" : {
+ "balance" : "",
+ "code" : "{ [[1]] 2 [[1]] 0 }",
+ "nonce" : "",
+ "storage" : {
+ "0x01" : "0x01"
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "660000"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "3e180b1862f9d158abb5e519a6d8605540c23682",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}