Skip to content

Conversation

@fab-10
Copy link
Contributor

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

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?

  • 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?

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
macfarla
macfarla previously approved these changes Dec 1, 2025
@macfarla macfarla dismissed their stale review December 2, 2025 02:00

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

fab-10 and others added 3 commits December 2, 2025 10:44
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>
@fab-10 fab-10 requested a review from macfarla December 2, 2025 10:39
@macfarla macfarla self-assigned this Dec 2, 2025
@macfarla macfarla enabled auto-merge (squash) December 2, 2025 22:45
@macfarla macfarla merged commit b0b775c into hyperledger:main Dec 2, 2025
46 checks passed
@fab-10 fab-10 deleted the fix-mining-configuration branch December 3, 2025 12:57
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>
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.

2 participants