diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2018-04-06 20:04:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 20:04:10 +0800 |
commit | b45e214b619826647a641f9d08f2dee6f82e86cd (patch) | |
tree | 42b0c6acde463ed8419c1fd22b72b8cd3d33f9d1 | |
parent | 2ed615c8b20c34b38a9b9d418186419586d5246d (diff) | |
parent | 7a788d6200a3ab35df7cd311ed1c529eafff0152 (diff) | |
download | tangerine-tests-b45e214b619826647a641f9d08f2dee6f82e86cd.tar tangerine-tests-b45e214b619826647a641f9d08f2dee6f82e86cd.tar.gz tangerine-tests-b45e214b619826647a641f9d08f2dee6f82e86cd.tar.bz2 tangerine-tests-b45e214b619826647a641f9d08f2dee6f82e86cd.tar.lz tangerine-tests-b45e214b619826647a641f9d08f2dee6f82e86cd.tar.xz tangerine-tests-b45e214b619826647a641f9d08f2dee6f82e86cd.tar.zst tangerine-tests-b45e214b619826647a641f9d08f2dee6f82e86cd.zip |
Merge pull request #442 from ethereum/id-input-is-bigger
call ID precompiled contract with smaller output size than input size
4 files changed, 444 insertions, 0 deletions
diff --git a/BlockchainTests/GeneralStateTests/stPreCompiledContracts/identity_to_smaller_d0g0v0.json b/BlockchainTests/GeneralStateTests/stPreCompiledContracts/identity_to_smaller_d0g0v0.json new file mode 100644 index 000000000..db94f5d73 --- /dev/null +++ b/BlockchainTests/GeneralStateTests/stPreCompiledContracts/identity_to_smaller_d0g0v0.json @@ -0,0 +1,218 @@ +{ + "identity_to_smaller_d0g0v0_Byzantium" : { + "_info" : { + "comment" : "", + "filledwith" : "cpp-1.3.0+commit.e327dcb7.Linux.g++", + "lllcversion" : "Version: 0.4.22-develop.2018.3.16+commit.2b2527f3.Linux.g++", + "source" : "src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts/identity_to_smaller_d0g0v0Filler.json", + "sourceHash" : "827f097dad52a0950722d39134145a4eed707f765324cd13e583dc70fd2e7ce1" + }, + "blocks" : [ + { + "blockHeader" : { + "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x3535353535353535353535353535353535353535", + "difficulty" : "0x020000", + "extraData" : "", + "gasLimit" : "0x05f5e100", + "gasUsed" : "0xa31e", + "hash" : "0x8742d08188906f4467ad394fb919f27d628815dfeb35da6b25c24ed1e9252a57", + "mixHash" : "0xfff218f62be02d2f6f5e8248e9941d6d6f7d511a372a0236e42c09d9373e947a", + "nonce" : "0x8e9462d0d5a04efd", + "number" : "0x01", + "parentHash" : "0x71c10835efdc7a74fe4929be88137002a665879ac2eb7bd9556a61dca668bcd1", + "receiptTrie" : "0x53c33d7d99b96b6b47f84a58febb0b1696996df22c970f9232c83453ad76d8d1", + "stateRoot" : "0x3c3f1fa84f6e9f40bd031c2641ff7f5789a3ad38f62770bb6b46b9a2ed49d5af", + "timestamp" : "0x03e8", + "transactionsTrie" : "0xec6a57e4973f6e046d48544dbdefff8286397777cc2c8660adcdb38c6b0ddabd", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf90260f901f8a071c10835efdc7a74fe4929be88137002a665879ac2eb7bd9556a61dca668bcd1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a03c3f1fa84f6e9f40bd031c2641ff7f5789a3ad38f62770bb6b46b9a2ed49d5afa0ec6a57e4973f6e046d48544dbdefff8286397777cc2c8660adcdb38c6b0ddabda053c33d7d99b96b6b47f84a58febb0b1696996df22c970f9232c83453ad76d8d1b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018405f5e10082a31e8203e880a0fff218f62be02d2f6f5e8248e9941d6d6f7d511a372a0236e42c09d9373e947a888e9462d0d5a04efdf862f860010183030d4094c305c901078781c232a2a521c2af7980f8385ee980801ba05082ac608c80290af68a18d44edf0526a3abc6ea3652ab46f63e8953eb813b57a06b1bc1f0b9eb8de1e19d159c9efb8607c2f24643982b112c98ade3e28af22722c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x030d40", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x5082ac608c80290af68a18d44edf0526a3abc6ea3652ab46f63e8953eb813b57", + "s" : "0x6b1bc1f0b9eb8de1e19d159c9efb8607c2f24643982b112c98ade3e28af22722", + "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", + "v" : "0x1b", + "value" : "0x00" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x3535353535353535353535353535353535353535", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x05f5e100", + "gasUsed" : "0x00", + "hash" : "0x71c10835efdc7a74fe4929be88137002a665879ac2eb7bd9556a61dca668bcd1", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0x00", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0x83be8bdd9283db5f309a04f78428218e500d43dc40a4619c2e78ca362f405381", + "timestamp" : "0x03b6", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fbf901f6a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a083be8bdd9283db5f309a04f78428218e500d43dc40a4619c2e78ca362f405381a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808405f5e100808203b642a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421880102030405060708c0c0", + "lastblockhash" : "0x8742d08188906f4467ad394fb919f27d628815dfeb35da6b25c24ed1e9252a57", + "network" : "Byzantium", + "postState" : { + "0x3535353535353535353535353535353535353535" : { + "balance" : "0x29a2241af62ca31e", + "code" : "", + "nonce" : "0x00", + "storage" : { + } + }, + "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { + "balance" : "0x0de0b6b3a7615af4", + "code" : "", + "nonce" : "0x02", + "storage" : { + } + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "code" : "0x7f112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00600052601060106020600060006004620186a0f1503d600055", + "nonce" : "0x21", + "storage" : { + "0x00" : "0x20" + } + } + }, + "pre" : { + "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { + "balance" : "0x0de0b6b3a761fe12", + "code" : "", + "nonce" : "0x01", + "storage" : { + } + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "code" : "0x7f112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00600052601060106020600060006004620186a0f1503d600055", + "nonce" : "0x21", + "storage" : { + } + } + } + }, + "identity_to_smaller_d0g0v0_Constantinople" : { + "_info" : { + "comment" : "", + "filledwith" : "cpp-1.3.0+commit.e327dcb7.Linux.g++", + "lllcversion" : "Version: 0.4.22-develop.2018.3.16+commit.2b2527f3.Linux.g++", + "source" : "src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts/identity_to_smaller_d0g0v0Filler.json", + "sourceHash" : "827f097dad52a0950722d39134145a4eed707f765324cd13e583dc70fd2e7ce1" + }, + "blocks" : [ + { + "blockHeader" : { + "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x3535353535353535353535353535353535353535", + "difficulty" : "0x020000", + "extraData" : "", + "gasLimit" : "0x05f5e100", + "gasUsed" : "0xa31e", + "hash" : "0xd53ff081d8010933b872d1f9832a45dd88df4ba65acd655c293a0c81e46d71b5", + "mixHash" : "0x433c6feaf4a04cf6ed8055e57845783e0b7990831555cefc303d13435a63f44b", + "nonce" : "0x8dfb3adb35f02d04", + "number" : "0x01", + "parentHash" : "0x71c10835efdc7a74fe4929be88137002a665879ac2eb7bd9556a61dca668bcd1", + "receiptTrie" : "0x53c33d7d99b96b6b47f84a58febb0b1696996df22c970f9232c83453ad76d8d1", + "stateRoot" : "0x3c3f1fa84f6e9f40bd031c2641ff7f5789a3ad38f62770bb6b46b9a2ed49d5af", + "timestamp" : "0x03e8", + "transactionsTrie" : "0xec6a57e4973f6e046d48544dbdefff8286397777cc2c8660adcdb38c6b0ddabd", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf90260f901f8a071c10835efdc7a74fe4929be88137002a665879ac2eb7bd9556a61dca668bcd1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a03c3f1fa84f6e9f40bd031c2641ff7f5789a3ad38f62770bb6b46b9a2ed49d5afa0ec6a57e4973f6e046d48544dbdefff8286397777cc2c8660adcdb38c6b0ddabda053c33d7d99b96b6b47f84a58febb0b1696996df22c970f9232c83453ad76d8d1b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018405f5e10082a31e8203e880a0433c6feaf4a04cf6ed8055e57845783e0b7990831555cefc303d13435a63f44b888dfb3adb35f02d04f862f860010183030d4094c305c901078781c232a2a521c2af7980f8385ee980801ba05082ac608c80290af68a18d44edf0526a3abc6ea3652ab46f63e8953eb813b57a06b1bc1f0b9eb8de1e19d159c9efb8607c2f24643982b112c98ade3e28af22722c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x030d40", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x5082ac608c80290af68a18d44edf0526a3abc6ea3652ab46f63e8953eb813b57", + "s" : "0x6b1bc1f0b9eb8de1e19d159c9efb8607c2f24643982b112c98ade3e28af22722", + "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", + "v" : "0x1b", + "value" : "0x00" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x3535353535353535353535353535353535353535", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x05f5e100", + "gasUsed" : "0x00", + "hash" : "0x71c10835efdc7a74fe4929be88137002a665879ac2eb7bd9556a61dca668bcd1", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0x00", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0x83be8bdd9283db5f309a04f78428218e500d43dc40a4619c2e78ca362f405381", + "timestamp" : "0x03b6", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fbf901f6a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a083be8bdd9283db5f309a04f78428218e500d43dc40a4619c2e78ca362f405381a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808405f5e100808203b642a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421880102030405060708c0c0", + "lastblockhash" : "0xd53ff081d8010933b872d1f9832a45dd88df4ba65acd655c293a0c81e46d71b5", + "network" : "Constantinople", + "postState" : { + "0x3535353535353535353535353535353535353535" : { + "balance" : "0x29a2241af62ca31e", + "code" : "", + "nonce" : "0x00", + "storage" : { + } + }, + "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { + "balance" : "0x0de0b6b3a7615af4", + "code" : "", + "nonce" : "0x02", + "storage" : { + } + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "code" : "0x7f112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00600052601060106020600060006004620186a0f1503d600055", + "nonce" : "0x21", + "storage" : { + "0x00" : "0x20" + } + } + }, + "pre" : { + "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { + "balance" : "0x0de0b6b3a761fe12", + "code" : "", + "nonce" : "0x01", + "storage" : { + } + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "code" : "0x7f112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00600052601060106020600060006004620186a0f1503d600055", + "nonce" : "0x21", + "storage" : { + } + } + } + } +}
\ No newline at end of file diff --git a/GeneralStateTests/stPreCompiledContracts/identity_to_smaller.json b/GeneralStateTests/stPreCompiledContracts/identity_to_smaller.json new file mode 100644 index 000000000..25aed6a78 --- /dev/null +++ b/GeneralStateTests/stPreCompiledContracts/identity_to_smaller.json @@ -0,0 +1,74 @@ +{ + "identity_to_smaller" : { + "_info" : { + "comment" : "have a call to e.g. identity built-in that specifies output size less than input size. Check that the long input is totally available with RETURNDATA. CALL is with 100000 as gas, address 4 as destination, 0 as value, 0 as in-offset, 32 as in-size, 16 as out-offset, 16 as out-size. The returndatasize should see 32.", + "filledwith" : "cpp-1.3.0+commit.e327dcb7.Linux.g++", + "lllcversion" : "Version: 0.4.22-develop.2018.3.16+commit.2b2527f3.Linux.g++", + "source" : "src/GeneralStateTestsFiller/stPreCompiledContracts/identity_to_smallerFiller.json", + "sourceHash" : "3cbecb0174f2abebaa9c65118c8f4fca97446f87e3d2606955eaf99ef2b0dc5c" + }, + "env" : { + "currentCoinbase" : "0x3535353535353535353535353535353535353535", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x5f5e100", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0xc6745cf3cada515bbfb9573261c82547e0b8f9e3d5dd382e464704a84e47b5ad" + }, + "post" : { + "Byzantium" : [ + { + "hash" : "0xe9feb2712fd2e902d649a78742f99f199de5584a8a4f811b1478abf766d74308", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ], + "Constantinople" : [ + { + "hash" : "0xe9feb2712fd2e902d649a78742f99f199de5584a8a4f811b1478abf766d74308", + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + "pre" : { + "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { + "balance" : "0x0de0b6b3a761fe12", + "code" : "", + "nonce" : "0x01", + "storage" : { + } + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "code" : "0x7f112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00600052601060106020600060006004620186a0f1503d600055", + "nonce" : "0x21", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "0x" + ], + "gasLimit" : [ + "0x030d40" + ], + "gasPrice" : "0x01", + "nonce" : "0x01", + "secretKey" : "0x044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", + "value" : [ + "0x" + ] + } + } +}
\ No newline at end of file diff --git a/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts/identity_to_smaller_d0g0v0Filler.json b/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts/identity_to_smaller_d0g0v0Filler.json new file mode 100644 index 000000000..545e8ec6d --- /dev/null +++ b/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts/identity_to_smaller_d0g0v0Filler.json @@ -0,0 +1,86 @@ +{ + "identity_to_smaller_d0g0v0" : { + "blocks" : [ + { + "blockHeaderPremine" : { + "difficulty" : "0x020000", + "gasLimit" : "0x05f5e100", + "timestamp" : "0x03e8", + "updatePoW" : "1" + }, + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x030d40", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x5082ac608c80290af68a18d44edf0526a3abc6ea3652ab46f63e8953eb813b57", + "s" : "0x6b1bc1f0b9eb8de1e19d159c9efb8607c2f24643982b112c98ade3e28af22722", + "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", + "v" : "0x1b", + "value" : "0x00" + } + ], + "uncleHeaders" : [ + ] + } + ], + "expect" : [ + { + "network" : "Byzantium", + "result" : { + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "storage" : { + "0x00" : "0x20" + } + } + } + }, + { + "network" : "Constantinople", + "result" : { + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "storage" : { + "0x00" : "0x20" + } + } + } + } + ], + "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" : { + "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { + "balance" : "0x0de0b6b3a761fe12", + "code" : "", + "nonce" : "0x01", + "storage" : { + } + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "code" : "0x7f112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00600052601060106020600060006004620186a0f1503d600055", + "nonce" : "0x21", + "storage" : { + } + } + } + } +}
\ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stPreCompiledContracts/identity_to_smallerFiller.json b/src/GeneralStateTestsFiller/stPreCompiledContracts/identity_to_smallerFiller.json new file mode 100644 index 000000000..54ebd1f78 --- /dev/null +++ b/src/GeneralStateTestsFiller/stPreCompiledContracts/identity_to_smallerFiller.json @@ -0,0 +1,66 @@ +{ + "identity_to_smaller": { + "_info" : + { + "comment" : "have a call to e.g. identity built-in that specifies output size less than input size. Check that the long input is totally available with RETURNDATA. CALL is with 100000 as gas, address 4 as destination, 0 as value, 0 as in-offset, 32 as in-size, 16 as out-offset, 16 as out-size. The returndatasize should see 32." + }, + "env": { + "currentCoinbase": "0x3535353535353535353535353535353535353535", + "currentDifficulty": "0x020000", + "currentGasLimit": "0x5f5e100", + "currentNumber": "0x01", + "currentTimestamp": "1000", + "previousHash": "0xc6745cf3cada515bbfb9573261c82547e0b8f9e3d5dd382e464704a84e47b5ad" + }, + "pre": { + "82a978b3f5962a5b0957d9ee9eef472ee55b42f1": { + "balance": "999999999999868434", + "nonce": "1", + "code": "0x", + "storage": {} + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : + { + "balance" : "0", + "nonce" : "33", + "storage" : + { + }, + "code" : "{(seq (MSTORE 0 0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00) (CALL 100000 4 0 0 32 16 16) (SSTORE 0 (RETURNDATASIZE)))}" + } + }, + "transaction": { + "data": [ "" ], + "gasLimit": [ "200000" ], + "gasPrice": "0x01", + "nonce": "0x01", + "secretKey": "0x044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "to": "0xc305c901078781c232a2a521c2af7980f8385ee9", + "value": [ + "0x" + ] + }, + "expect": [ + { + "indexes": { + "data": 0, + "gas": -1, + "value": 0 + }, + "network": [ + ">=Byzantium" + ], + "result": { + "0xc305c901078781c232a2a521c2af7980f8385ee9" : + { + "balance" : "0", + "storage" : + { + "0x00" : "0x20" + } + } + } + } + ] + } +} |