Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hive: ethereum/consensus: need to port header validation code #666

Closed
jangko opened this issue May 18, 2021 · 3 comments
Closed

hive: ethereum/consensus: need to port header validation code #666

jangko opened this issue May 18, 2021 · 3 comments
Labels

Comments

@jangko
Copy link
Contributor

jangko commented May 18, 2021

the number of failing cases in ethereum/consensus test suite dwindling to 59.
one case (bcHomesteadToEIP150/EIP150Transition_HomesteadToEIP150At5) identified to be caused by a subtle bug in mapper.jq file. (#667)
but majority of them related to block header validation.

sub category such as bcTotalDifficultyTest and bcInvalidHeaderTest clearly indicate we need to port those validation code
from test_blockchain_json back to nimbus.

related procs in test_blockchain_json:

func validateGasLimit(gasLimit, parentGasLimit: GasInt)
proc validateHeader(header, parentHeader: BlockHeader, checkSeal: bool)
func validateUncle(currBlock, uncle, uncleParent: BlockHeader)
proc validateGasLimit(chainDB: BaseChainDB, header: BlockHeader)
proc validateUncles(chainDB: BaseChainDB, currBlock: EthBlock, checkSeal: bool)
func isGenesis(currBlock: EthBlock): bool
proc validateBlock(chainDB: BaseChainDB, currBlock: EthBlock, checkSeal: bool): bool

bcMultiChainTest sub category also pass test_blockchain_json, I suspect we also need to port some code back to nimbus but not sure which part.

after the ported code is stable enough, we can remove those in test_blockchain_json

@jangko
Copy link
Contributor Author

jangko commented May 27, 2021

after #668, failing test cases reduced again from 59 to 44.
and we identified the next code need to port back to nimbus

if not validateBlockUnchanged(result, preminedBlock):

validateBlockUnchanged will at least fix 4 more test cases.

@jangko
Copy link
Contributor Author

jangko commented Jun 23, 2021

#726 further reduce failing test cases down to 10 (Berlin, without London)

@jangko
Copy link
Contributor Author

jangko commented Jun 25, 2021

thanks to @mjfh hard work, we can close this issue now. fixed by #727

@jangko jangko closed this as completed Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant