From e2b112d32ff4d6ce0a3b5072deea8e773fc8d4db Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Mon, 29 May 2023 14:02:51 -0700 Subject: [PATCH 01/14] Update Tuweni to 2.4.0 Signed-off-by: Antoine Toulme --- 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/eth/build.gradle | 6 +++--- ethereum/ethstats/build.gradle | 2 +- ethereum/mock-p2p/build.gradle | 2 +- ethereum/p2p/build.gradle | 14 +++++++------- ethereum/permissioning/build.gradle | 6 +++--- ethereum/referencetests/build.gradle | 4 ++-- .../src/reference-test/external-resources | 2 +- 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/versions.gradle | 7 +------ 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 +++--- 35 files changed, 82 insertions(+), 87 deletions(-) diff --git a/acceptance-tests/dsl/build.gradle b/acceptance-tests/dsl/build.gradle index d65de08b954..7aff9aaffb5 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-io' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-io' + implementation 'io.tmio: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 8b23195361d..ace6d1bbb8a 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 'org.apache.tuweni:tuweni-crypto' + testimplementation 'io.tmio: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 969571b565c..dabc199f4dd 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-config' - implementation 'org.apache.tuweni:tuweni-toml' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-config' + implementation 'io.tmio:tuweni-toml' + implementation 'io.tmio: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 'org.apache.tuweni:tuweni-bytes' - testImplementation 'org.apache.tuweni:tuweni-units' + testimplementation 'io.tmio:tuweni-bytes' + testimplementation 'io.tmio: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 8e7f197d134..f30e2848f1a 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-units' testImplementation project(':testutil') diff --git a/consensus/clique/build.gradle b/consensus/clique/build.gradle index b6c39a703ae..4c5634f17c2 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio: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 540cd788315..49c73e7d176 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 'org.apache.tuweni:tuweni-bytes' + implementation 'io.tmio:tuweni-bytes' testImplementation project(':config') testImplementation project(':crypto:algorithms') diff --git a/consensus/ibft/build.gradle b/consensus/ibft/build.gradle index d5d76a1a2c4..3f7b1bf0ac6 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio: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 1c52ee104fe..fb8589123c6 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio: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 e2511ef3126..c5efa8d4bea 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio: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 3421c990bf3..7bd630566d5 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio: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 dd03c225d77..b44a18540ff 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-units' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/enclave/build.gradle b/enclave/build.gradle index ff3343462c9..a282e01a7ff 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 'org.apache.tuweni:tuweni-net' + implementation 'io.tmio:tuweni-net' runtimeOnly('org.bouncycastle:bcpkix-jdk15on') diff --git a/ethereum/api/build.gradle b/ethereum/api/build.gradle index 68b53a3b76a..110c0ba4070 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-net' - implementation 'org.apache.tuweni:tuweni-toml' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-net' + implementation 'io.tmio:tuweni-toml' + implementation 'io.tmio: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 6ab57e51315..d813869db6a 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio: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 690aad04106..514309d5ba1 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-concurrent' - implementation 'org.apache.tuweni:tuweni-units' - implementation 'org.apache.tuweni:tuweni-rlp' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-concurrent' + implementation 'io.tmio:tuweni-units' + implementation 'io.tmio: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 'org.apache.tuweni:tuweni-bytes' - testImplementation 'org.apache.tuweni:tuweni-io' - testImplementation 'org.apache.tuweni:tuweni-units' + testimplementation 'io.tmio:tuweni-bytes' + testimplementation 'io.tmio:tuweni-io' + testimplementation 'io.tmio:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter-params' diff --git a/ethereum/eth/build.gradle b/ethereum/eth/build.gradle index 0f68fc521d3..68a40750b7c 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' - implementation 'org.apache.tuweni:tuweni-rlp' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-units' + implementation 'io.tmio:tuweni-rlp' annotationProcessor "org.immutables:value" implementation "org.immutables:value-annotations" diff --git a/ethereum/ethstats/build.gradle b/ethereum/ethstats/build.gradle index c361c16c860..52fe38473ce 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 'org.apache.tuweni:tuweni-bytes' + implementation 'io.tmio:tuweni-bytes' implementation project(':consensus:clique') implementation project(':config') diff --git a/ethereum/mock-p2p/build.gradle b/ethereum/mock-p2p/build.gradle index b73c0a051fd..bfab38e98c7 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 'org.apache.tuweni:tuweni-bytes' + implementation 'io.tmio:tuweni-bytes' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/ethereum/p2p/build.gradle b/ethereum/p2p/build.gradle index 7de85f6d836..1fc228fa2ac 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-crypto' - implementation('org.apache.tuweni:tuweni-devp2p') { + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-crypto' + implementation('io.tmio:tuweni-devp2p') { exclude group:'ch.qos.logback', module:'logback-classic' } - implementation('org.apache.tuweni:tuweni-dns-discovery'){ + implementation('io.tmio:tuweni-dns-discovery'){ exclude group:'ch.qos.logback', module:'logback-classic' } - implementation 'org.apache.tuweni:tuweni-io' - implementation 'org.apache.tuweni:tuweni-rlp' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-io' + implementation 'io.tmio:tuweni-rlp' + implementation 'io.tmio:tuweni-units' implementation 'org.jetbrains.kotlin:kotlin-stdlib' implementation 'org.xerial.snappy:snappy-java' diff --git a/ethereum/permissioning/build.gradle b/ethereum/permissioning/build.gradle index 5b10e216ecf..a0493360a15 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-toml' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-toml' + implementation 'io.tmio:tuweni-units' implementation 'org.web3j:abi' testImplementation project(':config') diff --git a/ethereum/referencetests/build.gradle b/ethereum/referencetests/build.gradle index 49dc6109074..121e9e8969b 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 'org.apache.tuweni:tuweni-bytes' - referenceTestImplementation 'org.apache.tuweni:tuweni-units' + referenceTestimplementation 'io.tmio:tuweni-bytes' + referenceTestimplementation 'io.tmio: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/referencetests/src/reference-test/external-resources b/ethereum/referencetests/src/reference-test/external-resources index 04f338a6e67..638da7ca7b2 160000 --- a/ethereum/referencetests/src/reference-test/external-resources +++ b/ethereum/referencetests/src/reference-test/external-resources @@ -1 +1 @@ -Subproject commit 04f338a6e673a6b4d906ec9d6d2bc939309357a5 +Subproject commit 638da7ca7b2ca371ebb33d7d7d2562981aafd9b2 diff --git a/ethereum/retesteth/build.gradle b/ethereum/retesteth/build.gradle index 08d06932905..5bb9b1d8559 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-units' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/ethereum/rlp/build.gradle b/ethereum/rlp/build.gradle index 678918d7cef..17303480e92 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-units' implementation 'com.google.guava:guava' diff --git a/ethereum/stratum/build.gradle b/ethereum/stratum/build.gradle index d462fb3f32d..5c7dfaed20d 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio: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 c671a75bf0f..1704e07f428 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 'org.apache.tuweni:tuweni-bytes' + implementation 'io.tmio: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 'org.apache.tuweni:tuweni-units' + testimplementation 'io.tmio: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 0ca780ba88d..c491da61261 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio: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 'org.apache.tuweni:tuweni-units' + testimplementation 'io.tmio: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 639cf7e61bb..5aaf9ff0aa5 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-units' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-units' implementation 'org.hyperledger.besu:arithmetic' implementation 'org.hyperledger.besu:bls12-381' implementation 'tech.pegasys:jc-kzg-4844' diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 8abdc6c6191..88f007c4c17 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -133,7 +133,7 @@ dependencyManagement { entry 'log4j-slf4j2-impl' } - dependencySet(group: 'org.apache.tuweni', version: '2.3.1') { + dependencySet(group: 'io.tmio', version: '2.4.0') { entry 'tuweni-bytes' entry 'tuweni-config' entry 'tuweni-concurrent' @@ -147,11 +147,6 @@ 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 a3edd47ce74..9df2a09381c 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 'org.apache.tuweni:tuweni-bytes' + implementation 'io.tmio:tuweni-bytes' implementation 'org.bouncycastle:bcpkix-jdk15on' testImplementation 'junit:junit' diff --git a/plugin-api/build.gradle b/plugin-api/build.gradle index 442dd5f7856..36b6fece359 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 'org.apache.tuweni:tuweni-bytes' - api 'org.apache.tuweni:tuweni-units' + api 'io.tmio:tuweni-bytes' + api 'io.tmio:tuweni-units' implementation 'com.google.guava:guava' implementation project(':evm') } diff --git a/plugins/rocksdb/build.gradle b/plugins/rocksdb/build.gradle index dc5438f86c9..7cf2cb95041 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 'org.apache.tuweni:tuweni-bytes' + implementation 'io.tmio:tuweni-bytes' implementation 'org.rocksdb:rocksdbjni' implementation project(path: ':ethereum:core') diff --git a/privacy-contracts/build.gradle b/privacy-contracts/build.gradle index 65401fd753b..33e3176ce05 100644 --- a/privacy-contracts/build.gradle +++ b/privacy-contracts/build.gradle @@ -15,9 +15,9 @@ jar { enabled = true } dependencies { - implementation 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-io' - implementation 'org.apache.tuweni:tuweni-toml' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-io' + implementation 'io.tmio:tuweni-toml' implementation 'org.web3j:abi' implementation 'org.web3j:besu' } diff --git a/services/tasks/build.gradle b/services/tasks/build.gradle index f398248c730..7b9ea1b18a4 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 'org.apache.tuweni:tuweni-bytes' + implementation 'io.tmio:tuweni-bytes' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/testutil/build.gradle b/testutil/build.gradle index 193569c72c1..931730c2622 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 'org.apache.tuweni:tuweni-bytes' - implementation 'org.apache.tuweni:tuweni-io' - implementation 'org.apache.tuweni:tuweni-toml' + implementation 'io.tmio:tuweni-bytes' + implementation 'io.tmio:tuweni-io' + implementation 'io.tmio:tuweni-toml' implementation 'org.assertj:assertj-core' implementation 'org.mockito:mockito-core' implementation 'org.web3j:core' From 5b939a4886a0b361296f7f846a1f5f668286486e Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Mon, 29 May 2023 14:06:03 -0700 Subject: [PATCH 02/14] changelog Signed-off-by: Antoine Toulme --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc11f9f18f9..68b8cbb5d1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Allow Ethstats connection url to specify ws:// or wss:// scheme. [#5494](https://github.com/hyperledger/besu/issues/5494) - Add support for Shanghai changes to the GraphQL service [#5496](https://github.com/hyperledger/besu/pull/5496) - Unite the tx-pool CLI options under the same Tx Pool Options group in UX. [#5466](https://github.com/hyperledger/besu/issues/5466) +- Update to Tuweni 2.4.0. [#5513](https://github.com/hyperledger/besu/pull/5513) ### Bug Fixes From 4106ffa776af8535cd9f7668f81a048c5189c95e Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Mon, 29 May 2023 14:09:28 -0700 Subject: [PATCH 03/14] fix bad replace Signed-off-by: Antoine Toulme --- acceptance-tests/tests/build.gradle | 2 +- besu/build.gradle | 4 ++-- ethereum/core/build.gradle | 6 +++--- ethereum/referencetests/build.gradle | 4 ++-- ethereum/trie/build.gradle | 2 +- ethereum/verkletrie/build.gradle | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/acceptance-tests/tests/build.gradle b/acceptance-tests/tests/build.gradle index ace6d1bbb8a..cc4a54b009b 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 'io.tmio: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 dabc199f4dd..73977d81ba7 100644 --- a/besu/build.gradle +++ b/besu/build.gradle @@ -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 'io.tmio:tuweni-bytes' + testImplementation 'io.tmio:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.awaitility:awaitility' testImplementation 'org.junit.jupiter:junit-jupiter' diff --git a/ethereum/core/build.gradle b/ethereum/core/build.gradle index 514309d5ba1..a03dafd7d9e 100644 --- a/ethereum/core/build.gradle +++ b/ethereum/core/build.gradle @@ -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 'io.tmio:tuweni-bytes' + testImplementation 'io.tmio:tuweni-io' + testImplementation 'io.tmio:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter-params' diff --git a/ethereum/referencetests/build.gradle b/ethereum/referencetests/build.gradle index 121e9e8969b..1aa1e2a2651 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 'io.tmio:tuweni-bytes' + referenceTestImplementation 'io.tmio: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/trie/build.gradle b/ethereum/trie/build.gradle index 1704e07f428..6f1b78cb90a 100644 --- a/ethereum/trie/build.gradle +++ b/ethereum/trie/build.gradle @@ -46,7 +46,7 @@ dependencies { testImplementation 'com.fasterxml.jackson.core:jackson-databind' testImplementation 'junit:junit' - testimplementation 'io.tmio:tuweni-units' + testImplementation 'io.tmio: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 c491da61261..df0ba0e5119 100644 --- a/ethereum/verkletrie/build.gradle +++ b/ethereum/verkletrie/build.gradle @@ -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 'io.tmio:tuweni-units' testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.mockito:mockito-core' From 055bfef1dbe416649c8b637b5ff67cce34002d64 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Tue, 30 May 2023 18:13:14 -0700 Subject: [PATCH 04/14] update verification metadata Signed-off-by: Antoine Toulme --- gradle/verification-metadata.xml | 196 +++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 951ad1c9577..e82308b0fb2 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -467,6 +467,17 @@ + + + + + + + + + + + @@ -518,6 +529,14 @@ + + + + + + + + @@ -808,6 +827,9 @@ + + + @@ -2549,6 +2571,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2604,6 +2714,11 @@ + + + + + @@ -2630,6 +2745,14 @@ + + + + + + + + @@ -2638,11 +2761,24 @@ + + + + + + + + + + + + + @@ -3386,6 +3522,11 @@ + + + + + @@ -3410,6 +3551,11 @@ + + + + + @@ -3450,6 +3596,11 @@ + + + + + @@ -3466,6 +3617,11 @@ + + + + + @@ -4492,6 +4648,14 @@ + + + + + + + + @@ -4529,11 +4693,24 @@ + + + + + + + + + + + + + @@ -4542,6 +4719,14 @@ + + + + + + + + @@ -4553,6 +4738,17 @@ + + + + + + + + + + + From 8afdee84c615389a434b85298f325133f3793526 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Tue, 30 May 2023 21:06:19 -0700 Subject: [PATCH 05/14] update to 2.4.1 Signed-off-by: Antoine Toulme --- gradle/verification-metadata.xml | 173 +++++++++++++++++++++---------- gradle/versions.gradle | 2 +- 2 files changed, 119 insertions(+), 56 deletions(-) diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index e82308b0fb2..8643d1b5d95 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -2571,92 +2571,124 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3490,6 +3522,14 @@ + + + + + + + + @@ -3523,6 +3563,9 @@ + + + @@ -3552,6 +3595,9 @@ + + + @@ -3597,6 +3643,9 @@ + + + @@ -3618,6 +3667,9 @@ + + + @@ -4760,6 +4812,17 @@ + + + + + + + + + + + diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 88f007c4c17..8c74be1bdc3 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -133,7 +133,7 @@ dependencyManagement { entry 'log4j-slf4j2-impl' } - dependencySet(group: 'io.tmio', version: '2.4.0') { + dependencySet(group: 'io.tmio', version: '2.4.1') { entry 'tuweni-bytes' entry 'tuweni-config' entry 'tuweni-concurrent' From eb6413345b0945663247a5de90965cfd7a53ce0b Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Tue, 30 May 2023 21:06:42 -0700 Subject: [PATCH 06/14] update use of DNS daemon with Vertx Signed-off-by: Antoine Toulme --- .../besu/ethereum/p2p/network/DefaultP2PNetwork.java | 12 +++++++++--- .../src/reference-test/external-resources | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) 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 427093cb599..ec65934b297 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,6 +145,7 @@ 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; /** @@ -163,6 +164,7 @@ 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, @@ -173,7 +175,8 @@ public class DefaultP2PNetwork implements P2PNetwork { final PeerPermissions peerPermissions, final NatService natService, final MaintainedPeers maintainedPeers, - final PeerDenylistManager reputationManager) { + final PeerDenylistManager reputationManager, + final Vertx vertx) { this.localNode = localNode; this.peerDiscoveryAgent = peerDiscoveryAgent; this.rlpxAgent = rlpxAgent; @@ -183,6 +186,7 @@ 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(); @@ -229,7 +233,8 @@ public void start() { createDaemonListener(), 0L, 600000L, - config.getDnsDiscoveryServerOverride().orElse(null)); + config.getDnsDiscoveryServerOverride().orElse(null), + vertx); dnsDaemon.start(); }); @@ -535,7 +540,8 @@ private P2PNetwork doBuild() { peerPermissions, natService, maintainedPeers, - reputationManager); + reputationManager, + vertx); } private void validate() { diff --git a/ethereum/referencetests/src/reference-test/external-resources b/ethereum/referencetests/src/reference-test/external-resources index 638da7ca7b2..04f338a6e67 160000 --- a/ethereum/referencetests/src/reference-test/external-resources +++ b/ethereum/referencetests/src/reference-test/external-resources @@ -1 +1 @@ -Subproject commit 638da7ca7b2ca371ebb33d7d7d2562981aafd9b2 +Subproject commit 04f338a6e673a6b4d906ec9d6d2bc939309357a5 From 92f88046cced1931e0f032807e32a91d8fe34033 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Tue, 30 May 2023 23:52:20 -0700 Subject: [PATCH 07/14] fix issue with Bytes.repeat Signed-off-by: Antoine Toulme --- .../hyperledger/besu/ethereum/core/TransactionTestFixture.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 d766abf1017..60d03fcec0b 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 @@ -14,6 +14,7 @@ */ package org.hyperledger.besu.ethereum.core; +import com.google.common.base.Strings; import org.hyperledger.besu.crypto.KeyPair; import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Hash; @@ -32,7 +33,7 @@ public class TransactionTestFixture { private static final Hash DEFAULT_VERSIONED_HASH = Hash.wrap( Bytes32.wrap( - Bytes.concatenate(Bytes.fromHexString("0x01"), Bytes.repeat((byte) 42, 31)))); + Bytes.concatenate(Bytes.fromHexString("0x01"), Bytes.fromHexString("2a".repeat(31))))); private TransactionType transactionType = TransactionType.FRONTIER; From b14f7360700fdb2646cbe957521c16d9777c14d3 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Wed, 31 May 2023 00:00:22 -0700 Subject: [PATCH 08/14] spotless Signed-off-by: Antoine Toulme --- .../besu/ethereum/core/TransactionTestFixture.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 60d03fcec0b..79307d2ebdc 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 @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.ethereum.core; -import com.google.common.base.Strings; import org.hyperledger.besu.crypto.KeyPair; import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Hash; @@ -33,7 +32,8 @@ 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.fromHexString("2a".repeat(31))))); private TransactionType transactionType = TransactionType.FRONTIER; From 534cfbd7f549f4b5f9072d54c7cd716abd502781 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Thu, 1 Jun 2023 22:04:32 -0700 Subject: [PATCH 09/14] fix an issue with Bytes.repeat Signed-off-by: Antoine Toulme --- .../besu/ethereum/core/encoding/WithdrawalEncoderTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3c80cd78712..5812a936110 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 @@ -30,7 +30,7 @@ class WithdrawalEncoderTest { public static final String WITHDRAWAL_MAX_VALUE = "0xf088ffffffffffffffff88ffffffffffffffff94ffffffffffffffffffffffffffffffffffffffff88ffffffffffffffff"; public static final Address MAX_ADDRESS = - Address.fromHexString(Bytes.repeat((byte) 0xff, 20).toHexString()); + Address.fromHexString("ff".repeat(20)); @Test void shouldEncodeWithdrawalForZeroCase() { From aff4ad6491a1c92f4652f0ed844684619d0601c0 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Thu, 1 Jun 2023 22:09:07 -0700 Subject: [PATCH 10/14] spotless Signed-off-by: Antoine Toulme --- .../besu/ethereum/core/encoding/WithdrawalEncoderTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 5812a936110..7dd79e229a0 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,8 +29,7 @@ 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("ff".repeat(20)); @Test void shouldEncodeWithdrawalForZeroCase() { From 2b59945c67779dce6d751ad1aacee3001d92e5dc Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Fri, 2 Jun 2023 00:37:24 -0700 Subject: [PATCH 11/14] update antlr version Signed-off-by: Antoine Toulme --- gradle/verification-metadata.xml | 21 +++++++++++++++++++++ gradle/versions.gradle | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 8643d1b5d95..60cd327f988 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -3148,6 +3148,14 @@ + + + + + + + + @@ -3158,6 +3166,11 @@ + + + + + @@ -3174,6 +3187,14 @@ + + + + + + + + diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 8c74be1bdc3..fbbfd880381 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -16,7 +16,7 @@ dependencyManagement { dependencies { - dependencySet(group: 'org.antlr', version: '4.10.1') { + dependencySet(group: 'org.antlr', version: '4.11.1') { entry 'antlr4' entry 'antlr4-runtime' } From f3ad7e21c9c06c525f3f1934b9e0a2a51cfb6c06 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Sat, 3 Jun 2023 13:51:52 -0700 Subject: [PATCH 12/14] fix one more occurrence of Bytes.repeat Signed-off-by: Antoine Toulme --- .../eth/transactions/layered/BaseTransactionPoolTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 defafb1b369..b594d7a258b 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.repeat((byte) 1, payloadSize); + var payloadBytes = Bytes.fromHexString("01".repeat(payloadSize)); tx.payload(payloadBytes); } if (type.supports1559FeeMarket()) { From 65f8f3d8436b528aa1f0ff9db2730df446fb574e Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Sat, 3 Jun 2023 14:24:08 -0700 Subject: [PATCH 13/14] fix dns tests Signed-off-by: Antoine Toulme --- .../ethereum/p2p/network/DefaultP2PNetworkTest.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 ffc1c84431b..ef8170f9849 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 @@ -26,6 +26,8 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import io.vertx.core.Vertx; +import io.vertx.core.dns.DnsClient; import org.hyperledger.besu.cryptoservices.NodeKey; import org.hyperledger.besu.cryptoservices.NodeKeyUtils; import org.hyperledger.besu.ethereum.core.InMemoryKeyValueStorageProvider; @@ -348,8 +350,11 @@ 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().config(dnsConfig).build(); + final DefaultP2PNetwork testClass = (DefaultP2PNetwork) builder().vertx(vertx).config(dnsConfig).build(); testClass.start(); assertThat(testClass.getDnsDaemon()).isPresent(); @@ -366,7 +371,10 @@ public void shouldUseDnsServerOverrideIfPresent() { doReturn(disco).when(dnsConfig).getDiscovery(); doReturn(Optional.of("localhost")).when(dnsConfig).getDnsDiscoveryServerOverride(); - final DefaultP2PNetwork testClass = (DefaultP2PNetwork) builder().config(dnsConfig).build(); + Vertx vertx = mock(Vertx.class); + when(vertx.createDnsClient(any())).thenReturn(mock(DnsClient.class)); + + final DefaultP2PNetwork testClass = (DefaultP2PNetwork) builder().config(dnsConfig).vertx(vertx).build(); testClass.start(); // ensure we used the dns server override config when building DNSDaemon: From d1c4fcd0b36072fc93bacb562062213976bc1f75 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Sat, 3 Jun 2023 15:14:34 -0700 Subject: [PATCH 14/14] spotless Signed-off-by: Antoine Toulme --- .../ethereum/p2p/network/DefaultP2PNetworkTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 ef8170f9849..5b61d4946a4 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 @@ -26,8 +26,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import io.vertx.core.Vertx; -import io.vertx.core.dns.DnsClient; import org.hyperledger.besu.cryptoservices.NodeKey; import org.hyperledger.besu.cryptoservices.NodeKeyUtils; import org.hyperledger.besu.ethereum.core.InMemoryKeyValueStorageProvider; @@ -60,6 +58,8 @@ 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; @@ -354,7 +354,8 @@ public void shouldStartDnsDiscoveryWhenDnsURLIsConfigured() { 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().vertx(vertx).config(dnsConfig).build(); testClass.start(); assertThat(testClass.getDnsDaemon()).isPresent(); @@ -374,7 +375,8 @@ public void shouldUseDnsServerOverrideIfPresent() { 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).vertx(vertx).build(); testClass.start(); // ensure we used the dns server override config when building DNSDaemon: