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

fcU: Ignore newHead if it is an ancestor of chain head #4055

Merged

Conversation

daniellehrner
Copy link
Contributor

PR description

A forkchoice update will be ignored if newHead is an ancestor of chain head.

Fixed Issue(s)

fixes #4051

Documentation

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

Changelog

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
@daniellehrner daniellehrner marked this pull request as ready for review July 5, 2022 09:40
@@ -434,7 +440,7 @@ boolean ancestorIsValidTerminalProofOfWork(final BlockHeader blockheader) {

boolean resp =
parent.filter(header -> isTerminalProofOfWorkBlock(header, protocolContext)).isPresent();
LOG.warn(
LOG.debug(
Copy link
Contributor Author

@daniellehrner daniellehrner Jul 5, 2022

Choose a reason for hiding this comment

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

I've changed this one to debug, because it does not look like anything that should cause a warning in the log

@daniellehrner daniellehrner changed the title Re org back into canonical chain fcU: Ignore newHead if it is an ancestor of chain head Jul 5, 2022
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.

tbh I have misgivings about this behavior, but the hive suite seems to have made this optional behavior mandatory.

@jflo jflo enabled auto-merge (squash) July 5, 2022 23:51
@jflo jflo merged commit c84a243 into hyperledger:main Jul 5, 2022
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
)

* ignore forkchoice update if new head is an ancestor of the chain head
* added draft for CHANGELOG.md
* update PR link for CHANGELOG.md

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

Co-authored-by: Justin Florentine <justin+github@florentine.us>
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.

fcU: Ignore if newHead references an ancestor of chain head
3 participants