Skip to content

Cache block headers during sync if the flag is enabled#9224

Merged
ahamlat merged 3 commits intobesu-eth:mainfrom
ahamlat:cache-block-headers-during-sync
Sep 25, 2025
Merged

Cache block headers during sync if the flag is enabled#9224
ahamlat merged 3 commits intobesu-eth:mainfrom
ahamlat:cache-block-headers-during-sync

Conversation

@ahamlat
Copy link
Copy Markdown
Contributor

@ahamlat ahamlat commented Sep 25, 2025

PR description

This PR completes the PR #9223 to enable caching the headers during sync when one of the flags --cache-last-block-headers or --cache-last-block is enabled.

Fixed Issue(s)

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
  • hive tests: Engine or other RPCs modified?

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Copy link
Copy Markdown
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.

LGTM, just a nit

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
@ahamlat ahamlat enabled auto-merge (squash) September 25, 2025 14:57
@ahamlat ahamlat merged commit 4d12923 into besu-eth:main Sep 25, 2025
46 checks passed
AliZDev-v0 pushed a commit to AliZDev-v0/besu that referenced this pull request Oct 5, 2025
* Cache block header during sync if the flag is enabled

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Ali Zhagparov <alijakparov.kz@gmail.com>
jflo pushed a commit to jflo/besu that referenced this pull request Oct 13, 2025
* Cache block header during sync if the flag is enabled

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: jflo <justin+github@florentine.us>
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.

2 participants