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/clique validation on initial sync #3764

Merged
merged 4 commits into from
Jan 26, 2022

Conversation

LukaszRozmej
Copy link
Member

Changes:

On Clique, makes header download prerequisite for further FastSync. This was an issue, where we Clique on FastSync couldn't validate blocks, because of missing Headers from last epoch.

Types of changes

What types of changes does your code introduce?

  • 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

@dceleda dceleda self-requested a review January 26, 2022 15:25
@@ -423,6 +433,7 @@ private bool ShouldBeInStateNodesMode(Snapshot best)
bool hasFastSyncBeenActive = best.Header >= PivotNumber;
bool hasAnyPostPivotPeer = AnyPostPivotPeerKnown(best.PeerBlock);
bool notInFastSync = !best.IsInFastSync;
bool notNeedToWaitForHeaders = NotNeedToWaitForHeaders;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it needed for the State Sync in ShouldBeInStateNodesMode ?
Why can't we start immediately ?

Copy link
Member Author

Choose a reason for hiding this comment

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

we need to DL and validate Head header in order to know which state root to download

@dceleda dceleda self-requested a review January 26, 2022 15:27
…on_on_initial_sync

# Conflicts:
#	src/Nethermind/Nethermind.Synchronization.Test/ParallelSync/MultiSyncModeSelectorTests.cs
@LukaszRozmej LukaszRozmej merged commit d3b50bc into master Jan 26, 2022
@LukaszRozmej LukaszRozmej deleted the fix/clique_validation_on_initial_sync branch January 26, 2022 16:14
@LukaszRozmej LukaszRozmej mentioned this pull request Feb 15, 2022
12 tasks
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