From cf5e3dae98febeca540b92e4c6706449bc303a74 Mon Sep 17 00:00:00 2001 From: Fabio Di Fabio Date: Tue, 2 Apr 2024 17:06:37 +0200 Subject: [PATCH] Update Web3j dependencies (#6811) * Update Web3j dependencies Signed-off-by: Fabio Di Fabio * Force old version of the solidity compiler to pass AT Signed-off-by: Fabio Di Fabio --------- Signed-off-by: Fabio Di Fabio --- CHANGELOG.md | 1 + acceptance-tests/tests/build.gradle | 19 +- .../tests/contracts/SimpleStorage.sol | 2 +- .../privacy/PrivacyClusterAcceptanceTest.java | 9 +- gradle/verification-metadata.xml | 398 +++++++----------- gradle/versions.gradle | 4 +- settings.gradle | 4 + 7 files changed, 175 insertions(+), 262 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dff18ab5b..9d8e870c08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/acceptance-tests/tests/build.gradle b/acceptance-tests/tests/build.gradle index 668463383b..10b3138384 100644 --- a/acceptance-tests/tests/build.gradle +++ b/acceptance-tests/tests/build.gradle @@ -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' diff --git a/acceptance-tests/tests/contracts/SimpleStorage.sol b/acceptance-tests/tests/contracts/SimpleStorage.sol index 35dc7c3932..0b4838f1c2 100644 --- a/acceptance-tests/tests/contracts/SimpleStorage.sol +++ b/acceptance-tests/tests/contracts/SimpleStorage.sol @@ -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 . diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/privacy/PrivacyClusterAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/privacy/PrivacyClusterAcceptanceTest.java index 419286f168..e1bb0a980e 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/privacy/PrivacyClusterAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/privacy/PrivacyClusterAcceptanceTest.java @@ -187,6 +187,10 @@ public class PrivacyClusterAcceptanceTest extends PrivacyAcceptanceTestBase { 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( @@ -196,6 +200,7 @@ public class PrivacyClusterAcceptanceTest extends PrivacyAcceptanceTestBase { Numeric.prependHexPrefix(EventEmitter.BINARY), Base64String.wrap(alice.getEnclaveKey()), Collections.singletonList(Base64String.wrap(bob.getEnclaveKey())), + Base64String.wrap(receiptPrivacyGroupId), RESTRICTED); final String signedPrivateTransaction = @@ -243,10 +248,6 @@ public class PrivacyClusterAcceptanceTest extends PrivacyAcceptanceTestBase { "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( diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index f012b07434..7a0805fcce 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -114,16 +114,6 @@ - - - - - - - - - - @@ -134,21 +124,16 @@ + + + + + - - - - - - - - - - @@ -204,14 +189,6 @@ - - - - - - - - @@ -228,6 +205,14 @@ + + + + + + + + @@ -236,14 +221,6 @@ - - - - - - - - @@ -260,6 +237,14 @@ + + + + + + + + @@ -268,19 +253,6 @@ - - - - - - - - - - - - - @@ -297,6 +269,14 @@ + + + + + + + + @@ -529,12 +509,12 @@ - - - + + + - - + + @@ -3449,14 +3429,6 @@ - - - - - - - - @@ -3465,6 +3437,14 @@ + + + + + + + + @@ -4765,12 +4745,12 @@ - - - + + + - - + + @@ -4827,9 +4807,6 @@ - - - @@ -4864,9 +4841,6 @@ - - - @@ -4889,14 +4863,6 @@ - - - - - - - - @@ -4927,9 +4893,6 @@ - - - @@ -5556,14 +5519,6 @@ - - - - - - - - @@ -5580,11 +5535,24 @@ + + + + + + + + + + + + + @@ -5593,11 +5561,6 @@ - - - - - @@ -5608,6 +5571,11 @@ + + + + + @@ -5686,198 +5654,134 @@ - - - - - - - - - - - - - - - - - - - - - - + + + - - + + - - + + - - - + + + - - + + - - - - - - - - - - - - - - - - - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - - - - - - - - - - - - - + + + - - + + - - - - + + - - - + + + - - + + - - + + - - - - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - - - - - + + - - - - - - + + + - - + + - - - - - - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + @@ -5936,6 +5840,14 @@ + + + + + + + + diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 629d159825..036eef698c 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -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' diff --git a/settings.gradle b/settings.gradle index 3ca01a2606..81f4cb8736 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,6 +17,10 @@ pluginManagement { repositories { gradlePluginPortal() + maven { + url 'https://artifacts.consensys.net/public/maven/maven/' + content { includeGroupByRegex('tech\\.pegasys(\\..*)?') } + } } }