Skip to content

Uniform notification to selectors on a bundle selection rollback#9558

Merged
fab-10 merged 3 commits intobesu-eth:mainfrom
fab-10:uniform-notification-on-block-transaction-selection-rollback
Dec 17, 2025
Merged

Uniform notification to selectors on a bundle selection rollback#9558
fab-10 merged 3 commits intobesu-eth:mainfrom
fab-10:uniform-notification-on-block-transaction-selection-rollback

Conversation

@fab-10
Copy link
Copy Markdown
Contributor

@fab-10 fab-10 commented Dec 10, 2025

PR description

When selecting groups of related txs for block creation (aka bundles), a potential previously selected tx in the group, could be later not be selected anymore, due to the result of following txs in the same group.
This behavior, that is the result of the rollback of the group of txs, has a gap in the notifications sent to selectors, including plugin selectors, since in case of a rollback, only the onTransactionNotSelected method is called on the not selected tx of the group, while for selected but pending commit, but then reverted txs, that same method is not invoked.

This PR fixes this gap, calling also the onTransactionNotSelected method, with not selected reason SELECTED_ROLLBACK, for selected but pending commit, but then reverted txs.
The notification are always sent in the order they are processed.

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?

@fab-10 fab-10 force-pushed the uniform-notification-on-block-transaction-selection-rollback branch from f992f58 to e8fdaea Compare December 10, 2025 17:58
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the uniform-notification-on-block-transaction-selection-rollback branch from e8fdaea to 3f11a63 Compare December 11, 2025 11:30
@jflo jflo requested a review from Copilot December 11, 2025 15:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 requested a review from macfarla December 12, 2025 09:39
@fab-10 fab-10 enabled auto-merge (squash) December 17, 2025 11:25
@fab-10 fab-10 merged commit 0206354 into besu-eth:main Dec 17, 2025
46 checks passed
@fab-10 fab-10 deleted the uniform-notification-on-block-transaction-selection-rollback branch December 17, 2025 12:40
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.

3 participants