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

Reduce fast-sync-min-peers for post merge #4298

Merged
merged 9 commits into from
Aug 25, 2022

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Aug 23, 2022

Signed-off-by: Karim TAAM karim.t2am@gmail.com

PR description

Post merge we no longer need to wait to have 5 peers to validate a pivot block knowing that the pivot block comes from the consensus client. This PR proposes to reduce the min peers to 1 for post merge network. It will always be possible to change it via the flag if necessary

Fixed Issue(s)

fixes #4202

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@matkt matkt enabled auto-merge (squash) August 23, 2022 09:52
@macfarla
Copy link
Contributor

Does this overlap with #4285

@matkt
Copy link
Contributor Author

matkt commented Aug 23, 2022

@macfarla Reducing to two for all networks seems a bit dangerous imo. This may have to be done on a case-by-case basis depending on the networks. This PR focuses more on the post merge

@matkt matkt added the doc-change-required Indicates an issue or PR that requires doc to be updated label Aug 23, 2022
@macfarla
Copy link
Contributor

@mark-terry can you review this one?

Copy link
Contributor

@fab-10 fab-10 left a comment

Choose a reason for hiding this comment

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

Looks good, just want to verify if it is possible to restore the default info

description =
"Minimum number of peers required before starting fast sync. (default: ${DEFAULT-VALUE})")
private final Integer fastSyncMinPeerCount = FAST_SYNC_MIN_PEER_COUNT;
description = "Minimum number of peers required before starting fast sync.")
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 possible to says which is the default pre and post merge?
since there is actually a default, it seems not correct to remove the info here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I modified to add the default value again

@@ -2783,10 +2783,19 @@ private Optional<PkiBlockCreationConfiguration> maybePkiBlockCreationConfigurati
}

private SynchronizerConfiguration buildSyncConfig() {
Integer fastSyncMinPeers = fastSyncMinPeerCount;
if (fastSyncMinPeers == null) {
if (isMergedNetwork(network)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there more logic required here for the case where the sync begins at a pre-merge block? I've had cases recently on Ropsten where using fast sync with <=2 peers resulted in the sync stalling (ended up on a fork perhaps?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we cannot start a sync on a premerge block because of the snapsync. We need to use <128 old blocks. So after small amount of time it's not possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if the network merged the pivot block need to come from CL so 1 it's enough .

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Copy link
Contributor

@fab-10 fab-10 left a comment

Choose a reason for hiding this comment

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

Please update the CHANGELOG

@matkt matkt merged commit a44cb1c into hyperledger:main Aug 25, 2022
@rolandtyler rolandtyler removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Sep 6, 2022
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Sep 7, 2022
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Sep 7, 2022
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Sep 7, 2022
…4298)

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relax fast-sync-min-peers
5 participants