From 93584afcb4886d061522f4470c5f0bb8d14310f5 Mon Sep 17 00:00:00 2001 From: Fabio Di Fabio Date: Tue, 26 Mar 2024 11:21:50 +0100 Subject: [PATCH 1/2] Update Web3j dependencies Signed-off-by: Fabio Di Fabio --- CHANGELOG.md | 1 + acceptance-tests/tests/build.gradle | 13 +- .../privacy/PrivacyClusterAcceptanceTest.java | 9 +- gradle/verification-metadata.xml | 398 +++++++----------- gradle/versions.gradle | 4 +- settings.gradle | 4 + 6 files changed, 169 insertions(+), 260 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b24a6f89a..75a0750bc04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Extend error handling of plugin RPC methods [#6759](https://github.com/hyperledger/besu/pull/6759) - Added engine_newPayloadV4 and engine_getPayloadV4 methods [#6783](https://github.com/hyperledger/besu/pull/6783) - Reduce storage size of receipts [#6602](https://github.com/hyperledger/besu/pull/6602) +- 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 668463383b7..543ab645e4a 100644 --- a/acceptance-tests/tests/build.gradle +++ b/acceptance-tests/tests/build.gradle @@ -12,17 +12,8 @@ */ 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' } 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 419286f1689..e1bb0a980ea 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 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( @@ -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 = @@ -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( diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index f012b074345..7a0805fccef 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 629d1598258..036eef698c3 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 3ca01a26067..81f4cb8736b 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(\\..*)?') } + } } } From 5c0f303f388bc2319ab218283042476a4554f53c Mon Sep 17 00:00:00 2001 From: Fabio Di Fabio Date: Tue, 26 Mar 2024 17:35:14 +0100 Subject: [PATCH 2/2] Force old version of the solidity compiler to pass AT Signed-off-by: Fabio Di Fabio --- acceptance-tests/tests/build.gradle | 6 +++++- acceptance-tests/tests/contracts/SimpleStorage.sol | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/acceptance-tests/tests/build.gradle b/acceptance-tests/tests/build.gradle index 543ab645e4a..10b3138384a 100644 --- a/acceptance-tests/tests/build.gradle +++ b/acceptance-tests/tests/build.gradle @@ -20,7 +20,11 @@ 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 35dc7c3932f..0b4838f1c26 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 .