From 8c7b764d47ce55ba6abe437ae8232cc537c4e0d9 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 21:18:34 +0100 Subject: [PATCH 01/18] updated tests --- tests/files/StateTests/stBlockHashTest.json | 190 ++ .../StateTests/stSystemOperationsTest.json | 1139 +++++++- .../VMTests/RandomTests/201501082023.json | 31 + .../VMTests/RandomTests/201501082026.json | 31 + .../VMTests/RandomTests/201501082028.json | 31 + .../VMTests/RandomTests/201501082029.json | 31 + .../VMTests/RandomTests/201501082030.json | 31 + .../VMTests/RandomTests/201501082036.json | 31 + .../VMTests/RandomTests/201501082039.json | 31 + .../VMTests/RandomTests/201501082040.json | 31 + .../VMTests/RandomTests/201501082041.json | 31 + .../VMTests/RandomTests/201501082052.json | 31 + .../VMTests/RandomTests/201501082111.json | 31 + .../VMTests/RandomTests/201501082112.json | 31 + .../VMTests/RandomTests/201501082115.json | 31 + .../VMTests/RandomTests/201501082116.json | 31 + .../VMTests/RandomTests/201501082118.json | 31 + .../VMTests/RandomTests/201501082119.json | 31 + .../VMTests/RandomTests/201501082121.json | 31 + .../VMTests/RandomTests/201501082122.json | 31 + .../VMTests/RandomTests/201501082123.json | 31 + .../VMTests/RandomTests/201501082131.json | 31 + .../VMTests/RandomTests/201501082132.json | 31 + .../VMTests/RandomTests/201501082134.json | 31 + .../VMTests/RandomTests/201501082137.json | 31 + .../VMTests/RandomTests/201501082141.json | 31 + .../VMTests/RandomTests/201501082145.json | 31 + .../VMTests/RandomTests/201501082146.json | 31 + .../VMTests/RandomTests/201501082150.json | 31 + .../VMTests/RandomTests/201501082151.json | 31 + .../VMTests/RandomTests/201501082153.json | 31 + .../VMTests/RandomTests/201501082156.json | 31 + .../VMTests/RandomTests/201501082159.json | 31 + .../VMTests/RandomTests/201501082200.json | 31 + .../VMTests/RandomTests/201501082203.json | 31 + .../VMTests/RandomTests/201501082205.json | 31 + .../VMTests/RandomTests/201501082207.json | 31 + .../VMTests/RandomTests/201501091628.json | 46 + .../VMTests/RandomTests/201501091644.json | 46 + .../VMTests/RandomTests/201501091657.json | 46 + .../VMTests/RandomTests/201501091658.json | 46 + .../VMTests/RandomTests/201501091727.json | 31 + tests/files/VMTests/RandomTests/goFail.json | 46 + tests/files/VMTests/RandomTests/goFail2.json | 47 + tests/files/VMTests/RandomTests/goFail3.json | 54 + tests/files/VMTests/vmArithmeticTest.json | 90 + tests/files/VMTests/vmBlockInfoTest.json | 91 + .../VMTests/vmEnvironmentalInfoTest.json | 367 +++ .../VMTests/vmIOandFlowOperationsTest.json | 2358 ++++++++++++++++- vm/stack.go | 17 +- vm/vm_debug.go | 2 +- 51 files changed, 5594 insertions(+), 107 deletions(-) create mode 100644 tests/files/StateTests/stBlockHashTest.json create mode 100644 tests/files/VMTests/RandomTests/201501082023.json create mode 100644 tests/files/VMTests/RandomTests/201501082026.json create mode 100644 tests/files/VMTests/RandomTests/201501082028.json create mode 100644 tests/files/VMTests/RandomTests/201501082029.json create mode 100644 tests/files/VMTests/RandomTests/201501082030.json create mode 100644 tests/files/VMTests/RandomTests/201501082036.json create mode 100644 tests/files/VMTests/RandomTests/201501082039.json create mode 100644 tests/files/VMTests/RandomTests/201501082040.json create mode 100644 tests/files/VMTests/RandomTests/201501082041.json create mode 100644 tests/files/VMTests/RandomTests/201501082052.json create mode 100644 tests/files/VMTests/RandomTests/201501082111.json create mode 100644 tests/files/VMTests/RandomTests/201501082112.json create mode 100644 tests/files/VMTests/RandomTests/201501082115.json create mode 100644 tests/files/VMTests/RandomTests/201501082116.json create mode 100644 tests/files/VMTests/RandomTests/201501082118.json create mode 100644 tests/files/VMTests/RandomTests/201501082119.json create mode 100644 tests/files/VMTests/RandomTests/201501082121.json create mode 100644 tests/files/VMTests/RandomTests/201501082122.json create mode 100644 tests/files/VMTests/RandomTests/201501082123.json create mode 100644 tests/files/VMTests/RandomTests/201501082131.json create mode 100644 tests/files/VMTests/RandomTests/201501082132.json create mode 100644 tests/files/VMTests/RandomTests/201501082134.json create mode 100644 tests/files/VMTests/RandomTests/201501082137.json create mode 100644 tests/files/VMTests/RandomTests/201501082141.json create mode 100644 tests/files/VMTests/RandomTests/201501082145.json create mode 100644 tests/files/VMTests/RandomTests/201501082146.json create mode 100644 tests/files/VMTests/RandomTests/201501082150.json create mode 100644 tests/files/VMTests/RandomTests/201501082151.json create mode 100644 tests/files/VMTests/RandomTests/201501082153.json create mode 100644 tests/files/VMTests/RandomTests/201501082156.json create mode 100644 tests/files/VMTests/RandomTests/201501082159.json create mode 100644 tests/files/VMTests/RandomTests/201501082200.json create mode 100644 tests/files/VMTests/RandomTests/201501082203.json create mode 100644 tests/files/VMTests/RandomTests/201501082205.json create mode 100644 tests/files/VMTests/RandomTests/201501082207.json create mode 100644 tests/files/VMTests/RandomTests/201501091628.json create mode 100644 tests/files/VMTests/RandomTests/201501091644.json create mode 100644 tests/files/VMTests/RandomTests/201501091657.json create mode 100644 tests/files/VMTests/RandomTests/201501091658.json create mode 100644 tests/files/VMTests/RandomTests/201501091727.json create mode 100644 tests/files/VMTests/RandomTests/goFail.json create mode 100644 tests/files/VMTests/RandomTests/goFail2.json create mode 100644 tests/files/VMTests/RandomTests/goFail3.json diff --git a/tests/files/StateTests/stBlockHashTest.json b/tests/files/StateTests/stBlockHashTest.json new file mode 100644 index 0000000000..ee8494d001 --- /dev/null +++ b/tests/files/StateTests/stBlockHashTest.json @@ -0,0 +1,190 @@ +{ + "blockhash0" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "5", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "code" : "0x600040600055600540600155600440600255", + "nonce" : "0", + "storage" : { + "0x" : "0x044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "0x02" : "0x13600b294191fc92924bb3ce4b969c1e7e2bab8f4c93c3fc6d0a51733df3c060" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1209", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "98781", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x600040600055600540600155600440600255", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "8500", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "10" + } + }, + "blockhashInRange" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "257", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "code" : "0x60014060005560024060015561010040600255", + "nonce" : "0", + "storage" : { + "0x" : "0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "0x01" : "0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5", + "0x02" : "0x6ca54da2c4784ea43fd88b3402de07ae4bced597cbb19f323b7595857a6720ae" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1409", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "98581", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x60014060005560024060015561010040600255", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "8500", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "10" + } + }, + "blockhashOutOfRange" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "257", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "code" : "0x600040600055610101406001557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff40600255", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "809", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99181", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x600040600055610101406001557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff40600255", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "8500", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "10" + } + } +} \ No newline at end of file diff --git a/tests/files/StateTests/stSystemOperationsTest.json b/tests/files/StateTests/stSystemOperationsTest.json index 4120f3cab6..4989c10f94 100644 --- a/tests/files/StateTests/stSystemOperationsTest.json +++ b/tests/files/StateTests/stSystemOperationsTest.json @@ -529,6 +529,69 @@ "value" : "100000" } }, + "CallRecursiveBomb0_OOG_atMaxCallDepth" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20100000", + "code" : "0x600160005401600055690fffffffffffffffffff610402600054040260025560006000690fffffffffffffffffff610402600054040260006000306104005a03f1600155", + "nonce" : "0", + "storage" : { + "0x" : "0x0401", + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "415000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999485000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20000000", + "code" : "0x600160005401600055690fffffffffffffffffff610402600054040260025560006000690fffffffffffffffffff610402600054040260006000306104005a03f1600155", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "1000000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "CallRecursiveBomb1" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -4166,10 +4229,11 @@ "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", "nonce" : "0", "storage" : { + "0x" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1636", + "balance" : "1166", "code" : "0x", "nonce" : "0", "storage" : { @@ -4177,13 +4241,14 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "46", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa" } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898364", + "balance" : "999999999999898834", "code" : "0x", "nonce" : "1", "storage" : { @@ -4200,7 +4265,242 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "CallToNameRegistratorAddressTooBigLeft" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000099977", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601774aa945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", + "nonce" : "0", + "storage" : { + "0x" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1166", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "46", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999898834", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601774aa945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "CallToNameRegistratorAddressTooBigRight" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000099977", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601774945304eb96065b2a98b57a48a06ae28d285a71b5aa6103e8f1600055", + "nonce" : "0", + "storage" : { + "0x" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "836", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "5304eb96065b2a98b57a48a06ae28d285a71b5aa" : { + "balance" : "23", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899164", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601774945304eb96065b2a98b57a48a06ae28d285a71b5aa6103e8f1600055", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "CallToNameRegistratorMemOOGAndInsufficientBalance" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604065ffffffffffff6000601773945304eb96065b2a98b57a48a06ae28d285a71b564fffffffffff1600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999890000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604065ffffffffffff6000601773945304eb96065b2a98b57a48a06ae28d285a71b564fffffffffff1600055", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4241,10 +4541,11 @@ "code" : "0x7feeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000620f120660406000601773945304eb96065b2a98b57a48a06ae28d285a71b56101f4f1600055", "nonce" : "0", "storage" : { + "0x" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1136", + "balance" : "1166", "code" : "0x", "nonce" : "0", "storage" : { @@ -4252,13 +4553,14 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "46", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { + "0xeeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00" : "0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa" } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898864", + "balance" : "999999999999898834", "code" : "0x", "nonce" : "1", "storage" : { @@ -4275,7 +4577,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4316,10 +4618,11 @@ "code" : "0x7feeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa602052600060406000620f1206601773945304eb96065b2a98b57a48a06ae28d285a71b56101f4f1600055", "nonce" : "0", "storage" : { + "0x" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1136", + "balance" : "966", "code" : "0x", "nonce" : "0", "storage" : { @@ -4327,13 +4630,13 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "46", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898864", + "balance" : "999999999999899034", "code" : "0x", "nonce" : "1", "storage" : { @@ -4350,7 +4653,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4402,7 +4705,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "46", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4425,7 +4728,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4477,7 +4780,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4500,7 +4803,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4552,7 +4855,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4575,7 +4878,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4627,7 +4930,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4650,7 +4953,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4691,10 +4994,11 @@ "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000600060006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", "nonce" : "0", "storage" : { + "0x" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1636", + "balance" : "966", "code" : "0x", "nonce" : "0", "storage" : { @@ -4702,13 +5006,13 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "46", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898364", + "balance" : "999999999999899034", "code" : "0x", "nonce" : "1", "storage" : { @@ -4725,7 +5029,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4763,14 +5067,15 @@ "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000099977", - "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526002600060406000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", + "code" : "0x6001601f60006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055600051600155", "nonce" : "0", "storage" : { - "0x" : "0x01" + "0x" : "0x01", + "0x01" : "0x2a" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1145", + "balance" : "1441", "code" : "0x", "nonce" : "0", "storage" : { @@ -4778,14 +5083,14 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "46", - "code" : "0x6001600155603760005360026000f3", + "code" : "0x6001600155602a601f536001601ff3", "nonce" : "0", "storage" : { "0x01" : "0x01" } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898855", + "balance" : "999999999999898559", "code" : "0x", "nonce" : "1", "storage" : { @@ -4795,14 +5100,167 @@ "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", - "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526002600060406000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", + "code" : "0x6001601f60006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055600051600155", "nonce" : "0", "storage" : { } }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x6001600155603760005360026000f3", + "code" : "0x6001600155602a601f536001601ff3", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "CallToReturn1ForDynamicJump0" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000099977", + "code" : "0x6001601f60006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055600051565b6023602355", + "nonce" : "0", + "storage" : { + "0x" : "0x01", + "0x23" : "0x23" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1444", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "46", + "code" : "0x6001600155602a601f536001601ff3", + "nonce" : "0", + "storage" : { + "0x01" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999898556", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6001601f60006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055600051565b6023602355", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6001600155602a601f536001601ff3", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "CallToReturn1ForDynamicJump1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x6001601f60006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f160005560005156605b6023602355", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6001600155602b601f536001601ff3", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999890000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6001601f60006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f160005560005156605b6023602355", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6001600155602b601f536001601ff3", "nonce" : "0", "storage" : { } @@ -4915,20 +5373,21 @@ "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000100000", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1000000", + "balance" : "1150", "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999998900000", + "balance" : "999999999999898850", "code" : "0x", "nonce" : "1", "storage" : { @@ -4938,7 +5397,7 @@ "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -4961,6 +5420,67 @@ "value" : "100000" } }, + "balanceInputAddressTooBig" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x74a94f5374fce5edbc8e2a8697c15331677e6ebf0baa31600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "622", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899378", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x74a94f5374fce5edbc8e2a8697c15331677e6ebf0baa31600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "callValue" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -5041,10 +5561,12 @@ "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f2600055", "nonce" : "0", "storage" : { + "0x" : "0x01", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1636", + "balance" : "1166", "code" : "0x", "nonce" : "0", "storage" : { @@ -5052,13 +5574,13 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898364", + "balance" : "999999999999898834", "code" : "0x", "nonce" : "1", "storage" : { @@ -5075,7 +5597,160 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "1000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "callcodeToNameRegistratorAddresTooBigLeft" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601774aa945304eb96065b2a98b57a48a06ae28d285a71b56103e8f2600055", + "nonce" : "0", + "storage" : { + "0x" : "0x01", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1166", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999898834", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601774aa945304eb96065b2a98b57a48a06ae28d285a71b56103e8f2600055", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "1000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "callcodeToNameRegistratorAddresTooBigRight" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601774945304eb96065b2a98b57a48a06ae28d285a71b5aa6103e8f2600055", + "nonce" : "0", + "storage" : { + "0x" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "836", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899164", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601774945304eb96065b2a98b57a48a06ae28d285a71b5aa6103e8f2600055", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -5116,10 +5791,11 @@ "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000600060006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f2600055", "nonce" : "0", "storage" : { + "0x" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1636", + "balance" : "966", "code" : "0x", "nonce" : "0", "storage" : { @@ -5127,13 +5803,13 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898364", + "balance" : "999999999999899034", "code" : "0x", "nonce" : "1", "storage" : { @@ -5150,7 +5826,7 @@ }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b60203560003555", "nonce" : "0", "storage" : { } @@ -5403,7 +6079,7 @@ "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000099977", - "code" : "0x7b601080600c6000396000f30060003554156009570060203560003555600052601c60046017f0600055", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052601d60036017f0600055", "nonce" : "1", "storage" : { "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" @@ -5425,7 +6101,7 @@ }, "d2571607e241ecf590ed94b12d87c94babe36db6" : { "balance" : "23", - "code" : "0x60003554156009570060203560003555", + "code" : "0x6000355415600957005b602035600035", "nonce" : "0", "storage" : { } @@ -5434,7 +6110,68 @@ "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", - "code" : "0x7b601080600c6000396000f30060003554156009570060203560003555600052601c60046017f0600055", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052601d60036017f0600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "createNameRegistratorOOG_MemExpansionInsufficientBalance" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "110000", + "code" : "0x7c601080600c6000396000f3006000355415600957005b602035600035556000526affffffffffffffffffffff6003612af8f0600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999890000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "10000", + "code" : "0x7c601080600c6000396000f3006000355415600957005b602035600035556000526affffffffffffffffffffff6003612af8f0600055", "nonce" : "0", "storage" : { } @@ -5472,7 +6209,7 @@ "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000100000", - "code" : "0x7b601080600c6000396000f30060003554156009570060203560003555600052601c650fffffffffff6017f0600055", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052601d650fffffffffff6017f0600055", "nonce" : "0", "storage" : { } @@ -5495,7 +6232,7 @@ "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", - "code" : "0x7b601080600c6000396000f30060003554156009570060203560003555600052601c650fffffffffff6017f0600055", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052601d650fffffffffff6017f0600055", "nonce" : "0", "storage" : { } @@ -5533,7 +6270,7 @@ "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000100000", - "code" : "0x7b601080600c6000396000f30060003554156009570060203560003555600052650fffffffffff60046017f0600055", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052650fffffffffff60036017f0600055", "nonce" : "0", "storage" : { } @@ -5556,7 +6293,7 @@ "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", - "code" : "0x7b601080600c6000396000f30060003554156009570060203560003555600052650fffffffffff60046017f0600055", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052650fffffffffff60036017f0600055", "nonce" : "0", "storage" : { } @@ -5594,7 +6331,7 @@ "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", - "code" : "0x7b601080600c6000396000f30060003554156009570060203560003555600052601c60046103e8f0600055", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052601d60036103e8f0600055", "nonce" : "0", "storage" : { } @@ -5610,7 +6347,7 @@ "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", - "code" : "0x7b601080600c6000396000f30060003554156009570060203560003555600052601c60046103e8f0600055", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052601d60036103e8f0600055", "nonce" : "0", "storage" : { } @@ -5633,6 +6370,189 @@ "value" : "100000" } }, + "createNameRegistratorZeroMem" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052600060036017f0600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999890000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052600060036017f0600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "createNameRegistratorZeroMem2" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x7c601080600c6000396000f3006000355415600957005b6020356000355560005260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6017f0600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999890000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7c601080600c6000396000f3006000355415600957005b6020356000355560005260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6017f0600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "createNameRegistratorZeroMemExpansion" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052600060006017f0600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999890000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052600060006017f0600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "currentAccountBalance" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -5986,6 +6906,121 @@ "value" : "100000" } }, + "suicideCallerAddresTooBigLeft" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "803", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1999999999999999197", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x3360005574aaa94f5374fce5edbc8e2a8697c15331677e6ebf0bff", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "1000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "suicideCallerAddresTooBigRight" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "803", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "4f5374fce5edbc8e2a8697c15331677e6ebf0baa" : { + "balance" : "1000000000000100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899197", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x3360005574a94f5374fce5edbc8e2a8697c15331677e6ebf0baaff", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "1000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "suicideNotExistingAccount" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", diff --git a/tests/files/VMTests/RandomTests/201501082023.json b/tests/files/VMTests/RandomTests/201501082023.json new file mode 100644 index 0000000000..d18c44ef53 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082023.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x406d3b84661619", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x406d3b84661619", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082026.json b/tests/files/VMTests/RandomTests/201501082026.json new file mode 100644 index 0000000000..9f85ee345e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082026.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x406442", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x406442", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082028.json b/tests/files/VMTests/RandomTests/201501082028.json new file mode 100644 index 0000000000..d22a5823b6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082028.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x406c6c658b319e39524111", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x406c6c658b319e39524111", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082029.json b/tests/files/VMTests/RandomTests/201501082029.json new file mode 100644 index 0000000000..7bc02c8745 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082029.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40659150999c9f567e79980a55", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40659150999c9f567e79980a55", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082030.json b/tests/files/VMTests/RandomTests/201501082030.json new file mode 100644 index 0000000000..99b1854e2b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082030.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x407f903b8d3b150453746297", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x407f903b8d3b150453746297", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082036.json b/tests/files/VMTests/RandomTests/201501082036.json new file mode 100644 index 0000000000..b4b69e676e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082036.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x406a303c728a8267a167", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x406a303c728a8267a167", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082039.json b/tests/files/VMTests/RandomTests/201501082039.json new file mode 100644 index 0000000000..547849ed33 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082039.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4054", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4054", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082040.json b/tests/files/VMTests/RandomTests/201501082040.json new file mode 100644 index 0000000000..2bdfe7cd4a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082040.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x407798", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x407798", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082041.json b/tests/files/VMTests/RandomTests/201501082041.json new file mode 100644 index 0000000000..575bdad8b2 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082041.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x407189ff019c0562", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x407189ff019c0562", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082052.json b/tests/files/VMTests/RandomTests/201501082052.json new file mode 100644 index 0000000000..ebc695e498 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082052.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40346c6742f06f5669", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40346c6742f06f5669", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082111.json b/tests/files/VMTests/RandomTests/201501082111.json new file mode 100644 index 0000000000..e79e6b1d22 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082111.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40693385207a7c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40693385207a7c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082112.json b/tests/files/VMTests/RandomTests/201501082112.json new file mode 100644 index 0000000000..a941570e69 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082112.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40768e103a065b96919d8a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40768e103a065b96919d8a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082115.json b/tests/files/VMTests/RandomTests/201501082115.json new file mode 100644 index 0000000000..a2bc3c0dc0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082115.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x647d17559c765637f279", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x647d17559c765637f279", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082116.json b/tests/files/VMTests/RandomTests/201501082116.json new file mode 100644 index 0000000000..6e416fc0d6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082116.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x407014808a968a735b89", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x407014808a968a735b89", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082118.json b/tests/files/VMTests/RandomTests/201501082118.json new file mode 100644 index 0000000000..c6f69137c8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082118.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4074a18f185a027e9b638b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4074a18f185a027e9b638b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082119.json b/tests/files/VMTests/RandomTests/201501082119.json new file mode 100644 index 0000000000..14478f375f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082119.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x69076656405385ff15126d5663", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69076656405385ff15126d5663", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082121.json b/tests/files/VMTests/RandomTests/201501082121.json new file mode 100644 index 0000000000..771df32adc --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082121.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x69598e9d6b8579545294975630", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69598e9d6b8579545294975630", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082122.json b/tests/files/VMTests/RandomTests/201501082122.json new file mode 100644 index 0000000000..28f1ba43bf --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082122.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x401962587f9256", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x401962587f9256", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082123.json b/tests/files/VMTests/RandomTests/201501082123.json new file mode 100644 index 0000000000..3533a44255 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082123.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40456a8c176f7ff18e33ff04", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40456a8c176f7ff18e33ff04", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082131.json b/tests/files/VMTests/RandomTests/201501082131.json new file mode 100644 index 0000000000..646df2c472 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082131.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x631788443a5685158e7c6f8509ff89", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x631788443a5685158e7c6f8509ff89", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082132.json b/tests/files/VMTests/RandomTests/201501082132.json new file mode 100644 index 0000000000..0262df5313 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082132.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x407d3199", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x407d3199", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082134.json b/tests/files/VMTests/RandomTests/201501082134.json new file mode 100644 index 0000000000..b28e51e150 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082134.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x407a695639610a78f3a2403b849f4478", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x407a695639610a78f3a2403b849f4478", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082137.json b/tests/files/VMTests/RandomTests/201501082137.json new file mode 100644 index 0000000000..c10765fcb5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082137.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40417a83021871", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40417a83021871", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082141.json b/tests/files/VMTests/RandomTests/201501082141.json new file mode 100644 index 0000000000..ff542e477c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082141.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x405b6985f154646e96", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x405b6985f154646e96", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082145.json b/tests/files/VMTests/RandomTests/201501082145.json new file mode 100644 index 0000000000..8acf41c685 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082145.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x405a33916e078d176a3b9f63158319", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x405a33916e078d176a3b9f63158319", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082146.json b/tests/files/VMTests/RandomTests/201501082146.json new file mode 100644 index 0000000000..67326f8bc8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082146.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40367a6d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40367a6d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082150.json b/tests/files/VMTests/RandomTests/201501082150.json new file mode 100644 index 0000000000..06883e498c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082150.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40417b787c7dff40", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40417b787c7dff40", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082151.json b/tests/files/VMTests/RandomTests/201501082151.json new file mode 100644 index 0000000000..92ae6a39d5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082151.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4063", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4063", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082153.json b/tests/files/VMTests/RandomTests/201501082153.json new file mode 100644 index 0000000000..3db434ce60 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082153.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x406c31a4a15790a4", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x406c31a4a15790a4", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082156.json b/tests/files/VMTests/RandomTests/201501082156.json new file mode 100644 index 0000000000..eab0bc9274 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082156.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x67a19571449a695a885684380a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x67a19571449a695a885684380a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082159.json b/tests/files/VMTests/RandomTests/201501082159.json new file mode 100644 index 0000000000..6742f26cb1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082159.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x407c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x407c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082200.json b/tests/files/VMTests/RandomTests/201501082200.json new file mode 100644 index 0000000000..37237191b4 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082200.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x62586218567e8b7114", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x62586218567e8b7114", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082203.json b/tests/files/VMTests/RandomTests/201501082203.json new file mode 100644 index 0000000000..932d8f2617 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082203.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4032906e0a53733c0b448d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4032906e0a53733c0b448d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082205.json b/tests/files/VMTests/RandomTests/201501082205.json new file mode 100644 index 0000000000..40019c92c0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082205.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4042729d793c731a3c8aff514341203b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4042729d793c731a3c8aff514341203b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501082207.json b/tests/files/VMTests/RandomTests/201501082207.json new file mode 100644 index 0000000000..c8e801f73a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501082207.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40ff0a95746b458444", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40ff0a95746b458444", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501091628.json b/tests/files/VMTests/RandomTests/201501091628.json new file mode 100644 index 0000000000..306eabf9c8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501091628.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5867880499313a384351f3", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5867880499313a384351f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5867880499313a384351f3", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501091644.json b/tests/files/VMTests/RandomTests/201501091644.json new file mode 100644 index 0000000000..9628c33ee0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501091644.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x453380409020758c7f3838739003", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9984", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x453380409020758c7f3838739003", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x453380409020758c7f3838739003", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501091657.json b/tests/files/VMTests/RandomTests/201501091657.json new file mode 100644 index 0000000000..ef2389ab2e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501091657.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3643325b201765585a94", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9984", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3643325b201765585a94", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3643325b201765585a94", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501091658.json b/tests/files/VMTests/RandomTests/201501091658.json new file mode 100644 index 0000000000..9de4b94c2e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501091658.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x586a6c16769c068737846f65f2f3", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x586a6c16769c068737846f65f2f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x586a6c16769c068737846f65f2f3", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501091727.json b/tests/files/VMTests/RandomTests/201501091727.json new file mode 100644 index 0000000000..619ce4a3dd --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501091727.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x583438f0", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x583438f0", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/goFail.json b/tests/files/VMTests/RandomTests/goFail.json new file mode 100644 index 0000000000..323786a93b --- /dev/null +++ b/tests/files/VMTests/RandomTests/goFail.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b6ca491571a0a338f3a33670260", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6ca491571a0a338f3a33670260", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6ca491571a0a338f3a33670260", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/goFail2.json b/tests/files/VMTests/RandomTests/goFail2.json new file mode 100644 index 0000000000..c2be970602 --- /dev/null +++ b/tests/files/VMTests/RandomTests/goFail2.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x681158607a06f03c3604671a16", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x681158607a06f03c3604671a16", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x681158607a06f03c3604671a16", + "nonce" : "0", + "storage" : { + } + } + } + } +} + diff --git a/tests/files/VMTests/RandomTests/goFail3.json b/tests/files/VMTests/RandomTests/goFail3.json new file mode 100644 index 0000000000..2bc3cb7aff --- /dev/null +++ b/tests/files/VMTests/RandomTests/goFail3.json @@ -0,0 +1,54 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60583532a07f610a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9964", + "logs" : [ + { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "bloom" : "00000000000000000000800000000000000000000000000000000880000000000000000000000000000000000000000000000000000000000000000000000000", + "data" : "0x", + "topics" : [ + ] + } + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60583532a07f610a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60583532a07f610a", + "nonce" : "0", + "storage" : { + } + } + } + } +} + diff --git a/tests/files/VMTests/vmArithmeticTest.json b/tests/files/VMTests/vmArithmeticTest.json index 9d7cac99fc..37c6bc33b5 100644 --- a/tests/files/VMTests/vmArithmeticTest.json +++ b/tests/files/VMTests/vmArithmeticTest.json @@ -5768,6 +5768,96 @@ } } }, + "sdiv4" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x6004600003600505600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9694", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6004600003600505600055", + "nonce" : "0", + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6004600003600505600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "sdiv5" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60016000037f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60000305600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9692", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016000037f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60000305600055", + "nonce" : "0", + "storage" : { + "0x" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016000037f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60000305600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "sdivByZero0" : { "callcreates" : [ ], diff --git a/tests/files/VMTests/vmBlockInfoTest.json b/tests/files/VMTests/vmBlockInfoTest.json index 67ec9dbf82..2633c466c2 100644 --- a/tests/files/VMTests/vmBlockInfoTest.json +++ b/tests/files/VMTests/vmBlockInfoTest.json @@ -87,6 +87,53 @@ } } }, + "blockhashInRange" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "257", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60014060005560024060015561010040600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9091", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60014060005560024060015561010040600255", + "nonce" : "0", + "storage" : { + "0x" : "0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "0x01" : "0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5", + "0x02" : "0x6ca54da2c4784ea43fd88b3402de07ae4bced597cbb19f323b7595857a6720ae" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60014060005560024060015561010040600255", + "nonce" : "0", + "storage" : { + } + } + } + }, "blockhashMyBlock" : { "callcreates" : [ ], @@ -175,6 +222,50 @@ } } }, + "blockhashOutOfRange" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "257", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600040600055610101406001557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff40600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9691", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600040600055610101406001557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff40600255", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600040600055610101406001557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff40600255", + "nonce" : "0", + "storage" : { + } + } + } + }, "coinbase" : { "callcreates" : [ ], diff --git a/tests/files/VMTests/vmEnvironmentalInfoTest.json b/tests/files/VMTests/vmEnvironmentalInfoTest.json index 88f22027ea..95e0afb0ab 100644 --- a/tests/files/VMTests/vmEnvironmentalInfoTest.json +++ b/tests/files/VMTests/vmEnvironmentalInfoTest.json @@ -1,4 +1,100 @@ { + "ExtCodeSizeAddressInputTooBigLeftMyAddress" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x74aa0f572e5295c57f15886f9b263e2f6d2d6c7b5ec63b600055", + "data" : "0x", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999697", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x74aa0f572e5295c57f15886f9b263e2f6d2d6c7b5ec63b600055", + "nonce" : "0", + "storage" : { + "0x" : "0x1a" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x74aa0f572e5295c57f15886f9b263e2f6d2d6c7b5ec63b600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "ExtCodeSizeAddressInputTooBigRightMyAddress" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x740f572e5295c57f15886f9b263e2f6d2d6c7b5ec6aa3b600055", + "data" : "0x", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999897", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x740f572e5295c57f15886f9b263e2f6d2d6c7b5ec6aa3b600055", + "nonce" : "0", + "storage" : { + } + }, + "572e5295c57f15886f9b263e2f6d2d6c7b5ec6aa" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x740f572e5295c57f15886f9b263e2f6d2d6c7b5ec6aa3b600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "address0" : { "callcreates" : [ ], @@ -230,6 +326,153 @@ } } }, + "balanceAddressInputTooBig" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x74cd1722f3947def4cf144679da39c4c32bdc35681aa31600055", + "data" : "0x", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999878", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x74cd1722f3947def4cf144679da39c4c32bdc35681aa31600055", + "nonce" : "0", + "storage" : { + } + }, + "1722f3947def4cf144679da39c4c32bdc35681aa" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x74cd1722f3947def4cf144679da39c4c32bdc35681aa31600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "balanceAddressInputTooBigLeftMyAddress" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x74aa0f572e5295c57f15886f9b263e2f6d2d6c7b5ec631600055", + "data" : "0x", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999678", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x74aa0f572e5295c57f15886f9b263e2f6d2d6c7b5ec631600055", + "nonce" : "0", + "storage" : { + "0x" : "0x0de0b6b3a7640000" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x74aa0f572e5295c57f15886f9b263e2f6d2d6c7b5ec631600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "balanceAddressInputTooBigRightMyAddress" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x740f572e5295c57f15886f9b263e2f6d2d6c7b5ec6aa31600055", + "data" : "0x", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999878", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x740f572e5295c57f15886f9b263e2f6d2d6c7b5ec6aa31600055", + "nonce" : "0", + "storage" : { + } + }, + "572e5295c57f15886f9b263e2f6d2d6c7b5ec6aa" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x740f572e5295c57f15886f9b263e2f6d2d6c7b5ec6aa31600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "balanceCaller3" : { "callcreates" : [ ], @@ -1189,6 +1432,130 @@ } } }, + "extcodecopy0AddressTooBigLeft" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x333b6000600074aacd1722f3947def4cf144679da39c4c32bdc356813c600051600055", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "123456789", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999689", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x333b6000600074aacd1722f3947def4cf144679da39c4c32bdc356813c600051600055", + "nonce" : "0", + "storage" : { + "0x" : "0x6005600055000000000000000000000000000000000000000000000000000000" + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "1000000000000000000", + "code" : "0x6005600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x333b6000600074aacd1722f3947def4cf144679da39c4c32bdc356813c600051600055", + "nonce" : "0", + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "1000000000000000000", + "code" : "0x6005600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "extcodecopy0AddressTooBigRight" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x333b6000600074cd1722f3947def4cf144679da39c4c32bdc35681aa3c600051600055", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "123456789", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999889", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x333b6000600074cd1722f3947def4cf144679da39c4c32bdc35681aa3c600051600055", + "nonce" : "0", + "storage" : { + } + }, + "1722f3947def4cf144679da39c4c32bdc35681aa" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "1000000000000000000", + "code" : "0x6005600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x333b6000600074cd1722f3947def4cf144679da39c4c32bdc35681aa3c600051600055", + "nonce" : "0", + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "1000000000000000000", + "code" : "0x6005600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "extcodecopyZeroMemExpansion" : { "callcreates" : [ ], diff --git a/tests/files/VMTests/vmIOandFlowOperationsTest.json b/tests/files/VMTests/vmIOandFlowOperationsTest.json index 24adc9d5dc..33804b1d22 100644 --- a/tests/files/VMTests/vmIOandFlowOperationsTest.json +++ b/tests/files/VMTests/vmIOandFlowOperationsTest.json @@ -1,4 +1,1934 @@ { + "BlockNumberDynamicJump0_AfterJumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600843015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600843015660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJump0_AfterJumpdest3" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600b60085043015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600b60085043015660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJump0_foreverOutOfGas" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b600060000156", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b600060000156", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJump0_jumpdest0" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600743015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9693", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600743015660015b600255", + "nonce" : "0", + "storage" : { + "0x02" : "0x23" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600743015660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJump0_jumpdest2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600a60085043015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9691", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600a60085043015660015b600255", + "nonce" : "0", + "storage" : { + "0x02" : "0x23" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600a60085043015660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJump0_withoutJumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x602360074301566001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602360074301566001600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJump1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x620fffff620fffff01430156", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x620fffff620fffff01430156", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpInsidePushWithJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6004430156655b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6004430156655b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpInsidePushWithoutJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600543015661eeff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600543015661eeff", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpi0" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600160094301576001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600160094301576001600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpi1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600060094301576001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9692", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600060094301576001600255", + "nonce" : "0", + "storage" : { + "0x02" : "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600060094301576001600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpi1_jumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236001600a43015760015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236001600a43015760015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpiAfterStop" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600160084301570060015b6002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9692", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600160084301570060015b6002600355", + "nonce" : "0", + "storage" : { + "0x03" : "0x02" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600160084301570060015b6002600355", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpiOutsideBoundary" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04301576002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04301576002600355", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpifInsidePushWithJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60016006430157655b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016006430157655b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "BlockNumberDynamicJumpifInsidePushWithoutJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6001600743015761eeff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6001600743015761eeff", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DyanmicJump0_outOfBoundary" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600760005401566001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600760005401566001600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "DynamicJump0_AfterJumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x602360086003015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602360086003015660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJump0_AfterJumpdest3" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600b6008506003015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600b6008506003015660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJump0_foreverOutOfGas" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b600060000156", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b600060000156", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJump0_jumpdest0" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x602360076003015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9693", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602360076003015660015b600255", + "nonce" : "0", + "storage" : { + "0x02" : "0x23" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602360076003015660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJump0_jumpdest2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600a6008506003015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9691", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600a6008506003015660015b600255", + "nonce" : "0", + "storage" : { + "0x02" : "0x23" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600a6008506003015660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJump0_withoutJumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236007600301566001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236007600301566001600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJump1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x620fffff620fffff0160030156", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x620fffff620fffff0160030156", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpAfterStop" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6008600101560060015b6002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9693", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6008600101560060015b6002600355", + "nonce" : "0", + "storage" : { + "0x03" : "0x02" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6008600101560060015b6002600355", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpInsidePushWithJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600460030156655b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600460030156655b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpInsidePushWithoutJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60056003015661eeff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60056003015661eeff", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpJD_DependsOnJumps0" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "1", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6009436006575b566001", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6009436006575b566001", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpJD_DependsOnJumps1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "1", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600a436006575b5660015b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9691", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600a436006575b5660015b6001600155", + "nonce" : "0", + "storage" : { + "0x01" : "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600a436006575b5660015b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpPathologicalTest0" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "4", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x435660615b4343025660615b60615b5b5b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9690", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x435660615b4343025660615b60615b5b5b6001600155", + "nonce" : "0", + "storage" : { + "0x01" : "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x435660615b4343025660615b60615b5b5b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpPathologicalTest1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "4", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x435660615b4343025660615b60615b605b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x435660615b4343025660615b60615b605b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpPathologicalTest2" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "4", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x435631615b60615b60615b606001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x435631615b60615b60615b606001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpPathologicalTest3" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "7", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x435631615b60615b60615b606001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x435631615b60615b60615b606001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpStartWithJumpDest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b586000555960115758600052596000575b58600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9478", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b586000555960115758600052596000575b58600055", + "nonce" : "0", + "storage" : { + "0x" : "0x12" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b586000555960115758600052596000575b58600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpi0" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x602360016009600301576001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602360016009600301576001600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpi1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x602360006009600301576001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9692", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602360006009600301576001600255", + "nonce" : "0", + "storage" : { + "0x02" : "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602360006009600301576001600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpi1_jumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236001600a6003015760015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236001600a6003015760015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpiAfterStop" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60016008600301570060015b6002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9692", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016008600301570060015b6002600355", + "nonce" : "0", + "storage" : { + "0x03" : "0x02" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016008600301570060015b6002600355", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpiOutsideBoundary" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0600301576002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0600301576002600355", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpifInsidePushWithJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6001600660030157655b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6001600660030157655b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "DynamicJumpifInsidePushWithoutJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600160076003015761eeff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600160076003015761eeff", + "nonce" : "0", + "storage" : { + } + } + } + }, + "JDfromStorageDynamicJump0_AfterJumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236008600054015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236008600054015660015b600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJump0_AfterJumpdest3" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600b600850600054015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600b600850600054015660015b600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJump0_foreverOutOfGas" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b600060000156", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b600060000156", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJump0_jumpdest0" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236007600054015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9673", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236007600054015660015b600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04", + "0x02" : "0x23" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236007600054015660015b600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJump0_jumpdest2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600a600850600054015660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9671", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600a600850600054015660015b600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04", + "0x02" : "0x23" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600a600850600054015660015b600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJump0_withoutJumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600760005401566001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600760005401566001600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJump1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x620fffff620fffff016000540156", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x620fffff620fffff016000540156", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpInsidePushWithJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60046000540156655b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60046000540156655b6001600155", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpInsidePushWithoutJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6005600054015661eeff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6005600054015661eeff", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpi0" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236001600960005401576001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236001600960005401576001600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpi1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236000600960005401576001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9672", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236000600960005401576001600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04", + "0x02" : "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236000600960005401576001600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpi1_jumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236001600a600054015760015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236001600a600054015760015b600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpiAfterStop" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6001600860005401570060015b6002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9672", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6001600860005401570060015b6002600355", + "nonce" : "0", + "storage" : { + "0x" : "0x04", + "0x03" : "0x02" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6001600860005401570060015b6002600355", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpiOutsideBoundary" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff060005401576002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff060005401576002600355", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpifInsidePushWithJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600160066000540157655b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600160066000540157655b6001600155", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, + "JDfromStorageDynamicJumpifInsidePushWithoutJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "2", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60016007600054015761eeff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016007600054015761eeff", + "nonce" : "0", + "storage" : { + "0x" : "0x04" + } + } + } + }, "dupAt51becameMload" : { "callcreates" : [ ], @@ -134,7 +2064,7 @@ } } }, - "jump0" : { + "jump0_AfterJumpdest" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -146,7 +2076,7 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x60236007566001600255", + "code" : "0x602360085660015b600255", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", @@ -156,7 +2086,36 @@ "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x60236007566001600255", + "code" : "0x602360085660015b600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jump0_AfterJumpdest3" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6023600b6008505660015b600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6023600b6008505660015b600255", "nonce" : "0", "storage" : { } @@ -175,7 +2134,7 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x600056", + "code" : "0x5b600056", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", @@ -185,7 +2144,7 @@ "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x600056", + "code" : "0x5b600056", "nonce" : "0", "storage" : { } @@ -237,35 +2196,6 @@ } } }, - "jump0_jumpdest1" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x602360085660015b600255", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x602360085660015b600255", - "nonce" : "0", - "storage" : { - } - } - } - }, "jump0_jumpdest2" : { "callcreates" : [ ], @@ -311,7 +2241,7 @@ } } }, - "jump0_jumpdest3" : { + "jump0_outOfBoundary" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -323,7 +2253,7 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6023600b6008505660015b600255", + "code" : "0x60236007566001600255", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", @@ -333,7 +2263,36 @@ "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x6023600b6008505660015b600255", + "code" : "0x60236007566001600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jump0_withoutJumpdest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60236007566001600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60236007566001600255", "nonce" : "0", "storage" : { } @@ -369,6 +2328,226 @@ } } }, + "jumpAfterStop" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6006560060015b6002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9695", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6006560060015b6002600355", + "nonce" : "0", + "storage" : { + "0x03" : "0x02" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6006560060015b6002600355", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jumpDynamicJumpSameDest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6002600401565b600360005260206000f3600656", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9988", + "logs" : [ + ], + "out" : "0x0000000000000000000000000000000000000000000000000000000000000003", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6002600401565b600360005260206000f3600656", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6002600401565b600360005260206000f3600656", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jumpInsidePushWithJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600456655b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600456655b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jumpInsidePushWithoutJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60055661eeff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60055661eeff", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jumpOntoJump" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x565b600056", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x565b600056", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jumpdestBigList" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6009565b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b", + "data" : "0x", + "gas" : "100000000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999914", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6009565b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6009565b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b", + "nonce" : "0", + "storage" : { + } + } + } + }, "jumpi0" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -472,7 +2651,52 @@ } } }, - "jumpi2" : { + "jumpiAfterStop" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60016008570060015b6002600355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9694", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016008570060015b6002600355", + "nonce" : "0", + "storage" : { + "0x03" : "0x02" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016008570060015b6002600355", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jumpiOutsideBoundary" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -501,6 +2725,64 @@ } } }, + "jumpifInsidePushWithJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6001600657655b6001600155", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6001600657655b6001600155", + "nonce" : "0", + "storage" : { + } + } + } + }, + "jumpifInsidePushWithoutJumpDest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600160075761eeff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600160075761eeff", + "nonce" : "0", + "storage" : { + } + } + } + }, "mloadError0" : { "callcreates" : [ ], diff --git a/vm/stack.go b/vm/stack.go index e31f3eb576..a9aafdb9dd 100644 --- a/vm/stack.go +++ b/vm/stack.go @@ -2,7 +2,6 @@ package vm import ( "fmt" - "math" "math/big" ) @@ -141,21 +140,7 @@ func (m *Memory) Resize(size uint64) { } } -func (m *Memory) Get(offset, size int64) []byte { - if size == 0 { - return nil - } - - if len(m.store) > int(offset) { - end := int(math.Min(float64(len(m.store)), float64(offset+size))) - - return m.store[offset:end] - } - - return nil -} - -func (self *Memory) Geti(offset, size int64) (cpy []byte) { +func (self *Memory) Get(offset, size int64) (cpy []byte) { if size == 0 { return nil } diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 92e4154e4f..04ba8190df 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -583,7 +583,7 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * topics[i] = ethutil.LeftPadBytes(stack.Pop().Bytes(), 32) } - data := mem.Geti(mStart.Int64(), mSize.Int64()) + data := mem.Get(mStart.Int64(), mSize.Int64()) log := &Log{context.Address(), topics, data} self.env.AddLog(log) From 351516c57cb5872e849ffca643526da5801564f2 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 22:23:33 +0100 Subject: [PATCH 02/18] Cast to string for hashable type --- core/block_processor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_processor.go b/core/block_processor.go index 3ccf2d03c9..a9f948a461 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -308,7 +308,7 @@ func (sm *BlockProcessor) AccumelateRewards(statedb *state.StateDB, block, paren } uncles.Add(string(uncle.Hash())) - if !ancestors.Has(uncle.ParentHash) { + if !ancestors.Has(string(uncle.ParentHash)) { return UncleError(fmt.Sprintf("Uncle's parent unknown (%x)", uncle.ParentHash[0:4])) } From 491c23a728e4f5cdedfa040aded6a6b136f6bee0 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 22:42:36 +0100 Subject: [PATCH 03/18] Moved the TD method from block processor. --- core/block_processor.go | 50 +++++++++++------------------------------ core/chain_manager.go | 16 ++++++++++++- tests/vm/gh_test.go | 2 +- 3 files changed, 29 insertions(+), 39 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index a9f948a461..4d93fcead2 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -2,7 +2,6 @@ package core import ( "bytes" - "errors" "fmt" "math/big" "sync" @@ -217,44 +216,21 @@ func (sm *BlockProcessor) ProcessWithParent(block, parent *types.Block) (td *big return } - // Calculate the new total difficulty and sync back to the db - if td, ok := sm.CalculateTD(block); ok { - // Sync the current block's state to the database and cancelling out the deferred Undo - state.Sync() + // Calculate the td for this block + td = CalculateTD(block, parent) + // Sync the current block's state to the database and cancelling out the deferred Undo + state.Sync() + // Set the block hashes for the current messages + state.Manifest().SetHash(block.Hash()) + messages = state.Manifest().Messages + // Reset the manifest XXX We need this? + state.Manifest().Reset() + // Remove transactions from the pool + sm.txpool.RemoveSet(block.Transactions()) - state.Manifest().SetHash(block.Hash()) + chainlogger.Infof("processed block #%d (%x...)\n", header.Number, block.Hash()[0:4]) - messages := state.Manifest().Messages - state.Manifest().Reset() - - chainlogger.Infof("processed block #%d (%x...)\n", header.Number, block.Hash()[0:4]) - - sm.txpool.RemoveSet(block.Transactions()) - - return td, messages, nil - } else { - return nil, nil, errors.New("total diff failed") - } -} - -func (sm *BlockProcessor) CalculateTD(block *types.Block) (*big.Int, bool) { - uncleDiff := new(big.Int) - for _, uncle := range block.Uncles() { - uncleDiff = uncleDiff.Add(uncleDiff, uncle.Difficulty) - } - - // TD(genesis_block) = 0 and TD(B) = TD(B.parent) + sum(u.difficulty for u in B.uncles) + B.difficulty - td := new(big.Int) - td = td.Add(sm.bc.Td(), uncleDiff) - td = td.Add(td, block.Header().Difficulty) - - // The new TD will only be accepted if the new difficulty is - // is greater than the previous. - if td.Cmp(sm.bc.Td()) > 0 { - return td, true - } - - return nil, false + return td, messages, nil } // Validates the current block. Returns an error if the block was invalid, diff --git a/core/chain_manager.go b/core/chain_manager.go index 90b5692ac1..caa2e7b430 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -34,6 +34,20 @@ func CalcDifficulty(block, parent *types.Block) *big.Int { return diff } +func CalculateTD(block, parent *types.Block) *big.Int { + uncleDiff := new(big.Int) + for _, uncle := range block.Uncles() { + uncleDiff = uncleDiff.Add(uncleDiff, uncle.Difficulty) + } + + // TD(genesis_block) = 0 and TD(B) = TD(B.parent) + sum(u.difficulty for u in B.uncles) + B.difficulty + td := new(big.Int) + td = td.Add(parent.Td, uncleDiff) + td = td.Add(td, block.Header().Difficulty) + + return td +} + func CalcGasLimit(parent, block *types.Block) *big.Int { if block.Number().Cmp(big.NewInt(0)) == 0 { return ethutil.BigPow(10, 6) @@ -360,7 +374,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { cblock := self.currentBlock if td.Cmp(self.td) > 0 { if block.Header().Number.Cmp(new(big.Int).Add(cblock.Header().Number, ethutil.Big1)) < 0 { - chainlogger.Infof("Split detected. New head #%v (%x), was #%v (%x)\n", block.Header().Number, block.Hash()[:4], cblock.Header().Number, cblock.Hash()[:4]) + chainlogger.Infof("Split detected. New head #%v (%x) TD=%v, was #%v (%x) TD=%v\n", block.Header().Number, block.Hash()[:4], td, cblock.Header().Number, cblock.Hash()[:4], self.td) } self.setTotalDifficulty(td) diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index 2aece215e8..47b5882688 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -81,7 +81,7 @@ func RunVmTest(p string, t *testing.T) { for name, test := range tests { /* helper.Logger.SetLogLevel(5) - if name != "jump0_jumpdest2" { + if name != "createNameRegistratorZeroMem" { continue } */ From e3da85faedf21a3ddb73a0fa29decf65364e6c39 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 10 Jan 2015 00:51:56 +0100 Subject: [PATCH 04/18] Implemented filter for ws + fixes * proper 0xhex * filters fixed * start of filter manager * accounts for ws. Closes #246 --- cmd/mist/assets/qml/browser.qml | 2 +- cmd/mist/ui_lib.go | 1 + cmd/utils/websockets.go | 54 +++++++++++++++++++----- event/filter/old_filter.go | 2 + ui/filter.go | 20 ++++++--- ui/qt/filter.go | 5 --- websocket/client.go | 8 +++- websocket/message.go | 9 ++-- xeth/hexface.go | 73 ++++++++++++++------------------- xeth/js_types.go | 63 +++++++++++++++++----------- 10 files changed, 144 insertions(+), 93 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index f6d2d2d64b..fcec774a57 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -66,7 +66,7 @@ Rectangle { onMessages: { // Bit of a cheat to get proper JSON var m = JSON.parse(JSON.parse(JSON.stringify(messages))) - webview.postEvent("messages", id, m); + webview.postEvent("eth_changed", id, m); } function onShhMessage(message, id) { diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index 60c7181c12..f3559183e6 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -70,6 +70,7 @@ func NewUiLib(engine *qml.Engine, eth *eth.Ethereum, assetPath string) *UiLib { lib := &UiLib{JSXEth: xeth.NewJSXEth(eth), engine: engine, eth: eth, assetPath: assetPath, jsEngine: javascript.NewJSRE(eth), filterCallbacks: make(map[int][]int)} //, filters: make(map[int]*xeth.JSFilter)} lib.miner = miner.New(eth.KeyManager().Address(), eth) lib.filterManager = filter.NewFilterManager(eth.EventMux()) + go lib.filterManager.Start() return lib } diff --git a/cmd/utils/websockets.go b/cmd/utils/websockets.go index 003e1bc227..5d97599c30 100644 --- a/cmd/utils/websockets.go +++ b/cmd/utils/websockets.go @@ -21,9 +21,14 @@ package utils import ( + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/event/filter" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/state" + "github.com/ethereum/go-ethereum/ui/qt" "github.com/ethereum/go-ethereum/websocket" "github.com/ethereum/go-ethereum/xeth" ) @@ -35,16 +40,19 @@ func args(v ...interface{}) []interface{} { } type WebSocketServer struct { - ethereum *eth.Ethereum - filterCallbacks map[int][]int + eth *eth.Ethereum + filterManager *filter.FilterManager } func NewWebSocketServer(eth *eth.Ethereum) *WebSocketServer { - return &WebSocketServer{eth, make(map[int][]int)} + filterManager := filter.NewFilterManager(eth.EventMux()) + go filterManager.Start() + + return &WebSocketServer{eth, filterManager} } func (self *WebSocketServer) Serv() { - pipe := xeth.NewJSXEth(self.ethereum) + pipe := xeth.NewJSXEth(self.eth) wsServ := websocket.NewServer("/eth", ":40404") wsServ.MessageFunc(func(c *websocket.Client, msg *websocket.Message) { @@ -112,15 +120,32 @@ func (self *WebSocketServer) Serv() { c.Write(pipe.BalanceAt(args.Get(0).Str()), msg.Id) - case "eth_secretToAddress": - args := msg.Arguments() - - c.Write(pipe.SecretToAddress(args.Get(0).Str()), msg.Id) + case "eth_accounts": + c.Write(pipe.Accounts(), msg.Id) case "eth_newFilter": + if mp, ok := msg.Args[0].(map[string]interface{}); ok { + var id int + filter := qt.NewFilterFromMap(mp, self.eth) + filter.MessageCallback = func(messages state.Messages) { + c.Event(toMessages(messages), "eth_changed", id) + } + id = self.filterManager.InstallFilter(filter) + c.Write(id, msg.Id) + } case "eth_newFilterString": - case "eth_messages": - // TODO + var id int + filter := core.NewFilter(self.eth) + filter.BlockCallback = func(block *types.Block) { + c.Event(nil, "eth_changed", id) + } + id = self.filterManager.InstallFilter(filter) + c.Write(id, msg.Id) + case "eth_filterLogs": + filter := self.filterManager.GetFilter(int(msg.Arguments().Get(0).Uint())) + if filter != nil { + c.Write(toMessages(filter.Find()), msg.Id) + } } }) @@ -128,6 +153,15 @@ func (self *WebSocketServer) Serv() { wsServ.Listen() } +func toMessages(messages state.Messages) (msgs []xeth.JSMessage) { + msgs = make([]xeth.JSMessage, len(messages)) + for i, msg := range messages { + msgs[i] = xeth.NewJSMessage(msg) + } + + return +} + func StartWebSockets(eth *eth.Ethereum) { wslogger.Infoln("Starting WebSockets") diff --git a/event/filter/old_filter.go b/event/filter/old_filter.go index 1a9a88173a..6c7f053d47 100644 --- a/event/filter/old_filter.go +++ b/event/filter/old_filter.go @@ -2,6 +2,7 @@ package filter import ( + "fmt" "sync" "github.com/ethereum/go-ethereum/core" @@ -78,6 +79,7 @@ out: self.filterMu.RUnlock() case state.Messages: + fmt.Println("got messages") self.filterMu.RLock() for _, filter := range self.filters { if filter.MessageCallback != nil { diff --git a/ui/filter.go b/ui/filter.go index 88faad5caa..e0797dad2a 100644 --- a/ui/filter.go +++ b/ui/filter.go @@ -5,6 +5,16 @@ import ( "github.com/ethereum/go-ethereum/ethutil" ) +func fromHex(s string) []byte { + if len(s) > 1 { + if s[0:2] == "0x" { + s = s[2:] + } + return ethutil.Hex2Bytes(s) + } + return nil +} + func NewFilterFromMap(object map[string]interface{}, eth core.EthManager) *core.Filter { filter := core.NewFilter(eth) @@ -20,12 +30,12 @@ func NewFilterFromMap(object map[string]interface{}, eth core.EthManager) *core. if object["to"] != nil { val := ethutil.NewValue(object["to"]) - filter.AddTo(ethutil.Hex2Bytes(val.Str())) + filter.AddTo(fromHex(val.Str())) } if object["from"] != nil { val := ethutil.NewValue(object["from"]) - filter.AddFrom(ethutil.Hex2Bytes(val.Str())) + filter.AddFrom(fromHex(val.Str())) } if object["max"] != nil { @@ -48,11 +58,11 @@ func NewFilterFromMap(object map[string]interface{}, eth core.EthManager) *core. // Conversion methodn func mapToAccountChange(m map[string]interface{}) (d core.AccountChange) { if str, ok := m["id"].(string); ok { - d.Address = ethutil.Hex2Bytes(str) + d.Address = fromHex(str) } if str, ok := m["at"].(string); ok { - d.StateAddress = ethutil.Hex2Bytes(str) + d.StateAddress = fromHex(str) } return @@ -62,7 +72,7 @@ func mapToAccountChange(m map[string]interface{}) (d core.AccountChange) { // ["aabbccdd", {id: "ccddee", at: "11223344"}], "aabbcc", {id: "ccddee", at: "1122"} func makeAltered(v interface{}) (d []core.AccountChange) { if str, ok := v.(string); ok { - d = append(d, core.AccountChange{ethutil.Hex2Bytes(str), nil}) + d = append(d, core.AccountChange{fromHex(str), nil}) } else if obj, ok := v.(map[string]interface{}); ok { d = append(d, mapToAccountChange(obj)) } else if slice, ok := v.([]interface{}); ok { diff --git a/ui/qt/filter.go b/ui/qt/filter.go index c689364016..423d5bd433 100644 --- a/ui/qt/filter.go +++ b/ui/qt/filter.go @@ -1,8 +1,6 @@ package qt import ( - "fmt" - "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/ui" "gopkg.in/qml.v1" @@ -23,13 +21,10 @@ func makeAltered(v interface{}) (d []core.AccountChange) { var s []interface{} qList.Convert(&s) - fmt.Println(s) - d = makeAltered(s) } else if qMap, ok := v.(*qml.Map); ok { var m map[string]interface{} qMap.Convert(&m) - fmt.Println(m) d = makeAltered(m) } diff --git a/websocket/client.go b/websocket/client.go index db2c8e5c91..340a67aea4 100644 --- a/websocket/client.go +++ b/websocket/client.go @@ -51,7 +51,13 @@ func (c *Client) Conn() *ws.Conn { } func (c *Client) Write(data interface{}, id int) { - msg := &Message{Id: id, Data: data} + c.write(&Message{Id: id, Data: data}) +} +func (c *Client) Event(data interface{}, ev string, id int) { + c.write(&Message{Id: id, Data: data, Event: ev}) +} + +func (c *Client) write(msg *Message) { select { case c.ch <- msg: default: diff --git a/websocket/message.go b/websocket/message.go index 73b47456f6..cd2af50993 100644 --- a/websocket/message.go +++ b/websocket/message.go @@ -3,10 +3,11 @@ package websocket import "github.com/ethereum/go-ethereum/ethutil" type Message struct { - Call string `json:"call"` - Args []interface{} `json:"args"` - Id int `json:"_id"` - Data interface{} `json:"data"` + Call string `json:"call"` + Args []interface{} `json:"args"` + Id int `json:"_id"` + Data interface{} `json:"data"` + Event string `json:"_event"` } func (self *Message) Arguments() *ethutil.Value { diff --git a/xeth/hexface.go b/xeth/hexface.go index c3d8cef864..808ae7d396 100644 --- a/xeth/hexface.go +++ b/xeth/hexface.go @@ -20,7 +20,7 @@ func NewJSXEth(eth core.EthManager) *JSXEth { } func (self *JSXEth) BlockByHash(strHash string) *JSBlock { - hash := ethutil.Hex2Bytes(strHash) + hash := fromHex(strHash) block := self.obj.ChainManager().GetBlock(hash) return NewJSBlock(block) @@ -50,8 +50,12 @@ func (self *JSXEth) Key() *JSKey { return NewJSKey(self.obj.KeyManager().KeyPair()) } +func (self *JSXEth) Accounts() []string { + return []string{toHex(self.obj.KeyManager().Address())} +} + func (self *JSXEth) StateObject(addr string) *JSObject { - object := &Object{self.World().safeGet(ethutil.Hex2Bytes(addr))} + object := &Object{self.World().safeGet(fromHex(addr))} return NewJSObject(object) } @@ -78,7 +82,7 @@ func (self *JSXEth) IsListening() bool { } func (self *JSXEth) CoinBase() string { - return ethutil.Bytes2Hex(self.obj.KeyManager().Address()) + return toHex(self.obj.KeyManager().Address()) } func (self *JSXEth) NumberToHuman(balance string) string { @@ -88,46 +92,46 @@ func (self *JSXEth) NumberToHuman(balance string) string { } func (self *JSXEth) StorageAt(addr, storageAddr string) string { - storage := self.World().SafeGet(ethutil.Hex2Bytes(addr)).Storage(ethutil.Hex2Bytes(storageAddr)) + storage := self.World().SafeGet(fromHex(addr)).Storage(fromHex(storageAddr)) - return ethutil.Bytes2Hex(storage.Bytes()) + return toHex(storage.Bytes()) } func (self *JSXEth) BalanceAt(addr string) string { - return self.World().SafeGet(ethutil.Hex2Bytes(addr)).Balance().String() + return self.World().SafeGet(fromHex(addr)).Balance().String() } func (self *JSXEth) TxCountAt(address string) int { - return int(self.World().SafeGet(ethutil.Hex2Bytes(address)).Nonce) + return int(self.World().SafeGet(fromHex(address)).Nonce) } func (self *JSXEth) CodeAt(address string) string { - return ethutil.Bytes2Hex(self.World().SafeGet(ethutil.Hex2Bytes(address)).Code) + return toHex(self.World().SafeGet(fromHex(address)).Code) } func (self *JSXEth) IsContract(address string) bool { - return len(self.World().SafeGet(ethutil.Hex2Bytes(address)).Code) > 0 + return len(self.World().SafeGet(fromHex(address)).Code) > 0 } func (self *JSXEth) SecretToAddress(key string) string { - pair, err := crypto.NewKeyPairFromSec(ethutil.Hex2Bytes(key)) + pair, err := crypto.NewKeyPairFromSec(fromHex(key)) if err != nil { return "" } - return ethutil.Bytes2Hex(pair.Address()) + return toHex(pair.Address()) } func (self *JSXEth) Execute(addr, value, gas, price, data string) (string, error) { ret, err := self.ExecuteObject(&Object{ - self.World().safeGet(ethutil.Hex2Bytes(addr))}, - ethutil.Hex2Bytes(data), + self.World().safeGet(fromHex(addr))}, + fromHex(data), ethutil.NewValue(value), ethutil.NewValue(gas), ethutil.NewValue(price), ) - return ethutil.Bytes2Hex(ret), err + return toHex(ret), err } type KeyVal struct { @@ -137,10 +141,10 @@ type KeyVal struct { func (self *JSXEth) EachStorage(addr string) string { var values []KeyVal - object := self.World().SafeGet(ethutil.Hex2Bytes(addr)) + object := self.World().SafeGet(fromHex(addr)) it := object.Trie().Iterator() for it.Next() { - values = append(values, KeyVal{ethutil.Bytes2Hex(it.Key), ethutil.Bytes2Hex(it.Value)}) + values = append(values, KeyVal{toHex(it.Key), toHex(it.Value)}) } valuesJson, err := json.Marshal(values) @@ -154,7 +158,7 @@ func (self *JSXEth) EachStorage(addr string) string { func (self *JSXEth) ToAscii(str string) string { padded := ethutil.RightPadBytes([]byte(str), 32) - return "0x" + ethutil.Bytes2Hex(padded) + return "0x" + toHex(padded) } func (self *JSXEth) FromAscii(str string) string { @@ -162,7 +166,7 @@ func (self *JSXEth) FromAscii(str string) string { str = str[2:] } - return string(bytes.Trim(ethutil.Hex2Bytes(str), "\x00")) + return string(bytes.Trim(fromHex(str), "\x00")) } func (self *JSXEth) FromNumber(str string) string { @@ -170,7 +174,7 @@ func (self *JSXEth) FromNumber(str string) string { str = str[2:] } - return ethutil.BigD(ethutil.Hex2Bytes(str)).String() + return ethutil.BigD(fromHex(str)).String() } func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, error) { @@ -182,26 +186,11 @@ func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr data []byte ) - if ethutil.IsHex(codeStr) { - data = ethutil.Hex2Bytes(codeStr[2:]) - } else { - data = ethutil.Hex2Bytes(codeStr) - } + data = fromHex(codeStr) - if ethutil.IsHex(toStr) { - to = ethutil.Hex2Bytes(toStr[2:]) - } else { - to = ethutil.Hex2Bytes(toStr) - } - - var keyPair *crypto.KeyPair - var err error - if ethutil.IsHex(key) { - keyPair, err = crypto.NewKeyPairFromSec([]byte(ethutil.Hex2Bytes(key[2:]))) - } else { - keyPair, err = crypto.NewKeyPairFromSec([]byte(ethutil.Hex2Bytes(key))) - } + to = fromHex(toStr) + keyPair, err := crypto.NewKeyPairFromSec([]byte(fromHex(key))) if err != nil { return "", err } @@ -211,14 +200,14 @@ func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr return "", err } if types.IsContractAddr(to) { - return ethutil.Bytes2Hex(core.AddressFromMessage(tx)), nil + return toHex(core.AddressFromMessage(tx)), nil } - return ethutil.Bytes2Hex(tx.Hash()), nil + return toHex(tx.Hash()), nil } func (self *JSXEth) PushTx(txStr string) (*JSReceipt, error) { - tx := types.NewTransactionFromBytes(ethutil.Hex2Bytes(txStr)) + tx := types.NewTransactionFromBytes(fromHex(txStr)) err := self.obj.TxPool().Add(tx) if err != nil { return nil, err @@ -233,11 +222,11 @@ func (self *JSXEth) CompileMutan(code string) string { return err.Error() } - return ethutil.Bytes2Hex(data) + return toHex(data) } func (self *JSXEth) FindInConfig(str string) string { - return ethutil.Bytes2Hex(self.World().Config().Get(str).Address()) + return toHex(self.World().Config().Get(str).Address()) } func ToJSMessages(messages state.Messages) *ethutil.List { diff --git a/xeth/js_types.go b/xeth/js_types.go index 5fe5946b1c..a0be996fff 100644 --- a/xeth/js_types.go +++ b/xeth/js_types.go @@ -12,6 +12,19 @@ import ( "github.com/ethereum/go-ethereum/state" ) +func toHex(b []byte) string { + return "0x" + ethutil.Bytes2Hex(b) +} +func fromHex(s string) []byte { + if len(s) > 1 { + if s[0:2] == "0x" { + s = s[2:] + } + return ethutil.Hex2Bytes(s) + } + return nil +} + // Block interface exposed to QML type JSBlock struct { //Transactions string `json:"transactions"` @@ -52,12 +65,12 @@ func NewJSBlock(block *types.Block) *JSBlock { return &JSBlock{ ref: block, Size: block.Size().String(), Number: int(block.NumberU64()), GasUsed: block.GasUsed().String(), - GasLimit: block.GasLimit().String(), Hash: ethutil.Bytes2Hex(block.Hash()), + GasLimit: block.GasLimit().String(), Hash: toHex(block.Hash()), Transactions: txlist, Uncles: ulist, Time: block.Time(), - Coinbase: ethutil.Bytes2Hex(block.Coinbase()), - PrevHash: ethutil.Bytes2Hex(block.ParentHash()), - Bloom: ethutil.Bytes2Hex(block.Bloom()), + Coinbase: toHex(block.Coinbase()), + PrevHash: toHex(block.ParentHash()), + Bloom: toHex(block.Bloom()), Raw: block.String(), } } @@ -71,7 +84,7 @@ func (self *JSBlock) ToString() string { } func (self *JSBlock) GetTransaction(hash string) *JSTransaction { - tx := self.ref.Transaction(ethutil.Hex2Bytes(hash)) + tx := self.ref.Transaction(fromHex(hash)) if tx == nil { return nil } @@ -96,22 +109,22 @@ type JSTransaction struct { } func NewJSTx(tx *types.Transaction) *JSTransaction { - hash := ethutil.Bytes2Hex(tx.Hash()) - receiver := ethutil.Bytes2Hex(tx.To()) + hash := toHex(tx.Hash()) + receiver := toHex(tx.To()) if receiver == "0000000000000000000000000000000000000000" { - receiver = ethutil.Bytes2Hex(core.AddressFromMessage(tx)) + receiver = toHex(core.AddressFromMessage(tx)) } - sender := ethutil.Bytes2Hex(tx.From()) + sender := toHex(tx.From()) createsContract := core.MessageCreatesContract(tx) var data string if createsContract { data = strings.Join(core.Disassemble(tx.Data()), "\n") } else { - data = ethutil.Bytes2Hex(tx.Data()) + data = toHex(tx.Data()) } - return &JSTransaction{ref: tx, Hash: hash, Value: ethutil.CurrencyToString(tx.Value()), Address: receiver, Contract: createsContract, Gas: tx.Gas().String(), GasPrice: tx.GasPrice().String(), Data: data, Sender: sender, CreatesContract: createsContract, RawData: ethutil.Bytes2Hex(tx.Data())} + return &JSTransaction{ref: tx, Hash: hash, Value: ethutil.CurrencyToString(tx.Value()), Address: receiver, Contract: createsContract, Gas: tx.Gas().String(), GasPrice: tx.GasPrice().String(), Data: data, Sender: sender, CreatesContract: createsContract, RawData: toHex(tx.Data())} } func (self *JSTransaction) ToString() string { @@ -125,7 +138,7 @@ type JSKey struct { } func NewJSKey(key *crypto.KeyPair) *JSKey { - return &JSKey{ethutil.Bytes2Hex(key.Address()), ethutil.Bytes2Hex(key.PrivateKey), ethutil.Bytes2Hex(key.PublicKey)} + return &JSKey{toHex(key.Address()), toHex(key.PrivateKey), toHex(key.PublicKey)} } type JSObject struct { @@ -146,9 +159,9 @@ type PReceipt struct { func NewPReciept(contractCreation bool, creationAddress, hash, address []byte) *PReceipt { return &PReceipt{ contractCreation, - ethutil.Bytes2Hex(creationAddress), - ethutil.Bytes2Hex(hash), - ethutil.Bytes2Hex(address), + toHex(creationAddress), + toHex(hash), + toHex(address), } } @@ -185,9 +198,9 @@ type JSReceipt struct { func NewJSReciept(contractCreation bool, creationAddress, hash, address []byte) *JSReceipt { return &JSReceipt{ contractCreation, - ethutil.Bytes2Hex(creationAddress), - ethutil.Bytes2Hex(hash), - ethutil.Bytes2Hex(address), + toHex(creationAddress), + toHex(hash), + toHex(address), } } @@ -207,15 +220,15 @@ type JSMessage struct { func NewJSMessage(message *state.Message) JSMessage { return JSMessage{ - To: ethutil.Bytes2Hex(message.To), - From: ethutil.Bytes2Hex(message.From), - Input: ethutil.Bytes2Hex(message.Input), - Output: ethutil.Bytes2Hex(message.Output), + To: toHex(message.To), + From: toHex(message.From), + Input: toHex(message.Input), + Output: toHex(message.Output), Path: int32(message.Path), - Origin: ethutil.Bytes2Hex(message.Origin), + Origin: toHex(message.Origin), Timestamp: int32(message.Timestamp), - Coinbase: ethutil.Bytes2Hex(message.Origin), - Block: ethutil.Bytes2Hex(message.Block), + Coinbase: toHex(message.Origin), + Block: toHex(message.Block), Number: int32(message.Number.Int64()), Value: message.Value.String(), } From 7e6b72cb5c0172b8a6a15239a6628b64c8f8de23 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 10 Jan 2015 18:08:43 +0100 Subject: [PATCH 05/18] removed accidental qt dep --- cmd/utils/websockets.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/utils/websockets.go b/cmd/utils/websockets.go index 5d97599c30..48ea4014b9 100644 --- a/cmd/utils/websockets.go +++ b/cmd/utils/websockets.go @@ -28,7 +28,7 @@ import ( "github.com/ethereum/go-ethereum/event/filter" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/state" - "github.com/ethereum/go-ethereum/ui/qt" + "github.com/ethereum/go-ethereum/ui" "github.com/ethereum/go-ethereum/websocket" "github.com/ethereum/go-ethereum/xeth" ) @@ -126,7 +126,7 @@ func (self *WebSocketServer) Serv() { case "eth_newFilter": if mp, ok := msg.Args[0].(map[string]interface{}); ok { var id int - filter := qt.NewFilterFromMap(mp, self.eth) + filter := ui.NewFilterFromMap(mp, self.eth) filter.MessageCallback = func(messages state.Messages) { c.Event(toMessages(messages), "eth_changed", id) } From 35fe4313d57e1df6c3c8af0bc0b530bd7033e21b Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 12 Jan 2015 10:19:27 +0100 Subject: [PATCH 06/18] pre-pow --- core/chain_manager_test.go | 18 ++++++++++++++++++ crypto/crypto_test.go | 13 +++++++++++++ event/filter/old_filter.go | 2 -- pow/dash/crypto.c | 5 +++++ pow/dash/crypto.go | 14 ++++++++++++++ 5 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 pow/dash/crypto.c create mode 100644 pow/dash/crypto.go diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 725352dafa..f382516b7c 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -128,3 +128,21 @@ func TestChainMultipleInsertions(t *testing.T) { t.Error("Invalid canonical chain") } } + +func TestGetAncestors(t *testing.T) { + db, _ := ethdb.NewMemDatabase() + var eventMux event.TypeMux + chainMan := NewChainManager(db, &eventMux) + chain, err := loadChain("valid1", t) + if err != nil { + fmt.Println(err) + t.FailNow() + } + + for _, block := range chain { + chainMan.write(block) + } + + ancestors := chainMan.GetAncestors(chain[len(chain)-1], 4) + fmt.Println(ancestors) +} diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index af62a02a21..b579e6e4e5 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -3,7 +3,9 @@ package crypto import ( "bytes" "encoding/hex" + "fmt" "testing" + "time" ) // These tests are sanity checks. @@ -34,3 +36,14 @@ func checkhash(t *testing.T, name string, f func([]byte) []byte, msg, exp []byte t.Errorf("hash %s returned wrong result.\ngot: %x\nwant: %x", name, sum, exp) } } + +func BenchmarkSha3(b *testing.B) { + a := []byte("hello world") + amount := 1000000 + start := time.Now() + for i := 0; i < amount; i++ { + Sha3(a) + } + + fmt.Println(amount, ":", time.Since(start)) +} diff --git a/event/filter/old_filter.go b/event/filter/old_filter.go index 6c7f053d47..1a9a88173a 100644 --- a/event/filter/old_filter.go +++ b/event/filter/old_filter.go @@ -2,7 +2,6 @@ package filter import ( - "fmt" "sync" "github.com/ethereum/go-ethereum/core" @@ -79,7 +78,6 @@ out: self.filterMu.RUnlock() case state.Messages: - fmt.Println("got messages") self.filterMu.RLock() for _, filter := range self.filters { if filter.MessageCallback != nil { diff --git a/pow/dash/crypto.c b/pow/dash/crypto.c new file mode 100644 index 0000000000..9c5a62d16a --- /dev/null +++ b/pow/dash/crypto.c @@ -0,0 +1,5 @@ +extern char *Sha3(char *, int); +char *sha3_cgo(char *data, int l) +{ + return Sha3(data, l); +} diff --git a/pow/dash/crypto.go b/pow/dash/crypto.go new file mode 100644 index 0000000000..0644a54ae5 --- /dev/null +++ b/pow/dash/crypto.go @@ -0,0 +1,14 @@ +package dash + +/* +char *sha3_cgo(char *, int); // Forward declaration +*/ +import "C" +import ( + "github.com/ethereum/go-ethereum/crypto" +) + +//export Sha3 +func Sha3(data []byte, l int) []byte { + return crypto.Sha3(data) +} From 00348756bce00c2d19f16ce8df5eff7a62f5cfc6 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 12 Jan 2015 13:49:47 +0100 Subject: [PATCH 07/18] updated tests --- .../StateTests/stSystemOperationsTest.json | 48 ++++++++++++++----- .../VMTests/RandomTests/201501091831.json | 46 ++++++++++++++++++ .../VMTests/RandomTests/201501110744GO.json | 46 ++++++++++++++++++ .../VMTests/RandomTests/201501120415GO.json | 46 ++++++++++++++++++ ...501091727.json => 201501120933PYTHON.json} | 4 +- tests/helper/vm.go | 2 +- vm/context.go | 7 +++ vm/vm_debug.go | 13 +---- 8 files changed, 186 insertions(+), 26 deletions(-) create mode 100644 tests/files/VMTests/RandomTests/201501091831.json create mode 100644 tests/files/VMTests/RandomTests/201501110744GO.json create mode 100644 tests/files/VMTests/RandomTests/201501120415GO.json rename tests/files/VMTests/RandomTests/{201501091727.json => 201501120933PYTHON.json} (91%) diff --git a/tests/files/StateTests/stSystemOperationsTest.json b/tests/files/StateTests/stSystemOperationsTest.json index 4989c10f94..d519d375d1 100644 --- a/tests/files/StateTests/stSystemOperationsTest.json +++ b/tests/files/StateTests/stSystemOperationsTest.json @@ -6384,25 +6384,33 @@ "out" : "0x", "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000100000", + "balance" : "1000000000000099977", "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052600060036017f0600055", - "nonce" : "0", + "nonce" : "1", "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "10000", + "balance" : "908", "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999890000", + "balance" : "999999999999899092", "code" : "0x", "nonce" : "1", "storage" : { } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "23", + "code" : "0x", + "nonce" : "0", + "storage" : { + } } }, "pre" : { @@ -6445,25 +6453,33 @@ "out" : "0x", "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000100000", + "balance" : "1000000000000099977", "code" : "0x7c601080600c6000396000f3006000355415600957005b6020356000355560005260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6017f0600055", - "nonce" : "0", + "nonce" : "1", "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "10000", + "balance" : "908", "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999890000", + "balance" : "999999999999899092", "code" : "0x", "nonce" : "1", "storage" : { } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "23", + "code" : "0x", + "nonce" : "0", + "storage" : { + } } }, "pre" : { @@ -6506,25 +6522,33 @@ "out" : "0x", "post" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000100000", + "balance" : "1000000000000099977", "code" : "0x7c601080600c6000396000f3006000355415600957005b60203560003555600052600060006017f0600055", - "nonce" : "0", + "nonce" : "1", "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "10000", + "balance" : "908", "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999890000", + "balance" : "999999999999899092", "code" : "0x", "nonce" : "1", "storage" : { } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "23", + "code" : "0x", + "nonce" : "0", + "storage" : { + } } }, "pre" : { diff --git a/tests/files/VMTests/RandomTests/201501091831.json b/tests/files/VMTests/RandomTests/201501091831.json new file mode 100644 index 0000000000..75906c8d67 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501091831.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x596b0768335591598873a0325111f337", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x596b0768335591598873a0325111f337", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x596b0768335591598873a0325111f337", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501110744GO.json b/tests/files/VMTests/RandomTests/201501110744GO.json new file mode 100644 index 0000000000..83b0a1dc99 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501110744GO.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3858423938447a730a049901951a0a1a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9991", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3858423938447a730a049901951a0a1a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3858423938447a730a049901951a0a1a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501120415GO.json b/tests/files/VMTests/RandomTests/201501120415GO.json new file mode 100644 index 0000000000..eabfba1796 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501120415GO.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x619f9a423639", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7442", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x619f9a423639", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x619f9a423639", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501091727.json b/tests/files/VMTests/RandomTests/201501120933PYTHON.json similarity index 91% rename from tests/files/VMTests/RandomTests/201501091727.json rename to tests/files/VMTests/RandomTests/201501120933PYTHON.json index 619ce4a3dd..04d232ba3d 100644 --- a/tests/files/VMTests/RandomTests/201501091727.json +++ b/tests/files/VMTests/RandomTests/201501120933PYTHON.json @@ -11,7 +11,7 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x583438f0", + "code" : "0x6303376d4056f107", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", @@ -21,7 +21,7 @@ "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x583438f0", + "code" : "0x6303376d4056f107", "nonce" : "0", "storage" : { } diff --git a/tests/helper/vm.go b/tests/helper/vm.go index 123003faa3..dac279753f 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -58,7 +58,7 @@ func (self *Env) Difficulty() *big.Int { return self.difficulty } func (self *Env) State() *state.StateDB { return self.state } func (self *Env) GasLimit() *big.Int { return self.gasLimit } func (self *Env) GetHash(n uint64) []byte { - return nil + return crypto.Sha3([]byte(big.NewInt(int64(n)).String())) } func (self *Env) AddLog(log state.Log) { self.logs = append(self.logs, log) diff --git a/vm/context.go b/vm/context.go index d14df1aa77..b48f1a657e 100644 --- a/vm/context.go +++ b/vm/context.go @@ -61,6 +61,13 @@ func (c *Context) GetRangeValue(x, size uint64) []byte { return ethutil.LeftPadBytes(c.Code[x:y], int(size)) } +func (c *Context) GetCode(x, size uint64) []byte { + x = uint64(math.Min(float64(x), float64(len(c.Code)))) + y := uint64(math.Min(float64(x+size), float64(len(c.Code)))) + + return ethutil.RightPadBytes(c.Code[x:y], int(size)) +} + func (c *Context) Return(ret []byte) []byte { // Return the remaining gas to the caller c.caller.ReturnGas(c.Gas, c.Price) diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 04ba8190df..eec8c518f0 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -2,7 +2,6 @@ package vm import ( "fmt" - "math" "math/big" "github.com/ethereum/go-ethereum/crypto" @@ -491,21 +490,13 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * } else { code = context.Code } - + context := NewContext(nil, nil, code, ethutil.Big0, ethutil.Big0) var ( - size = uint64(len(code)) mOff = stack.Pop().Uint64() cOff = stack.Pop().Uint64() l = stack.Pop().Uint64() ) - - if cOff > size { - cOff = 0 - l = 0 - } else if cOff+l > size { - l = uint64(math.Min(float64(cOff+l), float64(size))) - } - codeCopy := code[cOff : cOff+l] + codeCopy := context.GetCode(cOff, l) mem.Set(mOff, l, codeCopy) From 75cd9cd2de315f8680ff6a382e9b3bd48e17ecad Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 12 Jan 2015 14:40:40 +0100 Subject: [PATCH 08/18] updated tests --- core/execution.go | 13 ++--- .../VMTests/RandomTests/201501121148GO.json | 31 ++++++++++++ .../VMTests/RandomTests/201501121149GO.json | 31 ++++++++++++ .../VMTests/RandomTests/201501121151GO.json | 31 ++++++++++++ .../VMTests/RandomTests/201501121256GO.json | 46 ++++++++++++++++++ .../VMTests/RandomTests/201501121301GO.json | 47 +++++++++++++++++++ .../VMTests/RandomTests/201501121303GO.json | 47 +++++++++++++++++++ tests/helper/vm.go | 8 +++- vm/vm_debug.go | 4 +- 9 files changed, 246 insertions(+), 12 deletions(-) create mode 100644 tests/files/VMTests/RandomTests/201501121148GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121149GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121151GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121256GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121301GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121303GO.json diff --git a/core/execution.go b/core/execution.go index 43f4b58fb0..1057089f1c 100644 --- a/core/execution.go +++ b/core/execution.go @@ -13,7 +13,6 @@ type Execution struct { env vm.Environment address, input []byte Gas, price, value *big.Int - SkipTransfer bool } func NewExecution(env vm.Environment, address, input []byte, gas, gasPrice, value *big.Int) *Execution { @@ -43,14 +42,12 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ContextRef) (ret from, to := env.State().GetStateObject(caller.Address()), env.State().GetOrNewStateObject(self.address) // Skipping transfer is used on testing for the initial call - if !self.SkipTransfer { - err = env.Transfer(from, to, self.value) - if err != nil { - caller.ReturnGas(self.Gas, self.price) + err = env.Transfer(from, to, self.value) + if err != nil { + caller.ReturnGas(self.Gas, self.price) - err = fmt.Errorf("Insufficient funds to transfer value. Req %v, has %v", self.value, from.Balance) - return - } + err = fmt.Errorf("insufficient funds to transfer value. Req %v, has %v", self.value, from.Balance()) + return } snapshot := env.State().Copy() diff --git a/tests/files/VMTests/RandomTests/201501121148GO.json b/tests/files/VMTests/RandomTests/201501121148GO.json new file mode 100644 index 0000000000..fb72e9c9fe --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121148GO.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x0c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x0c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121149GO.json b/tests/files/VMTests/RandomTests/201501121149GO.json new file mode 100644 index 0000000000..bd8a769aed --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121149GO.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x0c0b8a4494328e02", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x0c0b8a4494328e02", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121151GO.json b/tests/files/VMTests/RandomTests/201501121151GO.json new file mode 100644 index 0000000000..56904da1b1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121151GO.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x590c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x590c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121256GO.json b/tests/files/VMTests/RandomTests/201501121256GO.json new file mode 100644 index 0000000000..156805eb4a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121256GO.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4542424283434544f063ff78ff1355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9791", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4542424283434544f063ff78ff1355", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4542424283434544f063ff78ff1355", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121301GO.json b/tests/files/VMTests/RandomTests/201501121301GO.json new file mode 100644 index 0000000000..b392bedd56 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121301GO.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4545434244f04343161755", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9591", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4545434244f04343161755", + "nonce" : "0", + "storage" : { + "0x" : "0x0f4240" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4545434244f04343161755", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121303GO.json b/tests/files/VMTests/RandomTests/201501121303GO.json new file mode 100644 index 0000000000..7e58edbae5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121303GO.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4245454345424344f055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9591", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4245454345424344f055", + "nonce" : "0", + "storage" : { + "0x" : "0x0f4240" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4245454345424344f055", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/helper/vm.go b/tests/helper/vm.go index dac279753f..797a2acf52 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -1,6 +1,7 @@ package helper import ( + "errors" "math/big" "github.com/ethereum/go-ethereum/core" @@ -66,12 +67,16 @@ func (self *Env) AddLog(log state.Log) { func (self *Env) Depth() int { return self.depth } func (self *Env) SetDepth(i int) { self.depth = i } func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error { + if self.skipTransfer { + if from.Balance().Cmp(amount) < 0 { + return errors.New("Insufficient balance in account") + } + } return vm.Transfer(from, to, amount) } func (self *Env) vm(addr, data []byte, gas, price, value *big.Int) *core.Execution { exec := core.NewExecution(self, addr, data, gas, price, value) - exec.SkipTransfer = self.skipTransfer return exec } @@ -104,6 +109,7 @@ func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Log ) caller := state.GetOrNewStateObject(from) + caller.SetBalance(ethutil.Big("1000000000000000000")) vmenv := NewEnvFromMap(state, env, exec) vmenv.skipTransfer = true diff --git a/vm/vm_debug.go b/vm/vm_debug.go index eec8c518f0..fee42d3d85 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -743,9 +743,7 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * default: vmlogger.Debugf("(pc) %-3v Invalid opcode %x\n", pc, op) - context.ReturnGas(big.NewInt(1), nil) - - return context.Return(nil), fmt.Errorf("Invalid opcode %x", op) + panic(fmt.Errorf("Invalid opcode %x", op)) } pc++ From 8a1b51c716abdc21a8af43282e106d77eda3706b Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 12 Jan 2015 16:13:30 +0100 Subject: [PATCH 09/18] updated tests --- .../RandomTests/201501121323MULMOD_GO.json | 54 +++++++++++++++++++ .../RandomTests/201501121328MULMOD_GO.json | 47 ++++++++++++++++ .../RandomTests/201501121329MULMODGO.json | 47 ++++++++++++++++ .../RandomTests/201501121402CALL_GO.json | 53 ++++++++++++++++++ .../RandomTests/201501121408ADDMOD_GO.json | 47 ++++++++++++++++ .../RandomTests/201501121416ADDMOD_GO.json | 47 ++++++++++++++++ vm/vm_debug.go | 40 +++++++------- 7 files changed, 317 insertions(+), 18 deletions(-) create mode 100644 tests/files/VMTests/RandomTests/201501121323MULMOD_GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121328MULMOD_GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121329MULMODGO.json create mode 100644 tests/files/VMTests/RandomTests/201501121402CALL_GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121408ADDMOD_GO.json create mode 100644 tests/files/VMTests/RandomTests/201501121416ADDMOD_GO.json diff --git a/tests/files/VMTests/RandomTests/201501121323MULMOD_GO.json b/tests/files/VMTests/RandomTests/201501121323MULMOD_GO.json new file mode 100644 index 0000000000..1daf701e08 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121323MULMOD_GO.json @@ -0,0 +1,54 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x414341424443850659a055450955", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "0", + "logs" : [ + { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "bloom" : "00000000000000000000800000000000000000000000000000000880000000000000000000000000000000000000000000000000000000000000000000000000", + "data" : "0x", + "topics" : [ + ] + } + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x414341424443850659a055450955", + "nonce" : "0", + "storage" : { + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0x02" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x414341424443850659a055450955", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121328MULMOD_GO.json b/tests/files/VMTests/RandomTests/201501121328MULMOD_GO.json new file mode 100644 index 0000000000..fd03ec48f0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121328MULMOD_GO.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x424341434541904255151409a29a9c55", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "0", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x424341434541904255151409a29a9c55", + "nonce" : "0", + "storage" : { + "0x02" : "0x0f4240" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x424341434541904255151409a29a9c55", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121329MULMODGO.json b/tests/files/VMTests/RandomTests/201501121329MULMODGO.json new file mode 100644 index 0000000000..755fb59254 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121329MULMODGO.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x444443424444554380330955", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "0", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x444443424444554380330955", + "nonce" : "0", + "storage" : { + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x444443424444554380330955", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121402CALL_GO.json b/tests/files/VMTests/RandomTests/201501121402CALL_GO.json new file mode 100644 index 0000000000..6a847d261e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121402CALL_GO.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + { + "data" : "0x0000", + "destination" : "0000000000000000000000000000000000000002", + "gasLimit" : "0", + "value" : "0" + } + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4243434242434243f14555", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9670", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4243434242434243f14555", + "nonce" : "0", + "storage" : { + "0x0f4240" : "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4243434242434243f14555", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121408ADDMOD_GO.json b/tests/files/VMTests/RandomTests/201501121408ADDMOD_GO.json new file mode 100644 index 0000000000..026a513af7 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121408ADDMOD_GO.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4241455544414443385908069c9e8955", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "0", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4241455544414443385908069c9e8955", + "nonce" : "0", + "storage" : { + "0x0f4240" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4241455544414443385908069c9e8955", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501121416ADDMOD_GO.json b/tests/files/VMTests/RandomTests/201501121416ADDMOD_GO.json new file mode 100644 index 0000000000..8f11540d26 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501121416ADDMOD_GO.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4341434543454542559313088e55", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "0", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4341434543454542559313088e55", + "nonce" : "0", + "storage" : { + "0x02" : "0x0f4240" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4341434543454542559313088e55", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/vm/vm_debug.go b/vm/vm_debug.go index fee42d3d85..81db45f194 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -48,6 +48,12 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * }) context := NewContext(caller, me, code, gas, price) + vmlogger.Debugf("(%d) (%x) %x (code=%d) gas: %v (d) %x\n", self.env.Depth(), caller.Address()[:4], context.Address(), len(code), context.Gas, callData) + + if p := Precompiled[string(me.Address())]; p != nil { + return self.RunPrecompiled(p, callData, context) + } + if self.Recoverable { // Recover from any require exception defer func() { @@ -64,10 +70,6 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * }() } - if p := Precompiled[string(me.Address())]; p != nil { - return self.RunPrecompiled(p, callData, context) - } - var ( op OpCode @@ -94,8 +96,6 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * } ) - vmlogger.Debugf("(%d) (%x) %x (code=%d) gas: %v (d) %x\n", self.env.Depth(), caller.Address()[:4], context.Address(), len(code), context.Gas, callData) - // Don't bother with the execution if there's no code. if len(code) == 0 { return context.Return(nil), nil @@ -368,12 +368,14 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * y := stack.Pop() z := stack.Pop() - base.Add(x, y) - base.Mod(base, z) + add := new(big.Int).Add(x, y) + if len(z.Bytes()) > 0 { // NOT 0x0 + base.Mod(add, z) - U256(base) + U256(base) + } - self.Printf(" = %v", base) + self.Printf(" %v + %v %% %v = %v", x, y, z, base) stack.Push(base) case MULMOD: @@ -382,12 +384,14 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * y := stack.Pop() z := stack.Pop() - base.Mul(x, y) - base.Mod(base, z) + mul := new(big.Int).Mul(x, y) + if len(z.Bytes()) > 0 { // NOT 0x0 + base.Mod(mul, z) - U256(base) + U256(base) + } - self.Printf(" = %v", base) + self.Printf(" %v + %v %% %v = %v", x, y, z, base) stack.Push(base) @@ -541,6 +545,8 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * self.Printf(" => 0x%x", difficulty.Bytes()) case GASLIMIT: + self.Printf(" => %v", self.env.GasLimit()) + stack.Push(self.env.GasLimit()) // 0x50 range @@ -933,13 +939,11 @@ func (self *DebugVm) RunPrecompiled(p *PrecompiledAccount, callData []byte, cont return context.Return(ret), nil } else { - self.Endl() + self.Printf("NATIVE_FUNC => failed").Endl() tmp := new(big.Int).Set(context.Gas) - context.UseGas(context.Gas) - - return context.Return(nil), OOG(gas, tmp) + panic(OOG(gas, tmp).Error()) } } From ba225017c4c1b60dff57ad56da4e8972812a17e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 12 Jan 2015 19:40:14 +0100 Subject: [PATCH 10/18] JitVm struct stub. Forwards calls to DebugVm. --- vm/common.go | 1 + vm/vm.go | 2 ++ vm/vm_jit.go | 31 +++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 vm/vm_jit.go diff --git a/vm/common.go b/vm/common.go index f19b0fe4bc..ed250dab1b 100644 --- a/vm/common.go +++ b/vm/common.go @@ -14,6 +14,7 @@ type Type int const ( StandardVmTy Type = iota DebugVmTy + JitVmTy MaxVmTy ) diff --git a/vm/vm.go b/vm/vm.go index a5ea297b32..b795bb86e6 100644 --- a/vm/vm.go +++ b/vm/vm.go @@ -15,6 +15,8 @@ func New(env Environment, typ Type) VirtualMachine { switch typ { case DebugVmTy: return NewDebugVm(env) + case JitVmTy: + return NewJitVm(env) default: return &Vm{env: env} } diff --git a/vm/vm_jit.go b/vm/vm_jit.go new file mode 100644 index 0000000000..c715abab0b --- /dev/null +++ b/vm/vm_jit.go @@ -0,0 +1,31 @@ +package vm + +import "math/big" + +type JitVm struct { + env Environment + backup *DebugVm +} + +func NewJitVm(env Environment) *JitVm { + backupVm := NewDebugVm(env) + return &JitVm{env: env, backup: backupVm} +} + +func (self *JitVm) Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, callData []byte) (ret []byte, err error) { + return self.backup.Run(me, caller, code, value, gas, price, callData) +} + +func (self *JitVm) Printf(format string, v ...interface{}) VirtualMachine { + return self.backup.Printf(format, v) +} + +func (self *JitVm) Endl() VirtualMachine { + return self.backup.Endl() +} + +func (self *JitVm) Env() Environment { + return self.env +} + +//go is nice \ No newline at end of file From 34689cb3f369ad71164b81d0c05238d78cb67945 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 12 Jan 2015 20:36:45 +0100 Subject: [PATCH 11/18] Added manual triggering of filters --- cmd/mist/assets/ext/ethereum.js/lib/web3.js | 2 +- cmd/mist/assets/qml/browser.qml | 9 ++++- event/filter/filter.go | 8 +++++ ui/qt/qwhisper/whisper.go | 4 +++ whisper/whisper.go | 37 +++++++++++++++++---- 5 files changed, 51 insertions(+), 9 deletions(-) diff --git a/cmd/mist/assets/ext/ethereum.js/lib/web3.js b/cmd/mist/assets/ext/ethereum.js/lib/web3.js index 9a85c4d1bd..2fe414259a 100644 --- a/cmd/mist/assets/ext/ethereum.js/lib/web3.js +++ b/cmd/mist/assets/ext/ethereum.js/lib/web3.js @@ -150,7 +150,7 @@ var shhWatchMethods = function () { return [ { name: 'newFilter', call: 'shh_newFilter' }, { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, - { name: 'getMessage', call: 'shh_getMessages' } + { name: 'getMessages', call: 'shh_getMessages' } ]; }; diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index fcec774a57..7e8ed75bfe 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -310,7 +310,7 @@ Rectangle { postData(data._id, id); break; - case "eth_messages": + case "eth_filterLogs": require(1); var messages = eth.messages(data.args[0]); @@ -352,6 +352,13 @@ Rectangle { shh.post(params.payload, params.to, params.from, params.topics, params.priority, params.ttl); + break; + + case "shh_getMessages": + require(1); + + shh.trigger(data.args[0]); + break; } } catch(e) { diff --git a/event/filter/filter.go b/event/filter/filter.go index 9817d5782f..ca767f413e 100644 --- a/event/filter/filter.go +++ b/event/filter/filter.go @@ -68,3 +68,11 @@ out: } } } + +func (self *Filters) Match(a, b Filter) bool { + return reflect.TypeOf(a) == reflect.TypeOf(b) && a.Compare(b) +} + +func (self *Filters) Get(i int) Filter { + return self.watchers[i] +} diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go index 8b4628a1b6..becb2a29b3 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -84,6 +84,10 @@ func (self *Whisper) Watch(opts map[string]interface{}, view *qml.Common) int { return i } +func (self *Whisper) Trigger(id int) { + go self.Whisper.Trigger(id) +} + func filterFromMap(opts map[string]interface{}) (f whisper.Filter) { if to, ok := opts["to"].(string); ok { f.To = crypto.ToECDSA(fromHex(to)) diff --git a/whisper/whisper.go b/whisper/whisper.go index 3ff4bac5ac..bdc69f199b 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -126,6 +126,20 @@ func (self *Whisper) Watch(opts Filter) int { }) } +func (self *Whisper) Trigger(id int) { + filter := self.filters.Get(id) + if filter != nil { + for _, e := range self.messages { + if msg, key := self.open(e); msg != nil { + f := createFilter(msg, e.Topics, key) + if self.filters.Match(filter, f) { + self.filters.Notify(f, msg) + } + } + } + } +} + // Main handler for passing whisper messages to whisper peer objects func (self *Whisper) msgHandler(peer *p2p.Peer, ws p2p.MsgReadWriter) error { wpeer := NewPeer(self, peer, ws) @@ -227,19 +241,28 @@ func (self *Whisper) envelopes() (envelopes []*Envelope) { } func (self *Whisper) postEvent(envelope *Envelope) { + if message, key := self.open(envelope); message != nil { + self.filters.Notify(createFilter(message, envelope.Topics, key), message) + } +} + +func (self *Whisper) open(envelope *Envelope) (*Message, *ecdsa.PrivateKey) { for _, key := range self.keys { if message, err := envelope.Open(key); err == nil || (err != nil && err == ecies.ErrInvalidPublicKey) { - self.filters.Notify(filter.Generic{ - Str1: string(crypto.FromECDSA(key)), Str2: string(crypto.FromECDSAPub(message.Recover())), - Data: bytesToMap(envelope.Topics), - }, message) - break - } else { - wlogger.Infoln(err) + return message, key } } + + return nil, nil } func (self *Whisper) Protocol() p2p.Protocol { return self.protocol } + +func createFilter(message *Message, topics [][]byte, key *ecdsa.PrivateKey) filter.Filter { + return filter.Generic{ + Str1: string(crypto.FromECDSA(key)), Str2: string(crypto.FromECDSAPub(message.Recover())), + Data: bytesToMap(topics), + } +} From 750d70c2024784227c8ac920d651c337c2de207e Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 Jan 2015 00:25:45 +0100 Subject: [PATCH 12/18] updated tests --- ethutil/common.go | 1 + tests/helper/vm.go | 11 ++++++++++- tests/vm/gh_test.go | 6 ------ vm/vm_debug.go | 16 +++++++++------- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ethutil/common.go b/ethutil/common.go index 0a29cac6c7..271c56fd54 100644 --- a/ethutil/common.go +++ b/ethutil/common.go @@ -84,4 +84,5 @@ var ( BigFalse = Big0 Big32 = big.NewInt(32) Big256 = big.NewInt(0xff) + Big257 = big.NewInt(257) ) diff --git a/tests/helper/vm.go b/tests/helper/vm.go index 797a2acf52..2f3ec30f7a 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -15,6 +15,7 @@ type Env struct { depth int state *state.StateDB skipTransfer bool + initial bool Gas *big.Int origin []byte @@ -68,9 +69,17 @@ func (self *Env) Depth() int { return self.depth } func (self *Env) SetDepth(i int) { self.depth = i } func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error { if self.skipTransfer { + // ugly hack + if self.initial { + self.initial = false + return nil + } + if from.Balance().Cmp(amount) < 0 { return errors.New("Insufficient balance in account") } + + return nil } return vm.Transfer(from, to, amount) } @@ -109,10 +118,10 @@ func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Log ) caller := state.GetOrNewStateObject(from) - caller.SetBalance(ethutil.Big("1000000000000000000")) vmenv := NewEnvFromMap(state, env, exec) vmenv.skipTransfer = true + vmenv.initial = true ret, err := vmenv.Call(caller, to, data, gas, price, value) return ret, vmenv.logs, vmenv.Gas, err diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index 47b5882688..699225e903 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -79,12 +79,6 @@ func RunVmTest(p string, t *testing.T) { helper.CreateFileTests(t, p, &tests) for name, test := range tests { - /* - helper.Logger.SetLogLevel(5) - if name != "createNameRegistratorZeroMem" { - continue - } - */ db, _ := ethdb.NewMemDatabase() statedb := state.New(nil, db) for addr, account := range test.Pre { diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 81db45f194..255faefb07 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -50,10 +50,6 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * vmlogger.Debugf("(%d) (%x) %x (code=%d) gas: %v (d) %x\n", self.env.Depth(), caller.Address()[:4], context.Address(), len(code), context.Gas, callData) - if p := Precompiled[string(me.Address())]; p != nil { - return self.RunPrecompiled(p, callData, context) - } - if self.Recoverable { // Recover from any require exception defer func() { @@ -70,6 +66,10 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * }() } + if p := Precompiled[string(me.Address())]; p != nil { + return self.RunPrecompiled(p, callData, context) + } + var ( op OpCode @@ -513,10 +513,12 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * // 0x40 range case BLOCKHASH: num := stack.Pop() - if num.Cmp(new(big.Int).Sub(self.env.BlockNumber(), ethutil.Big256)) < 0 { - stack.Push(ethutil.Big0) - } else { + + n := U256(new(big.Int).Sub(self.env.BlockNumber(), ethutil.Big257)) + if num.Cmp(n) > 0 && num.Cmp(self.env.BlockNumber()) < 0 { stack.Push(ethutil.BigD(self.env.GetHash(num.Uint64()))) + } else { + stack.Push(ethutil.Big0) } self.Printf(" => 0x%x", stack.Peek().Bytes()) From 4704a0a288af89795e251db98eb253de117ff031 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 Jan 2015 10:30:52 +0100 Subject: [PATCH 13/18] remove pre compiled for tests --- tests/helper/vm.go | 5 +++++ tests/vm/gh_test.go | 11 +++++----- vm/address.go | 49 +++++++++++++++++++++++++-------------------- 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/tests/helper/vm.go b/tests/helper/vm.go index 2f3ec30f7a..7c33839cfb 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -116,6 +116,8 @@ func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Log price = ethutil.Big(exec["gasPrice"]) value = ethutil.Big(exec["value"]) ) + // Reset the pre-compiled contracts for VM tests. + vm.Precompiled = make(map[string]*vm.PrecompiledAccount) caller := state.GetOrNewStateObject(from) @@ -138,6 +140,9 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state. caddr = FromHex(env["currentCoinbase"]) ) + // Set pre compiled contracts + vm.Precompiled = vm.PrecompiledContracts() + coinbase := statedb.GetOrNewStateObject(caddr) coinbase.SetGasPool(ethutil.Big(env["currentGasLimit"])) diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index 699225e903..7b41411de6 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -79,6 +79,7 @@ func RunVmTest(p string, t *testing.T) { helper.CreateFileTests(t, p, &tests) for name, test := range tests { + //helper.Log.Infoln("Running", name) db, _ := ethdb.NewMemDatabase() statedb := state.New(nil, db) for addr, account := range test.Pre { @@ -116,12 +117,6 @@ func RunVmTest(p string, t *testing.T) { ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction) } - // Log the error if there is one. Error does not mean failing test. - // A test fails if err != nil and post params are specified in the test. - if err != nil { - helper.Log.Infof("%s's: %v\n", name, err) - } - rexp := helper.FromHex(test.Out) if bytes.Compare(rexp, ret) != 0 { t.Errorf("%s's return failed. Expected %x, got %x\n", name, rexp, ret) @@ -129,10 +124,14 @@ func RunVmTest(p string, t *testing.T) { if isVmTest { if len(test.Gas) == 0 && err == nil { + // Log VM err + helper.Log.Infof("%s's: %v\n", name, err) t.Errorf("%s's gas unspecified, indicating an error. VM returned (incorrectly) successfull", name) } else { gexp := ethutil.Big(test.Gas) if gexp.Cmp(gas) != 0 { + // Log VM err + helper.Log.Infof("%s's: %v\n", name, err) t.Errorf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas) } } diff --git a/vm/address.go b/vm/address.go index be4284421d..1c9369ab73 100644 --- a/vm/address.go +++ b/vm/address.go @@ -20,32 +20,37 @@ func (self PrecompiledAccount) Call(in []byte) []byte { return self.fn(in) } -var Precompiled = map[string]*PrecompiledAccount{ - // ECRECOVER - string(ethutil.LeftPadBytes([]byte{1}, 20)): &PrecompiledAccount{func(l int) *big.Int { - return GasEcrecover - }, ecrecoverFunc}, +var Precompiled = PrecompiledContracts() - // SHA256 - string(ethutil.LeftPadBytes([]byte{2}, 20)): &PrecompiledAccount{func(l int) *big.Int { - n := big.NewInt(int64(l+31)/32 + 1) - n.Mul(n, GasSha256) - return n - }, sha256Func}, +// XXX Could set directly. Testing requires resetting and setting of pre compiled contracts. +func PrecompiledContracts() map[string]*PrecompiledAccount { + return map[string]*PrecompiledAccount{ + // ECRECOVER + string(ethutil.LeftPadBytes([]byte{1}, 20)): &PrecompiledAccount{func(l int) *big.Int { + return GasEcrecover + }, ecrecoverFunc}, - // RIPEMD160 - string(ethutil.LeftPadBytes([]byte{3}, 20)): &PrecompiledAccount{func(l int) *big.Int { - n := big.NewInt(int64(l+31)/32 + 1) - n.Mul(n, GasRipemd) - return n - }, ripemd160Func}, + // SHA256 + string(ethutil.LeftPadBytes([]byte{2}, 20)): &PrecompiledAccount{func(l int) *big.Int { + n := big.NewInt(int64(l+31)/32 + 1) + n.Mul(n, GasSha256) + return n + }, sha256Func}, - string(ethutil.LeftPadBytes([]byte{4}, 20)): &PrecompiledAccount{func(l int) *big.Int { - n := big.NewInt(int64(l+31)/32 + 1) - n.Mul(n, GasMemCpy) + // RIPEMD160 + string(ethutil.LeftPadBytes([]byte{3}, 20)): &PrecompiledAccount{func(l int) *big.Int { + n := big.NewInt(int64(l+31)/32 + 1) + n.Mul(n, GasRipemd) + return n + }, ripemd160Func}, - return n - }, memCpy}, + string(ethutil.LeftPadBytes([]byte{4}, 20)): &PrecompiledAccount{func(l int) *big.Int { + n := big.NewInt(int64(l+31)/32 + 1) + n.Mul(n, GasMemCpy) + + return n + }, memCpy}, + } } func sha256Func(in []byte) []byte { From 1e5353824a7859d5cfa98565b5a879d5ca7e582a Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 Jan 2015 10:32:02 +0100 Subject: [PATCH 14/18] updated tests --- .../RandomTests/201501121323MULMOD_GO.json | 54 ----- ...> 201501122225CALL_TO_PRECOMPILED_GO.json} | 14 +- ...=> 201501122239BALANCE_OF_ADDRESS_GO.json} | 10 +- ...json => 201501130902PYTHON_BLOCKHASH.json} | 18 +- ...30903PYTHON_INVALID_JUMP_DESTINATION.json} | 20 +- ...=> 201501130906PYTHON_INVALID_OPCODE.json} | 20 +- tests/files/VMTests/vmArithmeticTest.json | 220 ++++++++++++++++++ 7 files changed, 248 insertions(+), 108 deletions(-) delete mode 100644 tests/files/VMTests/RandomTests/201501121323MULMOD_GO.json rename tests/files/VMTests/RandomTests/{201501121402CALL_GO.json => 201501122225CALL_TO_PRECOMPILED_GO.json} (83%) rename tests/files/VMTests/RandomTests/{201501121416ADDMOD_GO.json => 201501122239BALANCE_OF_ADDRESS_GO.json} (85%) rename tests/files/VMTests/RandomTests/{201501121408ADDMOD_GO.json => 201501130902PYTHON_BLOCKHASH.json} (72%) rename tests/files/VMTests/RandomTests/{201501121328MULMOD_GO.json => 201501130903PYTHON_INVALID_JUMP_DESTINATION.json} (65%) rename tests/files/VMTests/RandomTests/{201501121329MULMODGO.json => 201501130906PYTHON_INVALID_OPCODE.json} (61%) diff --git a/tests/files/VMTests/RandomTests/201501121323MULMOD_GO.json b/tests/files/VMTests/RandomTests/201501121323MULMOD_GO.json deleted file mode 100644 index 1daf701e08..0000000000 --- a/tests/files/VMTests/RandomTests/201501121323MULMOD_GO.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "2", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x414341424443850659a055450955", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "0", - "logs" : [ - { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "bloom" : "00000000000000000000800000000000000000000000000000000880000000000000000000000000000000000000000000000000000000000000000000000000", - "data" : "0x", - "topics" : [ - ] - } - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x414341424443850659a055450955", - "nonce" : "0", - "storage" : { - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0x02" - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x414341424443850659a055450955", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201501121402CALL_GO.json b/tests/files/VMTests/RandomTests/201501122225CALL_TO_PRECOMPILED_GO.json similarity index 83% rename from tests/files/VMTests/RandomTests/201501121402CALL_GO.json rename to tests/files/VMTests/RandomTests/201501122225CALL_TO_PRECOMPILED_GO.json index 6a847d261e..d5ee2bbf35 100644 --- a/tests/files/VMTests/RandomTests/201501121402CALL_GO.json +++ b/tests/files/VMTests/RandomTests/201501122225CALL_TO_PRECOMPILED_GO.json @@ -5,7 +5,7 @@ "data" : "0x0000", "destination" : "0000000000000000000000000000000000000002", "gasLimit" : "0", - "value" : "0" + "value" : "1000000" } ], "env" : { @@ -19,31 +19,31 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4243434242434243f14555", + "code" : "0x424345424245424335f15155", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "9670", + "gas" : "9668", "logs" : [ ], "out" : "0x", "post" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4243434242434243f14555", + "balance" : "999999999999000000", + "code" : "0x424345424245424335f15155", "nonce" : "0", "storage" : { - "0x0f4240" : "0x01" + "0x" : "0x02" } } }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x4243434242434243f14555", + "code" : "0x424345424245424335f15155", "nonce" : "0", "storage" : { } diff --git a/tests/files/VMTests/RandomTests/201501121416ADDMOD_GO.json b/tests/files/VMTests/RandomTests/201501122239BALANCE_OF_ADDRESS_GO.json similarity index 85% rename from tests/files/VMTests/RandomTests/201501121416ADDMOD_GO.json rename to tests/files/VMTests/RandomTests/201501122239BALANCE_OF_ADDRESS_GO.json index 8f11540d26..1741d4a0fd 100644 --- a/tests/files/VMTests/RandomTests/201501121416ADDMOD_GO.json +++ b/tests/files/VMTests/RandomTests/201501122239BALANCE_OF_ADDRESS_GO.json @@ -13,31 +13,31 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4341434543454542559313088e55", + "code" : "0x434244424342303155", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "0", + "gas" : "9673", "logs" : [ ], "out" : "0x", "post" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x4341434543454542559313088e55", + "code" : "0x434244424342303155", "nonce" : "0", "storage" : { - "0x02" : "0x0f4240" + "0x0de0b6b3a7640000" : "0x02" } } }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x4341434543454542559313088e55", + "code" : "0x434244424342303155", "nonce" : "0", "storage" : { } diff --git a/tests/files/VMTests/RandomTests/201501121408ADDMOD_GO.json b/tests/files/VMTests/RandomTests/201501130902PYTHON_BLOCKHASH.json similarity index 72% rename from tests/files/VMTests/RandomTests/201501121408ADDMOD_GO.json rename to tests/files/VMTests/RandomTests/201501130902PYTHON_BLOCKHASH.json index 026a513af7..2303227afa 100644 --- a/tests/files/VMTests/RandomTests/201501121408ADDMOD_GO.json +++ b/tests/files/VMTests/RandomTests/201501130902PYTHON_BLOCKHASH.json @@ -1,6 +1,12 @@ { "randomVMtest" : { "callcreates" : [ + { + "data" : "0x0000", + "destination" : "", + "gasLimit" : "9890", + "value" : "1000000" + } ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -13,31 +19,31 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4241455544414443385908069c9e8955", + "code" : "0x454243404244404045f060048160a255", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "0", + "gas" : "9587", "logs" : [ ], "out" : "0x", "post" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4241455544414443385908069c9e8955", + "balance" : "999999999999000000", + "code" : "0x454243404244404045f060048160a255", "nonce" : "0", "storage" : { - "0x0f4240" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + "0xa2" : "0x945304eb96065b2a98b57a48a06ae28d285a71b5" } } }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x4241455544414443385908069c9e8955", + "code" : "0x454243404244404045f060048160a255", "nonce" : "0", "storage" : { } diff --git a/tests/files/VMTests/RandomTests/201501121328MULMOD_GO.json b/tests/files/VMTests/RandomTests/201501130903PYTHON_INVALID_JUMP_DESTINATION.json similarity index 65% rename from tests/files/VMTests/RandomTests/201501121328MULMOD_GO.json rename to tests/files/VMTests/RandomTests/201501130903PYTHON_INVALID_JUMP_DESTINATION.json index fd03ec48f0..a5f37de744 100644 --- a/tests/files/VMTests/RandomTests/201501121328MULMOD_GO.json +++ b/tests/files/VMTests/RandomTests/201501130903PYTHON_INVALID_JUMP_DESTINATION.json @@ -1,7 +1,5 @@ { "randomVMtest" : { - "callcreates" : [ - ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", @@ -13,31 +11,17 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x424341434541904255151409a29a9c55", + "code" : "0x42414444404343342061036e57a4084155", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "0", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x424341434541904255151409a29a9c55", - "nonce" : "0", - "storage" : { - "0x02" : "0x0f4240" - } - } - }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x424341434541904255151409a29a9c55", + "code" : "0x42414444404343342061036e57a4084155", "nonce" : "0", "storage" : { } diff --git a/tests/files/VMTests/RandomTests/201501121329MULMODGO.json b/tests/files/VMTests/RandomTests/201501130906PYTHON_INVALID_OPCODE.json similarity index 61% rename from tests/files/VMTests/RandomTests/201501121329MULMODGO.json rename to tests/files/VMTests/RandomTests/201501130906PYTHON_INVALID_OPCODE.json index 755fb59254..004f2401aa 100644 --- a/tests/files/VMTests/RandomTests/201501121329MULMODGO.json +++ b/tests/files/VMTests/RandomTests/201501130906PYTHON_INVALID_OPCODE.json @@ -1,7 +1,5 @@ { "randomVMtest" : { - "callcreates" : [ - ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", @@ -13,31 +11,17 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x444443424444554380330955", + "code" : "0x434545430c737040877855", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "0", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x444443424444554380330955", - "nonce" : "0", - "storage" : { - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - } - } - }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x444443424444554380330955", + "code" : "0x434545430c737040877855", "nonce" : "0", "storage" : { } diff --git a/tests/files/VMTests/vmArithmeticTest.json b/tests/files/VMTests/vmArithmeticTest.json index 37c6bc33b5..528496da40 100644 --- a/tests/files/VMTests/vmArithmeticTest.json +++ b/tests/files/VMTests/vmArithmeticTest.json @@ -534,6 +534,94 @@ } } }, + "addmodDivByZero" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60006001600408600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9895", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006001600408600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006001600408600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "addmodDivByZero1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60006000600108600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9895", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006000600108600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006000600108600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "divByNonZero0" : { "callcreates" : [ ], @@ -5589,6 +5677,138 @@ } } }, + "mulmoddivByZero" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60006001600509600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9895", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006001600509600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006001600509600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "mulmoddivByZero1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60006001600009600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9895", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006001600009600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006001600009600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "mulmoddivByZero2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60006000600109600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9895", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006000600109600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006000600109600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "sdiv0" : { "callcreates" : [ ], From e3cad04decbbc83a0c956850717cb0ae0b2b3eec Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 Jan 2015 13:36:44 +0100 Subject: [PATCH 15/18] Fixed whisper messages * Whisper protocol wasn't properly suppling envelope slices * Message history wasn't properly propagated * Added 'Messages' method, filtering any current envelope with the supplied filter. --- cmd/mist/assets/qml/browser.qml | 4 +++- ui/qt/qwhisper/message.go | 6 ++--- ui/qt/qwhisper/whisper.go | 12 +++++++--- whisper/envelope.go | 42 +++++++++++++++++++-------------- whisper/message.go | 6 ++++- whisper/whisper.go | 22 ++++++++++------- 6 files changed, 58 insertions(+), 34 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index 7e8ed75bfe..34a58f9354 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -357,7 +357,9 @@ Rectangle { case "shh_getMessages": require(1); - shh.trigger(data.args[0]); + var m = shh.messages(data.args[0]); + var messages = JSON.parse(JSON.parse(JSON.stringify(m))); + postData(data._id, messages); break; } diff --git a/ui/qt/qwhisper/message.go b/ui/qt/qwhisper/message.go index c876473996..3a80381ff9 100644 --- a/ui/qt/qwhisper/message.go +++ b/ui/qt/qwhisper/message.go @@ -8,9 +8,9 @@ import ( type Message struct { ref *whisper.Message - Flags int32 - Payload string - From string + Flags int32 `json:"flags"` + Payload string `json:"payload"` + From string `json:"from"` } func ToQMessage(msg *whisper.Message) *Message { diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go index becb2a29b3..b904678f40 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -43,7 +43,7 @@ func (self *Whisper) Post(payload []string, to, from string, topics []string, pr msg := whisper.NewMessage(data) envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{ - Ttl: time.Duration(ttl), + Ttl: time.Duration(ttl) * time.Second, To: crypto.ToECDSAPub(fromHex(to)), From: crypto.ToECDSA(fromHex(from)), Topics: whisper.TopicsFromString(topics...), @@ -84,8 +84,14 @@ func (self *Whisper) Watch(opts map[string]interface{}, view *qml.Common) int { return i } -func (self *Whisper) Trigger(id int) { - go self.Whisper.Trigger(id) +func (self *Whisper) Messages(id int) (messages *ethutil.List) { + msgs := self.Whisper.Messages(id) + messages = ethutil.EmptyList() + for _, message := range msgs { + messages.Append(ToQMessage(message)) + } + + return } func filterFromMap(opts map[string]interface{}) (f whisper.Filter) { diff --git a/whisper/envelope.go b/whisper/envelope.go index 9d28dfa6be..3c477ad9f8 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -1,11 +1,9 @@ package whisper import ( - "bytes" "crypto/ecdsa" "encoding/binary" "fmt" - "io" "time" "github.com/ethereum/go-ethereum/crypto" @@ -28,22 +26,6 @@ type Envelope struct { hash Hash } -func NewEnvelopeFromReader(reader io.Reader) (*Envelope, error) { - var envelope Envelope - - buf := new(bytes.Buffer) - buf.ReadFrom(reader) - - h := H(crypto.Sha3(buf.Bytes())) - if err := rlp.Decode(buf, &envelope); err != nil { - return nil, err - } - - envelope.hash = h - - return &envelope, nil -} - func (self *Envelope) Hash() Hash { if self.hash == EmptyHash { self.hash = H(crypto.Sha3(ethutil.Encode(self))) @@ -126,3 +108,27 @@ func (self *Envelope) withoutNonce() interface{} { func (self *Envelope) RlpData() interface{} { return []interface{}{self.Expiry, self.Ttl, ethutil.ByteSliceToInterface(self.Topics), self.Data, self.Nonce} } + +func (self *Envelope) DecodeRLP(s *rlp.Stream) error { + var extenv struct { + Expiry uint32 + Ttl uint32 + Topics [][]byte + Data []byte + Nonce uint32 + } + if err := s.Decode(&extenv); err != nil { + return err + } + + self.Expiry = extenv.Expiry + self.Ttl = extenv.Ttl + self.Topics = extenv.Topics + self.Data = extenv.Data + self.Nonce = extenv.Nonce + + // TODO We should use the stream directly here. + self.hash = H(crypto.Sha3(ethutil.Encode(self))) + + return nil +} diff --git a/whisper/message.go b/whisper/message.go index db0110b4a7..bbad8e6a37 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -67,7 +67,11 @@ func (self *Message) Seal(pow time.Duration, opts Opts) (*Envelope, error) { } } - envelope := NewEnvelope(DefaultTtl, opts.Topics, self) + if opts.Ttl == 0 { + opts.Ttl = DefaultTtl + } + + envelope := NewEnvelope(opts.Ttl, opts.Topics, self) envelope.Seal(pow) return envelope, nil diff --git a/whisper/whisper.go b/whisper/whisper.go index bdc69f199b..ece2dd6d40 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -126,18 +126,20 @@ func (self *Whisper) Watch(opts Filter) int { }) } -func (self *Whisper) Trigger(id int) { +func (self *Whisper) Messages(id int) (messages []*Message) { filter := self.filters.Get(id) if filter != nil { for _, e := range self.messages { if msg, key := self.open(e); msg != nil { f := createFilter(msg, e.Topics, key) if self.filters.Match(filter, f) { - self.filters.Notify(f, msg) + messages = append(messages, msg) } } } } + + return } // Main handler for passing whisper messages to whisper peer objects @@ -158,17 +160,19 @@ func (self *Whisper) msgHandler(peer *p2p.Peer, ws p2p.MsgReadWriter) error { return err } - envelope, err := NewEnvelopeFromReader(msg.Payload) - if err != nil { + var envelopes []*Envelope + if err := msg.Decode(&envelopes); err != nil { peer.Infoln(err) continue } - if err := self.add(envelope); err != nil { - // TODO Punish peer here. Invalid envelope. - peer.Infoln(err) + for _, envelope := range envelopes { + if err := self.add(envelope); err != nil { + // TODO Punish peer here. Invalid envelope. + peer.Infoln(err) + } + wpeer.addKnown(envelope) } - wpeer.addKnown(envelope) } } @@ -192,6 +196,8 @@ func (self *Whisper) add(envelope *Envelope) error { go self.postEvent(envelope) } + wlogger.DebugDetailln("added whisper message") + return nil } From 82beaabf6a8b5a146a38e1d6a31a78157c79a0cf Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 Jan 2015 14:57:51 +0100 Subject: [PATCH 16/18] Fixed consensus issue --- core/block_processor.go | 2 +- core/state_transition.go | 3 +-- tests/vm/gh_test.go | 1 - vm/vm_debug.go | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index 4d93fcead2..6224d7c59d 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -271,7 +271,7 @@ func (sm *BlockProcessor) AccumelateRewards(statedb *state.StateDB, block, paren reward := new(big.Int).Set(BlockReward) ancestors := set.New() - for _, ancestor := range sm.bc.GetAncestors(block, 6) { + for _, ancestor := range sm.bc.GetAncestors(block, 7) { ancestors.Add(string(ancestor.Hash())) } diff --git a/core/state_transition.go b/core/state_transition.go index b22c5bf217..8b0ca2ac4b 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -192,8 +192,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) { if err == nil { dataGas := big.NewInt(int64(len(ret))) dataGas.Mul(dataGas, vm.GasCreateByte) - if err = self.UseGas(dataGas); err == nil { - //self.state.SetCode(ref.Address(), ret) + if err := self.UseGas(dataGas); err == nil { ref.SetCode(ret) } } diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index 7b41411de6..e1fdcd6580 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -79,7 +79,6 @@ func RunVmTest(p string, t *testing.T) { helper.CreateFileTests(t, p, &tests) for name, test := range tests { - //helper.Log.Infoln("Running", name) db, _ := ethdb.NewMemDatabase() statedb := state.New(nil, db) for addr, account := range test.Pre { diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 255faefb07..5949ea5d9d 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -663,8 +663,8 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * context.UseGas(context.Gas) - ret, err, ref := self.env.Create(context, addr, input, gas, price, value) - if err != nil { + ret, suberr, ref := self.env.Create(context, addr, input, gas, price, value) + if suberr != nil { stack.Push(ethutil.BigFalse) self.Printf("CREATE err %v", err) From 8f733461b3f4aee982eb9991d46ff828281b1ac9 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 Jan 2015 14:58:12 +0100 Subject: [PATCH 17/18] Default datadir for mist is now shared with CLI (.ethereum) --- cmd/mist/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mist/flags.go b/cmd/mist/flags.go index 2f0790b76a..8a67cdd0a7 100644 --- a/cmd/mist/flags.go +++ b/cmd/mist/flags.go @@ -92,7 +92,7 @@ func defaultAssetPath() string { } func defaultDataDir() string { usr, _ := user.Current() - return path.Join(usr.HomeDir, ".mist") + return path.Join(usr.HomeDir, ".ethereum") } var defaultConfigFile = path.Join(defaultDataDir(), "conf.ini") From bb55307a9d8fa73b0fbc0727f8b80925a87627b7 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 Jan 2015 20:31:31 +0100 Subject: [PATCH 18/18] Updated tests --- core/execution.go | 15 ++++-- .../201501131326STACKUNDERFLOW_CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131330CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131331CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131414CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131452CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131453CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131627CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131628CPPJIT.json | 31 +++++++++++ ...5CREATE_RETURNS_DIFFERENT_ADDREESS_GO.json | 53 +++++++++++++++++++ .../RandomTests/201501131811CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131818CPPJIT.json | 46 ++++++++++++++++ .../RandomTests/201501131820CPPJIT.json | 47 ++++++++++++++++ .../RandomTests/201501131821CPPJIT.json | 47 ++++++++++++++++ .../RandomTests/201501131823CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131824CPPJIT.json | 31 +++++++++++ .../RandomTests/201501131826CPPJIT.json | 31 +++++++++++ vm/vm_debug.go | 24 +++------ 18 files changed, 584 insertions(+), 20 deletions(-) create mode 100644 tests/files/VMTests/RandomTests/201501131326STACKUNDERFLOW_CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131330CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131331CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131414CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131452CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131453CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131627CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131628CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131655CREATE_RETURNS_DIFFERENT_ADDREESS_GO.json create mode 100644 tests/files/VMTests/RandomTests/201501131811CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131818CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131820CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131821CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131823CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131824CPPJIT.json create mode 100644 tests/files/VMTests/RandomTests/201501131826CPPJIT.json diff --git a/core/execution.go b/core/execution.go index 1057089f1c..756a3ed036 100644 --- a/core/execution.go +++ b/core/execution.go @@ -5,6 +5,7 @@ import ( "math/big" "time" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/vm" ) @@ -40,14 +41,22 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ContextRef) (ret return nil, vm.DepthError{} } + vsnapshot := env.State().Copy() + if len(self.address) == 0 { + // Generate a new address + nonce := env.State().GetNonce(caller.Address()) + self.address = crypto.CreateAddress(caller.Address(), nonce) + env.State().SetNonce(caller.Address(), nonce+1) + } + from, to := env.State().GetStateObject(caller.Address()), env.State().GetOrNewStateObject(self.address) - // Skipping transfer is used on testing for the initial call err = env.Transfer(from, to, self.value) if err != nil { + env.State().Set(vsnapshot) + caller.ReturnGas(self.Gas, self.price) - err = fmt.Errorf("insufficient funds to transfer value. Req %v, has %v", self.value, from.Balance()) - return + return nil, fmt.Errorf("insufficient funds to transfer value. Req %v, has %v", self.value, from.Balance()) } snapshot := env.State().Copy() diff --git a/tests/files/VMTests/RandomTests/201501131326STACKUNDERFLOW_CPPJIT.json b/tests/files/VMTests/RandomTests/201501131326STACKUNDERFLOW_CPPJIT.json new file mode 100644 index 0000000000..a671ea90b0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131326STACKUNDERFLOW_CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x10375807f18320838f51427932", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x10375807f18320838f51427932", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131330CPPJIT.json b/tests/files/VMTests/RandomTests/201501131330CPPJIT.json new file mode 100644 index 0000000000..8451f902b3 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131330CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x8f06058888984060113c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x8f06058888984060113c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131331CPPJIT.json b/tests/files/VMTests/RandomTests/201501131331CPPJIT.json new file mode 100644 index 0000000000..9059f4aa6b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131331CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60023c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60023c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131414CPPJIT.json b/tests/files/VMTests/RandomTests/201501131414CPPJIT.json new file mode 100644 index 0000000000..f1bddac845 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131414CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x98a15260977a64", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x98a15260977a64", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131452CPPJIT.json b/tests/files/VMTests/RandomTests/201501131452CPPJIT.json new file mode 100644 index 0000000000..2a82243922 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131452CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5982", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5982", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131453CPPJIT.json b/tests/files/VMTests/RandomTests/201501131453CPPJIT.json new file mode 100644 index 0000000000..9fb97d4030 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131453CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4386735568", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4386735568", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131627CPPJIT.json b/tests/files/VMTests/RandomTests/201501131627CPPJIT.json new file mode 100644 index 0000000000..1b5924e260 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131627CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x41414544454545408a85836e9408689355", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x41414544454545408a85836e9408689355", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131628CPPJIT.json b/tests/files/VMTests/RandomTests/201501131628CPPJIT.json new file mode 100644 index 0000000000..c40fac911c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131628CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x45894544404042411955", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x45894544404042411955", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131655CREATE_RETURNS_DIFFERENT_ADDREESS_GO.json b/tests/files/VMTests/RandomTests/201501131655CREATE_RETURNS_DIFFERENT_ADDREESS_GO.json new file mode 100644 index 0000000000..a65f82f69e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131655CREATE_RETURNS_DIFFERENT_ADDREESS_GO.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + { + "data" : "0x", + "destination" : "", + "gasLimit" : "9792", + "value" : "0" + } + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4342404343424041f0f0627ea30555", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9491", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4342404343424041f0f0627ea30555", + "nonce" : "0", + "storage" : { + "0x7ea305" : "0x945304eb96065b2a98b57a48a06ae28d285a71b5" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4342404343424041f0f0627ea30555", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131811CPPJIT.json b/tests/files/VMTests/RandomTests/201501131811CPPJIT.json new file mode 100644 index 0000000000..1368e99769 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131811CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x42451a455342ee4255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x42451a455342ee4255", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131818CPPJIT.json b/tests/files/VMTests/RandomTests/201501131818CPPJIT.json new file mode 100644 index 0000000000..cce35b4fe5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131818CPPJIT.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x414543434242411a3578f7d99a9a5afe", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9990", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x414543434242411a3578f7d99a9a5afe", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x414543434242411a3578f7d99a9a5afe", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131820CPPJIT.json b/tests/files/VMTests/RandomTests/201501131820CPPJIT.json new file mode 100644 index 0000000000..3c09d43c61 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131820CPPJIT.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x42454045414440455755", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9691", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x42454045414440455755", + "nonce" : "0", + "storage" : { + "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : "0x0f4240" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x42454045414440455755", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131821CPPJIT.json b/tests/files/VMTests/RandomTests/201501131821CPPJIT.json new file mode 100644 index 0000000000..9d896a4382 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131821CPPJIT.json @@ -0,0 +1,47 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x434341434182404557459142556955", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9687", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x434341434182404557459142556955", + "nonce" : "0", + "storage" : { + "0x02" : "0x012c" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x434341434182404557459142556955", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131823CPPJIT.json b/tests/files/VMTests/RandomTests/201501131823CPPJIT.json new file mode 100644 index 0000000000..367511caca --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131823CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x43454545451a80a96139e64693a255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x43454545451a80a96139e64693a255", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131824CPPJIT.json b/tests/files/VMTests/RandomTests/201501131824CPPJIT.json new file mode 100644 index 0000000000..a9aeff36a0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131824CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x45444443414144451a86fa55", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x45444443414144451a86fa55", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501131826CPPJIT.json b/tests/files/VMTests/RandomTests/201501131826CPPJIT.json new file mode 100644 index 0000000000..278b6a440b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501131826CPPJIT.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4245411a40444542c1505b7855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4245411a40444542c1505b7855", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 5949ea5d9d..44137568e0 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -643,32 +643,21 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * case CREATE: var ( - err error value = stack.Pop() size, offset = stack.Popn() input = mem.Get(offset.Int64(), size.Int64()) gas = new(big.Int).Set(context.Gas) - - // Snapshot the current stack so we are able to - // revert back to it later. - //snapshot = self.env.State().Copy() + addr []byte ) - // Generate a new address - n := statedb.GetNonce(context.Address()) - addr := crypto.CreateAddress(context.Address(), n) - statedb.SetNonce(context.Address(), n+1) - - self.Printf(" (*) %x", addr).Endl() - context.UseGas(context.Gas) - - ret, suberr, ref := self.env.Create(context, addr, input, gas, price, value) + ret, suberr, ref := self.env.Create(context, nil, input, gas, price, value) if suberr != nil { stack.Push(ethutil.BigFalse) - self.Printf("CREATE err %v", err) + self.Printf(" (*) 0x0 %v", suberr) } else { + // gas < len(ret) * CreateDataGas == NO_CODE dataGas := big.NewInt(int64(len(ret))) dataGas.Mul(dataGas, GasCreateByte) @@ -676,11 +665,12 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * ref.SetCode(ret) msg.Output = ret } + addr = ref.Address() stack.Push(ethutil.BigD(addr)) - } - self.Endl() + self.Printf(" (*) %x", addr) + } // Debug hook if self.Dbg != nil {