Skip to content
/ besu Public
forked from hyperledger/besu

Commit

Permalink
Update Web3j dependencies (hyperledger#6811)
Browse files Browse the repository at this point in the history
* Update Web3j dependencies

Signed-off-by: Fabio Di Fabio <[email protected]>

* Force old version of the solidity compiler to pass AT

Signed-off-by: Fabio Di Fabio <[email protected]>

---------

Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: amsmota <[email protected]>
  • Loading branch information
fab-10 authored and amsmota committed Apr 16, 2024
1 parent ea59aa2 commit b3cd32e
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 262 deletions.
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 {
url 'https://artifacts.consensys.net/public/maven/maven/'
content { includeGroupByRegex('tech\\.pegasys(\\..*)?') }
}
}
}

Expand Down

0 comments on commit b3cd32e

Please sign in to comment.