diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-02-27 00:33:34 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-02-27 00:33:34 +0800 |
commit | a622eccecb6e090a8c5522bcb08df6b9d8215aa8 (patch) | |
tree | b1a1ca50bf3f2513b5141b8e74712872b61b7afb | |
parent | a3b3d19d80d1caac047296582062618e2a461108 (diff) | |
download | dexon-a622eccecb6e090a8c5522bcb08df6b9d8215aa8.tar.gz dexon-a622eccecb6e090a8c5522bcb08df6b9d8215aa8.tar.zst dexon-a622eccecb6e090a8c5522bcb08df6b9d8215aa8.zip |
more mem tests - calldatacopy and return
-rw-r--r-- | StateTests/stMemoryTest.json | 61 | ||||
-rw-r--r-- | VMTests/vmEnvironmentalInfoTest.json | 264 | ||||
-rw-r--r-- | VMTests/vmSha3Test.json | 14 |
3 files changed, 332 insertions, 7 deletions
diff --git a/StateTests/stMemoryTest.json b/StateTests/stMemoryTest.json index ce3e01648..a2255d849 100644 --- a/StateTests/stMemoryTest.json +++ b/StateTests/stMemoryTest.json @@ -2497,6 +2497,67 @@ "value" : "10" } }, + "memReturn" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "42949672960", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0xff55883355001144bbccddffeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa00000000000000000000000000000000", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000010", + "code" : "0x366000600037596000f3", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "909", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "429496728681", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x366000600037596000f3", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "429496729600", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0xff55883355001144bbccddffeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "gasLimit" : "1342183320", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "value" : "10" + } + }, "mload16bitBound" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", diff --git a/VMTests/vmEnvironmentalInfoTest.json b/VMTests/vmEnvironmentalInfoTest.json index b573b08a9..2cd1c779c 100644 --- a/VMTests/vmEnvironmentalInfoTest.json +++ b/VMTests/vmEnvironmentalInfoTest.json @@ -570,6 +570,50 @@ } } }, + "calldatacopy0_return" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60026001600037596000f3", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999991", + "logs" : [ + ], + "out" : "0x2345000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60026001600037596000f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60026001600037596000f3", + "nonce" : "0", + "storage" : { + } + } + } + }, "calldatacopy1" : { "callcreates" : [ ], @@ -615,6 +659,50 @@ } } }, + "calldatacopy1_return" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60016001600037596000f3", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999991", + "logs" : [ + ], + "out" : "0x2300000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016001600037596000f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016001600037596000f3", + "nonce" : "0", + "storage" : { + } + } + } + }, "calldatacopy2" : { "callcreates" : [ ], @@ -659,6 +747,50 @@ } } }, + "calldatacopy2_return" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60006001600037596000f3", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999993", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006001600037596000f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006001600037596000f3", + "nonce" : "0", + "storage" : { + } + } + } + }, "calldatacopyZeroMemExpansion" : { "callcreates" : [ ], @@ -703,6 +835,50 @@ } } }, + "calldatacopyZeroMemExpansion_return" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60006000600037596000f3", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999993", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006000600037596000f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006000600037596000f3", + "nonce" : "0", + "storage" : { + } + } + } + }, "calldatacopy_DataIndexTooHigh" : { "callcreates" : [ ], @@ -791,6 +967,94 @@ } } }, + "calldatacopy_DataIndexTooHigh2_return" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037596000f3", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999991", + "logs" : [ + ], + "out" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037596000f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037596000f3", + "nonce" : "0", + "storage" : { + } + } + } + }, + "calldatacopy_DataIndexTooHigh_return" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037596000f3", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999977", + "logs" : [ + ], + "out" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037596000f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037596000f3", + "nonce" : "0", + "storage" : { + } + } + } + }, "calldataload0" : { "callcreates" : [ ], diff --git a/VMTests/vmSha3Test.json b/VMTests/vmSha3Test.json index dacaadb01..7a054cf89 100644 --- a/VMTests/vmSha3Test.json +++ b/VMTests/vmSha3Test.json @@ -300,7 +300,7 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, - "gas" : "4294442684", + "gas" : "4026006204", "logs" : [ ], "out" : "0x", @@ -419,7 +419,7 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, - "gas" : "4294966941", + "gas" : "4294966940", "logs" : [ ], "out" : "0x", @@ -509,7 +509,7 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, - "gas" : "4294966940", + "gas" : "4294966939", "logs" : [ ], "out" : "0x", @@ -554,7 +554,7 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, - "gas" : "4294966910", + "gas" : "4294966907", "logs" : [ ], "out" : "0x", @@ -599,7 +599,7 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, - "gas" : "4294966909", + "gas" : "4294966905", "logs" : [ ], "out" : "0x", @@ -644,7 +644,7 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, - "gas" : "4294966909", + "gas" : "4294966905", "logs" : [ ], "out" : "0x", @@ -689,7 +689,7 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, - "gas" : "4294966908", + "gas" : "4294966904", "logs" : [ ], "out" : "0x", |