diff --git a/acceptance-tests/build.gradle b/acceptance-tests/build.gradle index f732ec2b4fa..79b3c6f52c0 100644 --- a/acceptance-tests/build.gradle +++ b/acceptance-tests/build.gradle @@ -1,4 +1,6 @@ dependencies { + testImplementation 'io.tmio:tuweni-units' + acceptanceTestImplementation project(":infrastructure:bls") acceptanceTestImplementation project(':infrastructure:time') acceptanceTestImplementation project(':data:serializer') diff --git a/build.gradle b/build.gradle index 7f04f2a384d..e06251b765f 100644 --- a/build.gradle +++ b/build.gradle @@ -984,7 +984,6 @@ subprojects { runtimeOnly 'org.apache.logging.log4j:log4j-core' runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl' - testImplementation 'io.tmio:tuweni-junit' testImplementation 'org.assertj:assertj-core' testImplementation 'org.mockito:mockito-core' testImplementation 'org.junit.jupiter:junit-jupiter-api' diff --git a/eth-reference-tests/build.gradle b/eth-reference-tests/build.gradle index 91cb2a10c90..6ebc8cf2cba 100644 --- a/eth-reference-tests/build.gradle +++ b/eth-reference-tests/build.gradle @@ -25,7 +25,6 @@ dependencies { referenceTestImplementation 'com.fasterxml.jackson.core:jackson-databind' referenceTestImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' referenceTestImplementation 'io.tmio:tuweni-bytes' - referenceTestImplementation 'io.tmio:tuweni-junit' referenceTestImplementation 'io.tmio:tuweni-ssz' referenceTestImplementation 'org.xerial.snappy:snappy-java' } diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/interop/MockStartDepositGeneratorTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/interop/MockStartDepositGeneratorTest.java index 44d11829600..1554b3f0ca9 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/interop/MockStartDepositGeneratorTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/interop/MockStartDepositGeneratorTest.java @@ -16,12 +16,10 @@ import static java.util.stream.Collectors.toList; import static org.junit.jupiter.api.Assertions.assertEquals; -import java.security.Security; import java.util.Arrays; import java.util.List; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.Test; import tech.pegasys.teku.bls.BLSKeyPair; import tech.pegasys.teku.bls.BLSSecretKey; @@ -60,10 +58,6 @@ class MockStartDepositGeneratorTest { private final Spec spec = TestSpecFactory.createDefault(); private final MockStartDepositGenerator generator = new MockStartDepositGenerator(spec); - static { - Security.addProvider(new BouncyCastleProvider()); - } - @Test public void shouldGenerateDepositData() { final List keyPairs = diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/operations/DepositTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/operations/DepositTest.java index 5769bfb7860..fe8b1c9fd2d 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/operations/DepositTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/operations/DepositTest.java @@ -24,15 +24,12 @@ import java.util.Objects; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; -import org.apache.tuweni.junit.BouncyCastleExtension; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import tech.pegasys.teku.infrastructure.ssz.SszTestUtils; import tech.pegasys.teku.infrastructure.ssz.collections.SszBytes32Vector; import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.util.DataStructureUtil; -@ExtendWith(BouncyCastleExtension.class) class DepositTest { private final DataStructureUtil dataStructureUtil = new DataStructureUtil(TestSpecFactory.createDefault()); diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/HistoricalBatchTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/HistoricalBatchTest.java index 3ca75e9921b..4bb6aeaf0a3 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/HistoricalBatchTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/HistoricalBatchTest.java @@ -18,9 +18,7 @@ import it.unimi.dsi.fastutil.ints.IntList; import java.util.stream.IntStream; import org.apache.tuweni.bytes.Bytes; -import org.apache.tuweni.junit.BouncyCastleExtension; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import tech.pegasys.teku.infrastructure.ssz.SszTestUtils; import tech.pegasys.teku.infrastructure.ssz.collections.SszMutableBytes32Vector; import tech.pegasys.teku.spec.Spec; @@ -28,7 +26,6 @@ import tech.pegasys.teku.spec.datastructures.state.HistoricalBatch.HistoricalBatchSchema; import tech.pegasys.teku.spec.util.DataStructureUtil; -@ExtendWith(BouncyCastleExtension.class) public class HistoricalBatchTest { private static final Spec SPEC = TestSpecFactory.createMainnetPhase0(); diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/AbstractBeaconStateSchemaTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/AbstractBeaconStateSchemaTest.java index 015ac23ba02..353f9bc3ea1 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/AbstractBeaconStateSchemaTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/AbstractBeaconStateSchemaTest.java @@ -23,9 +23,7 @@ import it.unimi.dsi.fastutil.ints.IntList; import java.util.List; import org.apache.tuweni.bytes.Bytes; -import org.apache.tuweni.junit.BouncyCastleExtension; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import tech.pegasys.teku.infrastructure.ssz.SszTestUtils; import tech.pegasys.teku.infrastructure.ssz.schema.SszPrimitiveSchemas; import tech.pegasys.teku.infrastructure.ssz.schema.SszVectorSchema; @@ -40,7 +38,6 @@ import tech.pegasys.teku.spec.datastructures.state.beaconstate.MutableBeaconState; import tech.pegasys.teku.spec.util.DataStructureUtil; -@ExtendWith(BouncyCastleExtension.class) public abstract class AbstractBeaconStateSchemaTest< T extends BeaconState, TMutable extends MutableBeaconState> { diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/AbstractBeaconStateTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/AbstractBeaconStateTest.java index 18421bada2e..3da8c63fd16 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/AbstractBeaconStateTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/AbstractBeaconStateTest.java @@ -15,9 +15,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.apache.tuweni.junit.BouncyCastleExtension; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.config.SpecConfig; @@ -27,7 +25,6 @@ import tech.pegasys.teku.spec.schemas.registry.SchemaRegistry; import tech.pegasys.teku.spec.util.DataStructureUtil; -@ExtendWith(BouncyCastleExtension.class) public abstract class AbstractBeaconStateTest< T extends BeaconState, TMutable extends MutableBeaconState> { diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/logic/common/block/BlockProcessorTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/logic/common/block/BlockProcessorTest.java index 4b146409389..96ecf5a5f68 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/logic/common/block/BlockProcessorTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/logic/common/block/BlockProcessorTest.java @@ -21,9 +21,7 @@ import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.bytes.Bytes48; -import org.apache.tuweni.junit.BouncyCastleExtension; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import tech.pegasys.teku.bls.BLSPublicKey; import tech.pegasys.teku.bls.BLSSignature; import tech.pegasys.teku.infrastructure.ssz.SszList; @@ -45,7 +43,6 @@ import tech.pegasys.teku.spec.logic.common.statetransition.exceptions.BlockProcessingException; import tech.pegasys.teku.spec.util.DataStructureUtil; -@ExtendWith(BouncyCastleExtension.class) public abstract class BlockProcessorTest { protected final Spec spec = createSpec(); protected final DataStructureUtil dataStructureUtil = new DataStructureUtil(spec); diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/logic/common/util/BeaconStateUtilTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/logic/common/util/BeaconStateUtilTest.java index 93876a268f4..cff95833239 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/logic/common/util/BeaconStateUtilTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/logic/common/util/BeaconStateUtilTest.java @@ -17,9 +17,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static tech.pegasys.teku.spec.config.SpecConfig.GENESIS_SLOT; -import org.apache.tuweni.junit.BouncyCastleExtension; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecVersion; @@ -31,7 +29,6 @@ import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; import tech.pegasys.teku.spec.util.DataStructureUtil; -@ExtendWith(BouncyCastleExtension.class) public class BeaconStateUtilTest { private final Spec spec = TestSpecFactory.createMinimalPhase0(); private final DataStructureUtil dataStructureUtil = new DataStructureUtil(spec); diff --git a/fork-choice-tests/build.gradle b/fork-choice-tests/build.gradle index 0225812d304..403ffbe49a5 100644 --- a/fork-choice-tests/build.gradle +++ b/fork-choice-tests/build.gradle @@ -19,5 +19,4 @@ dependencies { integrationTestImplementation 'com.fasterxml.jackson.core:jackson-databind' integrationTestImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' integrationTestImplementation 'io.tmio:tuweni-bytes' - integrationTestImplementation 'io.tmio:tuweni-junit' } diff --git a/fuzz/src/test/java/tech/pegasys/teku/fuzz/FuzzUtilTest.java b/fuzz/src/test/java/tech/pegasys/teku/fuzz/FuzzUtilTest.java index 3e69f57fc11..4355d4c3002 100644 --- a/fuzz/src/test/java/tech/pegasys/teku/fuzz/FuzzUtilTest.java +++ b/fuzz/src/test/java/tech/pegasys/teku/fuzz/FuzzUtilTest.java @@ -22,9 +22,7 @@ import java.util.List; import java.util.Optional; import org.apache.tuweni.bytes.Bytes; -import org.apache.tuweni.junit.BouncyCastleExtension; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.xerial.snappy.Snappy; import tech.pegasys.teku.fuzz.input.AttestationFuzzInput; import tech.pegasys.teku.fuzz.input.AttesterSlashingFuzzInput; @@ -69,7 +67,6 @@ import tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.electra.BeaconStateSchemaElectra; import tech.pegasys.teku.spec.schemas.SchemaDefinitionsElectra; -@ExtendWith(BouncyCastleExtension.class) class FuzzUtilTest { private final Spec spec = TestSpecFactory.createMinimalElectra(); diff --git a/gradle/versions.gradle b/gradle/versions.gradle index c4cfaa95c82..6fa62a2d5f6 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -79,7 +79,6 @@ dependencyManagement { dependencySet(group: 'io.tmio', version: '2.4.2') { entry 'tuweni-bytes' entry 'tuweni-crypto' - entry 'tuweni-junit' entry 'tuweni-ssz' entry 'tuweni-units' } diff --git a/teku/src/main/java/tech/pegasys/teku/Teku.java b/teku/src/main/java/tech/pegasys/teku/Teku.java index cf4cecff13c..0382fabba3e 100644 --- a/teku/src/main/java/tech/pegasys/teku/Teku.java +++ b/teku/src/main/java/tech/pegasys/teku/Teku.java @@ -15,10 +15,8 @@ import java.io.PrintWriter; import java.nio.charset.Charset; -import java.security.Security; import java.util.Optional; import java.util.concurrent.atomic.AtomicReference; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import tech.pegasys.teku.bls.impl.blst.BlstLoader; import tech.pegasys.teku.cli.BeaconNodeCommand; import tech.pegasys.teku.cli.BeaconNodeCommand.StartAction; @@ -31,7 +29,6 @@ public final class Teku { static { // Disable libsodium in tuweni Hash because the check for it's presence can be very slow. System.setProperty("org.apache.tuweni.crypto.useSodium", "false"); - Security.addProvider(new BouncyCastleProvider()); } public static void main(final String[] args) {