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 --- ...codeConsumeMoreGasThenTransactionHasFiller.json | 91 ++++++++++++++ ...AskMoreGasOnDepth2ThenTransactionHasFiller.json | 105 +++++++++++++++++ .../CallGoesOOGOnSecondLevel2Filler.json | 105 +++++++++++++++++ .../CallGoesOOGOnSecondLevelFiller.json | 106 +++++++++++++++++ .../CreateAndGasInsideCreateFiller.json | 91 ++++++++++++++ .../stEIP150Specific/DelegateCallOnEIPFiller.json | 89 ++++++++++++++ ...CallThatAskForeGasThenTrabsactionHasFiller.json | 83 +++++++++++++ .../NewGasPriceForCodesFiller.json | 131 +++++++++++++++++++++ .../SuicideToExistingContractFiller.json | 91 ++++++++++++++ .../SuicideToNotExistingContractFiller.json | 91 ++++++++++++++ .../Transaction64Rule_d64e0Filler.json | 96 +++++++++++++++ .../Transaction64Rule_d64m1Filler.json | 96 +++++++++++++++ .../Transaction64Rule_d64p1Filler.json | 96 +++++++++++++++ 13 files changed, 1271 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/CallAndCallcodeConsumeMoreGasThenTransactionHasFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/CallAskMoreGasOnDepth2ThenTransactionHasFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/CallGoesOOGOnSecondLevel2Filler.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/CallGoesOOGOnSecondLevelFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/CreateAndGasInsideCreateFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/DelegateCallOnEIPFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/ExecuteCallThatAskForeGasThenTrabsactionHasFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/NewGasPriceForCodesFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/SuicideToExistingContractFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/SuicideToNotExistingContractFiller.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64e0Filler.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64m1Filler.json create mode 100644 src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64p1Filler.json (limited to 'src/GeneralStateTestsFiller/stEIP150Specific') diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/CallAndCallcodeConsumeMoreGasThenTransactionHasFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/CallAndCallcodeConsumeMoreGasThenTransactionHasFiller.json new file mode 100644 index 000000000..ff5908cae --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/CallAndCallcodeConsumeMoreGasThenTransactionHasFiller.json @@ -0,0 +1,91 @@ +{ + "CallAndCallcodeConsumeMoreGasThenTransactionHas" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0x12", + "0x08" : "0x08d5b6", + "0x09" : "0x01", + "0x0a" : "0x01" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0", + "0x08" : "0", + "0x09" : "0", + "0x0a" : "0" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "By new EIP150 rules this transaction would be executed even if call consumes more gas then transaction has.", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (CALL 600000 0x1000000000000000000000000000000000000103 0 0 0 0 0)) (SSTORE 10 (CALLCODE 600000 0x1000000000000000000000000000000000000103 0 0 0 0 0)) } ", + "storage": { + } + }, + "1000000000000000000000000000000000000103" : { + "balance" : "0", + "nonce" : "0", + "code" : "should be 12 in the post state", + "code" : "{ (SSTORE 0 0x12) } ", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "600000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/CallAskMoreGasOnDepth2ThenTransactionHasFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/CallAskMoreGasOnDepth2ThenTransactionHasFiller.json new file mode 100644 index 000000000..5192f9349 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/CallAskMoreGasOnDepth2ThenTransactionHasFiller.json @@ -0,0 +1,105 @@ +{ + "CallAskMoreGasOnDepth2ThenTransactionHas" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000107" : { + "storage" : { + "0x08" : "0x030d3e", + "0x09" : "0x01" + } + }, + "1000000000000000000000000000000000000108" : { + "storage" : { + "0x08" : "0x02b157" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000107" : { + "storage" : { + "0x08" : "0", + "0x09" : "0" + } + }, + "1000000000000000000000000000000000000108" : { + "storage" : { + "0x08" : "0" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "ordinal call should work but on second depth it has call that asks more gas than left", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (CALL 200000 0x1000000000000000000000000000000000000107 0 0 0 0 0)) } ", + "storage": { + } + }, + "1000000000000000000000000000000000000107" : { + "balance" : "0", + "nonce" : "0", + "code" : "should work on EIP150", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (CALL 600000 0x1000000000000000000000000000000000000108 0 0 0 0 0)) } ", + "storage": { + } + }, + "1000000000000000000000000000000000000108" : { + "balance" : "0", + "nonce" : "0", + "code" : "should be set in the post state", + "code" : "{ (SSTORE 8 (GAS))} ", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "600000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/CallGoesOOGOnSecondLevel2Filler.json b/src/GeneralStateTestsFiller/stEIP150Specific/CallGoesOOGOnSecondLevel2Filler.json new file mode 100644 index 000000000..e01c8431a --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/CallGoesOOGOnSecondLevel2Filler.json @@ -0,0 +1,105 @@ +{ + "CallGoesOOGOnSecondLevel2" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000113" : { + "storage" : { + } + }, + "1000000000000000000000000000000000000114" : { + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000113" : { + "storage" : { + } + }, + "1000000000000000000000000000000000000114" : { + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "OOG Call transaction has less gas then in example above", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (CALL 600000 0x1000000000000000000000000000000000000113 0 0 0 0 0)) } ", + "storage": { + } + }, + "1000000000000000000000000000000000000113" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (CALL 600000 0x1000000000000000000000000000000000000114 0 0 0 0 0)) } ", + "storage": { + } + }, + "1000000000000000000000000000000000000114" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (GAS)) (SSTORE 10 (GAS)) }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "160000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/CallGoesOOGOnSecondLevelFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/CallGoesOOGOnSecondLevelFiller.json new file mode 100644 index 000000000..0bd615c84 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/CallGoesOOGOnSecondLevelFiller.json @@ -0,0 +1,106 @@ +{ + "CallGoesOOGOnSecondLevel" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000110" : { + "storage" : { + } + }, + "1000000000000000000000000000000000000111" : { + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000110" : { + "storage" : { + } + }, + "1000000000000000000000000000000000000111" : { + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "OOG Call because call goes OOG on second level", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (CALL 600000 0x1000000000000000000000000000000000000110 0 0 0 0 0)) } ", + "storage": { + } + }, + "1000000000000000000000000000000000000110" : { + "balance" : "0", + "nonce" : "0", + "code" : "Inner CaLL goes OOG on EIP150", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (CALL 600000 0x1000000000000000000000000000000000000111 0 0 0 0 0)) } ", + "storage": { + } + }, + "1000000000000000000000000000000000000111" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ (SSTORE 8 (GAS)) (CREATE 0 0 0) (CREATE 0 0 0) (SSTORE 9 (GAS)) (SSTORE 10 (GAS)) }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "220000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/CreateAndGasInsideCreateFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/CreateAndGasInsideCreateFiller.json new file mode 100644 index 000000000..48a7ef3d4 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/CreateAndGasInsideCreateFiller.json @@ -0,0 +1,91 @@ +{ + "CreateAndGasInsideCreate" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x09" : "0x076e34", + "0x0a" : "0x08d5b6", + "0x0b" : "0xf1ecf98489fa9ed60a664fc4998db699cfa39d40" + } + }, + "f1ecf98489fa9ed60a664fc4998db699cfa39d40" : { + "storage" : { + "0xfd" : "0x07ea53" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x09" : "0x076e34", + "0x0a" : "0x08d5b6", + "0x0b" : "0xf1ecf98489fa9ed60a664fc4998db699cfa39d40" + } + }, + "f1ecf98489fa9ed60a664fc4998db699cfa39d40" : { + "storage" : { + "0xfd" : "0x080a7c" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "Test gas before Create, inside create and after", + "code" : "{ (SSTORE 10 (GAS)) (MSTORE 0 0x5a60fd55) (SSTORE 11 (CREATE 0 28 4)) (SSTORE 9 (GAS)) }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "600000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/DelegateCallOnEIPFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/DelegateCallOnEIPFiller.json new file mode 100644 index 000000000..0518e4beb --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/DelegateCallOnEIPFiller.json @@ -0,0 +1,89 @@ +{ + "DelegateCallOnEIP" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0x12", + "0x08" : "0x08d5b6", + "0x09" : "0x01" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0", + "0x08" : "0", + "0x09" : "0" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "should work on EIP150 rules", + "code" : "{ (SSTORE 8 (GAS)) (SSTORE 9 (DELEGATECALL 600000 0x1000000000000000000000000000000000000105 0 0 0 0)) }", + "storage": { + } + }, + "1000000000000000000000000000000000000105" : { + "balance" : "0", + "nonce" : "0", + "code" : "should be 12 in the post state", + "code" : "{ (SSTORE 0 0x12) } ", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "600000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/ExecuteCallThatAskForeGasThenTrabsactionHasFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/ExecuteCallThatAskForeGasThenTrabsactionHasFiller.json new file mode 100644 index 000000000..bd2e3af71 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/ExecuteCallThatAskForeGasThenTrabsactionHasFiller.json @@ -0,0 +1,83 @@ +{ + "ExecuteCallThatAskForeGasThenTrabsactionHas" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000001" : { + "storage" : { + "0x01" : "0x0c" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000001" : { + "storage" : { + "0x01" : "0" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "code" : "{ [[1]] (CALL 600000 0x1000000000000000000000000000000000000001 0 0 0 0 0) }", + "nonce" : "0", + "storage" : { + } + }, + "1000000000000000000000000000000000000001" : { + "balance" : "100000", + "code" : "{ [[1]] 12 }", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "100000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/NewGasPriceForCodesFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/NewGasPriceForCodesFiller.json new file mode 100644 index 000000000..e7550ba15 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/NewGasPriceForCodesFiller.json @@ -0,0 +1,131 @@ +{ + "NewGasPriceForCodes" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0x12", + "0x01" : "0x20", + "0x02" : "0x1122334455667788991011121314151617181920000000000000000000000000", + "0x03" : "0xe8d49be840", + "0x04" : "0x12", + "0x07" : "0x01", + "0x08" : "0x01", + "0x0a" : "0x05e276", + "0x64" : "0x11" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0x12", + "0x01" : "0", + "0x02" : "0", + "0x03" : "0", + "0x04" : "0", + "0x07" : "0", + "0x08" : "0", + "0x0a" : "0", + "0x64" : "0" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Homestead"], + "result" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0x12", + "0x01" : "0x20", + "0x02" : "0x1122334455667788991011121314151617181920000000000000000000000000", + "0x03" : "0xe8d49be840", + "0x04" : "0x12", + "0x07" : "0x01", + "0x08" : "0x01", + "0x0a" : "0x05f428", + "0x64" : "0x11" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "1000000000000000000000000000000000000010" : { + "balance" : "111", + "code" : "0x1122334455667788991011121314151617181920212223242526272829303132", + "nonce" : "0", + "storage" : { + } + }, + "1000000000000000000000000000000000000011" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ (SSTORE 100 0x11) }", + "storage": { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "Test gasPrice of thise codes after EIP150 transition", + "code" : "{ (SSTORE 1 (EXTCODESIZE 0x1000000000000000000000000000000000000010)) (EXTCODECOPY 0x1000000000000000000000000000000000000010 0 0 20) (SSTORE 2 (MLOAD 0)) (SSTORE 4 (SLOAD 0)) (SSTORE 5 (CALL 30000 0x1000000000000000000000000000000000000011 1 0 0 0 0)) (SSTORE 6 (CALLCODE 30000 0x1000000000000000000000000000000000000011 1 0 0 0 0)) (SSTORE 7 (DELEGATECALL 30000 0x1000000000000000000000000000000000000011 0 0 0 0)) (SSTORE 8 (CALL 30000 0x1000000000000000000000000000000000000013 0 0 0 0 0)) (SSTORE 3 (BALANCE 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b)) (SSTORE 10 (GAS)) }", + "storage": { + "0x00" : "0x12" + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "600000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/SuicideToExistingContractFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/SuicideToExistingContractFiller.json new file mode 100644 index 000000000..31841f032 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/SuicideToExistingContractFiller.json @@ -0,0 +1,91 @@ +{ + "SuicideToExistingContract" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000118" : { + "shouldnotexist" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x01" : "0x08bf58" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000118" : { + "shouldnotexist" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x01" : "0x08d574" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "check gas spent on suicide known contract on EIP150", + "code" : "{ (CALL 60000 0x1000000000000000000000000000000000000118 0 0 0 0 0) [[1]] (GAS) }", + "storage": { + } + }, + "1000000000000000000000000000000000000118" : { + "balance" : "0", + "nonce" : "0", + "code" : "Suicide to existing account", + "code" : "{ (SUICIDE 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b) }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "600000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/SuicideToNotExistingContractFiller.json b/src/GeneralStateTestsFiller/stEIP150Specific/SuicideToNotExistingContractFiller.json new file mode 100644 index 000000000..c851b9157 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/SuicideToNotExistingContractFiller.json @@ -0,0 +1,91 @@ +{ + "SuicideToNotExistingContract" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000116" : { + "shouldnotexist" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x01" : "0x085db0" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000116" : { + "shouldnotexist" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x01" : "0x08d574" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "check gas spent on suicide to unknown contract on EIP150", + "code" : "{ (CALL 60000 0x1000000000000000000000000000000000000116 0 0 0 0 0) [[1]] (GAS) }", + "storage": { + } + }, + "1000000000000000000000000000000000000116" : { + "balance" : "0", + "nonce" : "0", + "code" : "Suicide to not existing account", + "code" : "{ (SUICIDE 0x2000000000000000000000000000000000000115) }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "600000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64e0Filler.json b/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64e0Filler.json new file mode 100644 index 000000000..efab9e041 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64e0Filler.json @@ -0,0 +1,96 @@ +{ + "Transaction64Rule_d64e0" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000118" : { + "storage" : { + "0x01" : "0x0c" + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0x021f34", + "0x02" : "0x018016" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000118" : { + "storage" : { + "0x01" : "0" + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0", + "0x02" : "0" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "check gas spent on suicide known contract on EIP150", + "code" : "{ [[0]] (GAS) (CALL 160000 0x1000000000000000000000000000000000000118 0 0 0 0 0) [[2]] (GAS) }", + "storage": { + } + }, + "1000000000000000000000000000000000000118" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[1]] 12 }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "160062" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64m1Filler.json b/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64m1Filler.json new file mode 100644 index 000000000..ecfd4c218 --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64m1Filler.json @@ -0,0 +1,96 @@ +{ + "Transaction64Rule_d64m1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000118" : { + "storage" : { + "0x01" : "0x0c" + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0x021f33", + "0x02" : "0x018015" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000118" : { + "storage" : { + "0x01" : "0" + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0", + "0x02" : "0" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "check gas spent on suicide known contract on EIP150", + "code" : "{ [[0]] (GAS) (CALL 160000 0x1000000000000000000000000000000000000118 0 0 0 0 0) [[2]] (GAS) }", + "storage": { + } + }, + "1000000000000000000000000000000000000118" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[1]] 12 }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "160061" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64p1Filler.json b/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64p1Filler.json new file mode 100644 index 000000000..e0fc55cef --- /dev/null +++ b/src/GeneralStateTestsFiller/stEIP150Specific/Transaction64Rule_d64p1Filler.json @@ -0,0 +1,96 @@ +{ + "Transaction64Rule_d64p1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000000", + "currentNumber" : "2675000", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["EIP150"], + "result" : { + "1000000000000000000000000000000000000118" : { + "storage" : { + "0x01" : "0x0c" + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0x021f35", + "0x02" : "0x018017" + } + } + } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Frontier", "Homestead"], + "result" : { + "1000000000000000000000000000000000000118" : { + "storage" : { + "0x01" : "0" + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x00" : "0", + "0x02" : "0" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0", + "code" : "check gas spent on suicide known contract on EIP150", + "code" : "{ [[0]] (GAS) (CALL 160000 0x1000000000000000000000000000000000000118 0 0 0 0 0) [[2]] (GAS) }", + "storage": { + } + }, + "1000000000000000000000000000000000000118" : { + "balance" : "0", + "nonce" : "0", + "code" : "{ [[1]] 12 }", + "storage": { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "160063" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "0" + ] + } + } +} -- cgit v1.2.3