diff options
author | winsvega <winsvega@mail.ru> | 2017-07-05 21:32:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-05 21:32:29 +0800 |
commit | 466c10373c324a8d024b32a4476778f3211d0c8a (patch) | |
tree | c1d7d6aeeb822e8588c0dd307d3034477c0a5c2f | |
parent | 17bf9ee3725160de5b61ad169cce407e3d81f402 (diff) | |
parent | 24dd562b3556d736f3083a9a3ea1db9286cd597d (diff) | |
download | tangerine-tests-466c10373c324a8d024b32a4476778f3211d0c8a.tar tangerine-tests-466c10373c324a8d024b32a4476778f3211d0c8a.tar.gz tangerine-tests-466c10373c324a8d024b32a4476778f3211d0c8a.tar.bz2 tangerine-tests-466c10373c324a8d024b32a4476778f3211d0c8a.tar.lz tangerine-tests-466c10373c324a8d024b32a4476778f3211d0c8a.tar.xz tangerine-tests-466c10373c324a8d024b32a4476778f3211d0c8a.tar.zst tangerine-tests-466c10373c324a8d024b32a4476778f3211d0c8a.zip |
Merge pull request #210 from ethereum/many_zeros_exp
Price calculation when exp length > 256, and the first word of exponent is zero
-rw-r--r-- | GeneralStateTests/stPreCompiledContracts/modexp.json | 48 | ||||
-rw-r--r-- | src/GeneralStateTestsFiller/stPreCompiledContracts/modexpFiller.json | 8 |
2 files changed, 52 insertions, 4 deletions
diff --git a/GeneralStateTests/stPreCompiledContracts/modexp.json b/GeneralStateTests/stPreCompiledContracts/modexp.json index 7dccbc525..c5a8c75ce 100644 --- a/GeneralStateTests/stPreCompiledContracts/modexp.json +++ b/GeneralStateTests/stPreCompiledContracts/modexp.json @@ -1,5 +1,10 @@ { "modexp" : { + "_info" : { + "comment" : "", + "filledwith" : "cpp-1.3.0+commit.bc18ce87.Linux.g++", + "source" : "/src/GeneralStateTestsFiller/stPreCompiledContracts/modexpFiller.json" + }, "env" : { "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "0x20000", @@ -225,6 +230,14 @@ "gas" : 0, "value" : 0 } + }, + { + "hash" : "0x6105198fe46b16679fce14df3ac906734c6c371f0f4b2876aba7303b30868a75", + "indexes" : { + "data" : 27, + "gas" : 0, + "value" : 0 + } } ], "EIP158" : [ @@ -443,6 +456,14 @@ "gas" : 0, "value" : 0 } + }, + { + "hash" : "0x6105198fe46b16679fce14df3ac906734c6c371f0f4b2876aba7303b30868a75", + "indexes" : { + "data" : 27, + "gas" : 0, + "value" : 0 + } } ], "Frontier" : [ @@ -661,6 +682,14 @@ "gas" : 0, "value" : 0 } + }, + { + "hash" : "0xbbe41bbf20a3f2663091f141148c584776955f1ddfe40a9c56eeb43c63cf961f", + "indexes" : { + "data" : 27, + "gas" : 0, + "value" : 0 + } } ], "Homestead" : [ @@ -879,6 +908,14 @@ "gas" : 0, "value" : 0 } + }, + { + "hash" : "0xbbe41bbf20a3f2663091f141148c584776955f1ddfe40a9c56eeb43c63cf961f", + "indexes" : { + "data" : 27, + "gas" : 0, + "value" : 0 + } } ], "Metropolis" : [ @@ -1097,6 +1134,14 @@ "gas" : 0, "value" : 0 } + }, + { + "hash" : "0x54f7ac3ec3555bd7fbf119a986b26aa0ace72058b8126ac5479f22adef152c50", + "indexes" : { + "data" : 27, + "gas" : 0, + "value" : 0 + } } ] }, @@ -1144,7 +1189,8 @@ "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000202", "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002", "0x000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001001001010010", - "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000064" + "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000064", + "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030006" ], "gasLimit" : [ "0x05f5e100" diff --git a/src/GeneralStateTestsFiller/stPreCompiledContracts/modexpFiller.json b/src/GeneralStateTestsFiller/stPreCompiledContracts/modexpFiller.json index 4074f49a1..842adfc4a 100644 --- a/src/GeneralStateTestsFiller/stPreCompiledContracts/modexpFiller.json +++ b/src/GeneralStateTestsFiller/stPreCompiledContracts/modexpFiller.json @@ -107,7 +107,7 @@ }, { "indexes" : { - "data" : [16], + "data" : [16,27], "gas" : -1, "value" : -1 }, @@ -179,7 +179,8 @@ "21,21,22,23 - Non-zero length exp & mod, but passed data has only base and part of exp / only base", "24 - Non-zero length base & exp & mod and no values in input data - interpreted as all zeroes", "25 - Price calculation when baseLength > modLength", - "26 - bigint_expmod precompiled contract returns 1 for 0 ^ 0 mod 100" + "26 - bigint_expmod precompiled contract returns 1 for 0 ^ 0 mod 100", + "27 - 02 ** 03 % 06, but exp with 256 bytes of zero in front." ], "data" : [ "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002003fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2efffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f", @@ -208,7 +209,8 @@ "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000202", "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002", "0x000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001001001010010", -"0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000064" +"0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000064", +"0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030006" ], "gasLimit" : [ "100000000" |