From e2e9f1ab5e97386f87c6dc303ce8b50ca7c4d2f2 Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Tue, 19 Nov 2024 09:19:48 +0100 Subject: [PATCH 01/19] Refactoring to use test watcher for unit tests as well. --- arithmetization/build.gradle | 1 + .../linea/UnitTestOutcomeWriter.java | 17 +++ .../net/consensys/linea/UnitTestWatcher.java | 37 ++++++ .../linea/zktracer/ZkTracerTest.java | 4 + ....platform.launcher.LauncherSessionListener | 1 + reference-tests/build.gradle | 2 +- .../linea/BlockchainReferenceTestJson.java | 6 +- .../ReferenceTestOutcomeRecorderTool.java | 107 ++--------------- .../linea/ReferenceTestOutcomeWriter.java | 3 +- .../linea/BlockchainReferenceTestTools.java | 18 ++- .../ReferenceTestOutcomeRecorderToolTest.java | 13 ++- .../consensys/linea/ReferenceTestWatcher.java | 2 +- testing/build.gradle | 1 + .../linea/reporting/TestOutcome.java | 10 +- .../reporting/TestOutcomeWriterTool.java | 109 ++++++++++++++++++ .../consensys/linea/reporting}/TestState.java | 2 +- 16 files changed, 217 insertions(+), 116 deletions(-) create mode 100644 arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java create mode 100644 arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java create mode 100644 arithmetization/src/test/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener rename reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestOutcome.java => testing/src/main/java/net/consensys/linea/reporting/TestOutcome.java (95%) create mode 100644 testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java rename {reference-tests/src/main/java/net/consensys/linea => testing/src/main/java/net/consensys/linea/reporting}/TestState.java (94%) diff --git a/arithmetization/build.gradle b/arithmetization/build.gradle index fa063329c8..980f759d41 100644 --- a/arithmetization/build.gradle +++ b/arithmetization/build.gradle @@ -71,6 +71,7 @@ dependencies { testImplementation "${besuArtifactGroup}.internal:rlp" testImplementation "${besuArtifactGroup}.internal:core" testImplementation "${besuArtifactGroup}.internal:referencetests" + testImplementation 'org.junit.platform:junit-platform-launcher' } configurations { diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java new file mode 100644 index 0000000000..152057a897 --- /dev/null +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java @@ -0,0 +1,17 @@ +package net.consensys.linea; + +import org.junit.platform.launcher.LauncherSession; +import org.junit.platform.launcher.LauncherSessionListener; + +import static net.consensys.linea.reporting.TestOutcomeWriterTool.writeToJsonFile; + +public class UnitTestOutcomeWriter implements LauncherSessionListener { + + public static final String FILE_NAME = "UnitTestsResults.json"; + + @Override + public void launcherSessionClosed(LauncherSession session) { + writeToJsonFile(FILE_NAME); + } + +} diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java new file mode 100644 index 0000000000..b162fc0044 --- /dev/null +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java @@ -0,0 +1,37 @@ +package net.consensys.linea; + +import lombok.extern.slf4j.Slf4j; +import net.consensys.linea.reporting.TestOutcomeWriterTool; +import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.api.extension.TestWatcher; + +import java.util.Optional; + +@Slf4j +public class UnitTestWatcher implements TestWatcher { + + private String FAILED = "FAILED"; + + @Override + public void testFailed(ExtensionContext context, Throwable cause) { + String testName = context.getDisplayName().split(": ")[1]; + log.info("Adding failure for {}", testName); + TestOutcomeWriterTool.addFailure(FAILED, cause.getMessage(), testName); + log.info("Failure added for {}", testName); + } + + @Override + public void testSuccessful(ExtensionContext context) { + TestOutcomeWriterTool.addSuccess(); + } + + @Override + public void testDisabled(ExtensionContext context, Optional reason) { + TestOutcomeWriterTool.addSkipped(); + } + + @Override + public void testAborted(ExtensionContext context, Throwable cause) { + TestOutcomeWriterTool.addAborted(); + } +} \ No newline at end of file diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java index 1ac111f012..c8ed33fb72 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java @@ -17,8 +17,12 @@ import static org.assertj.core.api.Assertions.assertThat; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UnitTestWatcher.class) public class ZkTracerTest { @Test diff --git a/arithmetization/src/test/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener b/arithmetization/src/test/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener new file mode 100644 index 0000000000..9e52c537e4 --- /dev/null +++ b/arithmetization/src/test/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener @@ -0,0 +1 @@ +net.consensys.linea.UnitTestOutcomeWriter \ No newline at end of file diff --git a/reference-tests/build.gradle b/reference-tests/build.gradle index 6b7722ce4f..715878b6a7 100644 --- a/reference-tests/build.gradle +++ b/reference-tests/build.gradle @@ -123,6 +123,6 @@ dependencies { implementation project(":arithmetization") implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' - testImplementation project(path: ':testing') + implementation project(path: ':testing') implementation 'org.junit.platform:junit-platform-launcher' } diff --git a/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestJson.java b/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestJson.java index d362acc6be..ff9fc067b8 100644 --- a/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestJson.java +++ b/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestJson.java @@ -14,8 +14,6 @@ */ package net.consensys.linea; -import static net.consensys.linea.ReferenceTestOutcomeRecorderTool.setFileDirectory; - import java.io.IOException; import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; @@ -26,12 +24,14 @@ import lombok.Synchronized; import lombok.extern.slf4j.Slf4j; +import static net.consensys.linea.reporting.TestOutcomeWriterTool.getFileDirectory; + @Slf4j public class BlockchainReferenceTestJson { @Synchronized public static CompletableFuture readBlockchainReferenceTestsOutput(String fileName) { - String fileDirectory = setFileDirectory(); + String fileDirectory = getFileDirectory(); return CompletableFuture.supplyAsync( () -> { Path directoryPath = Paths.get(fileDirectory); diff --git a/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeRecorderTool.java b/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeRecorderTool.java index 7c7fcfa770..61a7b4959c 100644 --- a/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeRecorderTool.java +++ b/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeRecorderTool.java @@ -14,24 +14,16 @@ */ package net.consensys.linea; -import java.io.FileWriter; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.*; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.ConcurrentSkipListSet; -import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.fasterxml.jackson.databind.ObjectMapper; -import lombok.Synchronized; import lombok.extern.slf4j.Slf4j; -import net.consensys.linea.zktracer.json.JsonConverter; +import net.consensys.linea.reporting.TestOutcomeWriterTool; +import net.consensys.linea.reporting.TestState; + +import static net.consensys.linea.reporting.TestOutcomeWriterTool.addFailure; @Slf4j public class ReferenceTestOutcomeRecorderTool { @@ -42,53 +34,25 @@ public class ReferenceTestOutcomeRecorderTool { public static final String JSON_OUTPUT_FILENAME = System.getenv() .getOrDefault("REFERENCE_TEST_OUTCOME_OUTPUT_FILE", "failedReferenceTests.json"); - public static JsonConverter jsonConverter = JsonConverter.builder().build(); - private static volatile AtomicInteger failedCounter = new AtomicInteger(0); - private static volatile AtomicInteger successCounter = new AtomicInteger(0); - private static volatile AtomicInteger disabledCounter = new AtomicInteger(0); - private static volatile AtomicInteger abortedCounter = new AtomicInteger(0); - private static volatile ConcurrentMap< - String, ConcurrentMap>> - modulesToConstraintsToTests = new ConcurrentHashMap<>(); public static void mapAndStoreTestResult( - String testName, TestState success, Map> failedConstraints) { + String testName, TestState success, Map> failedConstraints) { switch (success) { case FAILED -> { - failedCounter.incrementAndGet(); + TestOutcomeWriterTool.addFailed(); for (Map.Entry> failedConstraint : failedConstraints.entrySet()) { String moduleName = failedConstraint.getKey(); for (String constraint : failedConstraint.getValue()) { - ConcurrentMap> constraintsToTests = - modulesToConstraintsToTests.computeIfAbsent( - moduleName, m -> new ConcurrentHashMap<>()); - ConcurrentSkipListSet failingTests = - constraintsToTests.computeIfAbsent(constraint, m -> new ConcurrentSkipListSet<>()); - int size = failingTests.size(); - failingTests.add(testName); - if (failingTests.size() == size) { - log.warn("Duplicate name found... {}", failedConstraint); - } + addFailure(moduleName, constraint, testName); } } } - case SUCCESS -> successCounter.incrementAndGet(); - case ABORTED -> abortedCounter.incrementAndGet(); - case DISABLED -> disabledCounter.incrementAndGet(); + case SUCCESS -> TestOutcomeWriterTool.addSuccess(); + case ABORTED -> TestOutcomeWriterTool.addAborted(); + case DISABLED -> TestOutcomeWriterTool.addSkipped(); } } - @Synchronized - public static BlockchainReferenceTestOutcome parseBlockchainReferenceTestOutcome( - String jsonString) { - if (!jsonString.isEmpty()) { - BlockchainReferenceTestOutcome blockchainReferenceTestOutcome = - jsonConverter.fromJson(jsonString, BlockchainReferenceTestOutcome.class); - return blockchainReferenceTestOutcome; - } - throw new RuntimeException("invalid JSON"); - } - public static Map> extractConstraints(String message) { Map> pairs = new HashMap<>(); String cleaned = message.replaceAll(("\\[[0-9]+m"), " ").replace(']', ' ').trim(); @@ -174,57 +138,6 @@ private static void getPairFromString(String constraint, Map pairs.computeIfAbsent(pair[0].trim(), p -> new HashSet<>()).add(pair[1].trim()); } - @Synchronized - public static void writeToJsonFile() { - try { - String directory = setFileDirectory(); - log.info("Reference test will be written to file {} \\ {}", directory, JSON_OUTPUT_FILENAME); - writeToJsonFileInternal(JSON_OUTPUT_FILENAME).get(); - log.info("Reference test results written to file {}", JSON_OUTPUT_FILENAME); - log.info( - "Path exists: {}, file exist: {}", - Paths.get(directory).toFile().exists(), - Paths.get(directory).resolve(JSON_OUTPUT_FILENAME).toFile().exists()); - } catch (Exception e) { - log.error("Error while writing results"); - throw new RuntimeException("Error while writing results", e); - } - } - static ObjectMapper objectMapper = new ObjectMapper(); - @Synchronized - private static CompletableFuture writeToJsonFileInternal(String name) { - String fileDirectory = setFileDirectory(); - log.info("writing results summary to {}", fileDirectory + "/" + name); - try { - Files.createDirectories(Path.of(fileDirectory)); - } catch (IOException e) { - log.error("Error - Failed to create test directory output: %s".formatted(e.getMessage())); - throw new RuntimeException(e); - } - return CompletableFuture.runAsync( - () -> { - try (FileWriter file = new FileWriter(Path.of(fileDirectory, name).toString())) { - objectMapper.writeValue( - file, - new BlockchainReferenceTestOutcome( - failedCounter.get(), - successCounter.get(), - disabledCounter.get(), - abortedCounter.get(), - modulesToConstraintsToTests)); - } catch (Exception e) { - log.error("Error - Failed to write test output: %s".formatted(e.getMessage())); - } - }); - } - - static String setFileDirectory() { - String jsonDirectory = System.getenv("FAILED_TEST_JSON_DIRECTORY"); - if (jsonDirectory == null || jsonDirectory.isEmpty()) { - return "../tmp/local/"; - } - return jsonDirectory; - } } diff --git a/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeWriter.java b/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeWriter.java index f745a6a827..84b4d9ca3c 100644 --- a/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeWriter.java +++ b/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeWriter.java @@ -17,6 +17,7 @@ import static net.consensys.linea.ReferenceTestOutcomeRecorderTool.*; import lombok.extern.slf4j.Slf4j; +import net.consensys.linea.reporting.TestOutcomeWriterTool; import org.junit.platform.launcher.LauncherSession; import org.junit.platform.launcher.LauncherSessionListener; @@ -25,6 +26,6 @@ public class ReferenceTestOutcomeWriter implements LauncherSessionListener { @Override public void launcherSessionClosed(LauncherSession session) { - writeToJsonFile(); + TestOutcomeWriterTool.writeToJsonFile(JSON_OUTPUT_FILENAME); } } diff --git a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java index 366009470d..5111ef5c6d 100644 --- a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java +++ b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java @@ -36,6 +36,8 @@ import lombok.extern.slf4j.Slf4j; import net.consensys.linea.corset.CorsetValidator; +import net.consensys.linea.reporting.TestOutcome; +import net.consensys.linea.reporting.TestOutcomeWriterTool; import net.consensys.linea.testing.ExecutionEnvironment; import net.consensys.linea.zktracer.ZkTracer; import org.hyperledger.besu.ethereum.MainnetBlockValidator; @@ -86,6 +88,18 @@ public class BlockchainReferenceTestTools { PARAMS.ignore("RevertInCreateInInitCreate2_d0g0v0_London[London]"); PARAMS.ignore("RevertInCreateInInit_d0g0v0_London[London]"); + // Arithmetization restriction: recipient address is a precompile. + PARAMS.ignore("modexpRandomInput_d0g0v0_London[London]"); + PARAMS.ignore("modexpRandomInput_d0g1v0_London[London]"); + PARAMS.ignore("modexpRandomInput_d1g0v0_London[London]"); + PARAMS.ignore("modexpRandomInput_d1g1v0_London[London]"); + PARAMS.ignore("modexpRandomInput_d2g0v0_London[London]"); + PARAMS.ignore("modexpRandomInput_d2g1v0_London[London]"); + PARAMS.ignore("randomStatetest642_d0g0v0_London[London]"); + PARAMS.ignore("randomStatetest644_d0g0v0_London[London]"); + PARAMS.ignore("randomStatetest645_d0g0v0_London[London]"); + PARAMS.ignore("randomStatetest645_d0g0v1_London[London]"); + // Consumes a huge amount of memory. PARAMS.ignore("static_Call1MB1024Calldepth_d1g0v0_\\w+"); PARAMS.ignore("ShanghaiLove_.*"); @@ -121,9 +135,9 @@ public static CompletableFuture> getRecordedFailedTestsFromJson( return CompletableFuture.completedFuture(failedTests); } - CompletableFuture modulesToConstraintsFutures = + CompletableFuture modulesToConstraintsFutures = readBlockchainReferenceTestsOutput(JSON_INPUT_FILENAME) - .thenApply(ReferenceTestOutcomeRecorderTool::parseBlockchainReferenceTestOutcome); + .thenApply(TestOutcomeWriterTool::parseTestOutcome); return modulesToConstraintsFutures.thenApply( blockchainReferenceTestOutcome -> { diff --git a/reference-tests/src/test/java/net/consensys/linea/ReferenceTestOutcomeRecorderToolTest.java b/reference-tests/src/test/java/net/consensys/linea/ReferenceTestOutcomeRecorderToolTest.java index 57a80c13e9..d22a7dbdef 100644 --- a/reference-tests/src/test/java/net/consensys/linea/ReferenceTestOutcomeRecorderToolTest.java +++ b/reference-tests/src/test/java/net/consensys/linea/ReferenceTestOutcomeRecorderToolTest.java @@ -25,6 +25,9 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentSkipListSet; +import net.consensys.linea.reporting.TestOutcome; +import net.consensys.linea.reporting.TestOutcomeWriterTool; +import net.consensys.linea.reporting.TestState; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -52,13 +55,13 @@ void multipleModulesAreStoredCorrectly() { "test1", TestState.FAILED, Map.of("Constraint", Set.of(module1, module2))); ReferenceTestOutcomeRecorderTool.mapAndStoreTestResult( "test2", TestState.FAILED, Map.of("Constraint", Set.of(module1))); - ReferenceTestOutcomeRecorderTool.writeToJsonFile(); + TestOutcomeWriterTool.writeToJsonFile(JSON_OUTPUT_FILENAME_TEST); readBlockchainReferenceTestsOutput(JSON_OUTPUT_FILENAME_TEST) .thenApply( jsonString -> { - BlockchainReferenceTestOutcome blockchainReferenceTestOutcome = - ReferenceTestOutcomeRecorderTool.parseBlockchainReferenceTestOutcome(jsonString); + TestOutcome blockchainReferenceTestOutcome = + TestOutcomeWriterTool.parseTestOutcome(jsonString); ConcurrentMap>> modulesToConstraints = @@ -155,8 +158,8 @@ public void extractConstraints() { @Test void parseBlockchainReferenceTestOutcome() { - BlockchainReferenceTestOutcome outcome = - ReferenceTestOutcomeRecorderTool.parseBlockchainReferenceTestOutcome( + TestOutcome outcome = + TestOutcomeWriterTool.parseTestOutcome( """ { "abortedCounter": 20, diff --git a/reference-tests/src/test/java/net/consensys/linea/ReferenceTestWatcher.java b/reference-tests/src/test/java/net/consensys/linea/ReferenceTestWatcher.java index 31bc358b39..2eb69c5722 100644 --- a/reference-tests/src/test/java/net/consensys/linea/ReferenceTestWatcher.java +++ b/reference-tests/src/test/java/net/consensys/linea/ReferenceTestWatcher.java @@ -14,7 +14,7 @@ */ package net.consensys.linea; -import static net.consensys.linea.TestState.*; +import static net.consensys.linea.reporting.TestState.*; import static net.consensys.linea.testing.ExecutionEnvironment.CORSET_VALIDATION_RESULT; import java.util.HashMap; diff --git a/testing/build.gradle b/testing/build.gradle index e1ef423795..aecee8c3b5 100644 --- a/testing/build.gradle +++ b/testing/build.gradle @@ -30,6 +30,7 @@ dependencies { implementation "${besuArtifactGroup}.internal:algorithms" implementation "${besuArtifactGroup}:plugin-api" + implementation 'org.junit.platform:junit-platform-launcher' implementation 'org.junit.jupiter:junit-jupiter-api' runtimeOnly 'org.junit.jupiter:junit-jupiter-engine' implementation 'org.junit.jupiter:junit-jupiter-params' diff --git a/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestOutcome.java b/testing/src/main/java/net/consensys/linea/reporting/TestOutcome.java similarity index 95% rename from reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestOutcome.java rename to testing/src/main/java/net/consensys/linea/reporting/TestOutcome.java index 9da7c9413f..a607c5fb77 100644 --- a/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestOutcome.java +++ b/testing/src/main/java/net/consensys/linea/reporting/TestOutcome.java @@ -12,10 +12,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -package net.consensys.linea; - -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.ConcurrentSkipListSet; +package net.consensys.linea.reporting; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -24,6 +21,9 @@ import lombok.NoArgsConstructor; import lombok.Setter; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.ConcurrentSkipListSet; + @Getter @Setter @NoArgsConstructor(force = true) @@ -35,7 +35,7 @@ "abortedCounter", "modulesToConstraintsToTests" }) -public class BlockchainReferenceTestOutcome { +public class TestOutcome { @JsonProperty private final int failedCounter; @JsonProperty private final int successCounter; @JsonProperty private final int disabledCounter; diff --git a/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java b/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java new file mode 100644 index 0000000000..828f9ee010 --- /dev/null +++ b/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java @@ -0,0 +1,109 @@ +/* + * Copyright Consensys Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ +package net.consensys.linea.reporting; + + +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import net.consensys.linea.zktracer.json.JsonConverter; +import org.junit.platform.launcher.LauncherSession; + +import java.io.FileWriter; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.ConcurrentSkipListSet; +import java.util.concurrent.atomic.AtomicInteger; + +@Slf4j +public class TestOutcomeWriterTool { + + public static void addFailed() { + failedCounter.incrementAndGet(); + } + + public static JsonConverter jsonConverter = JsonConverter.builder().build(); + static ObjectMapper objectMapper = new ObjectMapper(); + + private static volatile AtomicInteger failedCounter = new AtomicInteger(0); + private static volatile AtomicInteger successCounter = new AtomicInteger(0); + private static volatile AtomicInteger disabledCounter = new AtomicInteger(0); + private static volatile AtomicInteger abortedCounter = new AtomicInteger(0); + private static volatile ConcurrentMap< + String, ConcurrentMap>> + modulesToConstraintsToTests = new ConcurrentHashMap<>(); + + public static void addFailure(String type, String cause, String test) { + modulesToConstraintsToTests.computeIfAbsent(type, t -> new ConcurrentHashMap<>()) + .computeIfAbsent(cause, t -> new ConcurrentSkipListSet<>()).add(test); + } + + public static void addSuccess() { + successCounter.incrementAndGet(); + } + + public static void addAborted() { + abortedCounter.incrementAndGet(); + } + + public static void addSkipped() { + disabledCounter.incrementAndGet(); + } + + public static void writeToJsonFile(String name) { + String fileDirectory = getFileDirectory(); + log.info("writing results summary to {}", fileDirectory + "/" + name); + try { + Files.createDirectories(Path.of(fileDirectory)); + } catch (IOException e) { + log.error("Error - Failed to create test directory output: %s".formatted(e.getMessage())); + throw new RuntimeException(e); + } + try (FileWriter file = new FileWriter(Path.of(fileDirectory, name).toString())) { + objectMapper.writeValue( + file, + new TestOutcome( + failedCounter.get(), + successCounter.get(), + disabledCounter.get(), + abortedCounter.get(), + modulesToConstraintsToTests)); + } catch (Exception e) { + log.error("Error - Failed to write test output: %s".formatted(e.getMessage())); + } + } + + + public static String getFileDirectory() { + String jsonDirectory = System.getenv("FAILED_TEST_JSON_DIRECTORY"); + if (jsonDirectory == null || jsonDirectory.isEmpty()) { + return "../tmp/local/"; + } + return jsonDirectory; + } + + + public static TestOutcome parseTestOutcome( + String jsonString) { + if (!jsonString.isEmpty()) { + TestOutcome blockchainReferenceTestOutcome = + jsonConverter.fromJson(jsonString, TestOutcome.class); + return blockchainReferenceTestOutcome; + } + throw new RuntimeException("invalid JSON"); + } +} diff --git a/reference-tests/src/main/java/net/consensys/linea/TestState.java b/testing/src/main/java/net/consensys/linea/reporting/TestState.java similarity index 94% rename from reference-tests/src/main/java/net/consensys/linea/TestState.java rename to testing/src/main/java/net/consensys/linea/reporting/TestState.java index af39139938..ca01b606d9 100644 --- a/reference-tests/src/main/java/net/consensys/linea/TestState.java +++ b/testing/src/main/java/net/consensys/linea/reporting/TestState.java @@ -12,7 +12,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -package net.consensys.linea; +package net.consensys.linea.reporting; public enum TestState { DISABLED, From 490c6992372e9427ff5d5a69b777148c19a1e667 Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Tue, 19 Nov 2024 09:33:21 +0100 Subject: [PATCH 02/19] add header --- .../net/consensys/linea/UnitTestOutcomeWriter.java | 14 ++++++++++++++ .../java/net/consensys/linea/UnitTestWatcher.java | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java index 152057a897..e476e2c0a3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java @@ -1,3 +1,17 @@ +/* + * Copyright Consensys Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ package net.consensys.linea; import org.junit.platform.launcher.LauncherSession; diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java index b162fc0044..68114624b0 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java @@ -1,3 +1,17 @@ +/* + * Copyright Consensys Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ package net.consensys.linea; import lombok.extern.slf4j.Slf4j; From c31d933c47170cdd0128cfdbf98fbfcb4359d0b9 Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Tue, 19 Nov 2024 09:38:52 +0100 Subject: [PATCH 03/19] spotless apply --- .../linea/UnitTestOutcomeWriter.java | 7 ++-- .../net/consensys/linea/UnitTestWatcher.java | 6 +-- .../linea/zktracer/ZkTracerTest.java | 1 - .../linea/BlockchainReferenceTestJson.java | 4 +- .../ReferenceTestOutcomeRecorderTool.java | 7 ++-- .../linea/reporting/TestOutcome.java | 6 +-- .../reporting/TestOutcomeWriterTool.java | 39 +++++++++---------- 7 files changed, 32 insertions(+), 38 deletions(-) diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java index e476e2c0a3..6b0050d900 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java @@ -14,12 +14,12 @@ */ package net.consensys.linea; +import static net.consensys.linea.reporting.TestOutcomeWriterTool.writeToJsonFile; + import org.junit.platform.launcher.LauncherSession; import org.junit.platform.launcher.LauncherSessionListener; -import static net.consensys.linea.reporting.TestOutcomeWriterTool.writeToJsonFile; - -public class UnitTestOutcomeWriter implements LauncherSessionListener { +public class UnitTestOutcomeWriter implements LauncherSessionListener { public static final String FILE_NAME = "UnitTestsResults.json"; @@ -27,5 +27,4 @@ public class UnitTestOutcomeWriter implements LauncherSessionListener { public void launcherSessionClosed(LauncherSession session) { writeToJsonFile(FILE_NAME); } - } diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java index 68114624b0..f7edccef89 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java @@ -14,13 +14,13 @@ */ package net.consensys.linea; +import java.util.Optional; + import lombok.extern.slf4j.Slf4j; import net.consensys.linea.reporting.TestOutcomeWriterTool; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestWatcher; -import java.util.Optional; - @Slf4j public class UnitTestWatcher implements TestWatcher { @@ -48,4 +48,4 @@ public void testDisabled(ExtensionContext context, Optional reason) { public void testAborted(ExtensionContext context, Throwable cause) { TestOutcomeWriterTool.addAborted(); } -} \ No newline at end of file +} diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java index c8ed33fb72..11e408001d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java @@ -21,7 +21,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; - @ExtendWith(UnitTestWatcher.class) public class ZkTracerTest { diff --git a/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestJson.java b/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestJson.java index ff9fc067b8..081dc4853e 100644 --- a/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestJson.java +++ b/reference-tests/src/main/java/net/consensys/linea/BlockchainReferenceTestJson.java @@ -14,6 +14,8 @@ */ package net.consensys.linea; +import static net.consensys.linea.reporting.TestOutcomeWriterTool.getFileDirectory; + import java.io.IOException; import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; @@ -24,8 +26,6 @@ import lombok.Synchronized; import lombok.extern.slf4j.Slf4j; -import static net.consensys.linea.reporting.TestOutcomeWriterTool.getFileDirectory; - @Slf4j public class BlockchainReferenceTestJson { diff --git a/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeRecorderTool.java b/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeRecorderTool.java index 61a7b4959c..7a7e6592f3 100644 --- a/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeRecorderTool.java +++ b/reference-tests/src/main/java/net/consensys/linea/ReferenceTestOutcomeRecorderTool.java @@ -14,6 +14,8 @@ */ package net.consensys.linea; +import static net.consensys.linea.reporting.TestOutcomeWriterTool.addFailure; + import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -23,8 +25,6 @@ import net.consensys.linea.reporting.TestOutcomeWriterTool; import net.consensys.linea.reporting.TestState; -import static net.consensys.linea.reporting.TestOutcomeWriterTool.addFailure; - @Slf4j public class ReferenceTestOutcomeRecorderTool { @@ -36,7 +36,7 @@ public class ReferenceTestOutcomeRecorderTool { .getOrDefault("REFERENCE_TEST_OUTCOME_OUTPUT_FILE", "failedReferenceTests.json"); public static void mapAndStoreTestResult( - String testName, TestState success, Map> failedConstraints) { + String testName, TestState success, Map> failedConstraints) { switch (success) { case FAILED -> { TestOutcomeWriterTool.addFailed(); @@ -139,5 +139,4 @@ private static void getPairFromString(String constraint, Map } static ObjectMapper objectMapper = new ObjectMapper(); - } diff --git a/testing/src/main/java/net/consensys/linea/reporting/TestOutcome.java b/testing/src/main/java/net/consensys/linea/reporting/TestOutcome.java index a607c5fb77..e7e1067abb 100644 --- a/testing/src/main/java/net/consensys/linea/reporting/TestOutcome.java +++ b/testing/src/main/java/net/consensys/linea/reporting/TestOutcome.java @@ -14,6 +14,9 @@ */ package net.consensys.linea.reporting; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.ConcurrentSkipListSet; + import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import lombok.AllArgsConstructor; @@ -21,9 +24,6 @@ import lombok.NoArgsConstructor; import lombok.Setter; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.ConcurrentSkipListSet; - @Getter @Setter @NoArgsConstructor(force = true) diff --git a/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java b/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java index 828f9ee010..de218fd347 100644 --- a/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java +++ b/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java @@ -14,12 +14,6 @@ */ package net.consensys.linea.reporting; - -import com.fasterxml.jackson.databind.ObjectMapper; -import lombok.extern.slf4j.Slf4j; -import net.consensys.linea.zktracer.json.JsonConverter; -import org.junit.platform.launcher.LauncherSession; - import java.io.FileWriter; import java.io.IOException; import java.nio.file.Files; @@ -29,6 +23,10 @@ import java.util.concurrent.ConcurrentSkipListSet; import java.util.concurrent.atomic.AtomicInteger; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import net.consensys.linea.zktracer.json.JsonConverter; + @Slf4j public class TestOutcomeWriterTool { @@ -45,11 +43,13 @@ public static void addFailed() { private static volatile AtomicInteger abortedCounter = new AtomicInteger(0); private static volatile ConcurrentMap< String, ConcurrentMap>> - modulesToConstraintsToTests = new ConcurrentHashMap<>(); + modulesToConstraintsToTests = new ConcurrentHashMap<>(); public static void addFailure(String type, String cause, String test) { - modulesToConstraintsToTests.computeIfAbsent(type, t -> new ConcurrentHashMap<>()) - .computeIfAbsent(cause, t -> new ConcurrentSkipListSet<>()).add(test); + modulesToConstraintsToTests + .computeIfAbsent(type, t -> new ConcurrentHashMap<>()) + .computeIfAbsent(cause, t -> new ConcurrentSkipListSet<>()) + .add(test); } public static void addSuccess() { @@ -75,19 +75,18 @@ public static void writeToJsonFile(String name) { } try (FileWriter file = new FileWriter(Path.of(fileDirectory, name).toString())) { objectMapper.writeValue( - file, - new TestOutcome( - failedCounter.get(), - successCounter.get(), - disabledCounter.get(), - abortedCounter.get(), - modulesToConstraintsToTests)); + file, + new TestOutcome( + failedCounter.get(), + successCounter.get(), + disabledCounter.get(), + abortedCounter.get(), + modulesToConstraintsToTests)); } catch (Exception e) { log.error("Error - Failed to write test output: %s".formatted(e.getMessage())); } } - public static String getFileDirectory() { String jsonDirectory = System.getenv("FAILED_TEST_JSON_DIRECTORY"); if (jsonDirectory == null || jsonDirectory.isEmpty()) { @@ -96,12 +95,10 @@ public static String getFileDirectory() { return jsonDirectory; } - - public static TestOutcome parseTestOutcome( - String jsonString) { + public static TestOutcome parseTestOutcome(String jsonString) { if (!jsonString.isEmpty()) { TestOutcome blockchainReferenceTestOutcome = - jsonConverter.fromJson(jsonString, TestOutcome.class); + jsonConverter.fromJson(jsonString, TestOutcome.class); return blockchainReferenceTestOutcome; } throw new RuntimeException("invalid JSON"); From d21c629cfbd4d4bd9182b7263c6676a668e07e10 Mon Sep 17 00:00:00 2001 From: F Bojarski Date: Wed, 20 Nov 2024 10:12:25 +0100 Subject: [PATCH 04/19] skip refTest because of balance too high Signed-off-by: F Bojarski --- .../net/consensys/linea/BlockchainReferenceTestTools.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java index 5111ef5c6d..604c9875c7 100644 --- a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java +++ b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java @@ -111,6 +111,11 @@ public class BlockchainReferenceTestTools { // Absurd amount of gas, doesn't run in parallel. PARAMS.ignore("randomStatetest94_\\w+"); + // Balance is more than 128 bits + PARAMS.ignore(("Call1024PreCalls_d0g0v0_London[London]")); + PARAMS.ignore(("Call1024PreCalls_d0g1v0_London[London]")); + PARAMS.ignore(("OverflowGasRequire_London[London]")); + // Don't do time-consuming tests. PARAMS.ignore("CALLBlake2f_MaxRounds.*"); PARAMS.ignore("loopMul_*"); From 86b65fdd547f78a5fbcff14ddf67ea10799a9108 Mon Sep 17 00:00:00 2001 From: F Bojarski Date: Wed, 20 Nov 2024 15:15:03 +0100 Subject: [PATCH 05/19] skip more huge balance tests Signed-off-by: F Bojarski --- linea-constraints | 2 +- .../java/net/consensys/linea/BlockchainReferenceTestTools.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/linea-constraints b/linea-constraints index e2113be937..adba4742e2 160000 --- a/linea-constraints +++ b/linea-constraints @@ -1 +1 @@ -Subproject commit e2113be93757214f02a5de15b88b5991b79b2982 +Subproject commit adba4742e2a45a4d348f8c35b3e20b0dfe4b3697 diff --git a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java index 604c9875c7..cc055e8501 100644 --- a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java +++ b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java @@ -115,6 +115,9 @@ public class BlockchainReferenceTestTools { PARAMS.ignore(("Call1024PreCalls_d0g0v0_London[London]")); PARAMS.ignore(("Call1024PreCalls_d0g1v0_London[London]")); PARAMS.ignore(("OverflowGasRequire_London[London]")); + PARAMS.ignore("StrangeContractCreation_London[London]"); + PARAMS.ignore("SuicideIssue_London[London]"); + PARAMS.ignore("DelegateCallSpam_London[London]"); // Don't do time-consuming tests. PARAMS.ignore("CALLBlake2f_MaxRounds.*"); From ba9edf2355ba203a32c223834eb3782213c75b3a Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Thu, 21 Nov 2024 12:12:38 +0100 Subject: [PATCH 06/19] add watcher to all tests. --- .../test/java/net/consensys/linea/UnitTestOutcomeWriter.java | 2 ++ .../src/test/java/net/consensys/linea/UnitTestWatcher.java | 4 +++- .../linea/continoustracing/ContinuousTracerTest.java | 4 ++-- .../java/net/consensys/linea/replaytests/Issue1031Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1090Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1109Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1116Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1123Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1124Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1126Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1136Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1145Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1169Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1180Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1216Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1264Tests.java | 4 +++- .../java/net/consensys/linea/replaytests/Issue1267Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1274Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1279Tests.java | 3 +++ .../java/net/consensys/linea/replaytests/Issue1280Tests.java | 4 +++- .../java/net/consensys/linea/replaytests/LeosNewRanges.java | 3 +++ .../consensys/linea/replaytests/LeosNewRangesSplitTests.java | 3 +++ .../java/net/consensys/linea/replaytests/NightlyTests.java | 3 +++ .../java/net/consensys/linea/replaytests/ReplayTestTools.java | 3 +++ .../java/net/consensys/linea/replaytests/ReplayTests.java | 3 +++ .../net/consensys/linea/zktracer/ExampleMultiBlockTest.java | 3 +++ .../net/consensys/linea/zktracer/ExampleSolidityTest.java | 3 +++ .../test/java/net/consensys/linea/zktracer/ExampleTxTest.java | 3 +++ .../java/net/consensys/linea/zktracer/ExceptionsTest.java | 3 +++ .../consensys/linea/zktracer/bytestheta/BaseThetaTest.java | 3 +++ .../linea/zktracer/containers/CountOnlyModuleTest.java | 3 +++ .../consensys/linea/zktracer/containers/CountOnlyTests.java | 3 +++ .../consensys/linea/zktracer/containers/StackedListTests.java | 3 +++ .../consensys/linea/zktracer/containers/StackedSetTests.java | 3 +++ .../InvalidCodePrefixAndMaxCodeSizeExceptionTest.java | 3 +++ .../linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java | 3 +++ .../zktracer/exceptions/MemoryExpansionExceptionTest.java | 3 +++ .../linea/zktracer/exceptions/OutOfGasExceptionTest.java | 3 +++ .../linea/zktracer/exceptions/OutOfSStoreExceptionTest.java | 3 +++ .../linea/zktracer/exceptions/StackOverflowExceptionTest.java | 3 +++ .../zktracer/exceptions/StackUnderflowExceptionTest.java | 3 +++ .../linea/zktracer/exceptions/StaticExceptionTest.java | 3 +++ .../linea/zktracer/instructionprocessing/BalanceTests.java | 3 +++ .../linea/zktracer/instructionprocessing/CallDataTests.java | 3 +++ .../zktracer/instructionprocessing/CallTrivialCasesTest.java | 3 +++ .../CodeCopyingInitializationCodeTest.java | 3 +++ .../instructionprocessing/ContractModifyingStorageTest.java | 3 +++ .../instructionprocessing/EmptyDeploymentsInTheRootTest.java | 3 +++ .../ExtCodeHashAndAccountExistenceTests.java | 3 +++ .../linea/zktracer/instructionprocessing/ImmediateRevert.java | 3 +++ .../instructionprocessing/JumpDestinationVettingTest.java | 3 +++ .../linea/zktracer/instructionprocessing/JumpTest.java | 3 +++ .../linea/zktracer/instructionprocessing/JumpiTest.java | 3 +++ .../linea/zktracer/instructionprocessing/KeccakTests.java | 3 +++ .../zktracer/instructionprocessing/ReturnDataCopyTest.java | 3 +++ .../instructionprocessing/SimpleGasCalculatorTest.java | 3 +++ .../linea/zktracer/instructionprocessing/StorageTest.java | 3 +++ .../zktracer/instructionprocessing/callTests/DoubleCall.java | 3 +++ .../instructionprocessing/callTests/TrimmingTests.java | 3 +++ .../zktracer/instructionprocessing/callTests/Utilities.java | 3 +++ .../callTests/abort/BalanceAbortTests.java | 3 +++ .../callTests/abort/CallStackDepthAbortTests.java | 3 +++ .../callTests/abort/MultiCallAbortTests.java | 3 +++ .../instructionprocessing/callTests/eoa/EoaTests.java | 3 +++ .../instructionprocessing/callTests/eoa/gasStipendTests.java | 3 +++ .../callTests/prc/ecrecover/gasStipendTests.java | 3 +++ .../instructionprocessing/callTests/smc/Utilities.java | 3 +++ .../callTests/smc/monoOpCodeTargets/ImmediateInvalid.java | 3 +++ .../callTests/smc/monoOpCodeTargets/singleJumpDest.java | 3 +++ .../callTests/smc/monoOpCodeTargets/singleStop.java | 3 +++ .../net/consensys/linea/zktracer/module/HexStringUtils.java | 4 ++++ .../java/net/consensys/linea/zktracer/module/add/AddTest.java | 3 +++ .../java/net/consensys/linea/zktracer/module/bin/BinTest.java | 3 +++ .../linea/zktracer/module/blockhash/BlockhashTest.java | 3 +++ .../net/consensys/linea/zktracer/module/ecdata/EcAddTest.java | 3 +++ .../consensys/linea/zktracer/module/ecdata/EcDataTest.java | 3 +++ .../consensys/linea/zktracer/module/ecdata/EcRecoverTest.java | 3 +++ .../module/ecdata/ecpairing/EcPairingArgumentsSingleton.java | 3 +++ .../module/ecdata/ecpairing/EcPairingTestSupport.java | 3 +++ .../module/ecdata/ecpairing/EcPairingTestWatcher.java | 3 +++ .../zktracer/module/ecdata/ecpairing/EcPairingrTest.java | 3 +++ .../java/net/consensys/linea/zktracer/module/exp/ExpTest.java | 3 +++ .../linea/zktracer/module/ext/TestDuplicatedOperations.java | 3 +++ .../linea/zktracer/module/hub/CallEmptyNoStopTest.java | 3 +++ .../consensys/linea/zktracer/module/hub/MessageFrameTest.java | 3 +++ .../linea/zktracer/module/hub/SimpleStorageConsistency.java | 3 +++ .../consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java | 3 +++ .../net/consensys/linea/zktracer/module/hub/TxSkipTests.java | 3 +++ .../java/net/consensys/linea/zktracer/module/mod/ModTest.java | 3 +++ .../consensys/linea/zktracer/module/mul/ExpExtensiveTest.java | 3 +++ .../java/net/consensys/linea/zktracer/module/mxp/MxpTest.java | 4 +++- .../net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java | 3 +++ .../consensys/linea/zktracer/module/mxp/MxpTracerTest.java | 3 +++ .../consensys/linea/zktracer/module/mxp/SeveralKeccaks.java | 3 +++ .../net/consensys/linea/zktracer/module/oob/OobCallTest.java | 3 +++ .../linea/zktracer/module/oob/OobJumpAndJumpiTest.java | 3 +++ .../net/consensys/linea/zktracer/module/oob/OobRdcTest.java | 3 +++ .../linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java | 3 +++ .../linea/zktracer/module/rlpaddr/TestRlpAddress.java | 3 +++ .../linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java | 3 +++ .../consensys/linea/zktracer/module/rlptxrcpt/LogTest.java | 3 +++ .../java/net/consensys/linea/zktracer/module/rom/RomTest.java | 3 +++ .../consensys/linea/zktracer/module/shf/ShfExtensiveTest.java | 3 +++ .../java/net/consensys/linea/zktracer/module/stp/StpTest.java | 3 +++ .../consensys/linea/zktracer/module/trm/TrmTracerTest.java | 3 +++ .../consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java | 3 +++ .../consensys/linea/zktracer/precompiles/EcrecoverTests.java | 3 +++ .../net/consensys/linea/zktracer/precompiles/ModexpTests.java | 3 +++ .../java/net/consensys/linea/zktracer/types/BytecodeTest.java | 3 +++ reference-tests/src/test/resources/ethereum-tests | 2 +- 110 files changed, 327 insertions(+), 7 deletions(-) diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java index 6b0050d900..bc3b911191 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java @@ -16,9 +16,11 @@ import static net.consensys.linea.reporting.TestOutcomeWriterTool.writeToJsonFile; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.platform.launcher.LauncherSession; import org.junit.platform.launcher.LauncherSessionListener; +@ExtendWith(UnitTestWatcher.class) public class UnitTestOutcomeWriter implements LauncherSessionListener { public static final String FILE_NAME = "UnitTestsResults.json"; diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java index f7edccef89..a2b9518967 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java @@ -18,17 +18,19 @@ import lombok.extern.slf4j.Slf4j; import net.consensys.linea.reporting.TestOutcomeWriterTool; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestWatcher; @Slf4j +@ExtendWith(UnitTestWatcher.class) public class UnitTestWatcher implements TestWatcher { private String FAILED = "FAILED"; @Override public void testFailed(ExtensionContext context, Throwable cause) { - String testName = context.getDisplayName().split(": ")[1]; + String testName = context.getDisplayName(); log.info("Adding failure for {}", testName); TestOutcomeWriterTool.addFailure(FAILED, cause.getMessage(), testName); log.info("Failure added for {}", testName); diff --git a/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java index dbfc69f63e..b59eefe8e1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java @@ -22,6 +22,7 @@ import java.nio.file.Path; import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.corset.CorsetValidator; import net.consensys.linea.plugins.continoustracing.ContinuousTracer; import net.consensys.linea.plugins.continoustracing.ContinuousTracingConfiguration; @@ -38,9 +39,8 @@ import org.junit.jupiter.api.io.TempDir; import org.mockito.ArgumentMatchers; import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -@ExtendWith(MockitoExtension.class) +@ExtendWith(UnitTestWatcher.class) public class ContinuousTracerTest { private static final Hash BLOCK_HASH = Hash.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000042"); diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java index 397247e380..eeb1105b1a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java @@ -17,10 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1031Tests { // @Disabled diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java index 3f68d67970..39ae4455a7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java @@ -17,10 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1090Tests { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java index e743439591..ce2c308fc9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java @@ -17,10 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1109Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java index 468dc64a31..eebd5b7120 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java @@ -17,11 +17,14 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** Insufficient balance at some address */ @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1116Tests { // @Disabled diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java index ced9556975..57db965435 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java @@ -17,12 +17,15 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** Same underlying NPE issue as that solved in #1216. */ @Tag("replay") @Tag("nightly") +@ExtendWith(UnitTestWatcher.class) public class Issue1123Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java index af11b54161..e6be5c6148 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java @@ -17,12 +17,15 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** STP constraints were failing for these ranges */ @Tag("replay") @Tag("nightly") +@ExtendWith(UnitTestWatcher.class) public class Issue1124Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java index 9de1f197f4..8ac6e51fc4 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java @@ -17,9 +17,11 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * The following ranges blew up the MMU circuit: @@ -37,6 +39,7 @@ *

See https://github.com/Consensys/linea-tracer/issues/1121 */ @Tag("nightly") +@ExtendWith(UnitTestWatcher.class) public class Issue1126Tests { @Test void test_3108622_3108633() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java index 82d7626337..f421e69072 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java @@ -17,8 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_SEPOLIA; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * This test contains a STATICCALL to the ECRECOVER precompile in the first transaction, at @@ -39,6 +41,7 @@ */ @Tag("replay") @Tag("nightly") +@ExtendWith(UnitTestWatcher.class) public class Issue1136Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java index efabbe5b5d..addfd73141 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java @@ -17,10 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_SEPOLIA; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1145Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java index 348555137b..c108722e28 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java @@ -17,10 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") +@ExtendWith(UnitTestWatcher.class) public class Issue1169Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java index 55ab7125c9..40620629d7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java @@ -17,15 +17,18 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** This range broke the MOD module's mod.set-absolute-values constraint. */ @Tag("nightly") @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1180Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java index 38514d60ac..c39e029118 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java @@ -17,13 +17,16 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_SEPOLIA; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.module.hub.AccountSnapshot; import net.consensys.linea.zktracer.module.hub.Hub; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class Issue1216Tests { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java index b00d3b2803..cbec8ccbd6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java @@ -17,11 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; -@Tag("nightly") @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1264Tests { @Test void issue_1216_mainnet_2321460_2321556() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java index 4b00056a93..bcb0710e9b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java @@ -17,11 +17,14 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1267Tests { // splitting of 3506963-3507013 diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java index a40dda58aa..9eb044b426 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java @@ -17,12 +17,15 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** Failing block for ADD ?! */ @Tag("nightly") @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1274Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java index cca131742e..f239c101b2 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java @@ -17,11 +17,14 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1279Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java index 684ffc03ea..b5e8198567 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java @@ -17,11 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") -@Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class Issue1280Tests { // 3901959-3902032 diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java index d4c9dfeabe..f35009b64e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java @@ -17,10 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Disabled +@ExtendWith(UnitTestWatcher.class) public class LeosNewRanges { @Test void leos_new_ranges_2258472_2258607() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java index feea117eef..1d2a12113c 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java @@ -17,10 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Disabled +@ExtendWith(UnitTestWatcher.class) public class LeosNewRangesSplitTests { @Test void split_range_2258472_2258479() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java index c85dd893ad..1ab0de6460 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java @@ -17,10 +17,13 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") +@ExtendWith(UnitTestWatcher.class) public class NightlyTests { @Test void leoFailingRange() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java index babe28b4fc..7efb819638 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java @@ -33,7 +33,9 @@ import java.util.zip.GZIPInputStream; import lombok.extern.slf4j.Slf4j; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.ReplayExecutionEnvironment; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.provider.Arguments; /** @@ -53,6 +55,7 @@ * One can run this command: scripts/capture.pl --start xxx --end yyy --output my-test-case.json.gz */ @Slf4j +@ExtendWith(UnitTestWatcher.class) public class ReplayTestTools { /** A list of block numbers used for testing purposes in {@link ReplayTests}. */ static List BLOCK_NUMBERS = new ArrayList<>(); diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java index 861fa82efc..fc540b6bbe 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java @@ -24,14 +24,17 @@ import java.io.IOException; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @Tag("replay") +@ExtendWith(UnitTestWatcher.class) public class ReplayTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java index d65d426b09..5a5a2f5c05 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.MultiBlockExecutionEnvironment; import net.consensys.linea.testing.SmartContractUtils; @@ -45,12 +46,14 @@ import org.hyperledger.besu.ethereum.processing.TransactionProcessingResult; import org.hyperledger.besu.evm.log.Log; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.web3j.abi.EventEncoder; import org.web3j.abi.FunctionEncoder; import org.web3j.abi.datatypes.DynamicArray; import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.generated.Uint256; +@ExtendWith(UnitTestWatcher.class) class ExampleMultiBlockTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java index 5f5eedeba0..89bdc28532 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.SmartContractUtils; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -42,12 +43,14 @@ import org.hyperledger.besu.ethereum.processing.TransactionProcessingResult; import org.hyperledger.besu.evm.log.Log; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.web3j.abi.EventEncoder; import org.web3j.abi.FunctionEncoder; import org.web3j.abi.datatypes.DynamicArray; import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.generated.Uint256; +@ExtendWith(UnitTestWatcher.class) public class ExampleSolidityTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java index 3a84887d4d..3602782d4c 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java @@ -17,6 +17,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -29,7 +30,9 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) class ExampleTxTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java index 639b8401d2..76f7172dd5 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java @@ -15,10 +15,13 @@ package net.consensys.linea.zktracer; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.module.hub.signals.Exceptions; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class ExceptionsTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java index 2fd4dfa452..24301e89d2 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java @@ -17,16 +17,19 @@ import static org.assertj.core.api.Assertions.assertThat; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.types.Bytes16; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * Test class related to {@link BaseTheta} data structure, which is an extension of {@link * BytesArray}, with support for high and low bytes' manipulation. */ +@ExtendWith(UnitTestWatcher.class) public class BaseThetaTest { @Test public void baseThetaTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java index b3f1da0e97..09afd378f0 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java @@ -17,10 +17,13 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.ZkTracer; import net.consensys.linea.zktracer.module.limits.precompiles.ModexpEffectiveCall; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class CountOnlyModuleTest { @Test void test() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java index 00b44c6640..b3a1b97fa3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java @@ -17,9 +17,12 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.container.stacked.CountOnlyOperation; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class CountOnlyTests { @Test void testAddedToFront() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java index 3367c0aa48..030e84e325 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java @@ -20,6 +20,7 @@ import java.math.BigInteger; import lombok.RequiredArgsConstructor; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.container.ModuleOperation; import net.consensys.linea.zktracer.container.stacked.ModuleOperationStackedList; import net.consensys.linea.zktracer.module.add.AddOperation; @@ -28,7 +29,9 @@ import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class StackedListTests { private static final AddOperation ONE_PLUS_ONE = new AddOperation( diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java index d9dd4873a0..b88e5af313 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java @@ -17,6 +17,7 @@ import java.math.BigInteger; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.container.stacked.ModuleOperationStackedSet; import net.consensys.linea.zktracer.module.add.AddOperation; import net.consensys.linea.zktracer.opcode.OpCode; @@ -24,7 +25,9 @@ import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class StackedSetTests { private static final AddOperation ONE_PLUS_ONE = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java index 65dd8cfc54..6fac1329b9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java @@ -23,6 +23,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; @@ -39,7 +40,9 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class InvalidCodePrefixAndMaxCodeSizeExceptionTest { // Here it is attempted to trigger the INVALID_CODE_PREFIX exception using a deployment diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java index 90c70c5a96..5cb71d1442 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java @@ -16,12 +16,15 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.hub.signals.TracedException; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class InvalidOpcodeExceptionTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java index 2d7d097911..9a7edae1b6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java @@ -28,13 +28,16 @@ import java.util.List; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class MemoryExpansionExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java index 25a045b26a..5dbac56b3d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java @@ -24,14 +24,17 @@ import java.util.List; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.opcode.OpCodeData; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class OutOfGasExceptionTest { // TODO: add tests when address is warm. Use constants such as G_WARM_ACCESS etc diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java index 1847ea02c1..e7254b9f99 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java @@ -17,13 +17,16 @@ import static net.consensys.linea.zktracer.module.hub.signals.TracedException.OUT_OF_SSTORE; import static org.junit.jupiter.api.Assertions.assertEquals; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.constants.GlobalConstants; import net.consensys.linea.zktracer.opcode.OpCode; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +@ExtendWith(UnitTestWatcher.class) public class OutOfSStoreExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java index 06e3537303..91859d6dc7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java @@ -22,14 +22,17 @@ import java.util.List; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.opcode.OpCodeData; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class StackOverflowExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java index 395b9192ed..6ed86b7145 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java @@ -22,14 +22,17 @@ import java.util.List; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.opcode.OpCodeData; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class StackUnderflowExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java index 0fc2fcea8b..e90f42908a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java @@ -20,6 +20,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; @@ -27,9 +28,11 @@ import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Wei; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +@ExtendWith(UnitTestWatcher.class) public class StaticExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java index 08eaa425df..6c7f1218bb 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java @@ -16,6 +16,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; @@ -27,11 +28,13 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * the purpose of these tests is to track balance updates for the sender, the coinbase and, in case * of a reverted transaction, the recipient. */ +@ExtendWith(UnitTestWatcher.class) public class BalanceTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java index 461dcc66f8..621a9d56ea 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java @@ -16,6 +16,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; @@ -27,12 +28,14 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * The tests below are designed to test our handling of call data. For deployment transactions, and * more generally deployment context's, call data is empty and the tests are "trivial" in some * sense. They aren't for message calls. */ +@ExtendWith(UnitTestWatcher.class) public class CallDataTests { // @Test // void transactionCallDataForMessageCallTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java index 7bbd85637f..9d01c49195 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java @@ -14,12 +14,15 @@ */ package net.consensys.linea.zktracer.instructionprocessing; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class CallTrivialCasesTest { @Test void eoaCallScenarioTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java index fa17441a1f..36127a8271 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java @@ -16,6 +16,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -31,6 +32,7 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * The purpose of {@link CodeCopyingInitializationCodeTest} is to test the coherence between the @@ -42,6 +44,7 @@ *

This test answers the point raised in this issue. */ +@ExtendWith(UnitTestWatcher.class) public class CodeCopyingInitializationCodeTest { final Bytes initCodeSimple = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java index b7cc420def..35efe356fb 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java @@ -21,6 +21,7 @@ import java.util.List; import java.util.Random; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; import net.consensys.linea.testing.ToyTransaction; @@ -35,7 +36,9 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class ContractModifyingStorageTest { /* diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java index 8be9b1325a..612910c1ff 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java @@ -16,6 +16,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -31,6 +32,7 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * The purpose of {@link EmptyDeploymentsInTheRootTest} is to make sure that deployment transactions @@ -38,6 +40,7 @@ * (if present) should be treated properly and the update to the deployment account is accounted for * in the relevant row. */ +@ExtendWith(UnitTestWatcher.class) public class EmptyDeploymentsInTheRootTest { final Bytes initCodeEmptyDeployment = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java index 2fd136b1c3..cfa5861835 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java @@ -16,11 +16,14 @@ import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class ExtCodeHashAndAccountExistenceTests { /** * EXTCODEHASH targets a precompile (which is DEAD initially) CALL the same precompile diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java index 8fb2912ab5..f067660c34 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java @@ -14,11 +14,14 @@ */ package net.consensys.linea.zktracer.instructionprocessing; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class ImmediateRevert { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java index 224c597ff6..eed2d2ed11 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java @@ -20,14 +20,17 @@ import java.util.Random; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class JumpDestinationVettingTest { final Random random = new Random(1); final int N_JUMPS = 3; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java index 97f6aaabf1..a7960f996d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java @@ -16,15 +16,18 @@ import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class JumpTest { // NOTE: the bytecode we propose will at time use the following offsets (unless pcNew is large) diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java index 9c864b0bdb..f6c4773e3f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java @@ -22,14 +22,17 @@ import java.util.List; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class JumpiTest { // NOTE: the bytecode we propose will at time use the following offsets (unless pcNew is large) diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java index 4b8ccd14b8..aecaf5b2f4 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java @@ -14,11 +14,14 @@ */ package net.consensys.linea.zktracer.instructionprocessing; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class KeccakTests { @Test void singleEmptyKeccak() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java index 09150e48fe..a10a9ae319 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java @@ -15,13 +15,16 @@ package net.consensys.linea.zktracer.instructionprocessing; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class ReturnDataCopyTest { @Test void testReturnDataCopyFromSha256() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java index 4728cf8e1a..b8ab424da7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java @@ -14,11 +14,14 @@ */ package net.consensys.linea.zktracer.instructionprocessing; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class SimpleGasCalculatorTest { @Test void simpleGasCalculatorTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java index 545a23b949..c9a1a3312a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java @@ -15,11 +15,14 @@ package net.consensys.linea.zktracer.instructionprocessing; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class StorageTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java index 9c78596adc..04aa8e1ba6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java @@ -17,11 +17,14 @@ import static net.consensys.linea.zktracer.instructionprocessing.callTests.Utilities.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class DoubleCall { /** Same address */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java index f33cfb72c7..d082c8d830 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java @@ -18,11 +18,14 @@ import static net.consensys.linea.zktracer.instructionprocessing.callTests.Utilities.untrimmedEoaAddress; import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class TrimmingTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java index e14877e80c..bb282cc0ca 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java @@ -17,10 +17,13 @@ import static com.google.common.base.Preconditions.checkArgument; import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.zktracer.opcode.OpCode; import org.hyperledger.besu.datatypes.Address; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class Utilities { public static final String fullEoaAddress = "000000000000000000000000abcdef0123456789"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java index a602be5a64..5a17c7ac77 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java @@ -18,11 +18,13 @@ import static net.consensys.linea.zktracer.opcode.OpCode.*; import static net.consensys.linea.zktracer.opcode.OpCode.CALL; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * The arithmetization has a two aborting scenarios for CALL's @@ -32,6 +34,7 @@ *

- scn/CALL_ABORT_WONT_REVERT The main point being: (unexceptional) aborted CALL's warm * up the target account. */ +@ExtendWith(UnitTestWatcher.class) public class BalanceAbortTests { final String eoaAddress = "abcdef0123456789"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java index ad369914c0..3904739e92 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java @@ -16,15 +16,18 @@ import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * Attempt to trigger the maximum call stack depth abort. We put everything to 0 to avoid memory * expansion costs. We will want to revert so we transfer value to see the effect of reverting. */ +@ExtendWith(UnitTestWatcher.class) public class CallStackDepthAbortTests { @Test void attemptAtCallStackDepthAbortWillRevert() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java index 351c3aaf0a..6fadf95ca6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java @@ -17,13 +17,16 @@ import static net.consensys.linea.zktracer.instructionprocessing.callTests.Utilities.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** CALL/ABORT's are revert sensitive. We test this with two CALL's. */ +@ExtendWith(UnitTestWatcher.class) public class MultiCallAbortTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/EoaTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/EoaTests.java index 4d438d7d2b..1e4afc40ce 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/EoaTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/EoaTests.java @@ -16,10 +16,12 @@ import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * In the arithmetization there are the following EOA specific scenarios: @@ -28,6 +30,7 @@ * *

- scn/CALL_EOA_SUCCESS_WONT_REVERT */ +@ExtendWith(UnitTestWatcher.class) public class EoaTests { final String eoaAddress = "abcdef0123456789"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java index e693d765dc..a8c8031788 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java @@ -17,15 +17,18 @@ import static net.consensys.linea.zktracer.instructionprocessing.callTests.Utilities.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * Transferring nonzero value provides a gas stipend to the callee. This stipend will immediately be * restituted to the caller in case of an EOA call. */ +@ExtendWith(UnitTestWatcher.class) public class gasStipendTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/gasStipendTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/gasStipendTests.java index 0acfcef5ef..f9a17c3d6f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/gasStipendTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/gasStipendTests.java @@ -17,10 +17,12 @@ import static net.consensys.linea.zktracer.instructionprocessing.callTests.Utilities.*; import static net.consensys.linea.zktracer.opcode.OpCode.CALL; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * For these tests to work as expected, the transaction should start out with sufficient gas. At @@ -32,6 +34,7 @@ * transfer + 25k if value transfer leads to a precompile starting to exist in the state etc ... + * 3k for the callee + opcode costs on the order of 130 or so) */ +@ExtendWith(UnitTestWatcher.class) public class gasStipendTests { // sufficient gas for PRC execution diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/Utilities.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/Utilities.java index e0ef573629..c26f5b51d1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/Utilities.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/Utilities.java @@ -16,6 +16,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.ToyAccount; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.crypto.KeyPair; @@ -23,7 +24,9 @@ import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Hash; import org.hyperledger.besu.datatypes.Wei; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class Utilities { public static KeyPair keyPair = new SECP256K1().generateKeyPair(); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java index 47c04d3dba..9ebbc6c81b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java @@ -19,10 +19,13 @@ import static net.consensys.linea.zktracer.opcode.OpCode.CALL; import static net.consensys.linea.zktracer.opcode.OpCode.REVERT; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class ImmediateInvalid { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleJumpDest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleJumpDest.java index 7190a9f6d4..b49c07d9da 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleJumpDest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleJumpDest.java @@ -19,14 +19,17 @@ import static net.consensys.linea.zktracer.opcode.OpCode.CALL; import static net.consensys.linea.zktracer.opcode.OpCode.REVERT; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * Second-simplest case where we enter a smart contract. The called smart contract executes a single * JUMPDEST opcode (which is costs gas). */ +@ExtendWith(UnitTestWatcher.class) public class singleJumpDest { /** This test should trigger the scenario/CALL_TO_SMC_SUCCESS_WONT_REVERT scenario. */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java index cdf44ac4f8..277feae062 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java @@ -18,13 +18,16 @@ import static net.consensys.linea.zktracer.instructionprocessing.callTests.smc.Utilities.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** * Simplest case where we enter a smart contract. The called smart contract executes a single STOP * opcode (which is free of charge). No value is transferred. */ +@ExtendWith(UnitTestWatcher.class) public class singleStop { /** This test should trigger the scenario/CALL_TO_SMC_SUCCESS_WONT_REVERT scenario. */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java index 65f070ede3..3b36ac06f9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java @@ -17,6 +17,10 @@ import java.math.BigInteger; +import net.consensys.linea.UnitTestWatcher; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UnitTestWatcher.class) public class HexStringUtils { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java index aef87adbb5..7af4609d2e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java @@ -15,12 +15,15 @@ package net.consensys.linea.zktracer.module.add; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class AddTest { @Test void testSmallZeroAdd() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java index 43192573dc..ad9e374f59 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java @@ -15,12 +15,15 @@ package net.consensys.linea.zktracer.module.bin; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class BinTest { @Test public void edgeCase() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java index 8702af13f6..2112b86c0d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java @@ -17,12 +17,15 @@ import static net.consensys.linea.zktracer.module.constants.GlobalConstants.BLOCKHASH_MAX_HISTORY; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class BlockhashTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java index 8c0b2510bd..c56342cf19 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java @@ -19,15 +19,18 @@ import java.util.List; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class EcAddTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java index a340d3a0d8..8e5d5e41a1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java @@ -15,10 +15,13 @@ package net.consensys.linea.zktracer.module.ecdata; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class EcDataTest { // TODO: add documentation diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java index 0314a1f259..91a289e26b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java @@ -23,16 +23,19 @@ import java.util.List; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.types.EWord; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class EcRecoverTest { @Test void testEcRecoverWithEmptyExt() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java index 0c282ee841..d6092799f5 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java @@ -17,9 +17,12 @@ import lombok.Getter; import lombok.Setter; +import net.consensys.linea.UnitTestWatcher; +import org.junit.jupiter.api.extension.ExtendWith; @Getter @Setter +@ExtendWith(UnitTestWatcher.class) public class EcPairingArgumentsSingleton { private static EcPairingArgumentsSingleton instance; private String arguments; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java index 8c1c2bd6be..e6d3aa5ab7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java @@ -24,8 +24,11 @@ import java.util.List; import java.util.Random; +import net.consensys.linea.UnitTestWatcher; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.provider.Arguments; +@ExtendWith(UnitTestWatcher.class) public class EcPairingTestSupport { private static final String DELIMITER_CSV = ","; static final String DELIMITER_PAIRINGS = "_"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java index ef1bb2d614..896c25fd39 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java @@ -25,9 +25,12 @@ import java.util.List; import java.util.Optional; +import net.consensys.linea.UnitTestWatcher; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestWatcher; +@ExtendWith(UnitTestWatcher.class) public class EcPairingTestWatcher implements TestWatcher { final String timestamp = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); final List testsToWatch = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java index 2018bca42a..f75a98ef56 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java @@ -34,6 +34,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; @@ -50,7 +51,9 @@ // A TestWatcher is used to log the results of testEcPairingSingleForScenario // into a csv file (one for successful and one for failing cases) // that can be used to run the same test cases with @CsvFileSource + @ExtendWith(EcPairingTestWatcher.class) +@ExtendWith(UnitTestWatcher.class) public class EcPairingrTest { // https://github.com/Consensys/linea-arithmetization/issues/822 diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java index d51f130363..43f7297f6b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java @@ -25,18 +25,21 @@ import java.util.stream.Stream; import lombok.extern.slf4j.Slf4j; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; @Slf4j +@ExtendWith(UnitTestWatcher.class) public class ExpTest { // Generates 128, 64, 2, 1 as LD (leading digit) // LD_INDICES | LD diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java index 79c6099d7b..a33a9d8742 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java @@ -17,12 +17,15 @@ import static org.assertj.core.api.Assertions.assertThat; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class TestDuplicatedOperations { @Test void testDuplicate() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java index cd1d533b5d..aae97ffa54 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java @@ -19,6 +19,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -32,8 +33,10 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; /** Ensure that calling a contract with empty code does not generate a virtual STOP trace */ +@ExtendWith(UnitTestWatcher.class) public class CallEmptyNoStopTest { @Test void test() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java index 10f23a8fb6..3d8166dc6f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java @@ -17,6 +17,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; @@ -25,7 +26,9 @@ import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Wei; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class MessageFrameTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java index 7210dce6ec..0f189f8c1e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java @@ -17,6 +17,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -32,7 +33,9 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class SimpleStorageConsistency { private final Address receiverAddress = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java index c734e91f0d..df154ee744 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java @@ -15,11 +15,14 @@ package net.consensys.linea.zktracer.module.hub; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class TestTwoPlusTwo { @Test void testAssembler() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java index a2450d2d49..cf6c739bd9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java @@ -19,6 +19,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; import net.consensys.linea.testing.ToyTransaction; @@ -32,7 +33,9 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class TxSkipTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java index 945c0d0ad6..8c57965ebc 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java @@ -15,12 +15,15 @@ package net.consensys.linea.zktracer.module.mod; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class ModTest { @Test void testSignedSmod() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java index f0f1192add..6b949402ab 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java @@ -25,6 +25,7 @@ import java.util.stream.Stream; import lombok.experimental.Accessors; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.HexStringUtils; @@ -32,12 +33,14 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @Accessors(fluent = true) @Tag("weekly") +@ExtendWith(UnitTestWatcher.class) public class ExpExtensiveTest { // Test vectors static final String P_1 = "f076b857fa9947c1f9ec558262c72704099ca8cd325566f73fb99238102ed171"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java index 1f97d5d06b..545a8df2d9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java @@ -32,6 +32,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; @@ -50,12 +51,13 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; // https://github.com/Consensys/linea-besu-plugin/issues/197 - @Execution(ExecutionMode.SAME_THREAD) +@ExtendWith(UnitTestWatcher.class) public class MxpTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java index 856c8e8100..54336a649e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java @@ -24,13 +24,16 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.opcode.gas.MxpType; import net.consensys.linea.zktracer.types.EWord; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class MxpTestUtils { public static final Random RAND = new Random(123456789123456L); public static final EWord TWO_POW_128 = EWord.of(EWord.ONE.shiftLeft(128)); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java index 30a4dd5d1e..160d4df184 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.stream.Stream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.DynamicTests; import net.consensys.linea.testing.OpcodeCall; import net.consensys.linea.zktracer.container.module.Module; @@ -30,7 +31,9 @@ import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.TestFactory; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class MxpTracerTest { // private static final Random RAND = new Random(); private static final int TEST_REPETITIONS = 2; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java index 547bdc4426..251340b728 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java @@ -14,11 +14,14 @@ */ package net.consensys.linea.zktracer.module.mxp; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class SeveralKeccaks { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java index b4424b2340..89a652195d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java @@ -21,6 +21,7 @@ import java.math.BigInteger; import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -38,7 +39,9 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class OobCallTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java index abd287dbac..71080e976d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java @@ -29,6 +29,7 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.hub.Hub; @@ -37,7 +38,9 @@ import net.consensys.linea.zktracer.types.EWord; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class OobJumpAndJumpiTest { public static final BigInteger TWO_POW_128_MINUS_ONE = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java index 9886f199d7..0cc7d098bf 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java @@ -22,13 +22,16 @@ import java.math.BigInteger; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.hub.Hub; import net.consensys.linea.zktracer.module.hub.signals.Exceptions; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class OobRdcTest { public static final BigInteger TWO_POW_128_LEFT = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java index 5fce76cc19..f975929238 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java @@ -24,6 +24,7 @@ import java.util.stream.IntStream; import com.google.common.io.BaseEncoding; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.hub.Hub; @@ -32,9 +33,11 @@ import org.bouncycastle.util.encoders.Hex; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class OobSha2RipemdIdentityTest { Random random = new Random(1L); static final int[] argSizes = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java index 84f24a8e71..85144f49ee 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java @@ -20,6 +20,7 @@ import java.util.List; import java.util.Random; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -35,7 +36,9 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class TestRlpAddress { private final Random rnd = new Random(666); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java index 23c4f697d1..0243279695 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java @@ -18,8 +18,11 @@ import java.math.BigInteger; import java.util.Random; +import net.consensys.linea.UnitTestWatcher; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class RlpRandEdgeCase { private static final Random RAND = new Random(666); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java index cfa2237084..ba0dd61cf8 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java @@ -15,12 +15,15 @@ package net.consensys.linea.zktracer.module.rlptxrcpt; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class LogTest { @Test void log2Test() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java index d464cc999f..f82b47fff3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java @@ -21,13 +21,16 @@ import java.util.stream.Stream; import kotlin.Pair; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +@ExtendWith(UnitTestWatcher.class) public class RomTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java index f24e38c822..65d1ae1979 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java @@ -25,6 +25,7 @@ import lombok.Getter; import lombok.experimental.Accessors; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; @@ -33,12 +34,14 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @Accessors(fluent = true) @Tag("weekly") +@ExtendWith(UnitTestWatcher.class) public class ShfExtensiveTest { private static final List shfTestSourceList = new ArrayList<>(); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java index fc58fba81d..397e234c46 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.Random; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -39,7 +40,9 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class StpTest { private static final Random RAND = new Random(666L); final int NB_CALL = 200; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java index 1d0b9f2cc9..37029cfb5e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java @@ -17,13 +17,16 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class TrmTracerTest { private final Bytes32 RANDOM_STRING_FROM_THE_INTERNET = Bytes32.fromHexString( diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java index a643641ca5..8714454f0f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java @@ -15,12 +15,15 @@ package net.consensys.linea.zktracer.module.wcp; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class WcpEdgeCaseTest { @Test void testZeroAndHugeArgs() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java index 05a49a4311..db635f3b1e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java @@ -14,12 +14,15 @@ */ package net.consensys.linea.zktracer.precompiles; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class EcrecoverTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java index 86486eb0a9..0556d26ee4 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java @@ -22,6 +22,7 @@ import java.util.List; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; @@ -29,7 +30,9 @@ import org.apache.tuweni.bytes.Bytes32; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class ModexpTests { // some 10 decimal digit primes in the range [256 ** 3, 256 ** 4[ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java index 1768a01029..039567b043 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java @@ -17,9 +17,12 @@ import static org.junit.jupiter.api.Assertions.*; +import net.consensys.linea.UnitTestWatcher; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) class BytecodeTest { @Test diff --git a/reference-tests/src/test/resources/ethereum-tests b/reference-tests/src/test/resources/ethereum-tests index 9201075490..4f65a0a7cb 160000 --- a/reference-tests/src/test/resources/ethereum-tests +++ b/reference-tests/src/test/resources/ethereum-tests @@ -1 +1 @@ -Subproject commit 9201075490807f58811078e9bb5ec895b4ac01a5 +Subproject commit 4f65a0a7cbecf4442415c226c65e089acaaf6a8b From 05ce87af965bced5876656ba704b523f2c737982 Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Mon, 25 Nov 2024 09:05:52 +0100 Subject: [PATCH 07/19] fix merge --- .../consensys/linea/continoustracing/ContinuousTracerTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java index b59eefe8e1..d02622abf3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java @@ -39,8 +39,10 @@ import org.junit.jupiter.api.io.TempDir; import org.mockito.ArgumentMatchers; import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(UnitTestWatcher.class) +@ExtendWith(MockitoExtension.class) public class ContinuousTracerTest { private static final Hash BLOCK_HASH = Hash.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000042"); From e1495c1cbd7e1c6baf54d8c6d2f006feebf8829f Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Mon, 25 Nov 2024 09:18:46 +0100 Subject: [PATCH 08/19] fix merge --- gradle.properties | 2 +- reference-tests/src/test/resources/ethereum-tests | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index cd76cc1dd0..2bd6de8875 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ releaseVersion=0.8.0-rc5 -besuVersion=24.11-develop-96e9ed8 +besuVersion=24.11-develop-139a0f1 besuArtifactGroup=io.consensys.linea-besu distributionIdentifier=linea-tracer distributionBaseUrl=https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/ diff --git a/reference-tests/src/test/resources/ethereum-tests b/reference-tests/src/test/resources/ethereum-tests index 4f65a0a7cb..02c1859633 160000 --- a/reference-tests/src/test/resources/ethereum-tests +++ b/reference-tests/src/test/resources/ethereum-tests @@ -1 +1 @@ -Subproject commit 4f65a0a7cbecf4442415c226c65e089acaaf6a8b +Subproject commit 02c1859633abbdf776956136931ea247485c9f90 From 060a1f758e6a1ee1638ac6fbeda227ad44543ecd Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Mon, 25 Nov 2024 09:49:25 +0100 Subject: [PATCH 09/19] revert due to performance regression --- .../linea/zktracer/types/Bytecode.java | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/types/Bytecode.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/types/Bytecode.java index f916ef74be..a10acb77a0 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/types/Bytecode.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/types/Bytecode.java @@ -38,8 +38,8 @@ public final class Bytecode { /** The bytecode. */ @Getter private final Bytes bytecode; - /** The bytecode hash; precomputed & memoized asynchronously. */ - private Future hash; + /** The bytecode hash; is null by default and computed & memoized on the fly when required. */ + private Hash hash; /** * Create an instance from {@link Bytes}. @@ -48,7 +48,6 @@ public final class Bytecode { */ public Bytecode(Bytes bytes) { this.bytecode = Objects.requireNonNullElse(bytes, Bytes.EMPTY); - hash = executorService.submit(() -> computeCodeHash()); } /** @@ -58,7 +57,7 @@ public Bytecode(Bytes bytes) { */ public Bytecode(Code code) { this.bytecode = code.getBytes(); - this.hash = CompletableFuture.completedFuture(code.getCodeHash()); + this.hash = code.getCodeHash(); } /** @@ -85,21 +84,13 @@ public boolean isEmpty() { * @return the bytecode hash */ public Hash getCodeHash() { - try { - return hash.get(); - } catch (Exception e) { - log.error("Error while precomputing code hash", e); - Hash computedHash = computeCodeHash(); - hash = CompletableFuture.completedFuture(computedHash); - return computedHash; - } - } - - private Hash computeCodeHash() { - if (this.bytecode.isEmpty()) { - return Hash.EMPTY; - } else { - return Hash.hash(this.bytecode); + if (this.hash == null) { + if (this.bytecode.isEmpty()) { + this.hash = Hash.EMPTY; + } else { + this.hash = Hash.hash(this.bytecode); + } } + return this.hash; } } From e5fbebe1cfdf318b5ff71181689fb06bef7b75a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bojarski?= <54240434+letypequividelespoubelles@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:27:36 +0100 Subject: [PATCH 10/19] skip more test --- .../java/net/consensys/linea/BlockchainReferenceTestTools.java | 1 + 1 file changed, 1 insertion(+) diff --git a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java index ee2ec95c25..d3e3c8f51a 100644 --- a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java +++ b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java @@ -126,6 +126,7 @@ public class BlockchainReferenceTestTools { PARAMS.ignore("StrangeContractCreation_London[London]"); PARAMS.ignore("SuicideIssue_London[London]"); PARAMS.ignore("DelegateCallSpam_London[London]"); + PARAMS.ignore(("OverflowGasRequire2_d0g0v0_London[London]")); // Don't do time-consuming tests. PARAMS.ignore("CALLBlake2f_MaxRounds.*"); From 8bed7923006478e1347485cc7823418d46643ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bojarski?= <54240434+letypequividelespoubelles@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:29:12 +0100 Subject: [PATCH 11/19] one more --- .../java/net/consensys/linea/BlockchainReferenceTestTools.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java index d3e3c8f51a..1e4127ea7b 100644 --- a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java +++ b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java @@ -126,7 +126,8 @@ public class BlockchainReferenceTestTools { PARAMS.ignore("StrangeContractCreation_London[London]"); PARAMS.ignore("SuicideIssue_London[London]"); PARAMS.ignore("DelegateCallSpam_London[London]"); - PARAMS.ignore(("OverflowGasRequire2_d0g0v0_London[London]")); + PARAMS.ignore("OverflowGasRequire2_d0g0v0_London[London]"); + PARAMS.ignore("HighGasLimit_d0g0v0_London[London]"); // Don't do time-consuming tests. PARAMS.ignore("CALLBlake2f_MaxRounds.*"); From f8af05bc61eeae2d88d2455fce0a328a8224cf90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20B=C3=A9gassat?= Date: Tue, 26 Nov 2024 22:14:43 +0700 Subject: [PATCH 12/19] fix: increment failure counter + shorter error message --- .../src/test/java/net/consensys/linea/UnitTestWatcher.java | 2 +- .../ContextFamilyTests/MessageCallTests.java | 5 +++++ .../ContextFamilyTests/RootOfMessageCallTests.java | 3 +++ .../net/consensys/linea/reporting/TestOutcomeWriterTool.java | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java index a2b9518967..aa051e9d41 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java @@ -32,7 +32,7 @@ public class UnitTestWatcher implements TestWatcher { public void testFailed(ExtensionContext context, Throwable cause) { String testName = context.getDisplayName(); log.info("Adding failure for {}", testName); - TestOutcomeWriterTool.addFailure(FAILED, cause.getMessage(), testName); + TestOutcomeWriterTool.addFailure(FAILED, cause.getMessage().split(System.lineSeparator(), 2)[0], testName); log.info("Failure added for {}", testName); } diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java index 5408d06942..bf4ee0cb7b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java @@ -23,12 +23,16 @@ import java.util.ArrayList; import java.util.List; +import kotlin.Unit; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.extension.TestWatcher; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; @@ -42,6 +46,7 @@ public class MessageCallTests { @EnumSource( value = OpCode.class, names = {"CALL", "CALLCODE", "DELEGATECALL", "STATICCALL"}) + @ExtendWith(UnitTestWatcher.class) public void testWithCall(OpCode opCode) { ToyAccount recipientAccount = buildRecipient(opCode); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java index 6d9f6e5c91..c3b5224a1b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java @@ -16,10 +16,13 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.MultiOpCodeSmcs.allContextOpCodes; +import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +@ExtendWith(UnitTestWatcher.class) public class RootOfMessageCallTests { @Test diff --git a/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java b/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java index de218fd347..f8042c929a 100644 --- a/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java +++ b/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java @@ -46,6 +46,7 @@ public static void addFailed() { modulesToConstraintsToTests = new ConcurrentHashMap<>(); public static void addFailure(String type, String cause, String test) { + failedCounter.incrementAndGet(); modulesToConstraintsToTests .computeIfAbsent(type, t -> new ConcurrentHashMap<>()) .computeIfAbsent(cause, t -> new ConcurrentSkipListSet<>()) From 96aa0bea2a6f410da6effd8086b0f1367827c709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20B=C3=A9gassat?= Date: Tue, 26 Nov 2024 22:17:22 +0700 Subject: [PATCH 13/19] spotless --- .../src/test/java/net/consensys/linea/UnitTestWatcher.java | 3 ++- .../ContextFamilyTests/MessageCallTests.java | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java index aa051e9d41..d622228347 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java @@ -32,7 +32,8 @@ public class UnitTestWatcher implements TestWatcher { public void testFailed(ExtensionContext context, Throwable cause) { String testName = context.getDisplayName(); log.info("Adding failure for {}", testName); - TestOutcomeWriterTool.addFailure(FAILED, cause.getMessage().split(System.lineSeparator(), 2)[0], testName); + TestOutcomeWriterTool.addFailure( + FAILED, cause.getMessage().split(System.lineSeparator(), 2)[0], testName); log.info("Failure added for {}", testName); } diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java index bf4ee0cb7b..6820156df7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.List; -import kotlin.Unit; import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import net.consensys.linea.zktracer.opcode.OpCode; @@ -32,7 +31,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.TestWatcher; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; From ebb23e97fe284f56dea93263594f610d8609bedf Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Wed, 27 Nov 2024 11:48:25 +0100 Subject: [PATCH 14/19] testing mem issue --- .../services/org.junit.platform.launcher.LauncherSessionListener | 1 - 1 file changed, 1 deletion(-) delete mode 100644 arithmetization/src/test/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener diff --git a/arithmetization/src/test/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener b/arithmetization/src/test/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener deleted file mode 100644 index 9e52c537e4..0000000000 --- a/arithmetization/src/test/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener +++ /dev/null @@ -1 +0,0 @@ -net.consensys.linea.UnitTestOutcomeWriter \ No newline at end of file From dafe2c2a96820d141b929acef604bbccc4701ae4 Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Wed, 27 Nov 2024 13:36:26 +0100 Subject: [PATCH 15/19] remove tests watcher --- .../test/java/net/consensys/linea/UnitTestOutcomeWriter.java | 2 +- .../src/test/java/net/consensys/linea/UnitTestWatcher.java | 2 +- .../consensys/linea/continoustracing/ContinuousTracerTest.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1031Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1090Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1109Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1116Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1123Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1124Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1126Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1136Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1145Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1169Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1180Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1216Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1264Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1267Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1274Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1279Tests.java | 2 +- .../java/net/consensys/linea/replaytests/Issue1280Tests.java | 2 +- .../java/net/consensys/linea/replaytests/LeosNewRanges.java | 2 +- .../consensys/linea/replaytests/LeosNewRangesSplitTests.java | 2 +- .../test/java/net/consensys/linea/replaytests/NightlyTests.java | 2 +- .../java/net/consensys/linea/replaytests/ReplayTestTools.java | 2 +- .../test/java/net/consensys/linea/replaytests/ReplayTests.java | 2 +- .../net/consensys/linea/zktracer/ExampleMultiBlockTest.java | 2 +- .../java/net/consensys/linea/zktracer/ExampleSolidityTest.java | 2 +- .../test/java/net/consensys/linea/zktracer/ExampleTxTest.java | 2 +- .../test/java/net/consensys/linea/zktracer/ExceptionsTest.java | 2 +- .../test/java/net/consensys/linea/zktracer/ZkTracerTest.java | 2 +- .../net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java | 2 +- .../linea/zktracer/containers/CountOnlyModuleTest.java | 2 +- .../net/consensys/linea/zktracer/containers/CountOnlyTests.java | 2 +- .../consensys/linea/zktracer/containers/StackedListTests.java | 2 +- .../consensys/linea/zktracer/containers/StackedSetTests.java | 2 +- .../InvalidCodePrefixAndMaxCodeSizeExceptionTest.java | 2 +- .../linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java | 2 +- .../linea/zktracer/exceptions/MemoryExpansionExceptionTest.java | 2 +- .../linea/zktracer/exceptions/OutOfGasExceptionTest.java | 2 +- .../linea/zktracer/exceptions/OutOfSStoreExceptionTest.java | 2 +- .../linea/zktracer/exceptions/StackOverflowExceptionTest.java | 2 +- .../linea/zktracer/exceptions/StackUnderflowExceptionTest.java | 2 +- .../linea/zktracer/exceptions/StaticExceptionTest.java | 2 +- .../linea/zktracer/instructionprocessing/BalanceTests.java | 2 +- .../linea/zktracer/instructionprocessing/CallDataTests.java | 2 +- .../zktracer/instructionprocessing/CallTrivialCasesTest.java | 2 +- .../CodeCopyingInitializationCodeTest.java | 2 +- .../ContextFamilyTests/MessageCallTests.java | 2 +- .../ContextFamilyTests/RootOfMessageCallTests.java | 2 +- .../instructionprocessing/ContractModifyingStorageTest.java | 2 +- .../instructionprocessing/EmptyDeploymentsInTheRootTest.java | 2 +- .../ExtCodeHashAndAccountExistenceTests.java | 2 +- .../linea/zktracer/instructionprocessing/ImmediateRevert.java | 2 +- .../instructionprocessing/JumpDestinationVettingTest.java | 2 +- .../linea/zktracer/instructionprocessing/JumpTest.java | 2 +- .../linea/zktracer/instructionprocessing/JumpiTest.java | 2 +- .../linea/zktracer/instructionprocessing/KeccakTests.java | 2 +- .../zktracer/instructionprocessing/ReturnDataCopyTest.java | 2 +- .../zktracer/instructionprocessing/SimpleGasCalculatorTest.java | 2 +- .../linea/zktracer/instructionprocessing/StorageTest.java | 2 +- .../zktracer/instructionprocessing/callTests/DoubleCall.java | 2 +- .../zktracer/instructionprocessing/callTests/TrimmingTests.java | 2 +- .../zktracer/instructionprocessing/callTests/Utilities.java | 2 +- .../callTests/abort/BalanceAbortTests.java | 2 +- .../callTests/abort/CallStackDepthAbortTests.java | 2 +- .../callTests/abort/MultiCallAbortTests.java | 2 +- .../instructionprocessing/callTests/eoa/gasStipendTests.java | 2 +- .../callTests/smc/monoOpCodeTargets/ImmediateInvalid.java | 2 +- .../callTests/smc/monoOpCodeTargets/singleStop.java | 2 +- .../net/consensys/linea/zktracer/module/HexStringUtils.java | 2 +- .../java/net/consensys/linea/zktracer/module/add/AddTest.java | 2 +- .../java/net/consensys/linea/zktracer/module/bin/BinTest.java | 2 +- .../linea/zktracer/module/blockhash/BlockhashTest.java | 2 +- .../net/consensys/linea/zktracer/module/ecdata/EcAddTest.java | 2 +- .../net/consensys/linea/zktracer/module/ecdata/EcDataTest.java | 2 +- .../consensys/linea/zktracer/module/ecdata/EcRecoverTest.java | 2 +- .../module/ecdata/ecpairing/EcPairingArgumentsSingleton.java | 2 +- .../zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java | 2 +- .../zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java | 2 +- .../linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java | 2 +- .../java/net/consensys/linea/zktracer/module/exp/ExpTest.java | 2 +- .../linea/zktracer/module/ext/TestDuplicatedOperations.java | 2 +- .../linea/zktracer/module/hub/CallEmptyNoStopTest.java | 2 +- .../consensys/linea/zktracer/module/hub/MessageFrameTest.java | 2 +- .../linea/zktracer/module/hub/SimpleStorageConsistency.java | 2 +- .../net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java | 2 +- .../net/consensys/linea/zktracer/module/hub/TxSkipTests.java | 2 +- .../java/net/consensys/linea/zktracer/module/mod/ModTest.java | 2 +- .../consensys/linea/zktracer/module/mul/ExpExtensiveTest.java | 2 +- .../java/net/consensys/linea/zktracer/module/mxp/MxpTest.java | 2 +- .../net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java | 2 +- .../net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java | 2 +- .../net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java | 2 +- .../net/consensys/linea/zktracer/module/oob/OobCallTest.java | 2 +- .../linea/zktracer/module/oob/OobJumpAndJumpiTest.java | 2 +- .../net/consensys/linea/zktracer/module/oob/OobRdcTest.java | 2 +- .../linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java | 2 +- .../consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java | 2 +- .../linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java | 2 +- .../net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java | 2 +- .../java/net/consensys/linea/zktracer/module/rom/RomTest.java | 2 +- .../consensys/linea/zktracer/module/shf/ShfExtensiveTest.java | 2 +- .../java/net/consensys/linea/zktracer/module/stp/StpTest.java | 2 +- .../net/consensys/linea/zktracer/module/trm/TrmTracerTest.java | 2 +- .../consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java | 2 +- .../consensys/linea/zktracer/precompiles/EcrecoverTests.java | 2 +- .../net/consensys/linea/zktracer/precompiles/ModexpTests.java | 2 +- .../java/net/consensys/linea/zktracer/types/BytecodeTest.java | 2 +- 108 files changed, 108 insertions(+), 108 deletions(-) diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java index bc3b911191..57226bd3d6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java @@ -20,7 +20,7 @@ import org.junit.platform.launcher.LauncherSession; import org.junit.platform.launcher.LauncherSessionListener; -@ExtendWith(UnitTestWatcher.class) + public class UnitTestOutcomeWriter implements LauncherSessionListener { public static final String FILE_NAME = "UnitTestsResults.json"; diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java index d622228347..0228f911f2 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.TestWatcher; @Slf4j -@ExtendWith(UnitTestWatcher.class) + public class UnitTestWatcher implements TestWatcher { private String FAILED = "FAILED"; diff --git a/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java index d02622abf3..0c1730b8c7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java @@ -41,7 +41,7 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -@ExtendWith(UnitTestWatcher.class) + @ExtendWith(MockitoExtension.class) public class ContinuousTracerTest { private static final Hash BLOCK_HASH = diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java index eeb1105b1a..401114e414 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1031Tests { // @Disabled diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java index 39ae4455a7..72b5511293 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1090Tests { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java index ce2c308fc9..6117480a0f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1109Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java index eebd5b7120..fa43703e70 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java @@ -24,7 +24,7 @@ /** Insufficient balance at some address */ @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1116Tests { // @Disabled diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java index 57db965435..316752d122 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java @@ -25,7 +25,7 @@ /** Same underlying NPE issue as that solved in #1216. */ @Tag("replay") @Tag("nightly") -@ExtendWith(UnitTestWatcher.class) + public class Issue1123Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java index e6be5c6148..1577238911 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java @@ -25,7 +25,7 @@ /** STP constraints were failing for these ranges */ @Tag("replay") @Tag("nightly") -@ExtendWith(UnitTestWatcher.class) + public class Issue1124Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java index 8ac6e51fc4..0c8d461c55 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java @@ -39,7 +39,7 @@ *

See https://github.com/Consensys/linea-tracer/issues/1121 */ @Tag("nightly") -@ExtendWith(UnitTestWatcher.class) + public class Issue1126Tests { @Test void test_3108622_3108633() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java index f421e69072..75157bccdc 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java @@ -41,7 +41,7 @@ */ @Tag("replay") @Tag("nightly") -@ExtendWith(UnitTestWatcher.class) + public class Issue1136Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java index addfd73141..d03618b860 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1145Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java index c108722e28..5280656311 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") -@ExtendWith(UnitTestWatcher.class) + public class Issue1169Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java index 40620629d7..a83ad3c4b1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java @@ -28,7 +28,7 @@ /** This range broke the MOD module's mod.set-absolute-values constraint. */ @Tag("nightly") @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1180Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java index c39e029118..1224d973a8 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java @@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class Issue1216Tests { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java index cbec8ccbd6..cf4e79947f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1264Tests { @Test void issue_1216_mainnet_2321460_2321556() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java index bcb0710e9b..b9ac941571 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java @@ -24,7 +24,7 @@ @Tag("nightly") @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1267Tests { // splitting of 3506963-3507013 diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java index 9eb044b426..2d8874be0c 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java @@ -25,7 +25,7 @@ /** Failing block for ADD ?! */ @Tag("nightly") @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1274Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java index f239c101b2..12ac1e03da 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java @@ -24,7 +24,7 @@ @Tag("nightly") @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class Issue1279Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java index b5e8198567..53112cf667 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") -@ExtendWith(UnitTestWatcher.class) + public class Issue1280Tests { // 3901959-3902032 diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java index f35009b64e..e427d1d12c 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Disabled -@ExtendWith(UnitTestWatcher.class) + public class LeosNewRanges { @Test void leos_new_ranges_2258472_2258607() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java index 1d2a12113c..12d295b7b7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Disabled -@ExtendWith(UnitTestWatcher.class) + public class LeosNewRangesSplitTests { @Test void split_range_2258472_2258479() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java index 1ab0de6460..2fc1c0cf70 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") -@ExtendWith(UnitTestWatcher.class) + public class NightlyTests { @Test void leoFailingRange() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java index 7efb819638..472d54b8b1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java @@ -55,7 +55,7 @@ * One can run this command: scripts/capture.pl --start xxx --end yyy --output my-test-case.json.gz */ @Slf4j -@ExtendWith(UnitTestWatcher.class) + public class ReplayTestTools { /** A list of block numbers used for testing purposes in {@link ReplayTests}. */ static List BLOCK_NUMBERS = new ArrayList<>(); diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java index fc540b6bbe..4f8223f9f3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java @@ -34,7 +34,7 @@ import org.junit.jupiter.params.provider.MethodSource; @Tag("replay") -@ExtendWith(UnitTestWatcher.class) + public class ReplayTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java index 5a5a2f5c05..a3eb25a273 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java @@ -53,7 +53,7 @@ import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.generated.Uint256; -@ExtendWith(UnitTestWatcher.class) + class ExampleMultiBlockTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java index 89bdc28532..96453e17a9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java @@ -50,7 +50,7 @@ import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.generated.Uint256; -@ExtendWith(UnitTestWatcher.class) + public class ExampleSolidityTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java index 3602782d4c..092813784f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java @@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + class ExampleTxTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java index 76f7172dd5..7129677998 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ExceptionsTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java index 11e408001d..c01a0acddb 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ZkTracerTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java index 24301e89d2..3167381938 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java @@ -29,7 +29,7 @@ * Test class related to {@link BaseTheta} data structure, which is an extension of {@link * BytesArray}, with support for high and low bytes' manipulation. */ -@ExtendWith(UnitTestWatcher.class) + public class BaseThetaTest { @Test public void baseThetaTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java index 09afd378f0..1566c61194 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class CountOnlyModuleTest { @Test void test() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java index b3a1b97fa3..9aad625f18 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class CountOnlyTests { @Test void testAddedToFront() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java index 030e84e325..ec6a96f2db 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class StackedListTests { private static final AddOperation ONE_PLUS_ONE = new AddOperation( diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java index b88e5af313..a1566cb8aa 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class StackedSetTests { private static final AddOperation ONE_PLUS_ONE = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java index 6fac1329b9..dba22c4f8e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java @@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class InvalidCodePrefixAndMaxCodeSizeExceptionTest { // Here it is attempted to trigger the INVALID_CODE_PREFIX exception using a deployment diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java index 5cb71d1442..8c4abc26de 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class InvalidOpcodeExceptionTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java index 65a36d4d6e..debd46d2a7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java @@ -37,7 +37,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class MemoryExpansionExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java index 5dbac56b3d..cd882aa245 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java @@ -34,7 +34,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class OutOfGasExceptionTest { // TODO: add tests when address is warm. Use constants such as G_WARM_ACCESS etc diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java index e7254b9f99..0a6e531e9b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java @@ -26,7 +26,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; -@ExtendWith(UnitTestWatcher.class) + public class OutOfSStoreExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java index 91859d6dc7..deade9106b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java @@ -32,7 +32,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class StackOverflowExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java index 6ed86b7145..d5dc71a582 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java @@ -32,7 +32,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class StackUnderflowExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java index 6b408932e7..b364cf7e55 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java @@ -33,7 +33,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; -@ExtendWith(UnitTestWatcher.class) + public class StaticExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java index 6c7f1218bb..2d33bf1a25 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java @@ -34,7 +34,7 @@ * the purpose of these tests is to track balance updates for the sender, the coinbase and, in case * of a reverted transaction, the recipient. */ -@ExtendWith(UnitTestWatcher.class) + public class BalanceTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java index 621a9d56ea..9e2afcb3a3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java @@ -35,7 +35,7 @@ * more generally deployment context's, call data is empty and the tests are "trivial" in some * sense. They aren't for message calls. */ -@ExtendWith(UnitTestWatcher.class) + public class CallDataTests { // @Test // void transactionCallDataForMessageCallTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java index 9d01c49195..43426d1715 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class CallTrivialCasesTest { @Test void eoaCallScenarioTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java index 36127a8271..81cfa49ade 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java @@ -44,7 +44,7 @@ *

This test answers the point raised in this issue. */ -@ExtendWith(UnitTestWatcher.class) + public class CodeCopyingInitializationCodeTest { final Bytes initCodeSimple = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java index 6820156df7..dde1028f65 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java @@ -44,7 +44,7 @@ public class MessageCallTests { @EnumSource( value = OpCode.class, names = {"CALL", "CALLCODE", "DELEGATECALL", "STATICCALL"}) - @ExtendWith(UnitTestWatcher.class) + public void testWithCall(OpCode opCode) { ToyAccount recipientAccount = buildRecipient(opCode); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java index c3b5224a1b..e05b76977e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class RootOfMessageCallTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java index 596787d1d4..8f9eb7b460 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java @@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ContractModifyingStorageTest { /* diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java index 612910c1ff..34089d1569 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java @@ -40,7 +40,7 @@ * (if present) should be treated properly and the update to the deployment account is accounted for * in the relevant row. */ -@ExtendWith(UnitTestWatcher.class) + public class EmptyDeploymentsInTheRootTest { final Bytes initCodeEmptyDeployment = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java index cfa5861835..ef2df5e43c 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ExtCodeHashAndAccountExistenceTests { /** * EXTCODEHASH targets a precompile (which is DEAD initially) CALL the same precompile diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java index f067660c34..3eb9181bfc 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ImmediateRevert { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java index eed2d2ed11..e10822cba1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java @@ -30,7 +30,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class JumpDestinationVettingTest { final Random random = new Random(1); final int N_JUMPS = 3; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java index a7960f996d..0594065b53 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java @@ -27,7 +27,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class JumpTest { // NOTE: the bytecode we propose will at time use the following offsets (unless pcNew is large) diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java index f6c4773e3f..3c2a573aba 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java @@ -32,7 +32,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class JumpiTest { // NOTE: the bytecode we propose will at time use the following offsets (unless pcNew is large) diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java index aecaf5b2f4..cb58c68427 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class KeccakTests { @Test void singleEmptyKeccak() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java index a10a9ae319..aafb8290a8 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ReturnDataCopyTest { @Test void testReturnDataCopyFromSha256() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java index b8ab424da7..03aea2c5c1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class SimpleGasCalculatorTest { @Test void simpleGasCalculatorTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java index c9a1a3312a..a4ef085ab1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class StorageTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java index 6f246c1a2c..9c68eadb85 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java @@ -26,7 +26,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; -@ExtendWith(UnitTestWatcher.class) + public class DoubleCall { /** Same selfDestructorAddress */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java index 9ce1832300..268a1a4c57 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class TrimmingTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java index 8d2405da5f..080437036b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java @@ -23,7 +23,7 @@ import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class Utilities { public static final String fullEoaAddress = "000000000000000000000000abcdef0123456789"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java index 7a781426d3..3cbc4fba99 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java @@ -34,7 +34,7 @@ *

- scn/CALL_ABORT_WONT_REVERT The main point being: (unexceptional) aborted CALL's warm * up the target account. */ -@ExtendWith(UnitTestWatcher.class) + public class BalanceAbortTests { final String eoaAddress = "abcdef0123456789"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java index e200ebc4d7..4ff36dd51d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java @@ -30,7 +30,7 @@ * Attempt to trigger the maximum call stack depth abort. We put everything to 0 to avoid memory * expansion costs. We will want to revert so we transfer value to see the effect of reverting. */ -@ExtendWith(UnitTestWatcher.class) + public class CallStackDepthAbortTests { @ParameterizedTest @EnumSource( diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java index 37e74eaadf..ff42f047b7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java @@ -26,7 +26,7 @@ import org.junit.jupiter.api.extension.ExtendWith; /** CALL/ABORT's are revert sensitive. We test this with two CALL's. */ -@ExtendWith(UnitTestWatcher.class) + public class MultiCallAbortTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java index 2c0cda3046..355a20e0c6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java @@ -28,7 +28,7 @@ * Transferring nonzero value provides a gas stipend to the callee. This stipend will immediately be * restituted to the caller in case of an EOA call. */ -@ExtendWith(UnitTestWatcher.class) + public class gasStipendTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java index 32456a9919..6f931dd940 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ImmediateInvalid { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java index ec1d6652cb..5f8e4b8aeb 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java @@ -27,7 +27,7 @@ * Simplest case where we enter a smart contract. The called smart contract executes a single STOP * opcode (which is free of charge). No value is transferred. */ -@ExtendWith(UnitTestWatcher.class) + public class singleStop { /** This test should trigger the scenario/CALL_TO_SMC_SUCCESS_WONT_REVERT scenario. */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java index 3b36ac06f9..34f919450d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java @@ -20,7 +20,7 @@ import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class HexStringUtils { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java index 7af4609d2e..8e3a35c16b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class AddTest { @Test void testSmallZeroAdd() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java index ad9e374f59..867d1f49bd 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class BinTest { @Test public void edgeCase() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java index 2112b86c0d..8da99847b2 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class BlockhashTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java index c56342cf19..6909c29621 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java @@ -30,7 +30,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class EcAddTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java index 8e5d5e41a1..e9364b472e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class EcDataTest { // TODO: add documentation diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java index 91a289e26b..571b84162e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java @@ -35,7 +35,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class EcRecoverTest { @Test void testEcRecoverWithEmptyExt() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java index d6092799f5..a4f517716a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java @@ -22,7 +22,7 @@ @Getter @Setter -@ExtendWith(UnitTestWatcher.class) + public class EcPairingArgumentsSingleton { private static EcPairingArgumentsSingleton instance; private String arguments; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java index 259d335809..a0ef7b8b23 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.provider.Arguments; -@ExtendWith(UnitTestWatcher.class) + public class EcPairingTestSupport { private static final String DELIMITER_CSV = ","; static final String DELIMITER_PAIRINGS = "_"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java index 896c25fd39..a95b645cd5 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestWatcher; -@ExtendWith(UnitTestWatcher.class) + public class EcPairingTestWatcher implements TestWatcher { final String timestamp = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); final List testsToWatch = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java index 232ace7116..2b0af2360a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java @@ -49,7 +49,7 @@ // that can be used to run the same test cases with @CsvFileSource @ExtendWith(EcPairingTestWatcher.class) -@ExtendWith(UnitTestWatcher.class) + public class EcPairingrTest { // https://github.com/Consensys/linea-arithmetization/issues/822 diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java index 43f7297f6b..36d326cb7c 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java @@ -39,7 +39,7 @@ import org.junit.jupiter.params.provider.ValueSource; @Slf4j -@ExtendWith(UnitTestWatcher.class) + public class ExpTest { // Generates 128, 64, 2, 1 as LD (leading digit) // LD_INDICES | LD diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java index a33a9d8742..ba99f46ab4 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class TestDuplicatedOperations { @Test void testDuplicate() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java index aae97ffa54..ac04951d9a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java @@ -36,7 +36,7 @@ import org.junit.jupiter.api.extension.ExtendWith; /** Ensure that calling a contract with empty code does not generate a virtual STOP trace */ -@ExtendWith(UnitTestWatcher.class) + public class CallEmptyNoStopTest { @Test void test() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java index 3d8166dc6f..8a8e069298 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class MessageFrameTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java index 0f189f8c1e..88d7718250 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java @@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class SimpleStorageConsistency { private final Address receiverAddress = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java index df154ee744..8f9065ade9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class TestTwoPlusTwo { @Test void testAssembler() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java index f9c844c13b..c7361e802a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java @@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class TxSkipTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java index 8c57965ebc..ae379473d8 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ModTest { @Test void testSignedSmod() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java index 6b949402ab..3b51c471dc 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java @@ -40,7 +40,7 @@ @Accessors(fluent = true) @Tag("weekly") -@ExtendWith(UnitTestWatcher.class) + public class ExpExtensiveTest { // Test vectors static final String P_1 = "f076b857fa9947c1f9ec558262c72704099ca8cd325566f73fb99238102ed171"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java index d59a278e15..512b005d7f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java @@ -54,7 +54,7 @@ // https://github.com/Consensys/linea-besu-plugin/issues/197 @Execution(ExecutionMode.SAME_THREAD) -@ExtendWith(UnitTestWatcher.class) + public class MxpTest { /** Construct non-static instance to prevent sharing across tests. */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java index 81af42de85..e77ddfc33e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java @@ -33,7 +33,7 @@ import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class MxpTestUtils { public static final EWord TWO_POW_128 = EWord.of(EWord.ONE.shiftLeft(128)); public static final EWord TWO_POW_32 = EWord.of(EWord.ONE.shiftLeft(32)); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java index 160d4df184..710fb60849 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.TestFactory; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class MxpTracerTest { // private static final Random RAND = new Random(); private static final int TEST_REPETITIONS = 2; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java index 251340b728..8c120e8d7b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class SeveralKeccaks { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java index 89a652195d..f8bdf3c17c 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java @@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class OobCallTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java index 71080e976d..b3b0920711 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java @@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class OobJumpAndJumpiTest { public static final BigInteger TWO_POW_128_MINUS_ONE = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java index 0cc7d098bf..c715e59021 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class OobRdcTest { public static final BigInteger TWO_POW_128_LEFT = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java index f975929238..a62346dc50 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java @@ -37,7 +37,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class OobSha2RipemdIdentityTest { Random random = new Random(1L); static final int[] argSizes = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java index 24a10acad9..f94cb279a1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java @@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class TestRlpAddress { private final Random rnd = new Random(666); private final RlpRandEdgeCase util = new RlpRandEdgeCase(); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java index 92cfd86b00..175dd43b69 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java @@ -22,7 +22,7 @@ import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class RlpRandEdgeCase { /** * NOTE: Do not make this static as it will introduce non-deterministic behaviour into the testing diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java index ba0dd61cf8..796ae3e2d1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class LogTest { @Test void log2Test() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java index f82b47fff3..e2e6173112 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java @@ -30,7 +30,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@ExtendWith(UnitTestWatcher.class) + public class RomTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java index 65d1ae1979..b758f0b735 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java @@ -41,7 +41,7 @@ @Accessors(fluent = true) @Tag("weekly") -@ExtendWith(UnitTestWatcher.class) + public class ShfExtensiveTest { private static final List shfTestSourceList = new ArrayList<>(); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java index 601f17b2d8..fa1d928948 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java @@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class StpTest { /** * NOTE: Do not make this static as it will introduce non-deterministic behaviour into the testing diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java index 37029cfb5e..97e1384649 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java @@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class TrmTracerTest { private final Bytes32 RANDOM_STRING_FROM_THE_INTERNET = Bytes32.fromHexString( diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java index 8714454f0f..9d83c6ea71 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class WcpEdgeCaseTest { @Test void testZeroAndHugeArgs() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java index db635f3b1e..3f12f3f700 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class EcrecoverTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java index 0556d26ee4..5ddfda2bb9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java @@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + public class ModexpTests { // some 10 decimal digit primes in the range [256 ** 3, 256 ** 4[ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java index 039567b043..36150a3e79 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -@ExtendWith(UnitTestWatcher.class) + class BytecodeTest { @Test From 46a3ddf1ae1bc0090c6f2f9c925c7fee4416c26a Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Wed, 27 Nov 2024 13:56:40 +0100 Subject: [PATCH 16/19] spotless --- .../test/java/net/consensys/linea/UnitTestOutcomeWriter.java | 2 -- .../src/test/java/net/consensys/linea/UnitTestWatcher.java | 2 -- .../linea/continoustracing/ContinuousTracerTest.java | 2 -- .../java/net/consensys/linea/replaytests/Issue1031Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1090Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1109Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1116Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1123Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1124Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1126Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1136Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1145Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1169Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1180Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1216Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1264Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1267Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1274Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1279Tests.java | 3 --- .../java/net/consensys/linea/replaytests/Issue1280Tests.java | 3 --- .../java/net/consensys/linea/replaytests/LeosNewRanges.java | 3 --- .../consensys/linea/replaytests/LeosNewRangesSplitTests.java | 3 --- .../java/net/consensys/linea/replaytests/NightlyTests.java | 3 --- .../java/net/consensys/linea/replaytests/ReplayTestTools.java | 3 --- .../java/net/consensys/linea/replaytests/ReplayTests.java | 3 --- .../net/consensys/linea/zktracer/ExampleMultiBlockTest.java | 3 --- .../net/consensys/linea/zktracer/ExampleSolidityTest.java | 3 --- .../test/java/net/consensys/linea/zktracer/ExampleTxTest.java | 3 --- .../java/net/consensys/linea/zktracer/ExceptionsTest.java | 3 --- .../test/java/net/consensys/linea/zktracer/ZkTracerTest.java | 3 --- .../consensys/linea/zktracer/bytestheta/BaseThetaTest.java | 3 --- .../linea/zktracer/containers/CountOnlyModuleTest.java | 3 --- .../consensys/linea/zktracer/containers/CountOnlyTests.java | 3 --- .../consensys/linea/zktracer/containers/StackedListTests.java | 3 --- .../consensys/linea/zktracer/containers/StackedSetTests.java | 3 --- .../InvalidCodePrefixAndMaxCodeSizeExceptionTest.java | 3 --- .../linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java | 3 --- .../zktracer/exceptions/MemoryExpansionExceptionTest.java | 3 --- .../linea/zktracer/exceptions/OutOfGasExceptionTest.java | 3 --- .../linea/zktracer/exceptions/OutOfSStoreExceptionTest.java | 3 --- .../linea/zktracer/exceptions/StackOverflowExceptionTest.java | 3 --- .../zktracer/exceptions/StackUnderflowExceptionTest.java | 3 --- .../linea/zktracer/exceptions/StaticExceptionTest.java | 3 --- .../linea/zktracer/instructionprocessing/BalanceTests.java | 3 --- .../linea/zktracer/instructionprocessing/CallDataTests.java | 3 --- .../zktracer/instructionprocessing/CallTrivialCasesTest.java | 3 --- .../CodeCopyingInitializationCodeTest.java | 3 --- .../ContextFamilyTests/MessageCallTests.java | 3 --- .../ContextFamilyTests/RootOfMessageCallTests.java | 3 --- .../instructionprocessing/ContractModifyingStorageTest.java | 3 --- .../instructionprocessing/EmptyDeploymentsInTheRootTest.java | 3 --- .../ExtCodeHashAndAccountExistenceTests.java | 3 --- .../linea/zktracer/instructionprocessing/ImmediateRevert.java | 3 --- .../instructionprocessing/JumpDestinationVettingTest.java | 3 --- .../linea/zktracer/instructionprocessing/JumpTest.java | 3 --- .../linea/zktracer/instructionprocessing/JumpiTest.java | 3 --- .../linea/zktracer/instructionprocessing/KeccakTests.java | 3 --- .../zktracer/instructionprocessing/ReturnDataCopyTest.java | 3 --- .../instructionprocessing/SimpleGasCalculatorTest.java | 3 --- .../linea/zktracer/instructionprocessing/StorageTest.java | 3 --- .../zktracer/instructionprocessing/callTests/DoubleCall.java | 3 --- .../instructionprocessing/callTests/TrimmingTests.java | 3 --- .../zktracer/instructionprocessing/callTests/Utilities.java | 3 --- .../callTests/abort/BalanceAbortTests.java | 3 --- .../callTests/abort/CallStackDepthAbortTests.java | 3 --- .../callTests/abort/MultiCallAbortTests.java | 3 --- .../instructionprocessing/callTests/eoa/gasStipendTests.java | 3 --- .../callTests/smc/monoOpCodeTargets/ImmediateInvalid.java | 3 --- .../callTests/smc/monoOpCodeTargets/singleStop.java | 3 --- .../net/consensys/linea/zktracer/module/HexStringUtils.java | 4 ---- .../java/net/consensys/linea/zktracer/module/add/AddTest.java | 3 --- .../java/net/consensys/linea/zktracer/module/bin/BinTest.java | 3 --- .../linea/zktracer/module/blockhash/BlockhashTest.java | 3 --- .../net/consensys/linea/zktracer/module/ecdata/EcAddTest.java | 3 --- .../consensys/linea/zktracer/module/ecdata/EcDataTest.java | 3 --- .../consensys/linea/zktracer/module/ecdata/EcRecoverTest.java | 3 --- .../module/ecdata/ecpairing/EcPairingArgumentsSingleton.java | 3 --- .../module/ecdata/ecpairing/EcPairingTestSupport.java | 3 --- .../module/ecdata/ecpairing/EcPairingTestWatcher.java | 3 --- .../zktracer/module/ecdata/ecpairing/EcPairingrTest.java | 2 -- .../java/net/consensys/linea/zktracer/module/exp/ExpTest.java | 3 --- .../linea/zktracer/module/ext/TestDuplicatedOperations.java | 3 --- .../linea/zktracer/module/hub/CallEmptyNoStopTest.java | 3 --- .../consensys/linea/zktracer/module/hub/MessageFrameTest.java | 3 --- .../linea/zktracer/module/hub/SimpleStorageConsistency.java | 3 --- .../consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java | 3 --- .../net/consensys/linea/zktracer/module/hub/TxSkipTests.java | 3 --- .../java/net/consensys/linea/zktracer/module/mod/ModTest.java | 3 --- .../consensys/linea/zktracer/module/mul/ExpExtensiveTest.java | 3 --- .../java/net/consensys/linea/zktracer/module/mxp/MxpTest.java | 3 --- .../net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java | 3 --- .../consensys/linea/zktracer/module/mxp/MxpTracerTest.java | 3 --- .../consensys/linea/zktracer/module/mxp/SeveralKeccaks.java | 3 --- .../net/consensys/linea/zktracer/module/oob/OobCallTest.java | 3 --- .../linea/zktracer/module/oob/OobJumpAndJumpiTest.java | 3 --- .../net/consensys/linea/zktracer/module/oob/OobRdcTest.java | 3 --- .../linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java | 3 --- .../linea/zktracer/module/rlpaddr/TestRlpAddress.java | 3 --- .../linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java | 3 --- .../consensys/linea/zktracer/module/rlptxrcpt/LogTest.java | 3 --- .../java/net/consensys/linea/zktracer/module/rom/RomTest.java | 3 --- .../consensys/linea/zktracer/module/shf/ShfExtensiveTest.java | 3 --- .../java/net/consensys/linea/zktracer/module/stp/StpTest.java | 3 --- .../consensys/linea/zktracer/module/trm/TrmTracerTest.java | 3 --- .../consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java | 3 --- .../consensys/linea/zktracer/precompiles/EcrecoverTests.java | 3 --- .../net/consensys/linea/zktracer/precompiles/ModexpTests.java | 3 --- .../java/net/consensys/linea/zktracer/types/BytecodeTest.java | 3 --- 108 files changed, 321 deletions(-) diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java index 57226bd3d6..6b0050d900 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java @@ -16,11 +16,9 @@ import static net.consensys.linea.reporting.TestOutcomeWriterTool.writeToJsonFile; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.platform.launcher.LauncherSession; import org.junit.platform.launcher.LauncherSessionListener; - public class UnitTestOutcomeWriter implements LauncherSessionListener { public static final String FILE_NAME = "UnitTestsResults.json"; diff --git a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java index 0228f911f2..b12fbcd54e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java @@ -18,12 +18,10 @@ import lombok.extern.slf4j.Slf4j; import net.consensys.linea.reporting.TestOutcomeWriterTool; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestWatcher; @Slf4j - public class UnitTestWatcher implements TestWatcher { private String FAILED = "FAILED"; diff --git a/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java index 0c1730b8c7..dbfc69f63e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/continoustracing/ContinuousTracerTest.java @@ -22,7 +22,6 @@ import java.nio.file.Path; import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.corset.CorsetValidator; import net.consensys.linea.plugins.continoustracing.ContinuousTracer; import net.consensys.linea.plugins.continoustracing.ContinuousTracingConfiguration; @@ -41,7 +40,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; - @ExtendWith(MockitoExtension.class) public class ContinuousTracerTest { private static final Hash BLOCK_HASH = diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java index 401114e414..397247e380 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1031Tests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") - public class Issue1031Tests { // @Disabled diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java index 72b5511293..3f68d67970 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1090Tests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") - public class Issue1090Tests { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java index 6117480a0f..e743439591 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1109Tests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") - public class Issue1109Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java index fa43703e70..468dc64a31 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1116Tests.java @@ -17,14 +17,11 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** Insufficient balance at some address */ @Tag("replay") - public class Issue1116Tests { // @Disabled diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java index 316752d122..ced9556975 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1123Tests.java @@ -17,15 +17,12 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** Same underlying NPE issue as that solved in #1216. */ @Tag("replay") @Tag("nightly") - public class Issue1123Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java index 1577238911..af11b54161 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1124Tests.java @@ -17,15 +17,12 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** STP constraints were failing for these ranges */ @Tag("replay") @Tag("nightly") - public class Issue1124Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java index 0c8d461c55..9de1f197f4 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1126Tests.java @@ -17,11 +17,9 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * The following ranges blew up the MMU circuit: @@ -39,7 +37,6 @@ *

See https://github.com/Consensys/linea-tracer/issues/1121 */ @Tag("nightly") - public class Issue1126Tests { @Test void test_3108622_3108633() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java index 75157bccdc..82d7626337 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1136Tests.java @@ -17,10 +17,8 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_SEPOLIA; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * This test contains a STATICCALL to the ECRECOVER precompile in the first transaction, at @@ -41,7 +39,6 @@ */ @Tag("replay") @Tag("nightly") - public class Issue1136Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java index d03618b860..efabbe5b5d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1145Tests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_SEPOLIA; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") - public class Issue1145Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java index 5280656311..348555137b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1169Tests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") - public class Issue1169Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java index a83ad3c4b1..55ab7125c9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1180Tests.java @@ -17,18 +17,15 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** This range broke the MOD module's mod.set-absolute-values constraint. */ @Tag("nightly") @Tag("replay") - public class Issue1180Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java index 1224d973a8..38514d60ac 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1216Tests.java @@ -17,15 +17,12 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_SEPOLIA; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.module.hub.AccountSnapshot; import net.consensys.linea.zktracer.module.hub.Hub; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class Issue1216Tests { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java index cf4e79947f..f5bb27f7a3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("replay") - public class Issue1264Tests { @Test void issue_1216_mainnet_2321460_2321556() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java index b9ac941571..4b00056a93 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1267Tests.java @@ -17,14 +17,11 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") @Tag("replay") - public class Issue1267Tests { // splitting of 3506963-3507013 diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java index 2d8874be0c..a40dda58aa 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1274Tests.java @@ -17,15 +17,12 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** Failing block for ADD ?! */ @Tag("nightly") @Tag("replay") - public class Issue1274Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java index 12ac1e03da..cca131742e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1279Tests.java @@ -17,14 +17,11 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") @Tag("replay") - public class Issue1279Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java index 53112cf667..31dd9ef263 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") - public class Issue1280Tests { // 3901959-3902032 diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java index e427d1d12c..d4c9dfeabe 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRanges.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Disabled - public class LeosNewRanges { @Test void leos_new_ranges_2258472_2258607() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java index 12d295b7b7..feea117eef 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/LeosNewRangesSplitTests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Disabled - public class LeosNewRangesSplitTests { @Test void split_range_2258472_2258479() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java index 2fc1c0cf70..c85dd893ad 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/NightlyTests.java @@ -17,13 +17,10 @@ import static net.consensys.linea.replaytests.ReplayTestTools.replay; import static net.consensys.linea.testing.ReplayExecutionEnvironment.LINEA_MAINNET; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; @Tag("nightly") - public class NightlyTests { @Test void leoFailingRange() { diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java index 472d54b8b1..babe28b4fc 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTestTools.java @@ -33,9 +33,7 @@ import java.util.zip.GZIPInputStream; import lombok.extern.slf4j.Slf4j; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.ReplayExecutionEnvironment; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.provider.Arguments; /** @@ -55,7 +53,6 @@ * One can run this command: scripts/capture.pl --start xxx --end yyy --output my-test-case.json.gz */ @Slf4j - public class ReplayTestTools { /** A list of block numbers used for testing purposes in {@link ReplayTests}. */ static List BLOCK_NUMBERS = new ArrayList<>(); diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java index 4f8223f9f3..861fa82efc 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/ReplayTests.java @@ -24,17 +24,14 @@ import java.io.IOException; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @Tag("replay") - public class ReplayTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java index a3eb25a273..d65d426b09 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleMultiBlockTest.java @@ -23,7 +23,6 @@ import java.util.Collections; import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.MultiBlockExecutionEnvironment; import net.consensys.linea.testing.SmartContractUtils; @@ -46,14 +45,12 @@ import org.hyperledger.besu.ethereum.processing.TransactionProcessingResult; import org.hyperledger.besu.evm.log.Log; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.web3j.abi.EventEncoder; import org.web3j.abi.FunctionEncoder; import org.web3j.abi.datatypes.DynamicArray; import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.generated.Uint256; - class ExampleMultiBlockTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java index 96453e17a9..5f5eedeba0 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleSolidityTest.java @@ -23,7 +23,6 @@ import java.util.Collections; import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.SmartContractUtils; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -43,14 +42,12 @@ import org.hyperledger.besu.ethereum.processing.TransactionProcessingResult; import org.hyperledger.besu.evm.log.Log; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.web3j.abi.EventEncoder; import org.web3j.abi.FunctionEncoder; import org.web3j.abi.datatypes.DynamicArray; import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.generated.Uint256; - public class ExampleSolidityTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java index 092813784f..3a84887d4d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExampleTxTest.java @@ -17,7 +17,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -30,8 +29,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - class ExampleTxTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java index 7129677998..639b8401d2 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ExceptionsTest.java @@ -15,12 +15,9 @@ package net.consensys.linea.zktracer; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.module.hub.signals.Exceptions; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ExceptionsTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java index c01a0acddb..1ac111f012 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/ZkTracerTest.java @@ -17,10 +17,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import net.consensys.linea.UnitTestWatcher; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ZkTracerTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java index 3167381938..2fd4dfa452 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/bytestheta/BaseThetaTest.java @@ -17,19 +17,16 @@ import static org.assertj.core.api.Assertions.assertThat; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.types.Bytes16; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * Test class related to {@link BaseTheta} data structure, which is an extension of {@link * BytesArray}, with support for high and low bytes' manipulation. */ - public class BaseThetaTest { @Test public void baseThetaTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java index 1566c61194..b3f1da0e97 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyModuleTest.java @@ -17,12 +17,9 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.ZkTracer; import net.consensys.linea.zktracer.module.limits.precompiles.ModexpEffectiveCall; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class CountOnlyModuleTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java index 9aad625f18..00b44c6640 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/CountOnlyTests.java @@ -17,11 +17,8 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.container.stacked.CountOnlyOperation; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class CountOnlyTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java index ec6a96f2db..3367c0aa48 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedListTests.java @@ -20,7 +20,6 @@ import java.math.BigInteger; import lombok.RequiredArgsConstructor; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.container.ModuleOperation; import net.consensys.linea.zktracer.container.stacked.ModuleOperationStackedList; import net.consensys.linea.zktracer.module.add.AddOperation; @@ -29,8 +28,6 @@ import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class StackedListTests { private static final AddOperation ONE_PLUS_ONE = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java index a1566cb8aa..d9dd4873a0 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/containers/StackedSetTests.java @@ -17,7 +17,6 @@ import java.math.BigInteger; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.zktracer.container.stacked.ModuleOperationStackedSet; import net.consensys.linea.zktracer.module.add.AddOperation; import net.consensys.linea.zktracer.opcode.OpCode; @@ -25,8 +24,6 @@ import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class StackedSetTests { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java index dba22c4f8e..65dd8cfc54 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidCodePrefixAndMaxCodeSizeExceptionTest.java @@ -23,7 +23,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; @@ -40,8 +39,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class InvalidCodePrefixAndMaxCodeSizeExceptionTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java index 8c4abc26de..90c70c5a96 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/InvalidOpcodeExceptionTest.java @@ -16,14 +16,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.hub.signals.TracedException; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class InvalidOpcodeExceptionTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java index debd46d2a7..6b443cd315 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/MemoryExpansionExceptionTest.java @@ -27,17 +27,14 @@ import java.util.List; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.mxp.MxpTestUtils; import net.consensys.linea.zktracer.opcode.OpCode; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class MemoryExpansionExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java index cd882aa245..25a045b26a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfGasExceptionTest.java @@ -24,17 +24,14 @@ import java.util.List; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.opcode.OpCodeData; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class OutOfGasExceptionTest { // TODO: add tests when address is warm. Use constants such as G_WARM_ACCESS etc diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java index 0a6e531e9b..1847ea02c1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/OutOfSStoreExceptionTest.java @@ -17,16 +17,13 @@ import static net.consensys.linea.zktracer.module.hub.signals.TracedException.OUT_OF_SSTORE; import static org.junit.jupiter.api.Assertions.assertEquals; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.constants.GlobalConstants; import net.consensys.linea.zktracer.opcode.OpCode; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; - public class OutOfSStoreExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java index deade9106b..06e3537303 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackOverflowExceptionTest.java @@ -22,17 +22,14 @@ import java.util.List; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.opcode.OpCodeData; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class StackOverflowExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java index d5dc71a582..395b9192ed 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StackUnderflowExceptionTest.java @@ -22,17 +22,14 @@ import java.util.List; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.opcode.OpCodeData; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class StackUnderflowExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java index b364cf7e55..791e31e783 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/exceptions/StaticExceptionTest.java @@ -21,7 +21,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; @@ -29,11 +28,9 @@ import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Wei; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; - public class StaticExceptionTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java index 2d33bf1a25..08eaa425df 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/BalanceTests.java @@ -16,7 +16,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; @@ -28,13 +27,11 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * the purpose of these tests is to track balance updates for the sender, the coinbase and, in case * of a reverted transaction, the recipient. */ - public class BalanceTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java index 9e2afcb3a3..461dcc66f8 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallDataTests.java @@ -16,7 +16,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; @@ -28,14 +27,12 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * The tests below are designed to test our handling of call data. For deployment transactions, and * more generally deployment context's, call data is empty and the tests are "trivial" in some * sense. They aren't for message calls. */ - public class CallDataTests { // @Test // void transactionCallDataForMessageCallTest() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java index 43426d1715..7bbd85637f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CallTrivialCasesTest.java @@ -14,14 +14,11 @@ */ package net.consensys.linea.zktracer.instructionprocessing; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class CallTrivialCasesTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java index 81cfa49ade..fa17441a1f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/CodeCopyingInitializationCodeTest.java @@ -16,7 +16,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -32,7 +31,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * The purpose of {@link CodeCopyingInitializationCodeTest} is to test the coherence between the @@ -44,7 +42,6 @@ *

This test answers the point raised in this issue. */ - public class CodeCopyingInitializationCodeTest { final Bytes initCodeSimple = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java index dde1028f65..5408d06942 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/MessageCallTests.java @@ -23,14 +23,12 @@ import java.util.ArrayList; import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; @@ -44,7 +42,6 @@ public class MessageCallTests { @EnumSource( value = OpCode.class, names = {"CALL", "CALLCODE", "DELEGATECALL", "STATICCALL"}) - public void testWithCall(OpCode opCode) { ToyAccount recipientAccount = buildRecipient(opCode); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java index e05b76977e..6d9f6e5c91 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContextFamilyTests/RootOfMessageCallTests.java @@ -16,12 +16,9 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.MultiOpCodeSmcs.allContextOpCodes; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class RootOfMessageCallTests { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java index 8f9eb7b460..bb420550ec 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ContractModifyingStorageTest.java @@ -20,7 +20,6 @@ import java.util.List; import java.util.Random; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; import net.consensys.linea.testing.ToyTransaction; @@ -36,8 +35,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ContractModifyingStorageTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java index 34089d1569..8be9b1325a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/EmptyDeploymentsInTheRootTest.java @@ -16,7 +16,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -32,7 +31,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * The purpose of {@link EmptyDeploymentsInTheRootTest} is to make sure that deployment transactions @@ -40,7 +38,6 @@ * (if present) should be treated properly and the update to the deployment account is accounted for * in the relevant row. */ - public class EmptyDeploymentsInTheRootTest { final Bytes initCodeEmptyDeployment = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java index ef2df5e43c..2fd136b1c3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ExtCodeHashAndAccountExistenceTests.java @@ -16,13 +16,10 @@ import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ExtCodeHashAndAccountExistenceTests { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java index 3eb9181bfc..8fb2912ab5 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ImmediateRevert.java @@ -14,13 +14,10 @@ */ package net.consensys.linea.zktracer.instructionprocessing; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ImmediateRevert { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java index e10822cba1..224c597ff6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpDestinationVettingTest.java @@ -20,17 +20,14 @@ import java.util.Random; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class JumpDestinationVettingTest { final Random random = new Random(1); final int N_JUMPS = 3; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java index 0594065b53..97f6aaabf1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpTest.java @@ -16,18 +16,15 @@ import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class JumpTest { // NOTE: the bytecode we propose will at time use the following offsets (unless pcNew is large) diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java index 3c2a573aba..9c864b0bdb 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/JumpiTest.java @@ -22,17 +22,14 @@ import java.util.List; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class JumpiTest { // NOTE: the bytecode we propose will at time use the following offsets (unless pcNew is large) diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java index cb58c68427..4b8ccd14b8 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/KeccakTests.java @@ -14,13 +14,10 @@ */ package net.consensys.linea.zktracer.instructionprocessing; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class KeccakTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java index aafb8290a8..09150e48fe 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/ReturnDataCopyTest.java @@ -15,15 +15,12 @@ package net.consensys.linea.zktracer.instructionprocessing; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ReturnDataCopyTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java index 03aea2c5c1..4728cf8e1a 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/SimpleGasCalculatorTest.java @@ -14,13 +14,10 @@ */ package net.consensys.linea.zktracer.instructionprocessing; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class SimpleGasCalculatorTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java index a4ef085ab1..545a23b949 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/StorageTest.java @@ -15,13 +15,10 @@ package net.consensys.linea.zktracer.instructionprocessing; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class StorageTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java index 9c68eadb85..f74fa5a3ed 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/DoubleCall.java @@ -17,16 +17,13 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.Calls.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.hyperledger.besu.datatypes.Address; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; - public class DoubleCall { /** Same selfDestructorAddress */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java index 268a1a4c57..106637ad5e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/TrimmingTests.java @@ -18,12 +18,9 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.Calls.untrimmedEoaAddress; import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class TrimmingTests { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java index 080437036b..12cb49a107 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/Utilities.java @@ -17,12 +17,9 @@ import static com.google.common.base.Preconditions.checkArgument; import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.zktracer.opcode.OpCode; import org.hyperledger.besu.datatypes.Address; -import org.junit.jupiter.api.extension.ExtendWith; - public class Utilities { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java index 3cbc4fba99..32f072ae87 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/BalanceAbortTests.java @@ -17,12 +17,10 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.Calls.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.hyperledger.besu.datatypes.Address; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; @@ -34,7 +32,6 @@ *

- scn/CALL_ABORT_WONT_REVERT The main point being: (unexceptional) aborted CALL's warm * up the target account. */ - public class BalanceAbortTests { final String eoaAddress = "abcdef0123456789"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java index 4ff36dd51d..fe7bc53d6d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/CallStackDepthAbortTests.java @@ -18,11 +18,9 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.Calls.appendRevert; import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; @@ -30,7 +28,6 @@ * Attempt to trigger the maximum call stack depth abort. We put everything to 0 to avoid memory * expansion costs. We will want to revert so we transfer value to see the effect of reverting. */ - public class CallStackDepthAbortTests { @ParameterizedTest @EnumSource( diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java index ff42f047b7..7739fc3901 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/abort/MultiCallAbortTests.java @@ -17,16 +17,13 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.Calls.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** CALL/ABORT's are revert sensitive. We test this with two CALL's. */ - public class MultiCallAbortTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java index 355a20e0c6..88974958ec 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/eoa/gasStipendTests.java @@ -17,18 +17,15 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.Calls.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * Transferring nonzero value provides a gas stipend to the callee. This stipend will immediately be * restituted to the caller in case of an EOA call. */ - public class gasStipendTests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java index 6f931dd940..f6abd47516 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/ImmediateInvalid.java @@ -19,12 +19,9 @@ import static net.consensys.linea.zktracer.opcode.OpCode.CALL; import static net.consensys.linea.zktracer.opcode.OpCode.REVERT; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ImmediateInvalid { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java index 5f8e4b8aeb..035c056ca1 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/smc/monoOpCodeTargets/singleStop.java @@ -18,16 +18,13 @@ import static net.consensys.linea.zktracer.instructionprocessing.utilities.MonoOpCodeSmcs.*; import static net.consensys.linea.zktracer.opcode.OpCode.*; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.*; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** * Simplest case where we enter a smart contract. The called smart contract executes a single STOP * opcode (which is free of charge). No value is transferred. */ - public class singleStop { /** This test should trigger the scenario/CALL_TO_SMC_SUCCESS_WONT_REVERT scenario. */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java index 34f919450d..65f070ede3 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/HexStringUtils.java @@ -17,10 +17,6 @@ import java.math.BigInteger; -import net.consensys.linea.UnitTestWatcher; -import org.junit.jupiter.api.extension.ExtendWith; - - public class HexStringUtils { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java index 8e3a35c16b..aef87adbb5 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/add/AddTest.java @@ -15,14 +15,11 @@ package net.consensys.linea.zktracer.module.add; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class AddTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java index 867d1f49bd..43192573dc 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/bin/BinTest.java @@ -15,14 +15,11 @@ package net.consensys.linea.zktracer.module.bin; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class BinTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java index 8da99847b2..8702af13f6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/blockhash/BlockhashTest.java @@ -17,14 +17,11 @@ import static net.consensys.linea.zktracer.module.constants.GlobalConstants.BLOCKHASH_MAX_HISTORY; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class BlockhashTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java index 6909c29621..8c0b2510bd 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcAddTest.java @@ -19,18 +19,15 @@ import java.util.List; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class EcAddTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java index e9364b472e..a340d3a0d8 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcDataTest.java @@ -15,12 +15,9 @@ package net.consensys.linea.zktracer.module.ecdata; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeRunner; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class EcDataTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java index 571b84162e..0314a1f259 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/EcRecoverTest.java @@ -23,19 +23,16 @@ import java.util.List; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.types.EWord; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class EcRecoverTest { @Test void testEcRecoverWithEmptyExt() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java index a4f517716a..0c282ee841 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingArgumentsSingleton.java @@ -17,12 +17,9 @@ import lombok.Getter; import lombok.Setter; -import net.consensys.linea.UnitTestWatcher; -import org.junit.jupiter.api.extension.ExtendWith; @Getter @Setter - public class EcPairingArgumentsSingleton { private static EcPairingArgumentsSingleton instance; private String arguments; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java index a0ef7b8b23..758853aaaa 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestSupport.java @@ -24,11 +24,8 @@ import java.util.List; import java.util.Random; -import net.consensys.linea.UnitTestWatcher; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.provider.Arguments; - public class EcPairingTestSupport { private static final String DELIMITER_CSV = ","; static final String DELIMITER_PAIRINGS = "_"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java index a95b645cd5..ef1bb2d614 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingTestWatcher.java @@ -25,12 +25,9 @@ import java.util.List; import java.util.Optional; -import net.consensys.linea.UnitTestWatcher; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestWatcher; - public class EcPairingTestWatcher implements TestWatcher { final String timestamp = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); final List testsToWatch = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java index 2b0af2360a..aa9f533758 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ecdata/ecpairing/EcPairingrTest.java @@ -30,7 +30,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; @@ -49,7 +48,6 @@ // that can be used to run the same test cases with @CsvFileSource @ExtendWith(EcPairingTestWatcher.class) - public class EcPairingrTest { // https://github.com/Consensys/linea-arithmetization/issues/822 diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java index 36d326cb7c..d51f130363 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/exp/ExpTest.java @@ -25,21 +25,18 @@ import java.util.stream.Stream; import lombok.extern.slf4j.Slf4j; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; @Slf4j - public class ExpTest { // Generates 128, 64, 2, 1 as LD (leading digit) // LD_INDICES | LD diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java index ba99f46ab4..79c6099d7b 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/ext/TestDuplicatedOperations.java @@ -17,14 +17,11 @@ import static org.assertj.core.api.Assertions.assertThat; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class TestDuplicatedOperations { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java index ac04951d9a..cd1d533b5d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/CallEmptyNoStopTest.java @@ -19,7 +19,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -33,10 +32,8 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; /** Ensure that calling a contract with empty code does not generate a virtual STOP trace */ - public class CallEmptyNoStopTest { @Test void test() { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java index 8a8e069298..10f23a8fb6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/MessageFrameTest.java @@ -17,7 +17,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; @@ -26,8 +25,6 @@ import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Wei; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class MessageFrameTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java index 88d7718250..7210dce6ec 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/SimpleStorageConsistency.java @@ -17,7 +17,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -33,8 +32,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class SimpleStorageConsistency { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java index 8f9065ade9..c734e91f0d 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TestTwoPlusTwo.java @@ -15,13 +15,10 @@ package net.consensys.linea.zktracer.module.hub; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class TestTwoPlusTwo { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java index c7361e802a..951a0d1d25 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/hub/TxSkipTests.java @@ -19,7 +19,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; import net.consensys.linea.testing.ToyTransaction; @@ -33,8 +32,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class TxSkipTests { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java index ae379473d8..945c0d0ad6 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mod/ModTest.java @@ -15,14 +15,11 @@ package net.consensys.linea.zktracer.module.mod; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ModTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java index 3b51c471dc..f0f1192add 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mul/ExpExtensiveTest.java @@ -25,7 +25,6 @@ import java.util.stream.Stream; import lombok.experimental.Accessors; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.HexStringUtils; @@ -33,14 +32,12 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @Accessors(fluent = true) @Tag("weekly") - public class ExpExtensiveTest { // Test vectors static final String P_1 = "f076b857fa9947c1f9ec558262c72704099ca8cd325566f73fb99238102ed171"; diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java index 512b005d7f..94402c5744 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTest.java @@ -28,7 +28,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; @@ -48,13 +47,11 @@ import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; // https://github.com/Consensys/linea-besu-plugin/issues/197 @Execution(ExecutionMode.SAME_THREAD) - public class MxpTest { /** Construct non-static instance to prevent sharing across tests. */ diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java index e77ddfc33e..9963ee8099 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTestUtils.java @@ -24,15 +24,12 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.opcode.gas.MxpType; import net.consensys.linea.zktracer.types.EWord; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.datatypes.Address; -import org.junit.jupiter.api.extension.ExtendWith; - public class MxpTestUtils { public static final EWord TWO_POW_128 = EWord.of(EWord.ONE.shiftLeft(128)); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java index 710fb60849..30a4dd5d1e 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/MxpTracerTest.java @@ -22,7 +22,6 @@ import java.util.List; import java.util.stream.Stream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.DynamicTests; import net.consensys.linea.testing.OpcodeCall; import net.consensys.linea.zktracer.container.module.Module; @@ -31,8 +30,6 @@ import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.TestFactory; -import org.junit.jupiter.api.extension.ExtendWith; - public class MxpTracerTest { // private static final Random RAND = new Random(); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java index 8c120e8d7b..547bdc4426 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/mxp/SeveralKeccaks.java @@ -14,13 +14,10 @@ */ package net.consensys.linea.zktracer.module.mxp; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class SeveralKeccaks { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java index f8bdf3c17c..b4424b2340 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobCallTest.java @@ -21,7 +21,6 @@ import java.math.BigInteger; import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -39,8 +38,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class OobCallTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java index b3b0920711..abd287dbac 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobJumpAndJumpiTest.java @@ -29,7 +29,6 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.hub.Hub; @@ -38,8 +37,6 @@ import net.consensys.linea.zktracer.types.EWord; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class OobJumpAndJumpiTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java index c715e59021..9886f199d7 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobRdcTest.java @@ -22,15 +22,12 @@ import java.math.BigInteger; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.hub.Hub; import net.consensys.linea.zktracer.module.hub.signals.Exceptions; import net.consensys.linea.zktracer.opcode.OpCode; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class OobRdcTest { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java index a62346dc50..5fce76cc19 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/oob/OobSha2RipemdIdentityTest.java @@ -24,7 +24,6 @@ import java.util.stream.IntStream; import com.google.common.io.BaseEncoding; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.module.hub.Hub; @@ -33,11 +32,9 @@ import org.bouncycastle.util.encoders.Hex; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; - public class OobSha2RipemdIdentityTest { Random random = new Random(1L); static final int[] argSizes = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java index f94cb279a1..f450da3dd4 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpaddr/TestRlpAddress.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Random; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -35,8 +34,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class TestRlpAddress { private final Random rnd = new Random(666); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java index 175dd43b69..ff03ebff65 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlpcommon/RlpRandEdgeCase.java @@ -18,10 +18,7 @@ import java.math.BigInteger; import java.util.Random; -import net.consensys.linea.UnitTestWatcher; import org.apache.tuweni.bytes.Bytes; -import org.junit.jupiter.api.extension.ExtendWith; - public class RlpRandEdgeCase { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java index 796ae3e2d1..cfa2237084 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rlptxrcpt/LogTest.java @@ -15,14 +15,11 @@ package net.consensys.linea.zktracer.module.rlptxrcpt; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class LogTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java index e2e6173112..d464cc999f 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/rom/RomTest.java @@ -21,16 +21,13 @@ import java.util.stream.Stream; import kotlin.Pair; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; - public class RomTest { @ParameterizedTest diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java index b758f0b735..f24e38c822 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/shf/ShfExtensiveTest.java @@ -25,7 +25,6 @@ import lombok.Getter; import lombok.experimental.Accessors; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; @@ -34,14 +33,12 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @Accessors(fluent = true) @Tag("weekly") - public class ShfExtensiveTest { private static final List shfTestSourceList = new ArrayList<>(); diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java index fa1d928948..f7221cf990 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/stp/StpTest.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.Random; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.ToyAccount; import net.consensys.linea.testing.ToyExecutionEnvironmentV2; @@ -40,8 +39,6 @@ import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class StpTest { /** diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java index 97e1384649..1d0b9f2cc9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/trm/TrmTracerTest.java @@ -17,15 +17,12 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class TrmTracerTest { private final Bytes32 RANDOM_STRING_FROM_THE_INTERNET = diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java index 9d83c6ea71..a643641ca5 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/module/wcp/WcpEdgeCaseTest.java @@ -15,14 +15,11 @@ package net.consensys.linea.zktracer.module.wcp; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class WcpEdgeCaseTest { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java index 3f12f3f700..05a49a4311 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/EcrecoverTests.java @@ -14,14 +14,11 @@ */ package net.consensys.linea.zktracer.precompiles; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class EcrecoverTests { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java index 5ddfda2bb9..86486eb0a9 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/precompiles/ModexpTests.java @@ -22,7 +22,6 @@ import java.util.List; -import net.consensys.linea.UnitTestWatcher; import net.consensys.linea.testing.BytecodeCompiler; import net.consensys.linea.testing.BytecodeRunner; import net.consensys.linea.zktracer.opcode.OpCode; @@ -30,8 +29,6 @@ import org.apache.tuweni.bytes.Bytes32; import org.hyperledger.besu.datatypes.Address; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - public class ModexpTests { diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java index 36150a3e79..1768a01029 100644 --- a/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/types/BytecodeTest.java @@ -17,11 +17,8 @@ import static org.junit.jupiter.api.Assertions.*; -import net.consensys.linea.UnitTestWatcher; import org.apache.tuweni.bytes.Bytes; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - class BytecodeTest { From a4129d33bf01e73f5c83955fd845ca16939cdfb5 Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Wed, 27 Nov 2024 16:04:58 +0100 Subject: [PATCH 17/19] spotless --- .../java/net/consensys/linea/replaytests/Issue1264Tests.java | 1 + .../java/net/consensys/linea/replaytests/Issue1280Tests.java | 1 + .../net/consensys/linea/reporting/TestOutcomeWriterTool.java | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java index f5bb27f7a3..b00d3b2803 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1264Tests.java @@ -20,6 +20,7 @@ import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +@Tag("nightly") @Tag("replay") public class Issue1264Tests { @Test diff --git a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java index 31dd9ef263..684ffc03ea 100644 --- a/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java +++ b/arithmetization/src/test/java/net/consensys/linea/replaytests/Issue1280Tests.java @@ -21,6 +21,7 @@ import org.junit.jupiter.api.Test; @Tag("nightly") +@Tag("replay") public class Issue1280Tests { // 3901959-3902032 diff --git a/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java b/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java index f8042c929a..1c38361bb0 100644 --- a/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java +++ b/testing/src/main/java/net/consensys/linea/reporting/TestOutcomeWriterTool.java @@ -35,7 +35,7 @@ public static void addFailed() { } public static JsonConverter jsonConverter = JsonConverter.builder().build(); - static ObjectMapper objectMapper = new ObjectMapper(); + private static ObjectMapper objectMapper = new ObjectMapper(); private static volatile AtomicInteger failedCounter = new AtomicInteger(0); private static volatile AtomicInteger successCounter = new AtomicInteger(0); @@ -43,7 +43,7 @@ public static void addFailed() { private static volatile AtomicInteger abortedCounter = new AtomicInteger(0); private static volatile ConcurrentMap< String, ConcurrentMap>> - modulesToConstraintsToTests = new ConcurrentHashMap<>(); + modulesToConstraintsToTests = new ConcurrentHashMap<>(20); public static void addFailure(String type, String cause, String test) { failedCounter.incrementAndGet(); From ae697b61a43c6404d3aa983ecbe1639f1637caa1 Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Wed, 27 Nov 2024 18:35:55 +0100 Subject: [PATCH 18/19] add back deleted test --- .../prc/ecrecover/GasStipendTests.java | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/GasStipendTests.java diff --git a/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/GasStipendTests.java b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/GasStipendTests.java new file mode 100644 index 0000000000..4d6262f8ca --- /dev/null +++ b/arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/GasStipendTests.java @@ -0,0 +1,167 @@ +/* + * Copyright Consensys Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ +package net.consensys.linea.zktracer.instructionprocessing.callTests.prc.ecrecover; + +import static net.consensys.linea.zktracer.instructionprocessing.utilities.Calls.*; + +import net.consensys.linea.testing.BytecodeCompiler; +import net.consensys.linea.testing.BytecodeRunner; +import net.consensys.linea.zktracer.opcode.OpCode; +import org.hyperledger.besu.datatypes.Address; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EnumSource; + +/** + * For these tests to work as expected, the transaction should start out with sufficient gas. At + * least 21k plus gas to cover the PUSH's and the (warm) CALL with potentially value transfer and + * potentially account creation costs. Also there should be enough gas in the end for the 63/64 + * business not diminish the gas we provide the callee. + * + *

Something like 60k gas should cover all costs (21k transaction costs + 9k for potential value + * transfer + 25k if value transfer leads to a precompile starting to exist in the state etc ... + + * 3k for the callee + opcode costs on the order of 130 or so) + */ +public class GasStipendTests { + + // sufficient gas for PRC execution + @ParameterizedTest + @EnumSource( + value = OpCode.class, + names = {"CALL", "CALLCODE", "DELEGATECALL", "STATICCALL"}) + void zeroValueEcRecoverCallTest(OpCode callOpCode) { + BytecodeCompiler program = BytecodeCompiler.newProgram(); + validEcrecoverData(program); + appendCall( + program, + callOpCode, + 3000, + Address.fromHexString(Address.ECREC.toHexString()), + 0, + 0, + 0, + 0, + 0); + + BytecodeRunner.of(program.compile()).run(); + } + + @ParameterizedTest + @EnumSource( + value = OpCode.class, + names = {"CALL", "CALLCODE", "DELEGATECALL", "STATICCALL"}) + void nonzeroValueEcRecoverCallTest(OpCode callOpCode) { + BytecodeCompiler program = BytecodeCompiler.newProgram(); + validEcrecoverData(program); + appendCall( + program, + callOpCode, + 3000, + Address.fromHexString(Address.ECREC.toHexString()), + 1, + 0, + 0, + 0, + 0); + + BytecodeRunner.of(program.compile()).run(); + } + + @ParameterizedTest + @EnumSource( + value = OpCode.class, + names = {"CALL", "CALLCODE", "DELEGATECALL", "STATICCALL"}) + void nonzeroValueEcRecoverCallWillRevertTest(OpCode callOpCode) { + BytecodeCompiler program = BytecodeCompiler.newProgram(); + validEcrecoverData(program); + appendCall( + program, + callOpCode, + 3000, + Address.fromHexString(Address.ECREC.toHexString()), + 1, + 0, + 0, + 0, + 32); + appendRevert(program, 0, 32); + + BytecodeRunner.of(program.compile()).run(); + } + + @ParameterizedTest + @EnumSource( + value = OpCode.class, + names = {"CALL", "CALLCODE"}) + void stipendCompletesGasEcRecoverCallTest(OpCode callOpCode) { + BytecodeCompiler program = BytecodeCompiler.newProgram(); + validEcrecoverData(program); + appendCall( + program, + callOpCode, + 700, + Address.fromHexString(Address.ECREC.toHexString()), + 1, + 0, + 0, + 0, + 0); + + BytecodeRunner.of(program.compile()).run(); + } + + // insufficient gas for PRC execution + @ParameterizedTest + @EnumSource( + value = OpCode.class, + names = {"CALL", "CALLCODE", "DELEGATECALL", "STATICCALL"}) + void gasFallsShortForEcRecoverTest(OpCode callOpCode) { + BytecodeCompiler program = BytecodeCompiler.newProgram(); + validEcrecoverData(program); + appendCall( + program, + callOpCode, + 2999, + Address.fromHexString(Address.ECREC.toHexString()), + 0, + 0, + 0, + 0, + 0); + + BytecodeRunner.of(program.compile()).run(); + } + + @ParameterizedTest + @EnumSource( + value = OpCode.class, + names = {"CALL", "CALLCODE"}) + void stipendFromValueFallsShortOfCompletingGasEcrecoverCallTest(OpCode callOpCode) { + BytecodeCompiler program = BytecodeCompiler.newProgram(); + validEcrecoverData(program); + appendCall( + program, + callOpCode, + 699, // value transfer adds G_stipend = 2_300 to this, falling short of the 3_000 required + // gas + Address.fromHexString(Address.ECREC.toHexString()), + 1, + 0, + 0, + 0, + 0); + + BytecodeRunner.of(program.compile()).run(); + } +} From 40b16a0f9cd94b854586ba0b061bd60ab16b0cbc Mon Sep 17 00:00:00 2001 From: FlorianHuc Date: Wed, 27 Nov 2024 18:39:35 +0100 Subject: [PATCH 19/19] remove double brackets. --- .../net/consensys/linea/BlockchainReferenceTestTools.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java index 1e4127ea7b..686d5cab02 100644 --- a/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java +++ b/reference-tests/src/test/java/net/consensys/linea/BlockchainReferenceTestTools.java @@ -120,9 +120,9 @@ public class BlockchainReferenceTestTools { PARAMS.ignore("randomStatetest94_\\w+"); // Balance is more than 128 bits - PARAMS.ignore(("Call1024PreCalls_d0g0v0_London[London]")); - PARAMS.ignore(("Call1024PreCalls_d0g1v0_London[London]")); - PARAMS.ignore(("OverflowGasRequire_London[London]")); + PARAMS.ignore("Call1024PreCalls_d0g0v0_London[London]"); + PARAMS.ignore("Call1024PreCalls_d0g1v0_London[London]"); + PARAMS.ignore("OverflowGasRequire_London[London]"); PARAMS.ignore("StrangeContractCreation_London[London]"); PARAMS.ignore("SuicideIssue_London[London]"); PARAMS.ignore("DelegateCallSpam_London[London]");