Skip to content

Conversation

@fab-10
Copy link
Contributor

@fab-10 fab-10 commented Sep 22, 2025

PR description

Adding protection against unexpected runtime exceptions that could be triggered by plugins, or internally, during block creation.

These exceptions are treat like internal errors, because they should have been handled, so they represent bugs and for that reason are logged as error for high visibility, and to avoid possible a inconsistent state a rollback is forced, so that the selection can continue with a clean state.

Fixed Issue(s)

fixes #9167

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 manage-unexpected-exceptions-during-block-creation branch 2 times, most recently from c5b2715 to 86d4b06 Compare September 22, 2025 17:54
@fab-10 fab-10 marked this pull request as ready for review September 22, 2025 17:54
@fab-10 fab-10 force-pushed the manage-unexpected-exceptions-during-block-creation branch 3 times, most recently from 830830c to 63a68ac Compare September 23, 2025 12:53
return richBenefactorTwo;
}

public Account getThirdBenefactor() {
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't get used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the method itself is not used, but Accounts.GENESIS_ACCOUNT_THREE_PRIVATE_KEY is, so for uniformity with the other 2 account I also added this method

CHANGELOG.md Outdated
- Configurable limit for how much time plugins are allowed take, to propose transactions, during block creation [#9184](https://github.com/hyperledger/besu/pull/9184)
- Add Osaka, BPO1 and BPO2 fork times for holesky, hoodi and sepolia [#9196](https://github.com/hyperledger/besu/pull/9196/files)
- Implement optional sender balance checks in the layered txpool [#9176](https://github.com/hyperledger/besu/pull/9176)
- Manage unexpected exceptions during block creation [#9208](https://github.com/hyperledger/besu/pull/9208)
Copy link
Contributor

Choose a reason for hiding this comment

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

needs moving out of 25.9.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the manage-unexpected-exceptions-during-block-creation branch from 63a68ac to be37644 Compare September 25, 2025 10:17
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 enabled auto-merge (squash) September 25, 2025 10:19
@fab-10 fab-10 force-pushed the manage-unexpected-exceptions-during-block-creation branch from 0768c8e to 6e3cdfb Compare September 25, 2025 10:57
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the manage-unexpected-exceptions-during-block-creation branch from 6e3cdfb to f8403ac Compare September 25, 2025 11:01
@fab-10 fab-10 merged commit ddf82e5 into hyperledger:main Sep 25, 2025
46 checks passed
AliZDev-v0 pushed a commit to AliZDev-v0/besu that referenced this pull request Oct 5, 2025
* Manage unexpected exceptions during block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestion from @macfarla

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestion from @macfarla

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Ali Zhagparov <alijakparov.kz@gmail.com>
jflo pushed a commit to jflo/besu that referenced this pull request Oct 13, 2025
* Manage unexpected exceptions during block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestion from @macfarla

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestion from @macfarla

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
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.

MinerExecutor - Noisy Log Message when block building times out

2 participants