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

Merge: Backward sync re-org below TTD fix #3696

Conversation

garyschulte
Copy link
Contributor

@garyschulte garyschulte commented Apr 6, 2022

Signed-off-by: garyschulte garyschulte@gmail.com

PR description

Address a post-merge case where we have transitioned to the post-merge rules, but need to import pre-merge blocks due to a reorg ahead of finalization.

BackwardSync is the only mechanism that should be able to reorg below TTD post merge, this PR creates a method In TransitionProtocolSchedule to get ProtocolSpec by block rather than by number.

TransitionBackwardSyncContext is a transition specific subclass of BackwardSyncContext that leverages the protocol spec by block (without dragging merge consensus into the core ethereum subproject where BackwardSync lives). This backward sync subclass can be removed post-merge with the rest of the transition-by-difficulty code removal.

CURRENTLY DRAFT while writing test coverage.

Fixed Issue(s)

fixes #3688

Documentation

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

Changelog

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte force-pushed the 3688-transition-schedule-by-difficulty branch from 39a8b09 to 7beeb30 Compare April 7, 2022 21:18
Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte marked this pull request as ready for review April 7, 2022 21:39
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Apr 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

85.7% 85.7% Coverage
0.0% 0.0% Duplication

@garyschulte garyschulte merged commit ae6c368 into hyperledger:main Apr 12, 2022
@garyschulte garyschulte deleted the 3688-transition-schedule-by-difficulty branch April 12, 2022 22:52
garyschulte added a commit to garyschulte/besu that referenced this pull request May 2, 2022
Signed-off-by: garyschulte <garyschulte@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Signed-off-by: garyschulte <garyschulte@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.

Ensure reorg below TTD gets the correct protocol schedule for pre-merge blocks
2 participants