From 62e76b332fc603da2c004fe4712cfcfe9f6d5aa0 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Tue, 19 May 2026 23:19:15 +0000 Subject: [PATCH 1/2] fix(ci): harden Chonk refresh post-action --- .github/ci3_success.sh | 6 ++---- barretenberg/ts/CHANGELOG.md | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/ci3_success.sh b/.github/ci3_success.sh index 8f01a8a9ee77..7684cdd71410 100755 --- a/.github/ci3_success.sh +++ b/.github/ci3_success.sh @@ -58,9 +58,6 @@ function handle_benchmarks { function handle_chonk_input_update { local github_repository="$1" - if [ "${CHONK_INPUT_UPDATE_REQUESTED:-0}" -eq 0 ]; then - return 1 - fi echo_header "Chonk Input Update" export GITHUB_REPOSITORY="${GITHUB_REPOSITORY:-$github_repository}" ./.github/ci3.sh chonk-input-update @@ -70,7 +67,8 @@ function main { echo_header "CI3 Post-Actions" # Get repository from git remote local github_repository=$(git remote get-url origin | sed -E 's|.*github\.com[/:]([^/]+/[^/]+)(\.git)?$|\1|') - if handle_chonk_input_update "${github_repository}"; then + if [ "${CHONK_INPUT_UPDATE_REQUESTED:-0}" -eq 1 ]; then + handle_chonk_input_update "${github_repository}" echo_header "Post-Actions Complete" return fi diff --git a/barretenberg/ts/CHANGELOG.md b/barretenberg/ts/CHANGELOG.md index 039d16fd8a28..91b4e9af31fe 100644 --- a/barretenberg/ts/CHANGELOG.md +++ b/barretenberg/ts/CHANGELOG.md @@ -4,7 +4,7 @@ ### Miscellaneous -* Lower the default bb.js CRS download size from `2 ** 20` to `2 ** 18`. Callers that need a larger CRS can still pass an explicit SRS size. +* Lower the default bb.js CRS download size from `2 ** 20` to `2 ** 19` for non-iOS browsers. iOS remains at `2 ** 18`. ## [0.77.0](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg.js-v0.76.4...barretenberg.js-v0.77.0) (2025-02-14) From 742f1474b48b0ec16dbb1c9c88aa6053912c3c5b Mon Sep 17 00:00:00 2001 From: AztecBot Date: Tue, 19 May 2026 23:52:43 +0000 Subject: [PATCH 2/2] fix(bb.js): expose wasm CRS size option --- barretenberg/ts/CHANGELOG.md | 2 +- barretenberg/ts/src/barretenberg/index.ts | 6 +++--- barretenberg/ts/src/bb_backends/index.ts | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/barretenberg/ts/CHANGELOG.md b/barretenberg/ts/CHANGELOG.md index 91b4e9af31fe..7995feb362bf 100644 --- a/barretenberg/ts/CHANGELOG.md +++ b/barretenberg/ts/CHANGELOG.md @@ -4,7 +4,7 @@ ### Miscellaneous -* Lower the default bb.js CRS download size from `2 ** 20` to `2 ** 19` for non-iOS browsers. iOS remains at `2 ** 18`. +* Lower the default bb.js CRS download size from `2 ** 20` to `2 ** 19` for non-iOS browsers. iOS remains at `2 ** 18`. Callers that need a larger CRS can still pass an explicit SRS size. ## [0.77.0](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg.js-v0.76.4...barretenberg.js-v0.77.0) (2025-02-14) diff --git a/barretenberg/ts/src/barretenberg/index.ts b/barretenberg/ts/src/barretenberg/index.ts index 3ea0f9bb765c..90ad65642a27 100644 --- a/barretenberg/ts/src/barretenberg/index.ts +++ b/barretenberg/ts/src/barretenberg/index.ts @@ -54,7 +54,7 @@ export class Barretenberg extends AsyncApi { // Explicit backend required - no fallback const backend = await createAsyncBackend(options.backend, options, logger); if (!options.skipSrsInit && (options.backend === BackendType.Wasm || options.backend === BackendType.WasmWorker)) { - await backend.initSRSChonk(); + await backend.initSRSChonk(options.srsSize); } return backend; } @@ -66,7 +66,7 @@ export class Barretenberg extends AsyncApi { logger(`Unix socket unavailable (${err.message}), falling back to WASM`); const backend = await createAsyncBackend(BackendType.Wasm, options, logger); if (!options.skipSrsInit) { - await backend.initSRSChonk(); + await backend.initSRSChonk(options.srsSize); } return backend; } @@ -74,7 +74,7 @@ export class Barretenberg extends AsyncApi { logger(`In browser, using WASM over worker backend.`); const backend = await createAsyncBackend(BackendType.WasmWorker, options, logger); if (!options.skipSrsInit) { - await backend.initSRSChonk(); + await backend.initSRSChonk(options.srsSize); } return backend; } diff --git a/barretenberg/ts/src/bb_backends/index.ts b/barretenberg/ts/src/bb_backends/index.ts index 18e17ea68407..760f51fe9da0 100644 --- a/barretenberg/ts/src/bb_backends/index.ts +++ b/barretenberg/ts/src/bb_backends/index.ts @@ -22,6 +22,9 @@ export type BackendOptions = { /** @description Path to download CRS files */ crsPath?: string; + /** @description Number of G1 points to download when initializing the CRS/SRS for WASM backends */ + srsSize?: number; + /** @description Path to download WASM files */ wasmPath?: string;