diff options
author | Dimitry <dimitry@ethereum.org> | 2018-10-18 20:08:14 +0800 |
---|---|---|
committer | Dimitry <dimitry@ethereum.org> | 2018-10-18 20:08:14 +0800 |
commit | c9cabfdf75ce9b2e81a57b009d8e7505eae1eded (patch) | |
tree | d7655ed87d9c3aedf35025b47204e94d37b96a28 /src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXto0Filler.json | |
parent | 262f787d154bf35625a3b87f31c4132567a79456 (diff) | |
download | tangerine-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar tangerine-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.gz tangerine-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.bz2 tangerine-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.lz tangerine-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.xz tangerine-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.tar.zst tangerine-tests-c9cabfdf75ce9b2e81a57b009d8e7505eae1eded.zip |
sstore xxx tests
Diffstat (limited to 'src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXto0Filler.json')
-rw-r--r-- | src/GeneralStateTestsFiller/stSStoreTest/sstore_Xto0toXto0Filler.json | 160 |
1 files changed, 136 insertions, 24 deletions
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" ] |