From a9ff1c93bd07f59ae11138cf7e979d44bb148bd5 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Tue, 19 May 2015 16:53:07 +0200 Subject: add smod tests --- VMTests/vmArithmeticTest.json | 485 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 478 insertions(+), 7 deletions(-) (limited to 'VMTests/vmArithmeticTest.json') diff --git a/VMTests/vmArithmeticTest.json b/VMTests/vmArithmeticTest.json index 7c82c9d4d..88d3c1e5b 100644 --- a/VMTests/vmArithmeticTest.json +++ b/VMTests/vmArithmeticTest.json @@ -356,6 +356,8 @@ } }, "addmod1_overflow3" : { + "callcreates" : [ + ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x0100", @@ -369,11 +371,25 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60056001600160000308600055", "data" : "0x", - "gas" : "0x2710", + "gas" : "0x0f4240", "gasPrice" : "0x5af3107a4000", "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "0x0de0b6b3a7640000" }, + "gas" : "0x0ef406", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60056001600160000308600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", @@ -385,6 +401,8 @@ } }, "addmod1_overflow4" : { + "callcreates" : [ + ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x0100", @@ -398,11 +416,25 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60056002600160000308600055", "data" : "0x", - "gas" : "0x2710", + "gas" : "0x0f4240", "gasPrice" : "0x5af3107a4000", "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "0x0de0b6b3a7640000" }, + "gas" : "0x0ef406", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60056002600160000308600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", @@ -414,6 +446,8 @@ } }, "addmod1_overflowDiff" : { + "callcreates" : [ + ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x0100", @@ -427,11 +461,25 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60056002600003600160000308600055", "data" : "0x", - "gas" : "0x2710", + "gas" : "0x0f4240", "gasPrice" : "0x5af3107a4000", "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "0x0de0b6b3a7640000" }, + "gas" : "0x0ef400", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60056002600003600160000308600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x04" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", @@ -842,6 +890,51 @@ } } }, + "addmodDivByZero3" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60016000600060000803600055", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x013866", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60016000600060000803600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60016000600060000803600055", + "nonce" : "0x00", + "storage" : { + } + } + } + }, "arith1" : { "callcreates" : [ ], @@ -1152,6 +1245,51 @@ } } }, + "divByZero_2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60076000600d0401600055", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x01386c", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60076000600d0401600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x07" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60076000600d0401600055", + "nonce" : "0x00", + "storage" : { + } + } + } + }, "exp0" : { "callcreates" : [ ], @@ -5498,6 +5636,51 @@ } } }, + "modByZero" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x6001600060030603600055", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x01386c", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x6001600060030603600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x6001600060030603600055", + "nonce" : "0x00", + "storage" : { + } + } + } + }, "mul0" : { "callcreates" : [ ], @@ -6017,6 +6200,8 @@ } }, "mulmod1_overflow2" : { + "callcreates" : [ + ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x0100", @@ -6030,11 +6215,25 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x600560027f800000000000000000000000000000000000000000000000000000000000000009600055", "data" : "0x", - "gas" : "0x2710", + "gas" : "0x0f4240", "gasPrice" : "0x5af3107a4000", "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "0x0de0b6b3a7640000" }, + "gas" : "0x0ef40c", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600560027f800000000000000000000000000000000000000000000000000000000000000009600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", @@ -6046,6 +6245,8 @@ } }, "mulmod1_overflow3" : { + "callcreates" : [ + ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x0100", @@ -6059,11 +6260,25 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x600560027f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09600055", "data" : "0x", - "gas" : "0x2710", + "gas" : "0x0f4240", "gasPrice" : "0x5af3107a4000", "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "0x0de0b6b3a7640000" }, + "gas" : "0x0ef40c", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600560027f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x04" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", @@ -6075,6 +6290,8 @@ } }, "mulmod1_overflow4" : { + "callcreates" : [ + ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x0100", @@ -6088,11 +6305,25 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x600560027f800000000000000000000000000000000000000000000000000000000000000109600055", "data" : "0x", - "gas" : "0x2710", + "gas" : "0x0f4240", "gasPrice" : "0x5af3107a4000", "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "0x0de0b6b3a7640000" }, + "gas" : "0x0ef40c", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600560027f800000000000000000000000000000000000000000000000000000000000000109600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x03" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", @@ -6502,6 +6733,51 @@ } } }, + "mulmoddivByZero3" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60006000600009600103600055", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x013866", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60006000600009600103600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60006000600009600103600055", + "nonce" : "0x00", + "storage" : { + } + } + } + }, "not1" : { "callcreates" : [ ], @@ -7081,6 +7357,51 @@ } } }, + "sdivByZero2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600160007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffcf923bdff6000030501600055", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x013866", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600160007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffcf923bdff6000030501600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600160007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffcf923bdff6000030501600055", + "nonce" : "0x00", + "storage" : { + } + } + } + }, "sdiv_dejavu" : { "callcreates" : [ ], @@ -8109,6 +8430,8 @@ } }, "smod6" : { + "callcreates" : [ + ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x0100", @@ -8122,11 +8445,25 @@ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60000307600055", "data" : "0x", - "gas" : "0x2710", + "gas" : "0x0186a0", "gasPrice" : "0x5af3107a4000", "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "0x0de0b6b3a7640000" }, + "gas" : "0x01386c", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60000307600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x0de0b6b3a7640000", @@ -8181,6 +8518,140 @@ } } }, + "smod8_byZero" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600d600060c86000030703600055", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x013866", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600d600060c86000030703600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600d600060c86000030703600055", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "smod_i256min1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60016000037f800000000000000000000000000000000000000000000000000000000000000060000307600055", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x0172fe", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60016000037f800000000000000000000000000000000000000000000000000000000000000060000307600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60016000037f800000000000000000000000000000000000000000000000000000000000000060000307600055", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "smod_i256min2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600160016000037f80000000000000000000000000000000000000000000000000000000000000006000030703600055", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x013860", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600160016000037f80000000000000000000000000000000000000000000000000000000000000006000030703600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x600160016000037f80000000000000000000000000000000000000000000000000000000000000006000030703600055", + "nonce" : "0x00", + "storage" : { + } + } + } + }, "stop" : { "callcreates" : [ ], -- cgit v1.2.3