version: mark 2.2.0 beta (#9820)
* version: mark 2.2.0 beta * ci: remove failing tests for android, windows, and macos (#9788) * ci: remove failing tests for android, windows, and macos * ci: restore android build jobs * Move state root verification before gas used (#9841) * Classic.json Bootnode Update (#9828) * fix: Update bootnodes list to only responsive nodes * feat: Add more bootnodes to classic.json list * feat: Add retested bootnodes * Implement NoProof for json tests and update tests reference (replaces #9744) (#9814) * Update test reference. Block test are really not working so I disabled a few by commenting directly in source. * Move ethtest commit cursor. * Implements 'NoProof' engine from https://github.com/ethereum/tests/issues/464 . Since tests has been regenerated those one were failing on block difficulty check. Update ethereum/tests, waiting for cost fix (block test are still commented). * Update tests submodule reference to latest (all test passing except an identified case). Fix block reward of constantinople json. * Restore broken test by using old json tests files. * Use CanonNoSeal instead of a custom engine, still have to include some additional tests code. * Gas upper limit check in json_chain test was bad, moving the test to verification, the test is running in `verify_header_param`. Note that test was previously only for ethash, and now for any engine. * Restore old behavior (gas uper limit only for ethash engine), at the cost of an additional trait method. * Proper rpc test fix. * Update tests submodule, add SStore bug tests. * Fix json issue tabulation. Update tests submodule to latest master (lot of new sstore tests passing) * Switch ethereum/tests to tag 6.0.0-beta.1 (no tests changes from latest synch). * Display hex with separator, use indirection instead of clone for copy types.
This commit is contained in:
parent
f8f8bf0fea
commit
5a7e54fb9e
@ -131,38 +131,16 @@ cargo-audit:
|
|||||||
tags:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
|
|
||||||
test-android:
|
build-android:
|
||||||
stage: optional
|
stage: optional
|
||||||
image: parity/rust-android:gitlab-ci
|
image: parity/rust-android:gitlab-ci
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: armv7-linux-androideabi
|
CARGO_TARGET: armv7-linux-androideabi
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/test-all.sh stable
|
- scripts/gitlab/build-unix.sh
|
||||||
tags:
|
tags:
|
||||||
- rust-arm
|
- rust-arm
|
||||||
|
|
||||||
test-darwin:
|
|
||||||
stage: optional
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: x86_64-apple-darwin
|
|
||||||
CC: gcc
|
|
||||||
CXX: g++
|
|
||||||
RUN_TESTS: cargo
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/test-all.sh stable
|
|
||||||
tags:
|
|
||||||
- rust-osx
|
|
||||||
|
|
||||||
test-windows:
|
|
||||||
stage: optional
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: x86_64-pc-windows-msvc
|
|
||||||
RUN_TESTS: cargo
|
|
||||||
script:
|
|
||||||
- sh scripts/gitlab/test-all.sh stable
|
|
||||||
tags:
|
|
||||||
- rust-windows
|
|
||||||
|
|
||||||
test-beta:
|
test-beta:
|
||||||
stage: optional
|
stage: optional
|
||||||
variables:
|
variables:
|
||||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1976,7 +1976,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -3068,17 +3068,18 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"nodes": [
|
"nodes": [
|
||||||
"enode://e809c4a2fec7daed400e5e28564e23693b23b2cc5a019b612505631bbe7b9ccf709c1796d2a3d29ef2b045f210caf51e3c4f5b6d3587d43ad5d6397526fa6179@174.112.32.157:30303",
|
"enode://efd48ad0879eeb7f9cb5e50f33f7bc21e805a72e90361f145baaa22dd75d111e7cd9c93f1b7060dcb30aa1b3e620269336dbf32339fea4c18925a4c15fe642df@18.205.66.229:30303",
|
||||||
"enode://6e538e7c1280f0a31ff08b382db5302480f775480b8e68f8febca0ceff81e4b19153c6f8bf60313b93bef2cc34d34e1df41317de0ce613a201d1660a788a03e2@52.206.67.235:30303",
|
|
||||||
"enode://5fbfb426fbb46f8b8c1bd3dd140f5b511da558cd37d60844b525909ab82e13a25ee722293c829e52cb65c2305b1637fa9a2ea4d6634a224d5f400bfe244ac0de@162.243.55.45:30303",
|
"enode://5fbfb426fbb46f8b8c1bd3dd140f5b511da558cd37d60844b525909ab82e13a25ee722293c829e52cb65c2305b1637fa9a2ea4d6634a224d5f400bfe244ac0de@162.243.55.45:30303",
|
||||||
"enode://42d8f29d1db5f4b2947cd5c3d76c6d0d3697e6b9b3430c3d41e46b4bb77655433aeedc25d4b4ea9d8214b6a43008ba67199374a9b53633301bca0cd20c6928ab@104.155.176.151:30303",
|
"enode://6dd3ac8147fa82e46837ec8c3223d69ac24bcdbab04b036a3705c14f3a02e968f7f1adfcdb002aacec2db46e625c04bf8b5a1f85bb2d40a479b3cc9d45a444af@104.237.131.102:30303",
|
||||||
"enode://814920f1ec9510aa9ea1c8f79d8b6e6a462045f09caa2ae4055b0f34f7416fca6facd3dd45f1cf1673c0209e0503f02776b8ff94020e98b6679a0dc561b4eba0@104.154.136.117:30303",
|
"enode://b9e893ea9cb4537f4fed154233005ae61b441cd0ecd980136138c304fefac194c25a16b73dac05fc66a4198d0c15dd0f33af99b411882c68a019dfa6bb703b9d@18.130.93.66:30303",
|
||||||
"enode://72e445f4e89c0f476d404bc40478b0df83a5b500d2d2e850e08eb1af0cd464ab86db6160d0fde64bd77d5f0d33507ae19035671b3c74fec126d6e28787669740@104.198.71.200:30303",
|
"enode://3fe9705a02487baea45c1ffebfa4d84819f5f1e68a0dbc18031553242a6a08e39499b61e361a52c2a92f9553efd63763f6fdd34692be0d4ba6823bb2fc346009@178.62.238.75:30303",
|
||||||
"enode://39abab9d2a41f53298c0c9dc6bbca57b0840c3ba9dccf42aa27316addc1b7e56ade32a0a9f7f52d6c5db4fe74d8824bcedfeaecf1a4e533cacb71cf8100a9442@144.76.238.49:30303",
|
"enode://d50facc65e46bda6ff594b6e95491efa16e067de41ae96571d9f3cb853d538c44864496fa5e4df10115f02bbbaf47853f932e110a44c89227da7c30e96840596@188.166.163.187:30303",
|
||||||
"enode://f50e675a34f471af2438b921914b5f06499c7438f3146f6b8936f1faeb50b8a91d0d0c24fb05a66f05865cd58c24da3e664d0def806172ddd0d4c5bdbf37747e@144.76.238.49:30306",
|
"enode://a0d5c589dc02d008fe4237da9877a5f1daedee0227ab612677eabe323520f003eb5e311af335de9f7964c2092bbc2b3b7ab1cce5a074d8346959f0868b4e366e@46.101.78.44:30303",
|
||||||
"enode://83b33409349ffa25e150555f7b4f8deebc68f3d34d782129dc3c8ba07b880c209310a4191e1725f2f6bef59bce9452d821111eaa786deab08a7e6551fca41f4f@159.89.223.6:30303",
|
"enode://c071d96b0c0f13006feae3977fb1b3c2f62caedf643df9a3655bc1b60f777f05e69a4e58bf3547bb299210092764c56df1e08380e91265baa845dca8bc0a71da@68.183.99.5:30303",
|
||||||
"enode://5cd218959f8263bc3721d7789070806b0adff1a0ed3f95ec886fb469f9362c7507e3b32b256550b9a7964a23a938e8d42d45a0c34b332bfebc54b29081e83b93@35.187.57.94:30303",
|
"enode://83b33409349ffa25e150555f7b4f8deebc68f3d34d782129dc3c8ba07b880c209310a4191e1725f2f6bef59bce9452d821111eaa786deab08a7e6551fca41f4f@206.189.68.191:30303",
|
||||||
"enode://6dd3ac8147fa82e46837ec8c3223d69ac24bcdbab04b036a3705c14f3a02e968f7f1adfcdb002aacec2db46e625c04bf8b5a1f85bb2d40a479b3cc9d45a444af@104.237.131.102:30303"
|
"enode://0daae2a30f2c73b0b257746587136efb8e3479496f7ea1e943eeb9a663b72dd04582f699f7010ee02c57fc45d1f09568c20a9050ff937f9139e2973ddd98b87b@159.89.169.103:30303",
|
||||||
|
"enode://50808461dd73b3d70537e4c1e5fafd1132b3a90f998399af9205f8889987d62096d4e853813562dd43e7270a71c9d9d4e4dd73a534fdb22fbac98c389c1a7362@178.128.55.119:30303",
|
||||||
|
"enode://5cd218959f8263bc3721d7789070806b0adff1a0ed3f95ec886fb469f9362c7507e3b32b256550b9a7964a23a938e8d42d45a0c34b332bfebc54b29081e83b93@35.187.57.94:30303"
|
||||||
],
|
],
|
||||||
"accounts": {
|
"accounts": {
|
||||||
"0000000000000000000000000000000000000001": { "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
"0000000000000000000000000000000000000001": { "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||||
|
@ -6,10 +6,7 @@
|
|||||||
"minimumDifficulty": "0x020000",
|
"minimumDifficulty": "0x020000",
|
||||||
"difficultyBoundDivisor": "0x0800",
|
"difficultyBoundDivisor": "0x0800",
|
||||||
"durationLimit": "0x0d",
|
"durationLimit": "0x0d",
|
||||||
"blockReward": {
|
"blockReward": "0x1BC16D674EC80000",
|
||||||
"0": "0x29A2241AF62C0000",
|
|
||||||
"5": "0x1BC16D674EC80000"
|
|
||||||
},
|
|
||||||
"homesteadTransition": "0x0",
|
"homesteadTransition": "0x0",
|
||||||
"eip100bTransition": "0x0",
|
"eip100bTransition": "0x0",
|
||||||
"difficultyBombDelays": {
|
"difficultyBombDelays": {
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 3f5febc901913ef698f1b09dda8705babd729e4a
|
Subproject commit 2cd62aeec11da29766b30d500f2b9a96f1f28cf0
|
@ -1,468 +1,42 @@
|
|||||||
{ "block":
|
{ "block":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"reference": "9590",
|
"reference": "None",
|
||||||
"failing": "stCreateTest",
|
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
||||||
"subtests": [
|
"failing": "GeneralStateTest_stCreate2",
|
||||||
"CreateOOGafterInitCodeReturndata2_d0g1v0_Constantinople"
|
"subtests": ["RevertInCreateInInitCreate2_d0g0v0_Constantinople"]
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"reference": "9590",
|
"reference": "None",
|
||||||
"failing": "stCreate2",
|
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
||||||
"subtests": [
|
"failing": "GeneralStateTest_stRevertTest",
|
||||||
"RevertDepthCreateAddressCollision_d0g1v0_Constantinople",
|
"subtests": ["RevertInCreateInInit_d0g0v0_Constantinople"]
|
||||||
"RevertDepthCreateAddressCollision_d1g1v1_Constantinople",
|
|
||||||
"CREATE2_Suicide_d5g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d7g0v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructedOOG_d2g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructedOOG_d2g0v0_Constantinople",
|
|
||||||
"create2collisionNonce_d1g0v0_Byzantium",
|
|
||||||
"create2collisionNonce_d1g0v0_Constantinople",
|
|
||||||
"CreateMessageRevertedOOGInInit_d0g1v0_Constantinople",
|
|
||||||
"create2callPrecompiles_d3g0v0_Constantinople",
|
|
||||||
"create2collisionCode_d1g0v0_Byzantium",
|
|
||||||
"create2collisionCode_d1g0v0_Constantinople",
|
|
||||||
"create2collisionStorage_d0g0v0_Byzantium",
|
|
||||||
"create2collisionStorage_d0g0v0_Constantinople",
|
|
||||||
"create2callPrecompiles_d4g0v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructedRevert_d0g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructedRevert_d0g0v0_Constantinople",
|
|
||||||
"CreateMessageReverted_d0g1v0_Constantinople",
|
|
||||||
"RevertOpcodeCreate_d0g1v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d11g0v0_Constantinople",
|
|
||||||
"create2checkFieldsInInitcode_d5g0v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructedOOG_d1g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructedOOG_d1g0v0_Constantinople",
|
|
||||||
"returndatacopy_following_create_d1g0v0_Constantinople",
|
|
||||||
"RevertDepthCreate2OOG_d1g1v1_Constantinople",
|
|
||||||
"create2collisionSelfdestructed_d2g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructed_d2g0v0_Constantinople",
|
|
||||||
"create2callPrecompiles_d2g0v0_Constantinople",
|
|
||||||
"create2InitCodes_d2g0v0_Constantinople",
|
|
||||||
"create2collisionNonce_d2g0v0_Byzantium",
|
|
||||||
"create2collisionNonce_d2g0v0_Constantinople",
|
|
||||||
"create2collisionCode_d0g0v0_Byzantium",
|
|
||||||
"create2collisionCode_d0g0v0_Constantinople",
|
|
||||||
"CREATE2_Bounds_d0g0v0_Constantinople",
|
|
||||||
"RevertDepthCreate2OOG_d0g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d1g0v0_Constantinople",
|
|
||||||
"CREATE2_Bounds3_d0g1v0_Constantinople",
|
|
||||||
"create2collisionStorage_d2g0v0_Byzantium",
|
|
||||||
"create2collisionStorage_d2g0v0_Constantinople",
|
|
||||||
"RevertDepthCreateAddressCollision_d0g0v1_Constantinople",
|
|
||||||
"create2callPrecompiles_d5g0v0_Constantinople",
|
|
||||||
"create2collisionCode2_d0g0v0_Byzantium",
|
|
||||||
"create2collisionCode2_d0g0v0_Constantinople",
|
|
||||||
"create2noCash_d0g0v0_Byzantium",
|
|
||||||
"create2noCash_d0g0v0_Constantinople",
|
|
||||||
"create2checkFieldsInInitcode_d7g0v0_Constantinople",
|
|
||||||
"create2SmartInitCode_d1g0v0_Constantinople",
|
|
||||||
"create2InitCodes_d6g0v0_Constantinople",
|
|
||||||
"create2noCash_d1g0v0_Byzantium",
|
|
||||||
"create2noCash_d1g0v0_Constantinople",
|
|
||||||
"CREATE2_ContractSuicideDuringInit_ThenStoreThenReturn_d0g0v0_Constantinople",
|
|
||||||
"RevertOpcodeInCreateReturns_d0g0v0_Constantinople",
|
|
||||||
"create2collisionStorage_d1g0v0_Byzantium",
|
|
||||||
"create2collisionStorage_d1g0v0_Constantinople",
|
|
||||||
"create2checkFieldsInInitcode_d3g0v0_Constantinople",
|
|
||||||
"create2collisionBalance_d0g0v0_Byzantium",
|
|
||||||
"create2collisionBalance_d0g0v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructed2_d0g0v0_Constantinople",
|
|
||||||
"create2InitCodes_d3g0v0_Constantinople",
|
|
||||||
"create2collisionCode2_d1g0v0_Byzantium",
|
|
||||||
"create2collisionCode2_d1g0v0_Constantinople",
|
|
||||||
"create2checkFieldsInInitcode_d1g0v0_Constantinople",
|
|
||||||
"create2collisionBalance_d1g0v0_Byzantium",
|
|
||||||
"create2collisionBalance_d1g0v0_Constantinople",
|
|
||||||
"CREATE2_Bounds3_d0g2v0_Constantinople",
|
|
||||||
"create2callPrecompiles_d6g0v0_Constantinople",
|
|
||||||
"Create2Recursive_d0g0v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructedOOG_d0g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructedOOG_d0g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d3g0v0_Constantinople",
|
|
||||||
"returndatacopy_following_create_d0g0v0_Constantinople",
|
|
||||||
"create2InitCodes_d8g0v0_Constantinople",
|
|
||||||
"RevertDepthCreate2OOG_d0g0v1_Constantinople",
|
|
||||||
"create2checkFieldsInInitcode_d2g0v0_Constantinople",
|
|
||||||
"RevertDepthCreate2OOG_d1g0v1_Constantinople",
|
|
||||||
"Create2OnDepth1024_d0g0v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructed2_d1g0v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructedRevert_d2g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructedRevert_d2g0v0_Constantinople",
|
|
||||||
"create2callPrecompiles_d0g0v0_Constantinople",
|
|
||||||
"RevertDepthCreateAddressCollision_d0g1v1_Constantinople",
|
|
||||||
"create2collisionSelfdestructed_d1g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructed_d1g0v0_Constantinople",
|
|
||||||
"call_outsize_then_create2_successful_then_returndatasize_d0g0v0_Byzantium",
|
|
||||||
"call_outsize_then_create2_successful_then_returndatasize_d0g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCodeRevert_d0g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCodeReturndata3_d0g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCodeReturndataSize_d0g0v0_Constantinople",
|
|
||||||
"create2InitCodes_d7g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d10g0v0_Constantinople",
|
|
||||||
"RevertDepthCreate2OOG_d0g1v0_Constantinople",
|
|
||||||
"create2InitCodes_d5g0v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructedRevert_d1g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructedRevert_d1g0v0_Constantinople",
|
|
||||||
"RevertDepthCreate2OOG_d1g1v0_Constantinople",
|
|
||||||
"create2collisionSelfdestructed_d0g0v0_Byzantium",
|
|
||||||
"create2collisionSelfdestructed_d0g0v0_Constantinople",
|
|
||||||
"create2noCash_d2g0v0_Byzantium",
|
|
||||||
"create2noCash_d2g0v0_Constantinople",
|
|
||||||
"CREATE2_Bounds3_d0g0v0_Constantinople",
|
|
||||||
"create2collisionNonce_d0g0v0_Byzantium",
|
|
||||||
"create2collisionNonce_d0g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d2g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCode_d0g0v0_Constantinople",
|
|
||||||
"call_then_create2_successful_then_returndatasize_d0g0v0_Byzantium",
|
|
||||||
"call_then_create2_successful_then_returndatasize_d0g0v0_Constantinople",
|
|
||||||
"create2collisionBalance_d2g0v0_Byzantium",
|
|
||||||
"create2collisionBalance_d2g0v0_Constantinople",
|
|
||||||
"create2checkFieldsInInitcode_d6g0v0_Constantinople",
|
|
||||||
"RevertDepthCreate2OOG_d0g1v1_Constantinople",
|
|
||||||
"returndatacopy_afterFailing_create_d0g0v0_Constantinople",
|
|
||||||
"returndatacopy_following_revert_in_create_d0g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d9g0v0_Constantinople",
|
|
||||||
"create2callPrecompiles_d7g0v0_Constantinople",
|
|
||||||
"RevertDepthCreateAddressCollision_d1g0v1_Constantinople",
|
|
||||||
"create2InitCodes_d1g0v0_Constantinople",
|
|
||||||
"CREATE2_Bounds_d0g1v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCodeReturndata_d0g0v0_Constantinople",
|
|
||||||
"create2checkFieldsInInitcode_d4g0v0_Constantinople",
|
|
||||||
"CreateMessageRevertedOOGInInit_d0g0v0_Constantinople",
|
|
||||||
"RevertDepthCreateAddressCollision_d1g1v0_Constantinople",
|
|
||||||
"returndatacopy_following_successful_create_d0g0v0_Constantinople",
|
|
||||||
"create2checkFieldsInInitcode_d0g0v0_Constantinople",
|
|
||||||
"CreateMessageReverted_d0g0v0_Constantinople",
|
|
||||||
"create2SmartInitCode_d0g0v0_Constantinople",
|
|
||||||
"CREATE2_Bounds2_d0g0v0_Constantinople",
|
|
||||||
"returndatasize_following_successful_create_d0g0v0_Constantinople",
|
|
||||||
"CREATE2_Bounds2_d0g1v0_Constantinople",
|
|
||||||
"returndatacopy_0_0_following_successful_create_d0g0v0_Constantinople",
|
|
||||||
"RevertDepthCreateAddressCollision_d0g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d0g0v0_Constantinople",
|
|
||||||
"create2InitCodes_d0g0v0_Constantinople",
|
|
||||||
"Create2OnDepth1023_d0g0v0_Constantinople",
|
|
||||||
"create2InitCodes_d4g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCodeReturndata2_d0g0v0_Constantinople",
|
|
||||||
"create2collisionBalance_d3g0v0_Byzantium",
|
|
||||||
"create2collisionBalance_d3g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d4g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCode_d0g1v0_Constantinople",
|
|
||||||
"RevertDepthCreateAddressCollision_d1g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCodeRevert2_d0g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCodeReturndata_d0g1v0_Constantinople",
|
|
||||||
"Create2Recursive_d0g1v0_Constantinople",
|
|
||||||
"create2collisionCode_d2g0v0_Byzantium",
|
|
||||||
"create2collisionCode_d2g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d6g0v0_Constantinople",
|
|
||||||
"CREATE2_Suicide_d8g0v0_Constantinople",
|
|
||||||
"RevertOpcodeCreate_d0g0v0_Constantinople",
|
|
||||||
"Create2OOGafterInitCodeReturndata2_d0g1v0_Constantinople",
|
|
||||||
"create2callPrecompiles_d1g0v0_Constantinople",
|
|
||||||
"RevertInCreateInInit_d0g0v0_Constantinople",
|
|
||||||
"RevertDepthCreate2OOG_d1g0v0_Constantinople"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "bcStateTest",
|
|
||||||
"subtests": [
|
|
||||||
"suicideStorageCheck_Byzantium",
|
|
||||||
"suicideStorageCheck_Constantinople",
|
|
||||||
"suicideStorageCheckVCreate2_Byzantium",
|
|
||||||
"suicideStorageCheckVCreate2_Constantinople",
|
|
||||||
"create2collisionwithSelfdestructSameBlock_Constantinople",
|
|
||||||
"blockhashNonConstArg_Constantinople",
|
|
||||||
"suicideThenCheckBalance_Constantinople",
|
|
||||||
"suicideThenCheckBalance_Homestead",
|
|
||||||
"suicideStorageCheckVCreate_Byzantium",
|
|
||||||
"suicideStorageCheckVCreate_Constantinople"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stEIP158Specific",
|
|
||||||
"subtests": [
|
|
||||||
"callToEmptyThenCallError_d0g0v0_Byzantium",
|
|
||||||
"callToEmptyThenCallError_d0g0v0_Constantinople",
|
|
||||||
"callToEmptyThenCallError_d0g0v0_EIP158"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stPreCompiledContracts",
|
|
||||||
"subtests": [
|
|
||||||
"identity_to_smaller_d0g0v0_Constantinople",
|
|
||||||
"identity_to_bigger_d0g0v0_Constantinople"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stReturnDataTest",
|
|
||||||
"subtests": [
|
|
||||||
"modexp_modsize0_returndatasize_d0g1v0_Constantinople",
|
|
||||||
"modexp_modsize0_returndatasize_d0g2v0_Constantinople",
|
|
||||||
"modexp_modsize0_returndatasize_d0g3v0_Constantinople"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stSpecialTest",
|
|
||||||
"subtests": [
|
|
||||||
"push32withoutByte_d0g0v0_Constantinople"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
"state":
|
"state":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"reference": "9590",
|
"reference": "None",
|
||||||
"failing": "stCreateTest",
|
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
||||||
|
"failing": "stCreate2Test",
|
||||||
"subtests": {
|
"subtests": {
|
||||||
"CreateOOGafterInitCodeReturndata2": {
|
"RevertInCreateInInitCreate2": {
|
||||||
"subnumbers": ["2"],
|
"subnumbers": ["1"],
|
||||||
"chain": "Constantinople (test)"
|
"chain": "Constantinople (test)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"reference": "9590",
|
"reference": "None",
|
||||||
"failing": "stCreate2Test",
|
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
||||||
|
"failing": "stRevertTest",
|
||||||
"subtests": {
|
"subtests": {
|
||||||
"RevertInCreateInInit": {
|
"RevertInCreateInInit": {
|
||||||
"subnumbers": ["1"],
|
"subnumbers": ["1"],
|
||||||
"chain": "Constantinople (test)"
|
"chain": "Constantinople (test)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stEIP150Specific",
|
|
||||||
"subtests": {
|
|
||||||
"NewGasPriceForCodes": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stInitCodeTest",
|
|
||||||
"subtests": {
|
|
||||||
"OutOfGasContractCreation": {
|
|
||||||
"subnumbers": ["4"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stPreCompiledContracts",
|
|
||||||
"subtests": {
|
|
||||||
"modexp": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stRevertTest",
|
|
||||||
"subtests": {
|
|
||||||
"LoopCallsDepthThenRevert3": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertOpcodeCreate": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertSubCallStorageOOG2": {
|
|
||||||
"subnumbers": ["1","3"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertDepthCreateOOG": {
|
|
||||||
"subnumbers": ["3","4"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertOpcodeMultipleSubCalls": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertOpcodeDirectCall": {
|
|
||||||
"subnumbers": ["1","2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"LoopCallsDepthThenRevert2": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertDepth2": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertRemoteSubCallStorageOOG2": {
|
|
||||||
"subnumbers": ["1","2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertDepthCreateAddressCollision": {
|
|
||||||
"subnumbers": ["3","4"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stStaticCall",
|
|
||||||
"subtests": {
|
|
||||||
"static_RevertDepth2": {
|
|
||||||
"subnumbers": ["1","3"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"static_CheckOpcodes4": {
|
|
||||||
"subnumbers": ["3"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"static_CheckOpcodes3": {
|
|
||||||
"subnumbers": ["5","6","7","8"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"static_callBasic": {
|
|
||||||
"subnumbers": ["1","2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"static_CheckOpcodes2": {
|
|
||||||
"subnumbers": ["5","6","7","8"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"static_callCreate": {
|
|
||||||
"subnumbers": ["2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "https://github.com/ethereum/tests/issues/512",
|
|
||||||
"failing": "stZeroKnowledge",
|
|
||||||
"subtests": {
|
|
||||||
"pointAddTrunc": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"pointAdd": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"pointMulAdd": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"pointMulAdd2": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "9590",
|
|
||||||
"failing": "stCreate2Test",
|
|
||||||
"subtests": {
|
|
||||||
"call_then_create2_successful_then_returndatasize": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"returndatacopy_afterFailing_create": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"create2checkFieldsInInitcode": {
|
|
||||||
"subnumbers": ["1","2","3","5","6","7"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"Create2Recursive": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"create2collisionBalance": {
|
|
||||||
"subnumbers": ["2","3"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"create2InitCodes": {
|
|
||||||
"subnumbers": ["1","5","6","7","8","9"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"Create2OOGafterInitCode": {
|
|
||||||
"subnumbers": ["2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"CreateMessageRevertedOOGInInit": {
|
|
||||||
"subnumbers": ["2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"returndatacopy_following_revert_in_create": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"create2collisionSelfdestructed": {
|
|
||||||
"subnumbers": ["2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"returndatacopy_0_0_following_successful_create": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"Create2OnDepth1023": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"Create2OOGafterInitCodeReturndata2": {
|
|
||||||
"subnumbers": ["2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"RevertOpcodeInCreateReturns": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"CREATE2_ContractSuicideDuringInit_ThenStoreThenReturn": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"returndatasize_following_successful_create": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"call_outsize_then_create2_successful_then_returndatasize": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"CreateMessageReverted": {
|
|
||||||
"subnumbers": ["2"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"CREATE2_Suicide": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"Create2OOGafterInitCodeRevert": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"Create2OnDepth1024": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"create2collisionStorage": {
|
|
||||||
"subnumbers": ["2","3"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
},
|
|
||||||
"create2callPrecompiles": {
|
|
||||||
"subnumbers": ["*"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -254,6 +254,9 @@ pub trait Engine<M: Machine>: Sync + Send {
|
|||||||
/// The number of generations back that uncles can be.
|
/// The number of generations back that uncles can be.
|
||||||
fn maximum_uncle_age(&self) -> usize { 6 }
|
fn maximum_uncle_age(&self) -> usize { 6 }
|
||||||
|
|
||||||
|
/// Optional maximum gas limit.
|
||||||
|
fn maximum_gas_limit(&self) -> Option<U256> { None }
|
||||||
|
|
||||||
/// Block transformation functions, before the transactions.
|
/// Block transformation functions, before the transactions.
|
||||||
/// `epoch_begin` set to true if this block kicks off an epoch.
|
/// `epoch_begin` set to true if this block kicks off an epoch.
|
||||||
fn on_new_block(
|
fn on_new_block(
|
||||||
|
@ -222,6 +222,8 @@ impl Engine<EthereumMachine> for Arc<Ethash> {
|
|||||||
|
|
||||||
fn maximum_uncle_count(&self, _block: BlockNumber) -> usize { 2 }
|
fn maximum_uncle_count(&self, _block: BlockNumber) -> usize { 2 }
|
||||||
|
|
||||||
|
fn maximum_gas_limit(&self) -> Option<U256> { Some(0x7fff_ffff_ffff_ffffu64.into()) }
|
||||||
|
|
||||||
fn populate_from_parent(&self, header: &mut Header, parent: &Header) {
|
fn populate_from_parent(&self, header: &mut Header, parent: &Header) {
|
||||||
let difficulty = self.calculate_difficulty(header, parent);
|
let difficulty = self.calculate_difficulty(header, parent);
|
||||||
header.set_difficulty(difficulty);
|
header.set_difficulty(difficulty);
|
||||||
@ -322,10 +324,6 @@ impl Engine<EthereumMachine> for Arc<Ethash> {
|
|||||||
return Err(From::from(BlockError::InvalidProofOfWork(OutOfBounds { min: Some(header.difficulty().clone()), max: None, found: difficulty })));
|
return Err(From::from(BlockError::InvalidProofOfWork(OutOfBounds { min: Some(header.difficulty().clone()), max: None, found: difficulty })));
|
||||||
}
|
}
|
||||||
|
|
||||||
if header.gas_limit() > &0x7fffffffffffffffu64.into() {
|
|
||||||
return Err(From::from(BlockError::InvalidGasLimit(OutOfBounds { min: None, max: Some(0x7fffffffffffffffu64.into()), found: header.gas_limit().clone() })));
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ use miner::Miner;
|
|||||||
use io::IoChannel;
|
use io::IoChannel;
|
||||||
use test_helpers;
|
use test_helpers;
|
||||||
use verification::queue::kind::blocks::Unverified;
|
use verification::queue::kind::blocks::Unverified;
|
||||||
|
use verification::VerifierType;
|
||||||
use super::SKIP_TEST_STATE;
|
use super::SKIP_TEST_STATE;
|
||||||
|
|
||||||
use super::HookType;
|
use super::HookType;
|
||||||
|
|
||||||
/// Run chain jsontests on a given folder.
|
/// Run chain jsontests on a given folder.
|
||||||
@ -84,6 +84,10 @@ pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_ho
|
|||||||
{
|
{
|
||||||
let db = test_helpers::new_db();
|
let db = test_helpers::new_db();
|
||||||
let mut config = ClientConfig::default();
|
let mut config = ClientConfig::default();
|
||||||
|
if ethjson::blockchain::Engine::NoProof == blockchain.engine {
|
||||||
|
config.verifier_type = VerifierType::CanonNoSeal;
|
||||||
|
config.check_seal = false;
|
||||||
|
}
|
||||||
config.history = 8;
|
config.history = 8;
|
||||||
let client = Client::new(
|
let client = Client::new(
|
||||||
config,
|
config,
|
||||||
@ -184,6 +188,7 @@ mod block_tests {
|
|||||||
declare_test!{BlockchainTests_GeneralStateTest_stZeroCallsTest, "BlockchainTests/GeneralStateTests/stZeroCallsTest/"}
|
declare_test!{BlockchainTests_GeneralStateTest_stZeroCallsTest, "BlockchainTests/GeneralStateTests/stZeroCallsTest/"}
|
||||||
declare_test!{BlockchainTests_GeneralStateTest_stZeroKnowledge, "BlockchainTests/GeneralStateTests/stZeroKnowledge/"}
|
declare_test!{BlockchainTests_GeneralStateTest_stZeroKnowledge, "BlockchainTests/GeneralStateTests/stZeroKnowledge/"}
|
||||||
declare_test!{BlockchainTests_GeneralStateTest_stZeroKnowledge2, "BlockchainTests/GeneralStateTests/stZeroKnowledge2/"}
|
declare_test!{BlockchainTests_GeneralStateTest_stZeroKnowledge2, "BlockchainTests/GeneralStateTests/stZeroKnowledge2/"}
|
||||||
|
declare_test!{BlockchainTests_GeneralStateTest_stSStoreTest, "BlockchainTests/GeneralStateTests/stSStoreTest/"}
|
||||||
|
|
||||||
declare_test!{BlockchainTests_TransitionTests_bcEIP158ToByzantium, "BlockchainTests/TransitionTests/bcEIP158ToByzantium/"}
|
declare_test!{BlockchainTests_TransitionTests_bcEIP158ToByzantium, "BlockchainTests/TransitionTests/bcEIP158ToByzantium/"}
|
||||||
declare_test!{BlockchainTests_TransitionTests_bcFrontierToHomestead, "BlockchainTests/TransitionTests/bcFrontierToHomestead/"}
|
declare_test!{BlockchainTests_TransitionTests_bcFrontierToHomestead, "BlockchainTests/TransitionTests/bcFrontierToHomestead/"}
|
||||||
|
@ -177,6 +177,7 @@ mod state_tests {
|
|||||||
declare_test!{GeneralStateTest_stZeroCallsRevert, "GeneralStateTests/stZeroCallsRevert/"}
|
declare_test!{GeneralStateTest_stZeroCallsRevert, "GeneralStateTests/stZeroCallsRevert/"}
|
||||||
declare_test!{GeneralStateTest_stZeroCallsTest, "GeneralStateTests/stZeroCallsTest/"}
|
declare_test!{GeneralStateTest_stZeroCallsTest, "GeneralStateTests/stZeroCallsTest/"}
|
||||||
declare_test!{GeneralStateTest_stZeroKnowledge, "GeneralStateTests/stZeroKnowledge/"}
|
declare_test!{GeneralStateTest_stZeroKnowledge, "GeneralStateTests/stZeroKnowledge/"}
|
||||||
|
declare_test!{GeneralStateTest_stSStoreTest, "GeneralStateTests/stSStoreTest/"}
|
||||||
|
|
||||||
// Attempts to send a transaction that requires more than current balance:
|
// Attempts to send a transaction that requires more than current balance:
|
||||||
// Tx:
|
// Tx:
|
||||||
|
@ -173,7 +173,7 @@ fn verify_uncles(block: &PreverifiedBlock, bc: &BlockProvider, engine: &EthEngin
|
|||||||
for _ in 0..engine.maximum_uncle_age() {
|
for _ in 0..engine.maximum_uncle_age() {
|
||||||
match bc.block_details(&hash) {
|
match bc.block_details(&hash) {
|
||||||
Some(details) => {
|
Some(details) => {
|
||||||
excluded.insert(details.parent.clone());
|
excluded.insert(details.parent);
|
||||||
let b = bc.block(&hash)
|
let b = bc.block(&hash)
|
||||||
.expect("parent already known to be stored; qed");
|
.expect("parent already known to be stored; qed");
|
||||||
excluded.extend(b.uncle_hashes());
|
excluded.extend(b.uncle_hashes());
|
||||||
@ -245,17 +245,17 @@ fn verify_uncles(block: &PreverifiedBlock, bc: &BlockProvider, engine: &EthEngin
|
|||||||
|
|
||||||
/// Phase 4 verification. Check block information against transaction enactment results,
|
/// Phase 4 verification. Check block information against transaction enactment results,
|
||||||
pub fn verify_block_final(expected: &Header, got: &Header) -> Result<(), Error> {
|
pub fn verify_block_final(expected: &Header, got: &Header) -> Result<(), Error> {
|
||||||
|
if expected.state_root() != got.state_root() {
|
||||||
|
return Err(From::from(BlockError::InvalidStateRoot(Mismatch { expected: *expected.state_root(), found: *got.state_root() })))
|
||||||
|
}
|
||||||
if expected.gas_used() != got.gas_used() {
|
if expected.gas_used() != got.gas_used() {
|
||||||
return Err(From::from(BlockError::InvalidGasUsed(Mismatch { expected: expected.gas_used().clone(), found: got.gas_used().clone() })))
|
return Err(From::from(BlockError::InvalidGasUsed(Mismatch { expected: *expected.gas_used(), found: *got.gas_used() })))
|
||||||
}
|
}
|
||||||
if expected.log_bloom() != got.log_bloom() {
|
if expected.log_bloom() != got.log_bloom() {
|
||||||
return Err(From::from(BlockError::InvalidLogBloom(Mismatch { expected: expected.log_bloom().clone(), found: got.log_bloom().clone() })))
|
return Err(From::from(BlockError::InvalidLogBloom(Mismatch { expected: *expected.log_bloom(), found: *got.log_bloom() })))
|
||||||
}
|
|
||||||
if expected.state_root() != got.state_root() {
|
|
||||||
return Err(From::from(BlockError::InvalidStateRoot(Mismatch { expected: expected.state_root().clone(), found: got.state_root().clone() })))
|
|
||||||
}
|
}
|
||||||
if expected.receipts_root() != got.receipts_root() {
|
if expected.receipts_root() != got.receipts_root() {
|
||||||
return Err(From::from(BlockError::InvalidReceiptsRoot(Mismatch { expected: expected.receipts_root().clone(), found: got.receipts_root().clone() })))
|
return Err(From::from(BlockError::InvalidReceiptsRoot(Mismatch { expected: *expected.receipts_root(), found: *got.receipts_root() })))
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@ -275,11 +275,16 @@ pub fn verify_header_params(header: &Header, engine: &EthEngine, is_full: bool,
|
|||||||
return Err(From::from(BlockError::RidiculousNumber(OutOfBounds { max: Some(From::from(BlockNumber::max_value())), min: None, found: header.number() })))
|
return Err(From::from(BlockError::RidiculousNumber(OutOfBounds { max: Some(From::from(BlockNumber::max_value())), min: None, found: header.number() })))
|
||||||
}
|
}
|
||||||
if header.gas_used() > header.gas_limit() {
|
if header.gas_used() > header.gas_limit() {
|
||||||
return Err(From::from(BlockError::TooMuchGasUsed(OutOfBounds { max: Some(header.gas_limit().clone()), min: None, found: header.gas_used().clone() })));
|
return Err(From::from(BlockError::TooMuchGasUsed(OutOfBounds { max: Some(*header.gas_limit()), min: None, found: *header.gas_used() })));
|
||||||
}
|
}
|
||||||
let min_gas_limit = engine.params().min_gas_limit;
|
let min_gas_limit = engine.params().min_gas_limit;
|
||||||
if header.gas_limit() < &min_gas_limit {
|
if header.gas_limit() < &min_gas_limit {
|
||||||
return Err(From::from(BlockError::InvalidGasLimit(OutOfBounds { min: Some(min_gas_limit), max: None, found: header.gas_limit().clone() })));
|
return Err(From::from(BlockError::InvalidGasLimit(OutOfBounds { min: Some(min_gas_limit), max: None, found: *header.gas_limit() })));
|
||||||
|
}
|
||||||
|
if let Some(limit) = engine.maximum_gas_limit() {
|
||||||
|
if header.gas_limit() > &limit {
|
||||||
|
return Err(From::from(::error::BlockError::InvalidGasLimit(OutOfBounds { min: None, max: Some(limit), found: *header.gas_limit() })));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let maximum_extra_data_size = engine.maximum_extra_data_size();
|
let maximum_extra_data_size = engine.maximum_extra_data_size();
|
||||||
if header.number() != 0 && header.extra_data().len() > maximum_extra_data_size {
|
if header.number() != 0 && header.extra_data().len() > maximum_extra_data_size {
|
||||||
@ -336,7 +341,7 @@ fn verify_parent(header: &Header, parent: &Header, engine: &EthEngine) -> Result
|
|||||||
let min_gas = parent_gas_limit - parent_gas_limit / gas_limit_divisor;
|
let min_gas = parent_gas_limit - parent_gas_limit / gas_limit_divisor;
|
||||||
let max_gas = parent_gas_limit + parent_gas_limit / gas_limit_divisor;
|
let max_gas = parent_gas_limit + parent_gas_limit / gas_limit_divisor;
|
||||||
if header.gas_limit() <= &min_gas || header.gas_limit() >= &max_gas {
|
if header.gas_limit() <= &min_gas || header.gas_limit() >= &max_gas {
|
||||||
return Err(From::from(BlockError::InvalidGasLimit(OutOfBounds { min: Some(min_gas), max: Some(max_gas), found: header.gas_limit().clone() })));
|
return Err(From::from(BlockError::InvalidGasLimit(OutOfBounds { min: Some(min_gas), max: Some(max_gas), found: *header.gas_limit() })));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -520,7 +525,7 @@ mod tests {
|
|||||||
// is fine.
|
// is fine.
|
||||||
let client = ::client::TestBlockChainClient::default();
|
let client = ::client::TestBlockChainClient::default();
|
||||||
let parent = bc.block_header_data(header.parent_hash())
|
let parent = bc.block_header_data(header.parent_hash())
|
||||||
.ok_or(BlockError::UnknownParent(header.parent_hash().clone()))?
|
.ok_or(BlockError::UnknownParent(*header.parent_hash()))?
|
||||||
.decode()?;
|
.decode()?;
|
||||||
|
|
||||||
let block = PreverifiedBlock {
|
let block = PreverifiedBlock {
|
||||||
|
@ -23,6 +23,21 @@ use blockchain::header::Header;
|
|||||||
use blockchain::block::Block;
|
use blockchain::block::Block;
|
||||||
use spec::{ForkSpec, Genesis, Seal, Ethereum};
|
use spec::{ForkSpec, Genesis, Seal, Ethereum};
|
||||||
|
|
||||||
|
/// Json Block test possible engine kind.
|
||||||
|
#[derive(Debug, PartialEq, Deserialize)]
|
||||||
|
pub enum Engine {
|
||||||
|
/// Default (old) behaviour.
|
||||||
|
Ethash,
|
||||||
|
/// No check of block's difficulty and nonce for tests.
|
||||||
|
NoProof,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Engine {
|
||||||
|
fn default() -> Self {
|
||||||
|
Engine::Ethash
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Blockchain deserialization.
|
/// Blockchain deserialization.
|
||||||
#[derive(Debug, PartialEq, Deserialize)]
|
#[derive(Debug, PartialEq, Deserialize)]
|
||||||
pub struct BlockChain {
|
pub struct BlockChain {
|
||||||
@ -45,6 +60,10 @@ pub struct BlockChain {
|
|||||||
pub best_block: H256,
|
pub best_block: H256,
|
||||||
/// Network.
|
/// Network.
|
||||||
pub network: ForkSpec,
|
pub network: ForkSpec,
|
||||||
|
#[serde(default)]
|
||||||
|
#[serde(rename="sealEngine")]
|
||||||
|
/// Engine
|
||||||
|
pub engine: Engine,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BlockChain {
|
impl BlockChain {
|
||||||
|
@ -27,6 +27,7 @@ pub mod test;
|
|||||||
pub use self::account::Account;
|
pub use self::account::Account;
|
||||||
pub use self::block::Block;
|
pub use self::block::Block;
|
||||||
pub use self::blockchain::BlockChain;
|
pub use self::blockchain::BlockChain;
|
||||||
|
pub use self::blockchain::Engine;
|
||||||
pub use self::header::Header;
|
pub use self::header::Header;
|
||||||
pub use self::state::State;
|
pub use self::state::State;
|
||||||
pub use self::test::Test;
|
pub use self::test::Test;
|
||||||
|
@ -27,6 +27,7 @@ use ethcore::miner::Miner;
|
|||||||
use ethcore::spec::{Genesis, Spec};
|
use ethcore::spec::{Genesis, Spec};
|
||||||
use ethcore::test_helpers;
|
use ethcore::test_helpers;
|
||||||
use ethcore::verification::queue::kind::blocks::Unverified;
|
use ethcore::verification::queue::kind::blocks::Unverified;
|
||||||
|
use ethcore::verification::VerifierType;
|
||||||
use ethjson::blockchain::BlockChain;
|
use ethjson::blockchain::BlockChain;
|
||||||
use ethjson::spec::ForkSpec;
|
use ethjson::spec::ForkSpec;
|
||||||
use io::IoChannel;
|
use io::IoChannel;
|
||||||
@ -84,7 +85,16 @@ struct EthTester {
|
|||||||
|
|
||||||
impl EthTester {
|
impl EthTester {
|
||||||
fn from_chain(chain: &BlockChain) -> Self {
|
fn from_chain(chain: &BlockChain) -> Self {
|
||||||
let tester = Self::from_spec(make_spec(chain));
|
|
||||||
|
let tester = if ::ethjson::blockchain::Engine::NoProof == chain.engine {
|
||||||
|
let mut config = ClientConfig::default();
|
||||||
|
config.verifier_type = VerifierType::CanonNoSeal;
|
||||||
|
config.check_seal = false;
|
||||||
|
Self::from_spec_conf(make_spec(chain), config)
|
||||||
|
} else {
|
||||||
|
Self::from_spec(make_spec(chain))
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
for b in chain.blocks_rlp() {
|
for b in chain.blocks_rlp() {
|
||||||
if let Ok(block) = Unverified::from_rlp(b) {
|
if let Ok(block) = Unverified::from_rlp(b) {
|
||||||
@ -101,6 +111,12 @@ impl EthTester {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn from_spec(spec: Spec) -> Self {
|
fn from_spec(spec: Spec) -> Self {
|
||||||
|
let config = ClientConfig::default();
|
||||||
|
Self::from_spec_conf(spec, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn from_spec_conf(spec: Spec, config: ClientConfig) -> Self {
|
||||||
|
|
||||||
let runtime = Runtime::with_thread_count(1);
|
let runtime = Runtime::with_thread_count(1);
|
||||||
let account_provider = account_provider();
|
let account_provider = account_provider();
|
||||||
let opt_account_provider = account_provider.clone();
|
let opt_account_provider = account_provider.clone();
|
||||||
@ -108,7 +124,7 @@ impl EthTester {
|
|||||||
let snapshot_service = snapshot_service();
|
let snapshot_service = snapshot_service();
|
||||||
|
|
||||||
let client = Client::new(
|
let client = Client::new(
|
||||||
ClientConfig::default(),
|
config,
|
||||||
&spec,
|
&spec,
|
||||||
test_helpers::new_db(),
|
test_helpers::new_db(),
|
||||||
miner_service.clone(),
|
miner_service.clone(),
|
||||||
@ -213,9 +229,9 @@ fn eth_get_block_by_hash() {
|
|||||||
let tester = EthTester::from_chain(&chain);
|
let tester = EthTester::from_chain(&chain);
|
||||||
|
|
||||||
// We're looking for block number 4 from "RPC_API_Test_Frontier"
|
// We're looking for block number 4 from "RPC_API_Test_Frontier"
|
||||||
let req_block = r#"{"method":"eth_getBlockByHash","params":["0x9c9bdab4cb53fd834e790b13545597f026494d42112e84c0aca9dd6bcc545295",false],"id":1,"jsonrpc":"2.0"}"#;
|
let req_block = r#"{"method":"eth_getBlockByHash","params":["0xaddb9e39795e9e041c936b88a2577802569f34afded0948707b074caa3163a87",false],"id":1,"jsonrpc":"2.0"}"#;
|
||||||
|
|
||||||
let res_block = r#"{"jsonrpc":"2.0","result":{"author":"0x8888f1f195afa192cfee860698584c030f4c9db1","difficulty":"0x200c0","extraData":"0x","gasLimit":"0x1dd8112","gasUsed":"0x5458","hash":"0x9c9bdab4cb53fd834e790b13545597f026494d42112e84c0aca9dd6bcc545295","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x8888f1f195afa192cfee860698584c030f4c9db1","mixHash":"0xaddea8d25bb0f955fa6c1d58d74ab8a3fec99d37943e2a261e3b12f97d6bff7c","nonce":"0x8e18bed16d5a88da","number":"0x4","parentHash":"0x2cbf4fc930c5b4c87598f43fc8eb26dccdab2f58a7d0d3ca92ec60a5444a330e","receiptsRoot":"0x7ed8026cf72ed0e98e6fd53ab406e51ffd34397d9da0052494ff41376fda7b5f","sealFields":["0xa0addea8d25bb0f955fa6c1d58d74ab8a3fec99d37943e2a261e3b12f97d6bff7c","0x888e18bed16d5a88da"],"sha3Uncles":"0x75cc08a7cb2cf8081446659fecb2633fb6b922d26edd59bd2272b1f5cae1c78b","size":"0x661","stateRoot":"0x68805721294e365020aca15ed56c360d9dc2cf03cbeff84c9b84b8aed023bfb5","timestamp":"0x59d662ff","totalDifficulty":"0xa0180","transactions":["0xb094b9dc356dbb8b256402c6d5709288066ad6a372c90c9c516f14277545fd58"],"transactionsRoot":"0x97a593d8d7e15b57f5c6bb25bc6c325463ef99f874bc08a78656c3ab5cb23262","uncles":["0xa1e9c9ecd2af999e0723aae1dc55dd9789ca618e0b34badcc8ac7d9a3dad3af2","0x81d429b6b6635214a2b0f976cc4b2ed49808140d6bede50129bc10d22ac9249e"]},"id":1}"#;
|
let res_block = r#"{"jsonrpc":"2.0","result":{"author":"0x8888f1f195afa192cfee860698584c030f4c9db1","difficulty":"0x20080","extraData":"0x","gasLimit":"0x1dd7ea0","gasUsed":"0x5458","hash":"0xaddb9e39795e9e041c936b88a2577802569f34afded0948707b074caa3163a87","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x8888f1f195afa192cfee860698584c030f4c9db1","mixHash":"0x713b0b31f6e72d8cb7367eaf59447ea531f209fc80e6379edd9f8d3bb73931c4","nonce":"0x4534b406bc23b86d","number":"0x4","parentHash":"0x17567aa5995b703736e32972289d68af50543acc4d56d37e8ad1fea7252cac4a","receiptsRoot":"0x7ed8026cf72ed0e98e6fd53ab406e51ffd34397d9da0052494ff41376fda7b5f","sealFields":["0xa0713b0b31f6e72d8cb7367eaf59447ea531f209fc80e6379edd9f8d3bb73931c4","0x884534b406bc23b86d"],"sha3Uncles":"0xe588a44b3e320e72e70b32b531f3ac0d432e756120135ae8fe5fa10895196b40","size":"0x661","stateRoot":"0x68805721294e365020aca15ed56c360d9dc2cf03cbeff84c9b84b8aed023bfb5","timestamp":"0x5bbdf772","totalDifficulty":"0xa00c0","transactions":["0xb094b9dc356dbb8b256402c6d5709288066ad6a372c90c9c516f14277545fd58"],"transactionsRoot":"0x97a593d8d7e15b57f5c6bb25bc6c325463ef99f874bc08a78656c3ab5cb23262","uncles":["0x86b48f5186c4b0882d3dca7977aa37840008832ef092f8ef797019dc74bfa8c7","0x2da9d062c11d536f0f1cc2a4e0111597c79926958d0fc26ae1a2d07d1a3bf47d"]},"id":1}"#;
|
||||||
assert_eq!(tester.handler.handle_request_sync(req_block).unwrap(), res_block);
|
assert_eq!(tester.handler.handle_request_sync(req_block).unwrap(), res_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ build = "build.rs"
|
|||||||
[package.metadata]
|
[package.metadata]
|
||||||
# This versions track. Should be changed to `stable` or `beta` when on respective branches.
|
# This versions track. Should be changed to `stable` or `beta` when on respective branches.
|
||||||
# Used by auto-updater and for Parity version string.
|
# Used by auto-updater and for Parity version string.
|
||||||
track = "nightly"
|
track = "beta"
|
||||||
|
|
||||||
# Network specific settings, used ONLY by auto-updater.
|
# Network specific settings, used ONLY by auto-updater.
|
||||||
# Latest supported fork blocks.
|
# Latest supported fork blocks.
|
||||||
|
Loading…
Reference in New Issue
Block a user