Fix: MiningConfiguration object must not be re-created#9518
Merged
macfarla merged 5 commits intobesu-eth:mainfrom Dec 2, 2025
Merged
Fix: MiningConfiguration object must not be re-created#9518macfarla merged 5 commits intobesu-eth:mainfrom
macfarla merged 5 commits intobesu-eth:mainfrom
Conversation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
macfarla
previously approved these changes
Dec 1, 2025
app/src/main/java/org/hyperledger/besu/controller/MiningConfigurationOverrides.java
Outdated
Show resolved
Hide resolved
approved in principle but the failing tests need fixing. The PoW test I think we could just remove rather than fixing since we're removing the feature. so just the clique one
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
macfarla
approved these changes
Dec 2, 2025
AliZDev-v0
pushed a commit
to AliZDev-v0/besu
that referenced
this pull request
Dec 10, 2025
* Fix: MiningConfiguration object must not be re-created Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * Apply suggestions from code review Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * Fix tests 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>
pinges
pushed a commit
to pinges/besu
that referenced
this pull request
Dec 15, 2025
* Fix: MiningConfiguration object must not be re-created Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * Apply suggestions from code review Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * Fix tests 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: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description
PR #9497 introduced an issue, that affects Clique networks, since the MiningConfiguration object was re-created, while it is a singleton that must be created only once, otherwise due to the presence of mutable values, some part of Besu can see a value while other another.
I also take the opportunity to make some renaming.
FYI: @macfarla
Fixed Issue(s)
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