* 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:
@@ -6,10 +6,7 @@
|
||||
"minimumDifficulty": "0x020000",
|
||||
"difficultyBoundDivisor": "0x0800",
|
||||
"durationLimit": "0x0d",
|
||||
"blockReward": {
|
||||
"0": "0x29A2241AF62C0000",
|
||||
"5": "0x1BC16D674EC80000"
|
||||
},
|
||||
"blockReward": "0x1BC16D674EC80000",
|
||||
"homesteadTransition": "0x0",
|
||||
"eip100bTransition": "0x0",
|
||||
"difficultyBombDelays": {
|
||||
|
||||
Submodule ethcore/res/ethereum/tests updated: 3f5febc901...2cd62aeec1
@@ -1,468 +1,42 @@
|
||||
{ "block":
|
||||
[
|
||||
{
|
||||
"reference": "9590",
|
||||
"failing": "stCreateTest",
|
||||
"subtests": [
|
||||
"CreateOOGafterInitCodeReturndata2_d0g1v0_Constantinople"
|
||||
]
|
||||
"reference": "None",
|
||||
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
||||
"failing": "GeneralStateTest_stCreate2",
|
||||
"subtests": ["RevertInCreateInInitCreate2_d0g0v0_Constantinople"]
|
||||
},
|
||||
{
|
||||
"reference": "9590",
|
||||
"failing": "stCreate2",
|
||||
"subtests": [
|
||||
"RevertDepthCreateAddressCollision_d0g1v0_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"
|
||||
]
|
||||
"reference": "None",
|
||||
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
||||
"failing": "GeneralStateTest_stRevertTest",
|
||||
"subtests": ["RevertInCreateInInit_d0g0v0_Constantinople"]
|
||||
}
|
||||
|
||||
],
|
||||
"state":
|
||||
[
|
||||
{
|
||||
"reference": "9590",
|
||||
"failing": "stCreateTest",
|
||||
"reference": "None",
|
||||
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
||||
"failing": "stCreate2Test",
|
||||
"subtests": {
|
||||
"CreateOOGafterInitCodeReturndata2": {
|
||||
"subnumbers": ["2"],
|
||||
"RevertInCreateInInitCreate2": {
|
||||
"subnumbers": ["1"],
|
||||
"chain": "Constantinople (test)"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"reference": "9590",
|
||||
"failing": "stCreate2Test",
|
||||
"reference": "None",
|
||||
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
||||
"failing": "stRevertTest",
|
||||
"subtests": {
|
||||
"RevertInCreateInInit": {
|
||||
"subnumbers": ["1"],
|
||||
"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.
|
||||
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.
|
||||
/// `epoch_begin` set to true if this block kicks off an epoch.
|
||||
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_gas_limit(&self) -> Option<U256> { Some(0x7fff_ffff_ffff_ffffu64.into()) }
|
||||
|
||||
fn populate_from_parent(&self, header: &mut Header, parent: &Header) {
|
||||
let difficulty = self.calculate_difficulty(header, parent);
|
||||
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 })));
|
||||
}
|
||||
|
||||
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(())
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ use miner::Miner;
|
||||
use io::IoChannel;
|
||||
use test_helpers;
|
||||
use verification::queue::kind::blocks::Unverified;
|
||||
use verification::VerifierType;
|
||||
use super::SKIP_TEST_STATE;
|
||||
|
||||
use super::HookType;
|
||||
|
||||
/// 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 mut config = ClientConfig::default();
|
||||
if ethjson::blockchain::Engine::NoProof == blockchain.engine {
|
||||
config.verifier_type = VerifierType::CanonNoSeal;
|
||||
config.check_seal = false;
|
||||
}
|
||||
config.history = 8;
|
||||
let client = Client::new(
|
||||
config,
|
||||
@@ -184,6 +188,7 @@ mod block_tests {
|
||||
declare_test!{BlockchainTests_GeneralStateTest_stZeroCallsTest, "BlockchainTests/GeneralStateTests/stZeroCallsTest/"}
|
||||
declare_test!{BlockchainTests_GeneralStateTest_stZeroKnowledge, "BlockchainTests/GeneralStateTests/stZeroKnowledge/"}
|
||||
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_bcFrontierToHomestead, "BlockchainTests/TransitionTests/bcFrontierToHomestead/"}
|
||||
|
||||
@@ -177,6 +177,7 @@ mod state_tests {
|
||||
declare_test!{GeneralStateTest_stZeroCallsRevert, "GeneralStateTests/stZeroCallsRevert/"}
|
||||
declare_test!{GeneralStateTest_stZeroCallsTest, "GeneralStateTests/stZeroCallsTest/"}
|
||||
declare_test!{GeneralStateTest_stZeroKnowledge, "GeneralStateTests/stZeroKnowledge/"}
|
||||
declare_test!{GeneralStateTest_stSStoreTest, "GeneralStateTests/stSStoreTest/"}
|
||||
|
||||
// Attempts to send a transaction that requires more than current balance:
|
||||
// Tx:
|
||||
|
||||
@@ -173,7 +173,7 @@ fn verify_uncles(block: &PreverifiedBlock, bc: &BlockProvider, engine: &EthEngin
|
||||
for _ in 0..engine.maximum_uncle_age() {
|
||||
match bc.block_details(&hash) {
|
||||
Some(details) => {
|
||||
excluded.insert(details.parent.clone());
|
||||
excluded.insert(details.parent);
|
||||
let b = bc.block(&hash)
|
||||
.expect("parent already known to be stored; qed");
|
||||
excluded.extend(b.uncle_hashes());
|
||||
@@ -246,16 +246,16 @@ fn verify_uncles(block: &PreverifiedBlock, bc: &BlockProvider, engine: &EthEngin
|
||||
/// Phase 4 verification. Check block information against transaction enactment results,
|
||||
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().clone(), found: got.state_root().clone() })))
|
||||
return Err(From::from(BlockError::InvalidStateRoot(Mismatch { expected: *expected.state_root(), found: *got.state_root() })))
|
||||
}
|
||||
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() {
|
||||
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.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(())
|
||||
}
|
||||
@@ -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() })))
|
||||
}
|
||||
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;
|
||||
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();
|
||||
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 max_gas = parent_gas_limit + parent_gas_limit / gas_limit_divisor;
|
||||
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(())
|
||||
@@ -520,7 +525,7 @@ mod tests {
|
||||
// is fine.
|
||||
let client = ::client::TestBlockChainClient::default();
|
||||
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()?;
|
||||
|
||||
let block = PreverifiedBlock {
|
||||
|
||||
Reference in New Issue
Block a user