Skip to content

Add a fallback pivot strategy when the safe block does not change for a long time#8395

Merged
fab-10 merged 1 commit intobesu-eth:mainfrom
fab-10:pivot-block-from-safe-block-fallback-selection
Mar 11, 2025
Merged

Add a fallback pivot strategy when the safe block does not change for a long time#8395
fab-10 merged 1 commit intobesu-eth:mainfrom
fab-10:pivot-block-from-safe-block-fallback-selection

Conversation

@fab-10
Copy link
Copy Markdown
Contributor

@fab-10 fab-10 commented Mar 6, 2025

PR description

If the safe block does not change after 7 minutes, then fallback to a previous head block as pivot.
Selecting a previous head block, instead of the last one, to reduce the possibility to be affected by reorgs.

This fallback is especially useful when the chain does not finalize, like it is happing to Holesky

Fixed Issue(s)

fixes #8393

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@fab-10 fab-10 force-pushed the pivot-block-from-safe-block-fallback-selection branch 2 times, most recently from 4a01830 to 081ba85 Compare March 6, 2025 18:24
Copy link
Copy Markdown
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

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

LGTM

@fab-10 fab-10 force-pushed the pivot-block-from-safe-block-fallback-selection branch from 081ba85 to e75e22b Compare March 11, 2025 10:18
@fab-10 fab-10 marked this pull request as ready for review March 11, 2025 10:18
@fab-10 fab-10 enabled auto-merge (squash) March 11, 2025 10:18
… a long time

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the pivot-block-from-safe-block-fallback-selection branch from e75e22b to de7a7f4 Compare March 11, 2025 10:34
@fab-10 fab-10 merged commit 011b52d into besu-eth:main Mar 11, 2025
43 checks passed
@fab-10 fab-10 deleted the pivot-block-from-safe-block-fallback-selection branch March 11, 2025 11:13
marcosio pushed a commit to IoBuilders/besu that referenced this pull request Mar 12, 2025
… a long time (besu-eth#8395)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
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.

Snap sync stalled

2 participants