Skip to content

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented May 5, 2025

PR description

Currently Besu artifacts are published to Maven, with a groupId = org.hyperledger.besu[.internal] and the artifactId is just the name of the subproject, for example: p2p, core or plugin-api`.

That works fine for defining a dependency on any Besu lib using the Maven coordinates, since the couple: groupId + artifactId are unique, but there is a potential issue when packaging the project, since very generic artifactIds, like core, util and so on, could collide with other project dependencies using the same artifactId and the same calver, since the Maven repository layout states that the jar name is only the artifactId + version, so the groupId could not be used to disambiguate when collecting all the jars needed by the app, as the Gradle distribution plugin does for example.

The solution proposed in this PR, is to change the artifactId of Besu libs to be automatically set to the project path, that is the concatenation of all the project names from the root to the leaf.
This way: core becomes besu-ethereum-core or plugin-api become besu-plugin-api.
This is the approach taken by most common libs like: Vert.x, Netty, etc...

This is a breaking change, since Maven coordinates change and plugins will have to update their dependencies specification.

Known projects that are using Besu dependencies and need to be updated, where possible I will open a PR to update the coordinates and notify the team:

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

@fab-10 fab-10 force-pushed the enh-maven-artifactIds branch from 2f3ad83 to 90226f9 Compare May 5, 2025 14:43
@fab-10 fab-10 changed the title Improve Maven artifacts naming to avoid possible collisions with other libs Change Maven artifactIds to avoid possible collisions with other libs May 5, 2025
@fab-10 fab-10 force-pushed the enh-maven-artifactIds branch from 90226f9 to f8ddb21 Compare May 5, 2025 15:13
@fab-10 fab-10 marked this pull request as ready for review May 5, 2025 15:13
Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

This LGTM - it will help with forks like op-besu as well.

It is probably worth checking to see what public projects might have dependencies on the current artifactId's. Cursory glance seems like at least a few web3j artifacts have dependencies, shomei, plugins, etc. Definitely worth a warning in the release notes.

@macfarla macfarla added the breaking This can only be addressed/merged for a release that allows user-facing changes to be breaking. label May 9, 2025
@fab-10 fab-10 force-pushed the enh-maven-artifactIds branch from f8ddb21 to 6d6dd3a Compare May 21, 2025 12:54
@fab-10
Copy link
Contributor Author

fab-10 commented May 23, 2025

@garyschulte after some research I added to the description the list of known public projects that are using Besu dependencies, and will notify them about the change

@fab-10 fab-10 force-pushed the enh-maven-artifactIds branch 3 times, most recently from 63f9f37 to 4d74fe0 Compare June 4, 2025 10:33
@fab-10 fab-10 mentioned this pull request Jun 4, 2025
9 tasks
fab-10 added 5 commits June 4, 2025 18:23
…r libs

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…pport to BOM

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
This reverts commit c93c37e.

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the enh-maven-artifactIds branch from 4d74fe0 to 0741532 Compare June 4, 2025 16:23
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 merged commit 9c7fb88 into hyperledger:main Jun 4, 2025
48 checks passed
Gabriel-Trintinalia added a commit that referenced this pull request Jun 6, 2025
* EIP-7825: Transaction gas limit cap (#8700)

* EIP-7825: Transaction gas limit cap

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

* Support transaction gas limit cap when simulating a tx

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

* Do not allow isAllowExceedingGasLimit for when block simulation is strict

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>

* EIP-7823 - Modexp upper bounds (#8632)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

* Change Maven artifactIds to avoid possible collisions with other libs (#8589)

* Improve Maven artifacts naming to avoid possible collisions with other libs

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

* Rename besu subproject to app (#8746)

* Rename `besu` module to `app`

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

* Implement percentiles array size limit for eth_feeHistory (#8748)

* implement percentiles array size limit for eth_feeHistory

Signed-off-by: garyschulte <garyschulte@gmail.com>

* Revert "feat: remove chain head check if peer supports eth/69 (#8725)" (#8753)

This reverts commit ed1086d.

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This can only be addressed/merged for a release that allows user-facing changes to be breaking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants