web3j icon indicating copy to clipboard operation
web3j copied to clipboard

Build fails due to dependency jc-kzg-4844 since version 4.11.0

Open michaelnetter opened this issue 1 year ago • 7 comments

Issue_title

Build fails due to dependency jc-kzg-4844 since version 4.11.0

Issue_description

I'm using web3j as a dependency in a maven project. Since version 4.11.0, I am unable to build the project. The error message is the following:

[ERROR] Failed to execute goal on project siwe-java: Could not resolve dependencies for project com.moonstoneid:siwe-java:jar:1.0.5: tech.pegasys:jc-kzg-4844:jar:0.8.0 was not found in https://repo1.maven.org/maven2 during a previous attempt.

It seems the issue is that the dependency jc-kzg-4844 is not available on maven central but only in this third party repository.

This puts developers who use web3j in a difficult spot. They need to either

  • add the repo to their Maven settings.xml -> Must be done by every developer.
  • add the repo to the pom.xml -> URL is hardcoded in the project forever. If the URL changes, this must be changed manually.

Issue_context

The issue was introduced in this pull request.

michaelnetter avatar Mar 11 '24 13:03 michaelnetter

Hey @michaelnetter ,

jc-kzg-4844 dependency was added so that users can do blob txs following support for EIP4844, let us check what we can do

NickSneo avatar Mar 13 '24 06:03 NickSneo

Hi @NickSneo, I highly appreciate your efforts to support EIP-4844 in web3j. I'm not a maven expert, but to me the cleanest solution would be to ask the developers of jc-kzg-4844 if they might consider publishing it on maven central. A fat jar (using the maven-install-plugin) that includes jc-kzg-4844 into web3j releases could be another option.

michaelnetter avatar Mar 13 '24 07:03 michaelnetter

Hey @michaelnetter, We are planning to talk to Consensys (developers of jc-kzg-4844) regarding this and moving it to maven central. Will update once we get any confirmations.

Thanks

NickSneo avatar Mar 18 '24 10:03 NickSneo

Hi @NickSneo, that sounds great. Thank you for your efforts!

michaelnetter avatar Mar 18 '24 12:03 michaelnetter

Hi @michaelnetter, I encountered the same error with both version 4.11.0 and 4.11.1.

I currently solved it by using the previous version 4.10.3

mmmark0 avatar Mar 22 '24 09:03 mmmark0

I'm following this thread because I'm facing the same issue :)

sandronm avatar May 06 '24 08:05 sandronm

We are in talks with Consensys team, they will be publishing it to maven central soon. Opened up an issue to track this progress - https://github.com/Consensys/jc-kzg-4844/issues/42

Link to discussion on Discord (will need to join Hyperledger Server to access this) - https://discord.com/channels/905194001349627914/1195062053682032700/1238389155877359638

NickSneo avatar May 10 '24 12:05 NickSneo

Web3j 4.12.0 fixes the issue. Thanks @NickSneo

michaelnetter avatar May 27 '24 08:05 michaelnetter

Thanks for confirming @michaelnetter Plz use web3j >=4.12.0 for build without Consensys repo dependency

NickSneo avatar May 27 '24 08:05 NickSneo