Skip to content

Commit 1793872

Browse files
committed
consolidate prcCallTests => weeklyTests
This consolidates all of the prcCallTests into the existing weeklyTests group. This makes sense as they all have roughly similar test profiles. The weeklyTests now has a much more aggressive degree of parallelism. In addition, this sets more suitable default sample sizes for the PRC calltests. Specifically, defaults are set to approx 10% of the overall parameter space.
1 parent dbb8a1d commit 1793872

File tree

11 files changed

+24
-88
lines changed

11 files changed

+24
-88
lines changed

.github/workflows/gradle-prc-call-tests.yml

-48
This file was deleted.

.github/workflows/gradle-weekly-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Weekly Replay Tests
1+
name: Weekly Tests
22

33
on:
44
schedule:
@@ -23,11 +23,11 @@ jobs:
2323
uses: ./.github/actions/setup-environment
2424

2525
- name: Run Weekly tests
26-
run: GOMEMLIMIT=55GiB ./gradlew weeklyTests
26+
run: GOMAXPROCS=2 GOMEMLIMIT=5GiB ./gradlew weeklyTests
2727
env:
2828
JAVA_OPTS: -Dorg.gradle.daemon=false
29-
WEEKLY_TESTS_PARALLELISM: 2
30-
GOCORSET_FLAGS: -vw -b1024 --ansi-escapes=false --report --air
29+
WEEKLY_TESTS_PARALLELISM: 26
30+
GOCORSET_FLAGS: -vw -b1024 --ansi-escapes=false --report --hir
3131

3232
- name: Upload test report
3333
if: always()

arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecadd/Tests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
import org.junit.jupiter.api.Test;
3030
import org.junit.jupiter.params.provider.Arguments;
3131

32-
@Tag("prc-calltests")
32+
@Tag("weekly")
3333
public class Tests extends PrecompileCallTests<CallParameters> {
3434
// Set sample size with potential for override.
3535
private static final int ECADD_SAMPLE_SIZE =
36-
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "500"));
36+
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "1000"));
3737

3838
public static Stream<Arguments> parameterGeneration() {
3939
return randomSampleByDayOfMonth(ECADD_SAMPLE_SIZE, ParameterGeneration.parameterGeneration())

arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecmul/Tests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
import org.junit.jupiter.api.Test;
3131
import org.junit.jupiter.params.provider.Arguments;
3232

33-
@Tag("prc-calltests")
33+
@Tag("weekly")
3434
public class Tests extends PrecompileCallTests<CallParameters> {
3535
// Set sample size with potential for override.
3636
private static final int ECMUL_SAMPLE_SIZE =
37-
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "500"));
37+
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "700"));
3838

3939
public static Stream<Arguments> parameterGeneration() {
4040
return randomSampleByDayOfMonth(ECMUL_SAMPLE_SIZE, ParameterGeneration.parameterGeneration())

arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecpairing/Tests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
import org.junit.jupiter.api.Tag;
2323
import org.junit.jupiter.params.provider.Arguments;
2424

25-
@Tag("prc-calltests")
25+
@Tag("weekly")
2626
public class Tests extends PrecompileCallTests<CallParameters> {
2727
// Set sample size with potential for override.
2828
private static final int ECPAIRING_SAMPLE_SIZE =
29-
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "500"));
29+
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "7500"));
3030

3131
public static Stream<Arguments> parameterGeneration() {
3232
return randomSampleByDayOfMonth(

arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/ecrecover/Tests.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
import org.junit.jupiter.api.Tag;
2323
import org.junit.jupiter.params.provider.Arguments;
2424

25-
@Tag("prc-calltests")
25+
@Tag("weekly")
2626
public class Tests extends PrecompileCallTests<CallParameters> {
2727
// Set sample size with potential for override.
2828
private static int ECRECOVER_SAMPLE_SIZE =
29-
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "500"));
29+
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "250"));
3030

3131
public static Stream<Arguments> parameterGeneration() {
32+
System.out.println("ECRECOVER TESTS=" + ParameterGeneration.parameterGeneration().size());
3233
return randomSampleByDayOfMonth(
3334
ECRECOVER_SAMPLE_SIZE, ParameterGeneration.parameterGeneration())
3435
.stream();

arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/hash/Tests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@
6060
*
6161
* <p>- play with (precompile) return data
6262
*/
63-
@Tag("prc-calltests")
63+
@Tag("weekly")
6464
public class Tests extends PrecompileCallTests<CallParameters> {
6565
// Set sample size with potential for override.
6666
private static final int HASH_SAMPLE_SIZE =
67-
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "500"));
67+
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "2000"));
6868

6969
public static Stream<Arguments> parameterGeneration() {
7070
return randomSampleByDayOfMonth(HASH_SAMPLE_SIZE, ParameterGeneration.parameterGeneration())

arithmetization/src/test/java/net/consensys/linea/zktracer/instructionprocessing/callTests/prc/modexp/Tests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
import org.junit.jupiter.api.Test;
3030
import org.junit.jupiter.params.provider.Arguments;
3131

32-
@Tag("prc-calltests")
32+
@Tag("weekly")
3333
public class Tests extends PrecompileCallTests<CallParameters> {
3434
// Set sample size with potential for override.
3535
private static final int MODEXP_SAMPLE_SIZE =
36-
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "500"));
36+
Integer.parseInt(System.getenv().getOrDefault("PRC_CALLTESTS_SAMPLE_SIZE", "700"));
3737

3838
public static Stream<Arguments> parameterGeneration() {
3939
return randomSampleByDayOfMonth(MODEXP_SAMPLE_SIZE, ParameterGeneration.parameterGeneration())

gradle/corset.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def TRACE_PKG = "net.consensys.linea.zktracer"
3333

3434
tasks.register('buildZkevmBin', Exec) {
3535
workingDir "${project.rootDir}/linea-constraints/"
36+
// Specify input files so gradle knows when to rebuild.
37+
inputs.files(fileTree(workingDir).include('**/*.lisp'))
38+
// Specify output file so gradle knows when out-of-date.
39+
outputs.files(fileTree(workingDir).include(ZKEVM_BIN))
3640
// Sanity check executing this makes sense.
3741
doFirst {
3842
// Record zkevm.bin for CorsetValidator

gradle/tests.gradle

+1-21
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ tasks.test.configure {
135135
excludeTags("nightly")
136136
excludeTags("replay")
137137
excludeTags("weekly")
138-
excludeTags("prc-calltests")
139138
}
140139
finalizedBy(jacocoTestReport)
141140
}
@@ -225,12 +224,11 @@ tasks.register("weeklyTests", Test) {
225224
systemProperty("junit.jupiter.execution.parallel.mode.classes.default", "concurrent")
226225
systemProperty("junit.jupiter.execution.parallel.config.strategy", "fixed")
227226
systemProperty("junit.jupiter.execution.parallel.config.fixed.parallelism",
228-
System.getenv().getOrDefault("WEEKLY_TESTS_PARALLELISM", "1").toInteger())
227+
System.getenv().getOrDefault("WEEKLY_TESTS_PARALLELISM", "8").toInteger())
229228

230229
useJUnitPlatform {
231230
excludeTags("nightly")
232231
excludeTags("replay")
233-
excludeTags("prc-calltests")
234232
includeTags("weekly")
235233
}
236234
finalizedBy(jacocoWeeklyTestsReport)
@@ -257,24 +255,6 @@ tasks.register("jacocoUnitFastReplayWeeklyNightlyReferenceBlockchainAndStateTest
257255
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
258256
}
259257

260-
tasks.register("prcCallTests", Test) {
261-
dependsOn(buildZkevmBin)
262-
//
263-
systemProperty("junit.jupiter.execution.parallel.enabled", true)
264-
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
265-
systemProperty("junit.jupiter.execution.parallel.mode.classes.default", "concurrent")
266-
systemProperty("junit.jupiter.execution.parallel.config.strategy", "fixed")
267-
systemProperty("junit.jupiter.execution.parallel.config.fixed.parallelism",
268-
System.getenv().getOrDefault("PRC_CALLTESTS_PARALLELISM", "8").toInteger())
269-
270-
useJUnitPlatform {
271-
excludeTags("nightly")
272-
excludeTags("replay")
273-
excludeTags("weekly")
274-
includeTags("prc-calltests")
275-
}
276-
}
277-
278258
// Configure default build task to require the tracer is built first.
279259
// This only makes sense for projects which need the tracer.
280260
compileJava.dependsOn 'buildTracer'

reference-tests/build.gradle

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jacoco {
2121
toolVersion = '0.8.12'
2222
}
2323

24-
apply from: rootProject.file("gradle/corset.gradle")
2524
apply from: rootProject.file("gradle/java.gradle")
2625
apply from: rootProject.file("gradle/dependency-management.gradle")
2726
apply from: rootProject.file('gradle/common-dependencies.gradle')
@@ -58,7 +57,7 @@ tasks.register("generateGeneralStateReferenceTests", RefTestGenerationTask) {
5857
}
5958

6059
tasks.register('referenceBlockchainTests', Test) {
61-
dependsOn(buildZkevmBin)
60+
dependsOn(":arithmetization:buildZkevmBin")
6261
finalizedBy(jacocoReferenceBlockchainTestsReport)
6362
description = 'Runs ETH reference blockchain tests.'
6463
dependsOn generateBlockchainReferenceTests
@@ -83,7 +82,7 @@ tasks.register("jacocoReferenceBlockchainTestsReport", JacocoReport) {
8382
}
8483

8584
tasks.register('referenceGeneralStateTests', Test) {
86-
dependsOn(buildZkevmBin)
85+
dependsOn(":arithmetization:buildZkevmBin")
8786
finalizedBy(jacocoReferenceGeneralStateTestsReport)
8887
description = 'Runs ETH reference general state tests.'
8988
dependsOn generateGeneralStateReferenceTests

0 commit comments

Comments
 (0)