-
Notifications
You must be signed in to change notification settings - Fork 995
Manage unexpected exceptions during block creation #9208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manage unexpected exceptions during block creation #9208
Conversation
c5b2715 to
86d4b06
Compare
830830c to
63a68ac
Compare
...n/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java
Show resolved
Hide resolved
| return richBenefactorTwo; | ||
| } | ||
|
|
||
| public Account getThirdBenefactor() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
plugin-api/src/main/java/org/hyperledger/besu/plugin/data/TransactionSelectionResult.java
Outdated
Show resolved
Hide resolved
plugin-api/src/main/java/org/hyperledger/besu/plugin/data/TransactionSelectionResult.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
63a68ac to
be37644
Compare
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
0768c8e to
6e3cdfb
Compare
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
6e3cdfb to
f8403ac
Compare
* 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>
* 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>
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?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests