Skip to content
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

Update Web3j dependencies #6811

Merged
merged 4 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- Remove deprecated Forest pruning [#6810](https://github.com/hyperledger/besu/pull/6810)
- Experimental Snap Sync Server [#6640](https://github.com/hyperledger/besu/pull/6640)
- Upgrade Reference Tests to 13.2 [#6854](https://github.com/hyperledger/besu/pull/6854)
- Update Web3j dependencies [#6811](https://github.com/hyperledger/besu/pull/6811)

### Bug fixes
- Fix txpool dump/restore race condition [#6665](https://github.com/hyperledger/besu/pull/6665)
Expand Down
19 changes: 7 additions & 12 deletions acceptance-tests/tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,19 @@
*/

plugins {
id 'org.web3j' version '4.9.2'
id 'org.web3j.solidity' version '0.3.5'
}

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.web3j' && details.requested.version == '4.9.2') {
details.useVersion '4.9.4'
details.because 'Plugin version is 4.9.2 (latest), but we want it to use web3j libs version 4.9.4'
}
}
id 'org.web3j' version '4.11.1'
id 'org.web3j.solidity' version '0.4.0'
}

web3j { generatedPackageName = 'org.hyperledger.besu.tests.web3j.generated' }

sourceSets.main.solidity.srcDirs = ["$projectDir/contracts"]

solidity { resolvePackages = false }
solidity {
resolvePackages = false
// TODO: remove the forced version, when DEV network is upgraded to support latest forks
version '0.8.19'
}

dependencies {
api 'org.slf4j:slf4j-api'
Expand Down
2 changes: 1 addition & 1 deletion acceptance-tests/tests/contracts/SimpleStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
pragma solidity >=0.7.0 <0.9.0;
pragma solidity >=0.7.0 <0.8.20;

// compile with:
// solc SimpleStorage.sol --bin --abi --optimize --overwrite -o .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ public void aliceCanUsePrivDistributeTransaction() {
EnclaveEncryptorType.EC.equals(enclaveEncryptorType)
? "0x3e5d325a03ad3ce5640502219833d30b89ce3ce1"
: "0xebf56429e6500e84442467292183d4d621359838";
final String receiptPrivacyGroupId =
EnclaveEncryptorType.EC.equals(enclaveEncryptorType)
? "MjuFB4b9Hz+f8zvkWWasxZWRjHWXU4t7B2nOHo4mekA="
: "DyAOiF/ynpc+JXa2YAGB0bCitSlOMNm+ShmB/7M6C4w=";

final RawPrivateTransaction rawPrivateTransaction =
RawPrivateTransaction.createContractTransaction(
Expand All @@ -196,6 +200,7 @@ public void aliceCanUsePrivDistributeTransaction() {
Numeric.prependHexPrefix(EventEmitter.BINARY),
Base64String.wrap(alice.getEnclaveKey()),
Collections.singletonList(Base64String.wrap(bob.getEnclaveKey())),
Base64String.wrap(receiptPrivacyGroupId),
RESTRICTED);

final String signedPrivateTransaction =
Expand Down Expand Up @@ -243,10 +248,6 @@ public void aliceCanUsePrivDistributeTransaction() {
"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEXIgZqRA25V+3nN+Do6b5r0jiUunub6ubjPhqwHpPxP44uUYh9RKCQNRnsqCJ9PjeTnC8R3ieJk7HWAlycU1bug=="))
: new ArrayList<>(
Collections.singletonList("Ko2bVqD+nNlNYL5EE7y3IdOnviftjiizpjRt+HTuFBs="));
final String receiptPrivacyGroupId =
EnclaveEncryptorType.EC.equals(enclaveEncryptorType)
? "MjuFB4b9Hz+f8zvkWWasxZWRjHWXU4t7B2nOHo4mekA="
: "DyAOiF/ynpc+JXa2YAGB0bCitSlOMNm+ShmB/7M6C4w=";

final PrivateTransactionReceipt expectedReceipt =
new PrivateTransactionReceipt(
Expand Down
398 changes: 155 additions & 243 deletions gradle/verification-metadata.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ dependencyManagement {

dependency 'org.testcontainers:testcontainers:1.19.3'

dependency 'org.web3j:quorum:4.9.5'
dependencySet(group: 'org.web3j', version: '4.10.3') {
dependency 'org.web3j:quorum:4.10.0'
dependencySet(group: 'org.web3j', version: '4.11.1') {
entry 'abi'
entry 'besu'
entry 'core'
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed? There are no plugins from the tech.pegasys namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is needed because new web3j plugin has tech.pegasys:jc-kzg-4844 as dependency

Copy link
Contributor

Choose a reason for hiding this comment

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

That's not good. Web3j cannot be loaded entirely from maven central? Consensys should invest time in getting these published to Maven Central.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know someone is already working on that, so this will not be required in a future version, in the meantime what you prefer, using version 4.10.0 of the plugin or temporarily keeping the extra repo here?

Copy link
Contributor

Choose a reason for hiding this comment

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

We do have the repository in our general listings. I was hoping we could keep the plugins section minimal. So this is acceptable since a long term solution is progressing.

url 'https://artifacts.consensys.net/public/maven/maven/'
content { includeGroupByRegex('tech\\.pegasys(\\..*)?') }
}
}
}

Expand Down
Loading