From 6111e1bbc36f6b8b19780412cc61f849b639e350 Mon Sep 17 00:00:00 2001 From: Sally MacFarlane Date: Tue, 13 Jun 2023 13:12:23 +1000 Subject: [PATCH] Revert "Update Tuweni to 2.4.1 (#5513)" (#5585) This reverts commit b96418143c9f1fdc5805add283edc48ea5c645a7. Signed-off-by: Sally MacFarlane --- CHANGELOG.md | 1 - acceptance-tests/dsl/build.gradle | 6 +- acceptance-tests/tests/build.gradle | 2 +- besu/build.gradle | 12 +- config/build.gradle | 4 +- consensus/clique/build.gradle | 4 +- consensus/common/build.gradle | 2 +- consensus/ibft/build.gradle | 4 +- consensus/merge/build.gradle | 4 +- consensus/qbft/build.gradle | 4 +- crypto/algorithms/build.gradle | 4 +- datatypes/build.gradle | 4 +- enclave/build.gradle | 2 +- ethereum/api/build.gradle | 8 +- ethereum/blockcreation/build.gradle | 4 +- ethereum/core/build.gradle | 14 +- .../ethereum/core/TransactionTestFixture.java | 3 +- .../core/encoding/WithdrawalEncoderTest.java | 3 +- ethereum/eth/build.gradle | 6 +- .../layered/BaseTransactionPoolTest.java | 2 +- ethereum/ethstats/build.gradle | 2 +- ethereum/mock-p2p/build.gradle | 2 +- ethereum/p2p/build.gradle | 14 +- .../p2p/network/DefaultP2PNetwork.java | 12 +- .../p2p/network/DefaultP2PNetworkTest.java | 14 +- ethereum/permissioning/build.gradle | 6 +- ethereum/referencetests/build.gradle | 4 +- ethereum/retesteth/build.gradle | 4 +- ethereum/rlp/build.gradle | 4 +- ethereum/stratum/build.gradle | 4 +- ethereum/trie/build.gradle | 4 +- ethereum/verkletrie/build.gradle | 6 +- evm/build.gradle | 4 +- gradle/verification-metadata.xml | 280 ------------------ gradle/versions.gradle | 9 +- pki/build.gradle | 2 +- plugin-api/build.gradle | 4 +- plugins/rocksdb/build.gradle | 2 +- privacy-contracts/build.gradle | 6 +- services/tasks/build.gradle | 2 +- testutil/build.gradle | 6 +- 41 files changed, 96 insertions(+), 388 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bd3f65517f..274918ccf0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,6 @@ and in case a rollback is needed, before installing a previous version, the migr - Tidy DEBUG logs by moving engine API full logging to TRACE [#5529](https://github.com/hyperledger/besu/pull/5529) - remove PoW validation if merge is enabled as it is not needed anymore [#5538](https://github.com/hyperledger/besu/pull/5538) - Use BlobDB for blockchain storage to reduce initial sync time and write amplification [#5475](https://github.com/hyperledger/besu/pull/5475) -- Update to Tuweni 2.4.1. [#5513](https://github.com/hyperledger/besu/pull/5513) ### Bug Fixes - check to ensure storage and transactions are not closed prior to reading/writing [#5527](https://github.com/hyperledger/besu/pull/5527) diff --git a/acceptance-tests/dsl/build.gradle b/acceptance-tests/dsl/build.gradle index 7aff9aaffb5..d65de08b954 100644 --- a/acceptance-tests/dsl/build.gradle +++ b/acceptance-tests/dsl/build.gradle @@ -36,9 +36,9 @@ dependencies { implementation 'io.vertx:vertx-core' implementation 'junit:junit' implementation 'io.opentelemetry:opentelemetry-api' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-io' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-io' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.assertj:assertj-core' implementation 'org.awaitility:awaitility' implementation 'org.java-websocket:Java-WebSocket' diff --git a/acceptance-tests/tests/build.gradle b/acceptance-tests/tests/build.gradle index cc4a54b009b..8b23195361d 100644 --- a/acceptance-tests/tests/build.gradle +++ b/acceptance-tests/tests/build.gradle @@ -76,7 +76,7 @@ dependencies { testImplementation 'junit:junit' testImplementation 'org.apache.commons:commons-compress' testImplementation 'org.apache.logging.log4j:log4j-core' - testImplementation 'io.tmio:tuweni-crypto' + testImplementation 'org.apache.tuweni:tuweni-crypto' testImplementation 'org.assertj:assertj-core' testImplementation 'org.awaitility:awaitility' testImplementation 'org.junit.jupiter:junit-jupiter' diff --git a/besu/build.gradle b/besu/build.gradle index 73977d81ba7..969571b565c 100644 --- a/besu/build.gradle +++ b/besu/build.gradle @@ -70,10 +70,10 @@ dependencies { implementation 'io.vertx:vertx-web' implementation 'org.apache.commons:commons-lang3' implementation 'org.apache.logging.log4j:log4j-core' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-config' - implementation 'io.tmio:tuweni-toml' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-config' + implementation 'org.apache.tuweni:tuweni-toml' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.springframework.security:spring-security-crypto' implementation 'org.xerial.snappy:snappy-java' implementation 'tech.pegasys:jc-kzg-4844' @@ -92,8 +92,8 @@ dependencies { testImplementation 'io.opentelemetry:opentelemetry-api' testImplementation 'junit:junit' testImplementation 'org.apache.commons:commons-text' - testImplementation 'io.tmio:tuweni-bytes' - testImplementation 'io.tmio:tuweni-units' + testImplementation 'org.apache.tuweni:tuweni-bytes' + testImplementation 'org.apache.tuweni:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.awaitility:awaitility' testImplementation 'org.junit.jupiter:junit-jupiter' diff --git a/config/build.gradle b/config/build.gradle index f30e2848f1a..8e7f197d134 100644 --- a/config/build.gradle +++ b/config/build.gradle @@ -36,8 +36,8 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.google.guava:guava' implementation 'info.picocli:picocli' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' testImplementation project(':testutil') diff --git a/consensus/clique/build.gradle b/consensus/clique/build.gradle index 4c5634f17c2..b6c39a703ae 100644 --- a/consensus/clique/build.gradle +++ b/consensus/clique/build.gradle @@ -47,8 +47,8 @@ dependencies { implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' testImplementation project(path: ':consensus:common', configuration: 'testArtifacts') testImplementation project(path: ':crypto:services', configuration: 'testSupportArtifacts') diff --git a/consensus/common/build.gradle b/consensus/common/build.gradle index 49c73e7d176..540cd788315 100644 --- a/consensus/common/build.gradle +++ b/consensus/common/build.gradle @@ -44,7 +44,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.google.guava:guava' - implementation 'io.tmio:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-bytes' testImplementation project(':config') testImplementation project(':crypto:algorithms') diff --git a/consensus/ibft/build.gradle b/consensus/ibft/build.gradle index 3f7b1bf0ac6..d5d76a1a2c4 100644 --- a/consensus/ibft/build.gradle +++ b/consensus/ibft/build.gradle @@ -44,8 +44,8 @@ dependencies { implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' integrationTestImplementation project(path: ':config', configuration: 'testSupportArtifacts') integrationTestImplementation project(path: ':ethereum:core', configuration: 'testSupportArtifacts') diff --git a/consensus/merge/build.gradle b/consensus/merge/build.gradle index fb8589123c6..1c52ee104fe 100644 --- a/consensus/merge/build.gradle +++ b/consensus/merge/build.gradle @@ -46,8 +46,8 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' testImplementation project(path: ':consensus:common', configuration: 'testArtifacts') testImplementation project(':crypto:algorithms') diff --git a/consensus/qbft/build.gradle b/consensus/qbft/build.gradle index 6c7640466cf..90e9a45deed 100644 --- a/consensus/qbft/build.gradle +++ b/consensus/qbft/build.gradle @@ -45,8 +45,8 @@ dependencies { implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.web3j:abi' integrationTestImplementation project(path: ':config', configuration: 'testSupportArtifacts') diff --git a/crypto/algorithms/build.gradle b/crypto/algorithms/build.gradle index 7bd630566d5..3421c990bf3 100644 --- a/crypto/algorithms/build.gradle +++ b/crypto/algorithms/build.gradle @@ -33,8 +33,8 @@ dependencies { api 'org.slf4j:slf4j-api' implementation 'net.java.dev.jna:jna' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.hyperledger.besu:secp256k1' implementation 'org.hyperledger.besu:secp256r1' implementation 'org.hyperledger.besu:blake2bf' diff --git a/datatypes/build.gradle b/datatypes/build.gradle index a55bf4e45c5..2f4a0e02065 100644 --- a/datatypes/build.gradle +++ b/datatypes/build.gradle @@ -34,8 +34,8 @@ dependencies { implementation project(':crypto:algorithms') implementation project(':ethereum:rlp') implementation 'com.google.guava:guava' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' diff --git a/enclave/build.gradle b/enclave/build.gradle index a282e01a7ff..ff3343462c9 100644 --- a/enclave/build.gradle +++ b/enclave/build.gradle @@ -7,7 +7,7 @@ dependencies { implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' implementation 'io.vertx:vertx-web' - implementation 'io.tmio:tuweni-net' + implementation 'org.apache.tuweni:tuweni-net' runtimeOnly('org.bouncycastle:bcpkix-jdk15on') diff --git a/ethereum/api/build.gradle b/ethereum/api/build.gradle index 110c0ba4070..68b53a3b76a 100644 --- a/ethereum/api/build.gradle +++ b/ethereum/api/build.gradle @@ -64,10 +64,10 @@ dependencies { implementation 'io.vertx:vertx-web' implementation 'io.vertx:vertx-codegen' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-net' - implementation 'io.tmio:tuweni-toml' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-net' + implementation 'org.apache.tuweni:tuweni-toml' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.antlr:antlr4-runtime' implementation 'org.bouncycastle:bcprov-jdk15on' implementation 'org.springframework.security:spring-security-crypto' diff --git a/ethereum/blockcreation/build.gradle b/ethereum/blockcreation/build.gradle index d813869db6a..6ab57e51315 100644 --- a/ethereum/blockcreation/build.gradle +++ b/ethereum/blockcreation/build.gradle @@ -24,8 +24,8 @@ dependencies { implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' testImplementation project(path: ':config', configuration: 'testSupportArtifacts') testImplementation project(path: ':ethereum:core', configuration: 'testArtifacts') diff --git a/ethereum/core/build.gradle b/ethereum/core/build.gradle index a03dafd7d9e..690aad04106 100644 --- a/ethereum/core/build.gradle +++ b/ethereum/core/build.gradle @@ -53,10 +53,10 @@ dependencies { implementation 'net.java.dev.jna:jna' implementation 'org.apache.commons:commons-lang3' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-concurrent' - implementation 'io.tmio:tuweni-units' - implementation 'io.tmio:tuweni-rlp' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-concurrent' + implementation 'org.apache.tuweni:tuweni-units' + implementation 'org.apache.tuweni:tuweni-rlp' implementation 'org.hyperledger.besu:bls12-381' implementation 'org.immutables:value-annotations' @@ -77,9 +77,9 @@ dependencies { testImplementation 'junit:junit' testImplementation 'org.apache.logging.log4j:log4j-core' - testImplementation 'io.tmio:tuweni-bytes' - testImplementation 'io.tmio:tuweni-io' - testImplementation 'io.tmio:tuweni-units' + testImplementation 'org.apache.tuweni:tuweni-bytes' + testImplementation 'org.apache.tuweni:tuweni-io' + testImplementation 'org.apache.tuweni:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter-params' diff --git a/ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/TransactionTestFixture.java b/ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/TransactionTestFixture.java index 79307d2ebdc..d766abf1017 100644 --- a/ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/TransactionTestFixture.java +++ b/ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/TransactionTestFixture.java @@ -32,8 +32,7 @@ public class TransactionTestFixture { private static final Hash DEFAULT_VERSIONED_HASH = Hash.wrap( Bytes32.wrap( - Bytes.concatenate( - Bytes.fromHexString("0x01"), Bytes.fromHexString("2a".repeat(31))))); + Bytes.concatenate(Bytes.fromHexString("0x01"), Bytes.repeat((byte) 42, 31)))); private TransactionType transactionType = TransactionType.FRONTIER; diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/encoding/WithdrawalEncoderTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/encoding/WithdrawalEncoderTest.java index 7dd79e229a0..3c80cd78712 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/encoding/WithdrawalEncoderTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/encoding/WithdrawalEncoderTest.java @@ -29,7 +29,8 @@ class WithdrawalEncoderTest { "0xd8808094000000000000000000000000000000000000000080"; public static final String WITHDRAWAL_MAX_VALUE = "0xf088ffffffffffffffff88ffffffffffffffff94ffffffffffffffffffffffffffffffffffffffff88ffffffffffffffff"; - public static final Address MAX_ADDRESS = Address.fromHexString("ff".repeat(20)); + public static final Address MAX_ADDRESS = + Address.fromHexString(Bytes.repeat((byte) 0xff, 20).toHexString()); @Test void shouldEncodeWithdrawalForZeroCase() { diff --git a/ethereum/eth/build.gradle b/ethereum/eth/build.gradle index 68a40750b7c..0f68fc521d3 100644 --- a/ethereum/eth/build.gradle +++ b/ethereum/eth/build.gradle @@ -55,9 +55,9 @@ dependencies { implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' implementation 'org.apache.commons:commons-lang3' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' - implementation 'io.tmio:tuweni-rlp' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' + implementation 'org.apache.tuweni:tuweni-rlp' annotationProcessor "org.immutables:value" implementation "org.immutables:value-annotations" diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/BaseTransactionPoolTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/BaseTransactionPoolTest.java index b594d7a258b..defafb1b369 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/BaseTransactionPoolTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/BaseTransactionPoolTest.java @@ -110,7 +110,7 @@ protected TransactionTestFixture prepareTransaction( .nonce(nonce) .type(type); if (payloadSize > 0) { - var payloadBytes = Bytes.fromHexString("01".repeat(payloadSize)); + var payloadBytes = Bytes.repeat((byte) 1, payloadSize); tx.payload(payloadBytes); } if (type.supports1559FeeMarket()) { diff --git a/ethereum/ethstats/build.gradle b/ethereum/ethstats/build.gradle index 52fe38473ce..c361c16c860 100644 --- a/ethereum/ethstats/build.gradle +++ b/ethereum/ethstats/build.gradle @@ -34,7 +34,7 @@ dependencies { implementation 'com.google.guava:guava' implementation 'com.squareup.okhttp3:okhttp' implementation 'io.vertx:vertx-core' - implementation 'io.tmio:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-bytes' implementation project(':consensus:clique') implementation project(':config') diff --git a/ethereum/mock-p2p/build.gradle b/ethereum/mock-p2p/build.gradle index bfab38e98c7..b73c0a051fd 100644 --- a/ethereum/mock-p2p/build.gradle +++ b/ethereum/mock-p2p/build.gradle @@ -35,7 +35,7 @@ dependencies { implementation project(':util') implementation 'io.vertx:vertx-core' - implementation 'io.tmio:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-bytes' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/ethereum/p2p/build.gradle b/ethereum/p2p/build.gradle index 0775a51d2a9..6d36dfd1c74 100644 --- a/ethereum/p2p/build.gradle +++ b/ethereum/p2p/build.gradle @@ -45,17 +45,17 @@ dependencies { implementation 'io.prometheus:simpleclient' implementation 'io.vertx:vertx-core' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-crypto' - implementation('io.tmio:tuweni-devp2p') { + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-crypto' + implementation('org.apache.tuweni:tuweni-devp2p') { exclude group:'ch.qos.logback', module:'logback-classic' } - implementation('io.tmio:tuweni-dns-discovery'){ + implementation('org.apache.tuweni:tuweni-dns-discovery'){ exclude group:'ch.qos.logback', module:'logback-classic' } - implementation 'io.tmio:tuweni-io' - implementation 'io.tmio:tuweni-rlp' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-io' + implementation 'org.apache.tuweni:tuweni-rlp' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.jetbrains.kotlin:kotlin-stdlib' implementation 'org.owasp.encoder:encoder' implementation 'org.xerial.snappy:snappy-java' diff --git a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/network/DefaultP2PNetwork.java b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/network/DefaultP2PNetwork.java index ec65934b297..427093cb599 100644 --- a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/network/DefaultP2PNetwork.java +++ b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/network/DefaultP2PNetwork.java @@ -145,7 +145,6 @@ public class DefaultP2PNetwork implements P2PNetwork { private final AtomicBoolean stopped = new AtomicBoolean(false); private final CountDownLatch shutdownLatch = new CountDownLatch(2); private final Duration shutdownTimeout = Duration.ofSeconds(15); - private final Vertx vertx; private DNSDaemon dnsDaemon; /** @@ -164,7 +163,6 @@ public class DefaultP2PNetwork implements P2PNetwork { * @param maintainedPeers A collection of peers for which we are expected to maintain connections * @param reputationManager An object that inspect disconnections for misbehaving peers that can * then be blacklisted. - * @param vertx the Vert.x instance managing network resources */ DefaultP2PNetwork( final MutableLocalNode localNode, @@ -175,8 +173,7 @@ public class DefaultP2PNetwork implements P2PNetwork { final PeerPermissions peerPermissions, final NatService natService, final MaintainedPeers maintainedPeers, - final PeerDenylistManager reputationManager, - final Vertx vertx) { + final PeerDenylistManager reputationManager) { this.localNode = localNode; this.peerDiscoveryAgent = peerDiscoveryAgent; this.rlpxAgent = rlpxAgent; @@ -186,7 +183,6 @@ public class DefaultP2PNetwork implements P2PNetwork { this.nodeId = nodeKey.getPublicKey().getEncodedBytes(); this.peerPermissions = peerPermissions; - this.vertx = vertx; // set the requirement here that the number of peers be greater than the lower bound final int peerLowerBound = rlpxAgent.getPeerLowerBound(); @@ -233,8 +229,7 @@ public void start() { createDaemonListener(), 0L, 600000L, - config.getDnsDiscoveryServerOverride().orElse(null), - vertx); + config.getDnsDiscoveryServerOverride().orElse(null)); dnsDaemon.start(); }); @@ -540,8 +535,7 @@ private P2PNetwork doBuild() { peerPermissions, natService, maintainedPeers, - reputationManager, - vertx); + reputationManager); } private void validate() { diff --git a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/network/DefaultP2PNetworkTest.java b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/network/DefaultP2PNetworkTest.java index 5b61d4946a4..ffc1c84431b 100644 --- a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/network/DefaultP2PNetworkTest.java +++ b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/network/DefaultP2PNetworkTest.java @@ -58,8 +58,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import io.vertx.core.Vertx; -import io.vertx.core.dns.DnsClient; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.crypto.SECP256K1; import org.assertj.core.api.Assertions; @@ -350,12 +348,8 @@ public void shouldStartDnsDiscoveryWhenDnsURLIsConfigured() { final NetworkingConfiguration dnsConfig = when(spy(config).getDiscovery()).thenReturn(disco).getMock(); - Vertx vertx = mock(Vertx.class); - when(vertx.createDnsClient(any())).thenReturn(mock(DnsClient.class)); - // spy on DefaultP2PNetwork - final DefaultP2PNetwork testClass = - (DefaultP2PNetwork) builder().vertx(vertx).config(dnsConfig).build(); + final DefaultP2PNetwork testClass = (DefaultP2PNetwork) builder().config(dnsConfig).build(); testClass.start(); assertThat(testClass.getDnsDaemon()).isPresent(); @@ -372,11 +366,7 @@ public void shouldUseDnsServerOverrideIfPresent() { doReturn(disco).when(dnsConfig).getDiscovery(); doReturn(Optional.of("localhost")).when(dnsConfig).getDnsDiscoveryServerOverride(); - Vertx vertx = mock(Vertx.class); - when(vertx.createDnsClient(any())).thenReturn(mock(DnsClient.class)); - - final DefaultP2PNetwork testClass = - (DefaultP2PNetwork) builder().config(dnsConfig).vertx(vertx).build(); + final DefaultP2PNetwork testClass = (DefaultP2PNetwork) builder().config(dnsConfig).build(); testClass.start(); // ensure we used the dns server override config when building DNSDaemon: diff --git a/ethereum/permissioning/build.gradle b/ethereum/permissioning/build.gradle index a0493360a15..5b10e216ecf 100644 --- a/ethereum/permissioning/build.gradle +++ b/ethereum/permissioning/build.gradle @@ -41,9 +41,9 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.google.guava:guava' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-toml' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-toml' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.web3j:abi' testImplementation project(':config') diff --git a/ethereum/referencetests/build.gradle b/ethereum/referencetests/build.gradle index 1aa1e2a2651..49dc6109074 100644 --- a/ethereum/referencetests/build.gradle +++ b/ethereum/referencetests/build.gradle @@ -138,8 +138,8 @@ dependencies { referenceTestImplementation 'ethereum:execution-spec-tests:0.2.3:fixtures@tar.gz' referenceTestImplementation 'com.fasterxml.jackson.core:jackson-databind' referenceTestImplementation 'com.google.guava:guava' - referenceTestImplementation 'io.tmio:tuweni-bytes' - referenceTestImplementation 'io.tmio:tuweni-units' + referenceTestImplementation 'org.apache.tuweni:tuweni-bytes' + referenceTestImplementation 'org.apache.tuweni:tuweni-units' referenceTestImplementation 'org.assertj:assertj-core' referenceTestImplementation 'org.junit.jupiter:junit-jupiter-api' referenceTestImplementation 'org.junit.jupiter:junit-jupiter-params' diff --git a/ethereum/retesteth/build.gradle b/ethereum/retesteth/build.gradle index 5bb9b1d8559..08d06932905 100644 --- a/ethereum/retesteth/build.gradle +++ b/ethereum/retesteth/build.gradle @@ -47,8 +47,8 @@ dependencies { implementation 'io.vertx:vertx-core' implementation 'io.vertx:vertx-web' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/ethereum/rlp/build.gradle b/ethereum/rlp/build.gradle index 17303480e92..678918d7cef 100644 --- a/ethereum/rlp/build.gradle +++ b/ethereum/rlp/build.gradle @@ -31,8 +31,8 @@ jar { dependencies { annotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' implementation 'com.google.guava:guava' diff --git a/ethereum/stratum/build.gradle b/ethereum/stratum/build.gradle index 5c7dfaed20d..d462fb3f32d 100644 --- a/ethereum/stratum/build.gradle +++ b/ethereum/stratum/build.gradle @@ -41,8 +41,8 @@ dependencies { implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' testImplementation project(path: ':metrics:core', configuration: 'testSupportArtifacts') testImplementation project(':testutil') diff --git a/ethereum/trie/build.gradle b/ethereum/trie/build.gradle index 6f1b78cb90a..c671a75bf0f 100644 --- a/ethereum/trie/build.gradle +++ b/ethereum/trie/build.gradle @@ -36,7 +36,7 @@ dependencies { implementation 'org.immutables:value-annotations' implementation 'com.google.guava:guava' implementation 'io.opentelemetry:opentelemetry-api' - implementation 'io.tmio:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.bouncycastle:bcprov-jdk15on' annotationProcessor 'org.immutables:value' @@ -46,7 +46,7 @@ dependencies { testImplementation 'com.fasterxml.jackson.core:jackson-databind' testImplementation 'junit:junit' - testImplementation 'io.tmio:tuweni-units' + testImplementation 'org.apache.tuweni:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.mockito:mockito-core' diff --git a/ethereum/verkletrie/build.gradle b/ethereum/verkletrie/build.gradle index df0ba0e5119..0ca780ba88d 100644 --- a/ethereum/verkletrie/build.gradle +++ b/ethereum/verkletrie/build.gradle @@ -35,8 +35,8 @@ dependencies { implementation "org.immutables:value-annotations" implementation 'com.google.guava:guava' implementation 'io.opentelemetry:opentelemetry-api' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.bouncycastle:bcprov-jdk15on' implementation 'org.hyperledger.besu:ipa-multipoint' @@ -48,7 +48,7 @@ dependencies { testImplementation 'com.fasterxml.jackson.core:jackson-databind' testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' testImplementation 'junit:junit' - testImplementation 'io.tmio:tuweni-units' + testImplementation 'org.apache.tuweni:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.mockito:mockito-core' diff --git a/evm/build.gradle b/evm/build.gradle index 83caaae31b1..dd8760c1079 100644 --- a/evm/build.gradle +++ b/evm/build.gradle @@ -40,8 +40,8 @@ dependencies { implementation 'com.github.ben-manes.caffeine:caffeine' implementation 'com.google.guava:guava' implementation 'net.java.dev.jna:jna' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-units' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-units' implementation 'org.hyperledger.besu:arithmetic' implementation 'org.hyperledger.besu:bls12-381' implementation 'tech.pegasys:jc-kzg-4844' diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index cc41d3d6638..13b39b44dc9 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -467,17 +467,6 @@ - - - - - - - - - - - @@ -529,14 +518,6 @@ - - - - - - - - @@ -827,9 +808,6 @@ - - - @@ -2571,126 +2549,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2746,11 +2604,6 @@ - - - - - @@ -2777,14 +2630,6 @@ - - - - - - - - @@ -2793,24 +2638,11 @@ - - - - - - - - - - - - - @@ -3148,14 +2980,6 @@ - - - - - - - - @@ -3166,11 +2990,6 @@ - - - - - @@ -3187,14 +3006,6 @@ - - - - - - - - @@ -3543,14 +3354,6 @@ - - - - - - - - @@ -3583,14 +3386,6 @@ - - - - - - - - @@ -3615,14 +3410,6 @@ - - - - - - - - @@ -3663,14 +3450,6 @@ - - - - - - - - @@ -3687,14 +3466,6 @@ - - - - - - - - @@ -4721,14 +4492,6 @@ - - - - - - - - @@ -4766,24 +4529,11 @@ - - - - - - - - - - - - - @@ -4792,14 +4542,6 @@ - - - - - - - - @@ -4811,17 +4553,6 @@ - - - - - - - - - - - @@ -4833,17 +4564,6 @@ - - - - - - - - - - - diff --git a/gradle/versions.gradle b/gradle/versions.gradle index fc3c2338164..88e87bdf01f 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -16,7 +16,7 @@ dependencyManagement { dependencies { - dependencySet(group: 'org.antlr', version: '4.11.1') { + dependencySet(group: 'org.antlr', version: '4.10.1') { entry 'antlr4' entry 'antlr4-runtime' } @@ -133,7 +133,7 @@ dependencyManagement { entry 'log4j-slf4j2-impl' } - dependencySet(group: 'io.tmio', version: '2.4.1') { + dependencySet(group: 'org.apache.tuweni', version: '2.3.1') { entry 'tuweni-bytes' entry 'tuweni-config' entry 'tuweni-concurrent' @@ -147,6 +147,11 @@ dependencyManagement { entry 'tuweni-units' } + // commons-net is a transitive dependency of tuweni. + // Tuweni 2.3.1 has commons-net:3.8.0 which we force here to 3.9.0 + // Once tuweni is updated, can remove this line + dependency 'commons-net:commons-net:3.9.0' + dependency 'org.assertj:assertj-core:3.24.2' dependency 'org.awaitility:awaitility:4.2.0' diff --git a/pki/build.gradle b/pki/build.gradle index 9df2a09381c..a3edd47ce74 100644 --- a/pki/build.gradle +++ b/pki/build.gradle @@ -31,7 +31,7 @@ dependencies { api 'org.slf4j:slf4j-api' implementation 'com.google.guava:guava' - implementation 'io.tmio:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.bouncycastle:bcpkix-jdk15on' testImplementation 'junit:junit' diff --git a/plugin-api/build.gradle b/plugin-api/build.gradle index 961801e866d..3966e03751e 100644 --- a/plugin-api/build.gradle +++ b/plugin-api/build.gradle @@ -30,8 +30,8 @@ jar { dependencies { api project(':datatypes') api 'org.apache.commons:commons-lang3' - api 'io.tmio:tuweni-bytes' - api 'io.tmio:tuweni-units' + api 'org.apache.tuweni:tuweni-bytes' + api 'org.apache.tuweni:tuweni-units' implementation 'com.google.guava:guava' implementation project(':evm') } diff --git a/plugins/rocksdb/build.gradle b/plugins/rocksdb/build.gradle index 7cf2cb95041..dc5438f86c9 100644 --- a/plugins/rocksdb/build.gradle +++ b/plugins/rocksdb/build.gradle @@ -45,7 +45,7 @@ dependencies { implementation 'info.picocli:picocli' implementation 'io.opentelemetry:opentelemetry-api' implementation 'io.prometheus:simpleclient' - implementation 'io.tmio:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.rocksdb:rocksdbjni' implementation project(path: ':ethereum:core') diff --git a/privacy-contracts/build.gradle b/privacy-contracts/build.gradle index 33e3176ce05..65401fd753b 100644 --- a/privacy-contracts/build.gradle +++ b/privacy-contracts/build.gradle @@ -15,9 +15,9 @@ jar { enabled = true } dependencies { - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-io' - implementation 'io.tmio:tuweni-toml' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-io' + implementation 'org.apache.tuweni:tuweni-toml' implementation 'org.web3j:abi' implementation 'org.web3j:besu' } diff --git a/services/tasks/build.gradle b/services/tasks/build.gradle index 7b9ea1b18a4..f398248c730 100644 --- a/services/tasks/build.gradle +++ b/services/tasks/build.gradle @@ -38,7 +38,7 @@ dependencies { implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' - implementation 'io.tmio:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-bytes' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/testutil/build.gradle b/testutil/build.gradle index 931730c2622..193569c72c1 100644 --- a/testutil/build.gradle +++ b/testutil/build.gradle @@ -37,9 +37,9 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp' implementation 'io.vertx:vertx-core' implementation 'junit:junit' - implementation 'io.tmio:tuweni-bytes' - implementation 'io.tmio:tuweni-io' - implementation 'io.tmio:tuweni-toml' + implementation 'org.apache.tuweni:tuweni-bytes' + implementation 'org.apache.tuweni:tuweni-io' + implementation 'org.apache.tuweni:tuweni-toml' implementation 'org.assertj:assertj-core' implementation 'org.mockito:mockito-core' implementation 'org.web3j:core'