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

Fix Goerli transition issue #4418

Merged
merged 1 commit into from
Aug 15, 2022
Merged

Fix Goerli transition issue #4418

merged 1 commit into from
Aug 15, 2022

Conversation

LukaszRozmej
Copy link
Member

@LukaszRozmej LukaszRozmej commented Aug 12, 2022

Changes:

  • NewPayloadV1Handler ShouldProcessBlock method was introduced. This decides if block should be processed and with what ProcessingOptions flags it will be processed. For reorging terminal blocks it removes IgnoreParentNotOnMainChain flag. This is main fix for Goerli transition issue. We are also waiting for the hive tests to get more sophisticated in order to be able to catch this issues in them.
  • BlockchainProcessor to return full block on InvalidBlock exception and event.
  • BlockTreeLookupOptions.AllowInvalid to also look into (latest) invalid blocks.
  • BlockTree will keep full recent invalid blocks instead of just hashes.
  • InvalidChainTracker to use invalid block parent directly rather than doing lookup.
  • InvalidChainTracker will use BlockTreeLookupOptions.AllowInvalid | BlockTreeLookupOptions.TotalDifficultyNotNeeded BlockTreeLookupOptions.DoNotCalculateTotalDifficulty options when looking up a block header.
  • Hookup InvalidChainTracker SetupBlockchainProcessorInterceptor in EngineModuleTests.
  • Added EnumExtensions.AllValuesCombinations (for testing purposes).

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests??

  • Yes
  • No

…cides if block should be processed and with what ProcessingOptions flags it will be processed. For reorging terminal blocks it removes IgnoreParentNotOnMainChain flag.

BlockchainProcessor to return full block on InvalidBlock exception and event.
BlockTreeLookupOptions.AllowInvalid to also look into (latest) invalid blocks.
BlockTree will keep full recent invalid blocks instead of just hashes.
InvalidChainTracker to use invalid block parent directly rather than doing lookup.
InvalidChainTracker will use BlockTreeLookupOptions.AllowInvalid | BlockTreeLookupOptions.TotalDifficultyNotNeeded | BlockTreeLookupOptions.DoNotCalculateTotalDifficulty options when looking up a block header.
Hookup InvalidChainTracker SetupBlockchainProcessorInterceptor in EngineModuleTests.
Added EnumExtensions.AllValuesCombinations (for testing purposes).
Copy link
Contributor

@asdacap asdacap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LukaszRozmej
Copy link
Member Author

Looks like 1 test regression in transition, 2 tests failing on standard, but they failed before.
https://github.com/NethermindEth/nethermind/actions/runs/2846761961
https://github.com/NethermindEth/nethermind/actions/runs/2846761591

Copy link
Contributor

@MarekM25 MarekM25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine. Could you explain why we changed invalid blocks handling? Did we fix some hive tests scenario?

Before we merge it I wanted to be sure that we didn't introduce any hive regression and we confirm fix with Mario's new tests

@MarekM25 MarekM25 merged commit d13d97f into master Aug 15, 2022
@MarekM25 MarekM25 deleted the merge/fix-transition-reorg branch August 15, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants