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

Use safe block as pivot block during snapsync #4819

Merged

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Dec 14, 2022

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

PR description

I found that if we only use finalized block during snapsync is not a good choice because we will have 60 blocks windows to download and heal. It can impact the performance of the sync because we will not have enough time to download a lof of leafs and heal etc. I found
A finalized block is one which has been accepted as canonical by more than 2/3 of validators. To create a conflicting block, an attacker would have to burn at least 1/3 of the total stake.
A safe head block is one which, under normal network conditions, is expected to be included in the canonical chain. Assuming network delays of less than 4 seconds, an honest majority of validators and no attacks on the fork-choice rule, the safe head will never be orphaned.
I think we can use safe block during a sync

Fixed Issue(s)

Documentation

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

Changelog

@matkt matkt changed the title Use safe block as pivot block suring snapsync Use safe block as pivot block during snapsync Dec 14, 2022
@matkt matkt marked this pull request as ready for review December 14, 2022 11:43
Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

🚢

@matkt matkt force-pushed the feature/use-safe-block-for-pivot-block branch 2 times, most recently from 6ce8c84 to 4f9906c Compare December 17, 2022 11:24
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@matkt matkt force-pushed the feature/use-safe-block-for-pivot-block branch from 4f9906c to ddf5aa8 Compare December 17, 2022 11:38
@macfarla macfarla enabled auto-merge (squash) December 21, 2022 00:53
@macfarla macfarla merged commit d3b6b32 into hyperledger:main Dec 21, 2022
jflo pushed a commit to jflo/besu that referenced this pull request Dec 22, 2022
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
macfarla added a commit to jflo/besu that referenced this pull request Jan 10, 2023
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Jan 14, 2023
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Jan 14, 2023
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Jan 14, 2023
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
garyschulte added a commit that referenced this pull request Jan 14, 2023
* Use safe block as pivot block suring snapsync (#4819)
* Bugfix snapshot transaction segfaults after storage truncation (#4786)
* Bugfix potential chain head and worldstate inconsistency (#4862)
* Peering - disconnect worst peer (#4888)
* Attempt to fix CPU spikes issue (#4867)
* not block subscribe when the worldstate storage is open (#4912)

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
fab-10 pushed a commit to fab-10/besu that referenced this pull request Jan 18, 2023
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
@matkt matkt deleted the feature/use-safe-block-for-pivot-block branch August 17, 2023 07:29
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
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.

4 participants