Skip to content

Commit 37fd82b

Browse files
authored
chore: give heavy bb tests explicit resource budgets (#24905)
## Summary - give the heaviest barretenberg native tests explicit larger CPU/memory budgets instead of relying on timeout headroom - run the wasm-threads `ecc_tests` sanity command with `CPUS=8` and `HARDWARE_CONCURRENCY=8`, so the guest thread pool follows the CI resource budget Refs the public nightly/debug CI failure: https://github.com/AztecProtocol/aztec-packages/actions/runs/29895447099. ## Testing - `bash -n barretenberg/cpp/bootstrap.sh` - `git diff --check -- barretenberg/cpp/bootstrap.sh` - `CI_FULL=1 ./bootstrap.sh test_cmds wasm_threads` --- *Created by [claudebox](https://claudebox.work/v2/sessions/1da5545363fc7f1f/jobs/7) · group: `slackbot` · [Slack thread](https://aztecprotocol.slack.com/archives/C04ALP0UQHH/p1784700203828799?thread_ts=1784700203.828799&cid=C04ALP0UQHH)*
2 parents 7ac944c + b55b3af commit 37fd82b

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

barretenberg/cpp/bootstrap.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,17 @@ function test_cmds_native {
283283
if [[ "${CI_FULL:-0}" -eq 0 && "$test" == "ChonkKernelCapacity.MaxCapacityPassing" ]]; then
284284
continue
285285
fi
286-
# A little extra resource for these tests.
287-
# IPARecursiveTests fails with 2 threads.
288-
if [[ "$test" =~ ^(AcirAvmRecursionConstraint|ChonkKernelCapacity|AvmRecursiveTests|IPARecursiveTests|HonkRecursionConstraintTest|ChonkRecursionConstraintTest) ]]; then
286+
# Heavy provers get more cores/memory so they finish within the default per-test timeout;
287+
# these circuits parallelize, so more cores lowers wall-time. Specific tests before family.
288+
if [[ "$test" == "ChonkKernelCapacity.MaxCapacityPassing" ]]; then
289+
# Accumulates and proves CHONK_MAX_NUM_APPS apps.
290+
prefix="$prefix:CPUS=8:MEM=16g"
291+
elif [[ "$test" == HonkRecursionConstraintTestWithoutPredicate/2.* ]]; then
292+
# Root rollup circuit (HonkRecursionTypesWithoutPredicate index 2, IsRootRollup=true):
293+
# a ~6.35M-gate circuit whose VK generation is memory- and compute-heavy.
294+
prefix="$prefix:CPUS=8:MEM=16g"
295+
elif [[ "$test" =~ ^(AcirAvmRecursionConstraint|ChonkKernelCapacity|AvmRecursiveTests|IPARecursiveTests|HonkRecursionConstraintTest|ChonkRecursionConstraintTest) ]]; then
296+
# IPARecursiveTests fails with 2 threads.
289297
prefix="$prefix:CPUS=4:MEM=8g"
290298
fi
291299
echo -e "$prefix barretenberg/cpp/scripts/run_test.sh $bin_name $test"
@@ -297,8 +305,9 @@ function test_cmds_native {
297305
}
298306

299307
function test_cmds_wasm_threads {
300-
# We only want to sanity check that we haven't broken wasm ecc in merge queue.
301-
echo "$hash barretenberg/cpp/scripts/wasmtime.sh barretenberg/cpp/build-wasm-threads/bin/ecc_tests"
308+
# Sanity check that threaded wasm ecc still works in the merge queue. Pass cores and
309+
# HARDWARE_CONCURRENCY into the guest so bb's wasm thread pool follows the CI budget.
310+
echo "$hash:CPUS=8 HARDWARE_CONCURRENCY=8 barretenberg/cpp/scripts/wasmtime.sh barretenberg/cpp/build-wasm-threads/bin/ecc_tests"
302311
}
303312

304313
function test_cmds_asan {

0 commit comments

Comments
 (0)