From ba6a35c1f3f2b992279f3072e5f983522a64a5c9 Mon Sep 17 00:00:00 2001 From: Dimitry Date: Fri, 13 Oct 2017 13:57:25 +0300 Subject: fuzzed test modexp input --- .../modexpRandomInput_d1g0v0Filler.json | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json (limited to 'src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json') diff --git a/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json b/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json new file mode 100644 index 000000000..f60774e40 --- /dev/null +++ b/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json @@ -0,0 +1,55 @@ +{ + "modexpRandomInput_d1g0v0" : { + "blocks" : [ + { + "blockHeaderPremine" : { + "difficulty" : "0x020000", + "gasLimit" : "0x05f5e100", + "timestamp" : "0x03e8", + "updatePoW" : "1" + }, + "transactions" : [ + { + "data" : "0x00000000008000000000000000000000000000000000000000000000000000000000000400000000000000000000000a", + "gasLimit" : "0x01adb0", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xae2d1d1f18f64abcf824eefb326271c7ebb264cc937d8113bb70f57131f00e32", + "s" : "0x357aa48004b6fcd243d26f98e58da74e1066519306d464b01934089ca293b9be", + "to" : "0x0000000000000000000000000000000000000005", + "v" : "0x1c", + "value" : "0x00" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "3535353535353535353535353535353535353535", + "difficulty" : "131072", + "extraData" : "0x42", + "gasLimit" : "0x05f5e100", + "gasUsed" : "0", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", + "timestamp" : "0x03b6", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "pre" : { + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x3635c9adc5dea00000", + "code" : "", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file -- cgit From 6e80effa947d9581e5ef8c4e02a45725f5af4346 Mon Sep 17 00:00:00 2001 From: Dimitry Date: Fri, 13 Oct 2017 15:34:21 +0300 Subject: modexp input test Consensus big in Parity: gas calculation of modexp is subject to overflow for certain inputs. Found via manual review. A case was found where consensus issue could be achieved in ~500K gas. --- .../stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json') diff --git a/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json b/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json index f60774e40..053cc4474 100644 --- a/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json +++ b/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts2/modexpRandomInput_d1g0v0Filler.json @@ -11,13 +11,13 @@ "transactions" : [ { "data" : "0x00000000008000000000000000000000000000000000000000000000000000000000000400000000000000000000000a", - "gasLimit" : "0x01adb0", + "gasLimit" : "0x0ad570", "gasPrice" : "0x01", "nonce" : "0x00", - "r" : "0xae2d1d1f18f64abcf824eefb326271c7ebb264cc937d8113bb70f57131f00e32", - "s" : "0x357aa48004b6fcd243d26f98e58da74e1066519306d464b01934089ca293b9be", + "r" : "0x7f92f6c87aa5aae5de02f4fef7b8625a4705dcc83101f5064e85d0451d6f7061", + "s" : "0x17646ae6179dc3564553aa73ff108c14e72d191c147bfa38b4885b7b88548c23", "to" : "0x0000000000000000000000000000000000000005", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x00" } ], -- cgit