Skip to content

Block transaction selector performance#9023

Merged
fab-10 merged 2 commits intobesu-eth:mainfrom
fab-10:block-transaction-selector-performance
Aug 27, 2025
Merged

Block transaction selector performance#9023
fab-10 merged 2 commits intobesu-eth:mainfrom
fab-10:block-transaction-selector-performance

Conversation

@fab-10
Copy link
Copy Markdown
Contributor

@fab-10 fab-10 commented Jul 30, 2025

PR description

This PR improves the performance of the block creation phase, reducing the time spent during the commit of the world state updaters, see the screenshot below that compares the time spent for the commit, between a control Besu running 25.7.0 and a dev Besu running this PR.

image

Thanks to @ahamlat and @matkt for spotting this PR and suggesting how performance could be improved

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

@fab-10 fab-10 force-pushed the block-transaction-selector-performance branch 2 times, most recently from 7f93ead to 7bb3544 Compare July 30, 2025 13:28
@fab-10 fab-10 marked this pull request as ready for review July 30, 2025 14:09
for (final var pendingAction : selectedTxPendingActions) {
pendingAction.run();
}
selectedTxPendingActions.clear();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it normal that this one is removed ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is done below at line 359, since there is no more the intermediate return

@fab-10 fab-10 requested a review from matkt August 26, 2025 14:29
@fab-10 fab-10 force-pushed the block-transaction-selector-performance branch from 7bb3544 to bf839d5 Compare August 26, 2025 14:55
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 but tests are failing

fab-10 added 2 commits August 27, 2025 11:51
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the block-transaction-selector-performance branch from bf839d5 to f264f37 Compare August 27, 2025 09:51
@fab-10 fab-10 enabled auto-merge (squash) August 27, 2025 09:54
@fab-10 fab-10 merged commit 7870344 into besu-eth:main Aug 27, 2025
46 checks passed
@fab-10 fab-10 deleted the block-transaction-selector-performance branch August 27, 2025 10:46
siladu pushed a commit to siladu/besu that referenced this pull request Aug 28, 2025
* Improve performance of block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
jflo pushed a commit to jflo/besu that referenced this pull request Sep 8, 2025
* Improve performance of block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
jflo pushed a commit to jflo/besu that referenced this pull request Sep 8, 2025
* Improve performance of block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: jflo <justin+github@florentine.us>
georgereuben pushed a commit to georgereuben/besu that referenced this pull request Sep 16, 2025
* Improve performance of block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: georgereuben <reubengeorge101@gmail.com>
georgereuben pushed a commit to georgereuben/besu that referenced this pull request Sep 16, 2025
* Improve performance of block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: georgereuben <reubengeorge101@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants