From 3bbfd218f807a872c82b0bc38c6b19276872d385 Mon Sep 17 00:00:00 2001 From: Dimitry Date: Wed, 4 Jan 2017 23:28:14 +0400 Subject: more Revert tests for Create opcode --- .../stRevertTest/RevertPrefoundCallFiller.json | 105 +++++++++++++++++++++ .../stRevertTest/RevertPrefoundCallOOGFiller.json | 71 ++++++++++++++ .../RevertPrefoundEmptyCallFiller.json | 101 ++++++++++++++++++++ .../RevertPrefoundEmptyCallOOGFiller.json | 71 ++++++++++++++ 4 files changed, 348 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundCallFiller.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundCallOOGFiller.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundEmptyCallFiller.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundEmptyCallOOGFiller.json (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundCallFiller.json b/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundCallFiller.json new file mode 100644 index 000000000..091800e0a --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundCallFiller.json @@ -0,0 +1,105 @@ +{ + "RevertPrefoundCall" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "1", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "1", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP158"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "1", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "1", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "a000000000000000000000000000000000000000" : { + "balance" : "1", + "code" : "{ [[0]] (CALL 50000 0x7db299e0885c85039f56fa504a13dd8ce8a56aa7 0 0 32 0 32) [[1]]12 }", + "nonce" : "", + "storage" : { + } + } + }, + "transaction" : { + "data" : "so X has nothing but the balance Transaction calls A A creates X A went OOG", + "data" : [ + "" + ], + "gasLimit" : [ + "94000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundCallOOGFiller.json b/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundCallOOGFiller.json new file mode 100644 index 000000000..94a2b9ad2 --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundCallOOGFiller.json @@ -0,0 +1,71 @@ +{ + "RevertPrefoundCallOOG" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["ALL"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "1", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "1", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "a000000000000000000000000000000000000000" : { + "balance" : "1", + "code" : "{ [[0]] (CALL 50000 0x7db299e0885c85039f56fa504a13dd8ce8a56aa7 0 0 32 0 32) [[1]]12 [[2]]12 }", + "nonce" : "", + "storage" : { + } + } + }, + "transaction" : { + "data" : "so X has nothing but the balance Transaction calls A A creates X A went OOG", + "data" : [ + "" + ], + "gasLimit" : [ + "63000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundEmptyCallFiller.json b/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundEmptyCallFiller.json new file mode 100644 index 000000000..7d382c704 --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundEmptyCallFiller.json @@ -0,0 +1,101 @@ +{ + "RevertPrefoundEmptyCall" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "0", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "0", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP158"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "shouldnotexist" : "1" + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "0", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "a000000000000000000000000000000000000000" : { + "balance" : "1", + "code" : "{ [[0]] (CALL 50000 0x7db299e0885c85039f56fa504a13dd8ce8a56aa7 0 0 32 0 32) [[1]]12 }", + "nonce" : "", + "storage" : { + } + } + }, + "transaction" : { + "data" : "so X has nothing but the balance Transaction calls A A creates X A went OOG", + "data" : [ + "" + ], + "gasLimit" : [ + "94000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundEmptyCallOOGFiller.json b/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundEmptyCallOOGFiller.json new file mode 100644 index 000000000..6a6ce908f --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/RevertPrefoundEmptyCallOOGFiller.json @@ -0,0 +1,71 @@ +{ + "RevertPrefoundEmptyCallOOG" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["ALL"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "0", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "0", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "a000000000000000000000000000000000000000" : { + "balance" : "1", + "code" : "{ [[0]] (CALL 50000 0x7db299e0885c85039f56fa504a13dd8ce8a56aa7 0 0 32 0 32) [[1]]12 [[2]]12 }", + "nonce" : "", + "storage" : { + } + } + }, + "transaction" : { + "data" : "so X has nothing but the balance Transaction calls A A creates X A went OOG", + "data" : [ + "" + ], + "gasLimit" : [ + "63000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} -- cgit