From 60075171252faccb5cb761939fd0e49f88e40204 Mon Sep 17 00:00:00 2001 From: Dimitry Date: Fri, 16 Dec 2016 18:22:29 +0300 Subject: eip150 test fillers to general tests --- .../TouchToEmptyAccountRevert2Filler.json | 77 +++++++++++++++ .../TouchToEmptyAccountRevert3Filler.json | 91 ++++++++++++++++++ .../TouchToEmptyAccountRevertFiller.json | 77 +++++++++++++++ .../stRevertTest/chfastRevertDepth2Filler.json | 106 +++++++++++++++++++++ .../chfastRevertPrefoundEmptyFiller.json | 88 +++++++++++++++++ .../chfastRevertPrefoundEmptyOOGFiller.json | 71 ++++++++++++++ .../stRevertTest/chfastRevertPrefoundFiller.json | 88 +++++++++++++++++ .../chfastRevertPrefoundOOGFiller.json | 71 ++++++++++++++ 8 files changed, 669 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevert2Filler.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevert3Filler.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevertFiller.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/chfastRevertDepth2Filler.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundEmptyFiller.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundEmptyOOGFiller.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundFiller.json create mode 100644 src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundOOGFiller.json (limited to 'src/GeneralStateTestsFiller/stRevertTest') diff --git a/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevert2Filler.json b/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevert2Filler.json new file mode 100644 index 000000000..c59c30353 --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevert2Filler.json @@ -0,0 +1,77 @@ +{ + "TouchToEmptyAccountRevert2" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["ALL"], + "result" : { + "1000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "1000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "ba4f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[0]](CALL 30000 0x1000000000000000000000000000000000000000 0 0 0 0 0) [[1]](CALL 30000 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0 0) }", + "storage": { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[2]](CALL 30000 0x1000000000000000000000000000000000000000 0 0 0 0 0) [[3]] 1 }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "77400" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "ba4f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevert3Filler.json b/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevert3Filler.json new file mode 100644 index 000000000..20f990a8e --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevert3Filler.json @@ -0,0 +1,91 @@ +{ + "TouchToEmptyAccountRevert3" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["ALL"], + "result" : { + "1000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "1000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "ba4f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[0]](CALL 30000 0xd94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0 0) [[1]](CALL 30000 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0 0) }", + "storage": { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[2]](CALL 30000 0xe94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0 0) [[3]] 1 }", + "storage": { + } + }, + "d94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ (SUICIDE 0x1000000000000000000000000000000000000000) }", + "storage": { + } + }, + "e94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ (SUICIDE 0x1000000000000000000000000000000000000000) }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "82400" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "ba4f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevertFiller.json b/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevertFiller.json new file mode 100644 index 000000000..12214cb3a --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/TouchToEmptyAccountRevertFiller.json @@ -0,0 +1,77 @@ +{ + "TouchToEmptyAccountRevert" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["ALL"], + "result" : { + "1000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "1000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[0]](CALL 30000 0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0 0) [[2]] 1 }", + "storage": { + } + }, + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[1]](CALL 30000 0x1000000000000000000000000000000000000000 0 0 0 0 0) }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "70000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/chfastRevertDepth2Filler.json b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertDepth2Filler.json new file mode 100644 index 000000000..7c2c0a80d --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertDepth2Filler.json @@ -0,0 +1,106 @@ +{ + "chfastRevertDepth2" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["ALL"], + "result" : { + "a000000000000000000000000000000000000000" : { + "storage" : { + "0x00" : "0x00", + "0x01" : "0x00", + "0x02" : "0x00" + } + }, + "b000000000000000000000000000000000000000" : { + "storage" : { + "0x00" : "0x00", + "0x01" : "0x00" + } + }, + "c000000000000000000000000000000000000000" : { + "storage" : { + "0x00" : "0x00" + } + }, + "d000000000000000000000000000000000000000" : { + "storage" : { + "0x00" : "0x00", + "0x01" : "0x00", + "0x02" : "0x00" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "a000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "{ [[0]] (ADD 1 (SLOAD 0)) [[1]] (CALL 150000 0xb000000000000000000000000000000000000000 0 0 0 0 0) [[2]] (CALL 150000 0xd000000000000000000000000000000000000000 0 0 0 0 0)}", + "nonce" : "0", + "storage" : { + } + }, + "b000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "{ [[0]] (ADD 1 (SLOAD 0)) [[1]] (CALL 50000 0xc000000000000000000000000000000000000000 0 0 0 0 0)}", + "nonce" : "", + "storage" : { + } + }, + "c000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "{ [[0]] (ADD 1 (SLOAD 0)) }", + "nonce" : "0", + "storage" : { + } + }, + "d000000000000000000000000000000000000000" : { + "balance" : "", + "code" : "{ [[0]] (ADD 1 (SLOAD 0)) [[1]] (CALL 50000 0xc000000000000000000000000000000000000000 0 0 0 0 0) [[2]] (GAS)}", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "In transaction T to A, A call B call C, then A call D calls C, D fails after calling C.", + "data" : [ + "" + ], + "gasLimit" : [ + "170685" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundEmptyFiller.json b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundEmptyFiller.json new file mode 100644 index 000000000..9a75d1eed --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundEmptyFiller.json @@ -0,0 +1,88 @@ +{ + "chfastRevertPrefound" : { + "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" : ["EIP158"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "0", + "code" : "", + "nonce" : "1", + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "0", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "a000000000000000000000000000000000000000" : { + "balance" : "1", + "code" : "{ [[0]] (CREATE 0 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/chfastRevertPrefoundEmptyOOGFiller.json b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundEmptyOOGFiller.json new file mode 100644 index 000000000..b20009ea5 --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundEmptyOOGFiller.json @@ -0,0 +1,71 @@ +{ + "chfastRevertPrefound" : { + "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]] (CREATE 0 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" : [ + "93000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundFiller.json b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundFiller.json new file mode 100644 index 000000000..598befca7 --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundFiller.json @@ -0,0 +1,88 @@ +{ + "chfastRevertPrefound" : { + "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" : ["EIP158"], + "result" : { + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "1", + "code" : "", + "nonce" : "1", + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "7db299e0885c85039f56fa504a13dd8ce8a56aa7" : { + "balance" : "1", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "a000000000000000000000000000000000000000" : { + "balance" : "1", + "code" : "{ [[0]] (CREATE 0 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/chfastRevertPrefoundOOGFiller.json b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundOOGFiller.json new file mode 100644 index 000000000..4c93d8879 --- /dev/null +++ b/src/GeneralStateTestsFiller/stRevertTest/chfastRevertPrefoundOOGFiller.json @@ -0,0 +1,71 @@ +{ + "chfastRevertPrefound" : { + "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]] (CREATE 0 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" : [ + "93000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a000000000000000000000000000000000000000", + "value" : [ + "0" + ] + } + } +} -- cgit