diff options
author | Jose Hugo De la cruz Romero <jhugodc@gmail.com> | 2018-11-13 09:44:17 +0800 |
---|---|---|
committer | Jose Hugo De la cruz Romero <jhugodc@gmail.com> | 2018-11-15 00:12:56 +0800 |
commit | eff6a92d708d11391c78497bb5b6c2c9d304e625 (patch) | |
tree | 25507322803ae97583c8274e6b9e3bdeffa20839 | |
parent | 47058293ddf5a8221c704f7546cb2ad552c15df9 (diff) | |
download | tangerine-tests-eff6a92d708d11391c78497bb5b6c2c9d304e625.tar tangerine-tests-eff6a92d708d11391c78497bb5b6c2c9d304e625.tar.gz tangerine-tests-eff6a92d708d11391c78497bb5b6c2c9d304e625.tar.bz2 tangerine-tests-eff6a92d708d11391c78497bb5b6c2c9d304e625.tar.lz tangerine-tests-eff6a92d708d11391c78497bb5b6c2c9d304e625.tar.xz tangerine-tests-eff6a92d708d11391c78497bb5b6c2c9d304e625.tar.zst tangerine-tests-eff6a92d708d11391c78497bb5b6c2c9d304e625.zip |
fix precompiles codehash test, refill using latest aleth/testeth
5 files changed, 238 insertions, 193 deletions
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashAccountWithoutCode.json b/GeneralStateTests/stExtCodeHash/extCodeHashAccountWithoutCode.json index f1a84fd1c..e9b7eb90c 100644 --- a/GeneralStateTests/stExtCodeHash/extCodeHashAccountWithoutCode.json +++ b/GeneralStateTests/stExtCodeHash/extCodeHashAccountWithoutCode.json @@ -2,7 +2,7 @@ "extCodeHashAccountWithoutCode" : { "_info" : { "comment" : "", - "filledwith" : "testeth 1.5.0.dev2-76+commit.2fd57400", + "filledwith" : "testeth 1.5.0-alpha.6-1+commit.19ad7d95.dirty", "lllcversion" : "Version: 0.5.0-develop.2018.11.8+commit.20481055.Linux.g++", "source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashAccountWithoutCodeFiller.yml", "sourceHash" : "f3baff76eb9c6d7615f45abd391713823e178cbfa8c8d3979b6048f3bbd493a8" diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashMaxCodeSize.json b/GeneralStateTests/stExtCodeHash/extCodeHashMaxCodeSize.json index 48d58d24d..74865f2ef 100644 --- a/GeneralStateTests/stExtCodeHash/extCodeHashMaxCodeSize.json +++ b/GeneralStateTests/stExtCodeHash/extCodeHashMaxCodeSize.json @@ -2,7 +2,7 @@ "extCodeHashMaxCodeSize" : { "_info" : { "comment" : "", - "filledwith" : "testeth 1.5.0.dev2-76+commit.2fd57400", + "filledwith" : "testeth 1.5.0-alpha.6-1+commit.19ad7d95.dirty", "lllcversion" : "Version: 0.5.0-develop.2018.11.8+commit.20481055.Linux.g++", "source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashMaxCodeSizeFiller.yml", "sourceHash" : "6065487ea4a95322c77cc6fd2d9d99dce598b96487e395f220e17a76d43ecc3e" diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashNonExistingAccount.json b/GeneralStateTests/stExtCodeHash/extCodeHashNonExistingAccount.json index 404e40c39..a0b232663 100644 --- a/GeneralStateTests/stExtCodeHash/extCodeHashNonExistingAccount.json +++ b/GeneralStateTests/stExtCodeHash/extCodeHashNonExistingAccount.json @@ -2,7 +2,7 @@ "extCodeHashNonExistingAccount" : { "_info" : { "comment" : "", - "filledwith" : "testeth 1.5.0.dev2-76+commit.2fd57400", + "filledwith" : "testeth 1.5.0-alpha.6-1+commit.19ad7d95.dirty", "lllcversion" : "Version: 0.5.0-develop.2018.11.8+commit.20481055.Linux.g++", "source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashNonExistingAccountFiller.yml", "sourceHash" : "0aa9f33930ffbcd1c2ca3a0bede0d9c098a6be7fe7c40f7f627d6029e45bc9d6" diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashPrecompiles.json b/GeneralStateTests/stExtCodeHash/extCodeHashPrecompiles.json index adfd50d1c..fa6176d3d 100644 --- a/GeneralStateTests/stExtCodeHash/extCodeHashPrecompiles.json +++ b/GeneralStateTests/stExtCodeHash/extCodeHashPrecompiles.json @@ -2,10 +2,10 @@ "extCodeHashPrecompiles" : { "_info" : { "comment" : "", - "filledwith" : "testeth 1.5.0.dev2-76+commit.2fd57400", + "filledwith" : "testeth 1.5.0-alpha.6-1+commit.19ad7d95.dirty", "lllcversion" : "Version: 0.5.0-develop.2018.11.8+commit.20481055.Linux.g++", "source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashPrecompilesFiller.yml", - "sourceHash" : "52b3a38f807fea2d086de2571b1de6cf63a00c16c145cc349007bbc2e68095a8" + "sourceHash" : "93944b3b990a16b1f7a78a7011593b0a5bb27bc7c87ee3e4dade3988ae8943d3" }, "env" : { "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -18,91 +18,123 @@ "post" : { "Constantinople" : [ { - "hash" : "0x4e9e8bacc8dd6feb1d85431dd0f7dcadce22301a01d62970d74512d879a951dc", + "hash" : "0x1a99e782115a0aa74cd1b49a079eef740e14a394dd09c054194c1f01e665b856", "indexes" : { "data" : 0, "gas" : 0, "value" : 0 }, "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "hash" : "0x7b3c2274148fb76f062bd7bc70fb8ab0bd699b2965d04729118f7cada789ae7d", + "indexes" : { + "data" : 1, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "hash" : "0x7b3c2274148fb76f062bd7bc70fb8ab0bd699b2965d04729118f7cada789ae7d", + "indexes" : { + "data" : 2, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "hash" : "0x7b3c2274148fb76f062bd7bc70fb8ab0bd699b2965d04729118f7cada789ae7d", + "indexes" : { + "data" : 3, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "hash" : "0x7b3c2274148fb76f062bd7bc70fb8ab0bd699b2965d04729118f7cada789ae7d", + "indexes" : { + "data" : 4, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "hash" : "0x7b3c2274148fb76f062bd7bc70fb8ab0bd699b2965d04729118f7cada789ae7d", + "indexes" : { + "data" : 5, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "hash" : "0x7b3c2274148fb76f062bd7bc70fb8ab0bd699b2965d04729118f7cada789ae7d", + "indexes" : { + "data" : 6, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "hash" : "0x7b3c2274148fb76f062bd7bc70fb8ab0bd699b2965d04729118f7cada789ae7d", + "indexes" : { + "data" : 7, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "hash" : "0x7b3c2274148fb76f062bd7bc70fb8ab0bd699b2965d04729118f7cada789ae7d", + "indexes" : { + "data" : 8, + "gas" : 0, + "value" : 0 + }, + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "postState" : { + "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0de0b6b3a7640001", + "code" : "0x60146000600c376000513f6000556000513b600155", + "nonce" : "0x00", + "storage" : { + } + }, + "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "0x35ac", + "code" : "", + "nonce" : "0x00", + "storage" : { + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x0de0b6b3a763ca53", + "code" : "", + "nonce" : "0x01", + "storage" : { + } + } + } } ] }, "pre" : { "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x0de0b6b3a7640000", - "code" : "0x6020600060006000600073aaaaaaaa00000000000000000000000000000001620249f0f1506020600060003e6000516000556020600060006000600073aaaaaaaa00000000000000000000000000000002620249f0f1506020600060003e6000516001556020600060006000600073aaaaaaaa00000000000000000000000000000003620249f0f1506020600060003e6000516002556020600060006000600073aaaaaaaa00000000000000000000000000000004620249f0f1506020600060003e6000516003556020600060006000600073aaaaaaaa00000000000000000000000000000005620249f0f1506020600060003e6000516004556020600060006000600073aaaaaaaa00000000000000000000000000000006620249f0f1506020600060003e6000516005556020600060006000600073aaaaaaaa00000000000000000000000000000007620249f0f1506020600060003e6000516006556020600060006000600073aaaaaaaa00000000000000000000000000000008620249f0f1506020600060003e600051600755", + "code" : "0x60146000600c376000513f6000556000513b600155", "nonce" : "0x00", "storage" : { - "0x00" : "0x01", - "0x01" : "0x01", - "0x02" : "0x01", - "0x03" : "0x01", - "0x04" : "0x01", - "0x05" : "0x01", - "0x06" : "0x01", - "0x07" : "0x01" + "0x00" : "0xab" } }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "0x0de0b6b3a7640000", - "code" : "0x00", - "nonce" : "0x00", - "storage" : { - } - }, - "0xaaaaaaaa00000000000000000000000000000001" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60013f60005260206000f3", - "nonce" : "0x00", - "storage" : { - } - }, - "0xaaaaaaaa00000000000000000000000000000002" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60023b60005260206000f3", - "nonce" : "0x00", - "storage" : { - } - }, - "0xaaaaaaaa00000000000000000000000000000003" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60033b60005260206000f3", - "nonce" : "0x00", - "storage" : { - } - }, - "0xaaaaaaaa00000000000000000000000000000004" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60043b60005260206000f3", - "nonce" : "0x00", - "storage" : { - } - }, - "0xaaaaaaaa00000000000000000000000000000005" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60053b60005260206000f3", - "nonce" : "0x00", - "storage" : { - } - }, - "0xaaaaaaaa00000000000000000000000000000006" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60063b60005260206000f3", - "nonce" : "0x00", - "storage" : { - } - }, - "0xaaaaaaaa00000000000000000000000000000007" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60073b60005260206000f3", - "nonce" : "0x00", - "storage" : { - } - }, - "0xaaaaaaaa00000000000000000000000000000008" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60083b60005260206000f3", + "code" : "", "nonce" : "0x00", "storage" : { } @@ -110,7 +142,15 @@ }, "transaction" : { "data" : [ - "0x" + "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000003", + "0x0000000000000000000000000000000000000004", + "0x0000000000000000000000000000000000000005", + "0x0000000000000000000000000000000000000006", + "0x0000000000000000000000000000000000000007", + "0x0000000000000000000000000000000000000008" ], "gasLimit" : [ "0x061a80" diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashPrecompilesFiller.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashPrecompilesFiller.yml index ae8099d54..8bb915043 100644 --- a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashPrecompilesFiller.yml +++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashPrecompilesFiller.yml @@ -13,123 +13,126 @@ extCodeHashPrecompiles: balance: '1000000000000000000' code: | { - (CALL 150000 0xaaaaaaaa00000000000000000000000000000001 0 0 0 0 32) - (RETURNDATACOPY 0 0 32) - [[0]] (MLOAD 0) - (CALL 150000 0xaaaaaaaa00000000000000000000000000000002 0 0 0 0 32) - (RETURNDATACOPY 0 0 32) - [[1]] (MLOAD 0) - (CALL 150000 0xaaaaaaaa00000000000000000000000000000003 0 0 0 0 32) - (RETURNDATACOPY 0 0 32) - [[2]] (MLOAD 0) - (CALL 150000 0xaaaaaaaa00000000000000000000000000000004 0 0 0 0 32) - (RETURNDATACOPY 0 0 32) - [[3]] (MLOAD 0) - (CALL 150000 0xaaaaaaaa00000000000000000000000000000005 0 0 0 0 32) - (RETURNDATACOPY 0 0 32) - [[4]] (MLOAD 0) - (CALL 150000 0xaaaaaaaa00000000000000000000000000000006 0 0 0 0 32) - (RETURNDATACOPY 0 0 32) - [[5]] (MLOAD 0) - (CALL 150000 0xaaaaaaaa00000000000000000000000000000007 0 0 0 0 32) - (RETURNDATACOPY 0 0 32) - [[6]] (MLOAD 0) - (CALL 150000 0xaaaaaaaa00000000000000000000000000000008 0 0 0 0 32) - (RETURNDATACOPY 0 0 32) - [[7]] (MLOAD 0) + (CALLDATACOPY 12 0 20) + [[0]] (EXTCODEHASH (MLOAD 0)) + [[1]] (EXTCODESIZE (MLOAD 0)) } nonce: '0' - storage: { # initialize storage values to 0x01 - 0: "0x01", - 1: "0x01", - 2: "0x01", - 3: "0x01", - 4: "0x01", - 5: "0x01", - 6: "0x01", - 7: "0x01" - } - aaaaaaaa00000000000000000000000000000001: - balance: '1000000000000000000' - code: | - { - (MSTORE 0 (EXTCODEHASH 0x0000000000000000000000000000000000000001)) - (RETURN 0 32) - } - nonce: '0' - storage: {} - aaaaaaaa00000000000000000000000000000002: - balance: '1000000000000000000' - code: | - { - (MSTORE 0 (EXTCODESIZE 0x0000000000000000000000000000000000000002)) - (RETURN 0 32) - } - nonce: '0' - storage: {} - # account with random bytecode with code size = MAXCODESIZE - 1 = 24575 - aaaaaaaa00000000000000000000000000000003: - balance: '1000000000000000000' - code: | - { - (MSTORE 0 (EXTCODESIZE 0x0000000000000000000000000000000000000003)) - (RETURN 0 32) - } - nonce: '0' - storage: {} - aaaaaaaa00000000000000000000000000000004: - balance: '1000000000000000000' - code: | - { - (MSTORE 0 (EXTCODESIZE 0x0000000000000000000000000000000000000004)) - (RETURN 0 32) - } - nonce: '0' - storage: {} - aaaaaaaa00000000000000000000000000000005: - balance: '1000000000000000000' - code: | - { - (MSTORE 0 (EXTCODESIZE 0x0000000000000000000000000000000000000005)) - (RETURN 0 32) - } - nonce: '0' - storage: {} - aaaaaaaa00000000000000000000000000000006: - balance: '1000000000000000000' - code: | - { - (MSTORE 0 (EXTCODESIZE 0x0000000000000000000000000000000000000006)) - (RETURN 0 32) - } - nonce: '0' - storage: {} - aaaaaaaa00000000000000000000000000000007: - balance: '1000000000000000000' - code: | - { - (MSTORE 0 (EXTCODESIZE 0x0000000000000000000000000000000000000007)) - (RETURN 0 32) - } - nonce: '0' - storage: {} - aaaaaaaa00000000000000000000000000000008: - balance: '1000000000000000000' - code: | - { - (MSTORE 0 (EXTCODESIZE 0x0000000000000000000000000000000000000008)) - (RETURN 0 32) - } - nonce: '0' - storage: {} + storage: { # set initial values to be overwritten + 0: '0xab', + 0: '0xab'} a94f5374fce5edbc8e2a8697c15331677e6ebf0b: balance: '1000000000000000000' - code: '0x00' + code: '0x' nonce: '0' storage: {} expect: - indexes: - data: !!int -1 + data: !!int 0 + gas: !!int -1 + value: !!int -1 + network: + - '>Byzantium' + result: + 095e7baea6a6c7c4c2dfeb977efac326af552d87: + balance: '1000000000000000001' + storage: { + 0: '0xd7f7ece59a0c71c5d0e6fd4f298dea11bfbc05b6d5701c7ae9bd2a444d897c27', + 1: '0x15' + } + - indexes: + data: !!int 1 + gas: !!int -1 + value: !!int -1 + network: + - '>Byzantium' + result: + 095e7baea6a6c7c4c2dfeb977efac326af552d87: + balance: '1000000000000000001' + storage: { + 0: '0x', + 1: '0x' + } + - indexes: + data: !!int 2 + gas: !!int -1 + value: !!int -1 + network: + - '>Byzantium' + result: + 095e7baea6a6c7c4c2dfeb977efac326af552d87: + balance: '1000000000000000001' + storage: { + 0: '0x', + 1: '0x' + } + - indexes: + data: !!int 3 + gas: !!int -1 + value: !!int -1 + network: + - '>Byzantium' + result: + 095e7baea6a6c7c4c2dfeb977efac326af552d87: + balance: '1000000000000000001' + storage: { + 0: '0x', + 1: '0x' + } + - indexes: + data: !!int 4 + gas: !!int -1 + value: !!int -1 + network: + - '>Byzantium' + result: + 095e7baea6a6c7c4c2dfeb977efac326af552d87: + balance: '1000000000000000001' + storage: { + 0: '0x', + 1: '0x' + } + - indexes: + data: !!int 5 + gas: !!int -1 + value: !!int -1 + network: + - '>Byzantium' + result: + 095e7baea6a6c7c4c2dfeb977efac326af552d87: + balance: '1000000000000000001' + storage: { + 0: '0x', + 1: '0x' + } + - indexes: + data: !!int 6 + gas: !!int -1 + value: !!int -1 + network: + - '>Byzantium' + result: + 095e7baea6a6c7c4c2dfeb977efac326af552d87: + balance: '1000000000000000001' + storage: { + 0: '0x', + 1: '0x' + } + - indexes: + data: !!int 7 + gas: !!int -1 + value: !!int -1 + network: + - '>Byzantium' + result: + 095e7baea6a6c7c4c2dfeb977efac326af552d87: + balance: '1000000000000000001' + storage: { + 0: '0x', + 1: '0x' + } + - indexes: + data: !!int 8 gas: !!int -1 value: !!int -1 network: @@ -137,19 +140,21 @@ extCodeHashPrecompiles: result: 095e7baea6a6c7c4c2dfeb977efac326af552d87: balance: '1000000000000000001' - storage: { # codehash of precompiles must be 0 - 0: '0', - 1: '0', - 2: '0', - 3: '0', - 4: '0', - 5: '0', - 6: '0', - 7: '0' - } + storage: { + 0: '0x', + 1: '0x' + } transaction: data: - - '' + - '0x095e7baea6a6c7c4c2dfeb977efac326af552d87' + - '0x0000000000000000000000000000000000000001' + - '0x0000000000000000000000000000000000000002' + - '0x0000000000000000000000000000000000000003' + - '0x0000000000000000000000000000000000000004' + - '0x0000000000000000000000000000000000000005' + - '0x0000000000000000000000000000000000000006' + - '0x0000000000000000000000000000000000000007' + - '0x0000000000000000000000000000000000000008' gasLimit: - '400000' gasPrice: '1' |