diff options
author | winsvega <winsvega@mail.ru> | 2018-08-28 20:02:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-28 20:02:34 +0800 |
commit | 980b4771fbe8ed4a5429e0feeadf4ae07a2b8929 (patch) | |
tree | 4e4e65483cc447606d3de82c809654233124a9d9 /src/BlockchainTestsFiller | |
parent | e25d2306414373a82dbd561a7bfe84b794ba2aaa (diff) | |
parent | faa4acbdf9e1206ff0250f0ec50af3864f2a4caf (diff) | |
download | tangerine-tests-980b4771fbe8ed4a5429e0feeadf4ae07a2b8929.tar tangerine-tests-980b4771fbe8ed4a5429e0feeadf4ae07a2b8929.tar.gz tangerine-tests-980b4771fbe8ed4a5429e0feeadf4ae07a2b8929.tar.bz2 tangerine-tests-980b4771fbe8ed4a5429e0feeadf4ae07a2b8929.tar.lz tangerine-tests-980b4771fbe8ed4a5429e0feeadf4ae07a2b8929.tar.xz tangerine-tests-980b4771fbe8ed4a5429e0feeadf4ae07a2b8929.tar.zst tangerine-tests-980b4771fbe8ed4a5429e0feeadf4ae07a2b8929.zip |
Merge pull request #490 from ethereum/morestorage
storage from suicide check
Diffstat (limited to 'src/BlockchainTestsFiller')
4 files changed, 415 insertions, 0 deletions
diff --git a/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckFiller.json b/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckFiller.json new file mode 100644 index 000000000..42d86878b --- /dev/null +++ b/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckFiller.json @@ -0,0 +1,101 @@ +{ + "suicideStorageCheck" : { + "_info" : { + "comment" : "[2:21:10] Vitalik Buterin: (i) set storage key 1 of contract C to 3. (ii) self-destruct contract C. (iii) in the next transaction create contract C, and read its storage key. I - via transaction create." + }, + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "3141592", + "gasUsed" : "0", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "sealEngine" : "NoProof", + "expect" : [ + { + "network" : ["Byzantium"], + "result" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1000" + }, + "ec0e71ad0a90ffe1909d27dac207f7680abba42d" : { + "nonce" : "1", + "storage" : { + "0x02" : "2" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + } + }, + { + "network" : [">=Constantinople"], + "result" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1000" + }, + "ec0e71ad0a90ffe1909d27dac207f7680abba42d" : { + "nonce" : "1", + "storage" : { + "0x02" : "2" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + } + } + ], + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000000000", + "nonce" : "0", + "code" : "", + "storage": {} + }, + "ec0e71ad0a90ffe1909d27dac207f7680abba42d" : { + "balance" : "1000", + "nonce" : "0", + "code" : "{ (SSTORE 1 3) (SELFDESTRUCT 1) }", + "storage": {} + } + }, + "blocks" : [ + { + "transactions" : [ + { + "data" : "", + "gasLimit" : "400000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "ec0e71ad0a90ffe1909d27dac207f7680abba42d", + "value" : "0" + }, + { + "data" : "{ (SSTORE 3 (SLOAD 1)) (SSTORE 2 2) }", + "gasLimit" : "400000", + "gasPrice" : "1", + "nonce" : "1", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "0" + } + ], + "uncleHeaders" : [ + ] + } + ] + } +} diff --git a/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckVCreate2Filler.json b/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckVCreate2Filler.json new file mode 100644 index 000000000..f55f386b5 --- /dev/null +++ b/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckVCreate2Filler.json @@ -0,0 +1,99 @@ +{ + "suicideStorageCheckVCreate2" : { + "_info" : { + "comment" : "[2:21:10] Vitalik Buterin: (i) set storage key 1 of contract C to 3. (ii) self-destruct contract C. (iii) in the next transaction create contract C, and read its storage key. I - via old create2" + }, + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "3141592", + "gasUsed" : "0", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "sealEngine" : "NoProof", + "expect" : [ + { + "network" : ["Byzantium"], + "result" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1000" + }, + "03855fc81ba27fb87117ab961e6bef17f7e84250" : { + "shouldnotexist" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + } + }, + { + "network" : [">=Constantinople"], + "result" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1000" + }, + "03855fc81ba27fb87117ab961e6bef17f7e84250" : { + "nonce" : "1", + "storage" : { + "0x02" : "2" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + } + } + ], + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000000000", + "nonce" : "0", + "code" : "", + "storage": {} + }, + "03855fc81ba27fb87117ab961e6bef17f7e84250" : { + "balance" : "1000", + "nonce" : "0", + "code" : "{ (SSTORE 1 3) (SELFDESTRUCT 1) }", + "storage": {} + } + }, + "blocks" : [ + { + "transactions" : [ + { + "data" : "", + "gasLimit" : "400000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "03855fc81ba27fb87117ab961e6bef17f7e84250", + "value" : "0" + }, + { + "//data" : "{ (SSTORE 3 (SLOAD 1)) (SSTORE 2 2) }", + "data" : "{ (MSTORE 0 0x6001546003556002600255) (CREATE2 0 21 11 0) }", + "gasLimit" : "400000", + "gasPrice" : "1", + "nonce" : "1", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "0" + } + ], + "uncleHeaders" : [ + ] + } + ] + } +} diff --git a/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckVCreateFiller.json b/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckVCreateFiller.json new file mode 100644 index 000000000..9bbed7f59 --- /dev/null +++ b/src/BlockchainTestsFiller/bcStateTests/suicideStorageCheckVCreateFiller.json @@ -0,0 +1,102 @@ +{ + "suicideStorageCheckVCreate" : { + "_info" : { + "comment" : "[2:21:10] Vitalik Buterin: (i) set storage key 1 of contract C to 3. (ii) self-destruct contract C. (iii) in the next transaction create contract C, and read its storage key. I - via old create." + }, + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "3141592", + "gasUsed" : "0", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "sealEngine" : "NoProof", + "expect" : [ + { + "network" : ["Byzantium"], + "result" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1000" + }, + "e3476106159f87477ad639e3ddcbb6b240efe459" : { + "nonce" : "1", + "storage" : { + "0x02" : "2" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + } + }, + { + "network" : [">=Constantinople"], + "result" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1000" + }, + "e3476106159f87477ad639e3ddcbb6b240efe459" : { + "nonce" : "1", + "storage" : { + "0x02" : "2" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + } + } + ], + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000000000", + "nonce" : "0", + "code" : "", + "storage": {} + }, + "e3476106159f87477ad639e3ddcbb6b240efe459" : { + "balance" : "1000", + "nonce" : "0", + "code" : "{ (SSTORE 1 3) (SELFDESTRUCT 1) }", + "storage": {} + } + }, + "blocks" : [ + { + "transactions" : [ + { + "data" : "", + "gasLimit" : "400000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "e3476106159f87477ad639e3ddcbb6b240efe459", + "value" : "0" + }, + { + "//data" : "{ (SSTORE 3 (SLOAD 1)) (SSTORE 2 2) }", + "data" : "{ (MSTORE 0 0x6001546003556002600255) (CREATE 0 21 11) }", + "gasLimit" : "400000", + "gasPrice" : "1", + "nonce" : "1", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "0" + } + ], + "uncleHeaders" : [ + ] + } + ] + } +} diff --git a/src/BlockchainTestsFiller/bcStateTests/suicideThenCheckBalanceFiller.json b/src/BlockchainTestsFiller/bcStateTests/suicideThenCheckBalanceFiller.json new file mode 100644 index 000000000..9889c52b3 --- /dev/null +++ b/src/BlockchainTestsFiller/bcStateTests/suicideThenCheckBalanceFiller.json @@ -0,0 +1,113 @@ +{ + "suicideThenCheckBalance" : { + "_info" : { + "comment" : "[2:22:42] Vitalik Buterin: another one is: (i) self-destruct contract C, (ii) in the next transaction, send 1 wei to C, (iii) verify that C's balance is 1 wei. [2:23:01] Vitalik Buterin: the reason this is important now is that with EIP98, clients will be switching to not 'committing' their caches to the trie at the end of every tx. [2:23:18] Vitalik Buterin: and this means that selfdestruct has to be handled more carefully than before. [2:23:49] Vitalik Buterin: pyethereum screwed it up and it had to get fixed, though pyethereum's bug had to do with pre-spurious dragon 'existence' so it may not be relevant now." + }, + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "3141592", + "gasUsed" : "0", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "sealEngine" : "NoProof", + "expect" : [ + { + "network" : ["Homestead"], + "result" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1000" + }, + "e3476106159f87477ad639e3ddcbb6b240efe459" : { + "balance" : "1", + "code" : "" + }, + "a3476106159f87477ad639e3ddcbb6b240efe459" : { + "storage" : { + "0x01" : "1" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + } + }, + { + "network" : [">=Constantinople"], + "result" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1000" + }, + "e3476106159f87477ad639e3ddcbb6b240efe459" : { + "balance" : "1", + "code" : "" + }, + "a3476106159f87477ad639e3ddcbb6b240efe459" : { + "storage" : { + "0x01" : "1" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + } + } + ], + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000000000", + "nonce" : "0", + "code" : "", + "storage": {} + }, + "a3476106159f87477ad639e3ddcbb6b240efe459" : { + "balance" : "1000", + "nonce" : "0", + "code" : "{ (CALL 500 0xe3476106159f87477ad639e3ddcbb6b240efe459 1 0 0 0 0) (SSTORE 1 (BALANCE 0xe3476106159f87477ad639e3ddcbb6b240efe459)) }", + "storage": {} + }, + "e3476106159f87477ad639e3ddcbb6b240efe459" : { + "balance" : "1000", + "nonce" : "0", + "code" : "{ (SSTORE 1 3) (SELFDESTRUCT 1) }", + "storage": {} + } + }, + "blocks" : [ + { + "transactions" : [ + { + "data" : "", + "gasLimit" : "400000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "e3476106159f87477ad639e3ddcbb6b240efe459", + "value" : "0" + }, + { + "data" : "", + "gasLimit" : "400000", + "gasPrice" : "1", + "nonce" : "1", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a3476106159f87477ad639e3ddcbb6b240efe459", + "value" : "0" + } + ], + "uncleHeaders" : [ + ] + } + ] + } +} |