You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,16 @@ Do not explain *what* the code does — well-named identifiers cover that. Comme
107
107
Do not reference the current task, PR, caller, or author (`// used by X`, `// fix for issue #123`, `// AI-generated`), and do not add banner-style section comments (`// ===== HELPERS =====`). Both rot the moment the surrounding code is moved.
108
108
</writing_comments>
109
109
110
+
<jargon>
111
+
Avoid recurring AI-isms in chat replies, PR descriptions, commit messages, code comments, and docs. Substitutes:
112
+
113
+
-**"load bearing"** → *important*, *critical*, *required*, or describe the actual dependency (e.g. "the scheduler relies on this invariant").
114
+
-**"seam"** (for an interaction point or boundary) → *interface*, *boundary*, *call site*, *integration point*.
-**"You're absolutely right"** and effusive agreement openers (*"Great catch!"*, *"Excellent point!"*) → never lead a reply with these. A short acknowledgement (*"Right — …"*, *"Agreed."*) is fine, and a closing *"you're right"* at the end of a long reply is acceptable when warranted. Lead with substance, not validation.
118
+
</jargon>
119
+
110
120
<attribution>
111
121
Attribute work to the git author, not to Claude. Do not add `Co-Authored-By: Claude` trailers or `Generated with Claude Code` in PR descriptions. The git author (from `git config user.name`) is the author of record.
Run realistic Chonk IVC benchmarks using **pinned protocol inputs** (real transaction flows captured from end-to-end tests), not the synthetic `chonk_bench` target. The synthetic benchmark (`chonk_bench`) uses trivially small mock circuits — it is useful for quick regression checks but does NOT reflect production proving performance. Users invoking `/benchmark-chonk` want the real thing.
9
+
Run realistic Chonk IVC benchmarks using **pinned protocol inputs** (real transaction flows captured from end-to-end tests).
10
10
11
-
## What makes this different from `chonk_bench`
12
-
13
-
||`chonk_bench` (synthetic) | This skill (realistic) |
14
-
|---|---|---|
15
-
| Input data | Mock circuits via `test_bench_shared.hpp`| Pinned msgpack from real Aztec transactions |
16
-
| Circuit count | 2 or 5 tiny circuits | Full transaction flows (10+ circuits) |
17
-
| Circuit variety | All identical | Mixed: app, kernel, tail, public |
**Chonk has no synthetic micro-benchmark.** Past attempts (`chonk_bench`) used trivially small mock circuits and produced misleading numbers — the target was deleted to prevent regression of that mistake. Always benchmark Chonk via `bb prove --scheme chonk` against pinned `ivc-inputs.msgpack` for real transaction flows. If a Chonk proving question seems to call for a micro-benchmark, the answer is still `bb prove` on a real flow.
This reads `benchmark_breakdown.json`, finds operations matching key components (sumcheck, pcs, pippenger, commitment, circuit, oink, compute), and appends them to `benchmarks.bench.json` with stacked chart markers for the dashboard.
277
270
278
-
## A/B comparison scripts
271
+
## A/B comparison
272
+
273
+
For Chonk A/B between branches, run `bb prove --scheme chonk` against the same pinned `ivc-inputs.msgpack` on each branch and compare the resulting `--bench_out_hierarchical` JSON manually. Use the **remote machine** (`/remote-bench`) for stable, single-run numbers.
279
274
280
-
These use GoogleBenchmark's `compare.py` for statistical analysis. Note: these use the **remote machine** — see `/remote-bench`.
275
+
The generic Google-Benchmark A/B scripts still exist for non-Chonk targets:
281
276
282
277
| Script | What it compares |
283
278
|--------|-----------------|
284
-
|`scripts/compare_chonk_bench.sh`| Native ChonkBench/Full/6, branch vs baseline |
285
-
|`scripts/compare_chonk_bench_wasm.sh`| WASM ChonkBench/Full/6, branch vs baseline |
|`scripts/ci_benchmark_ivc_flows.sh`| CI: proves a flow, extracts components, uploads to dashboard |
295
288
|`scripts/benchmark_example_ivc_flow_remote.sh`| Proves a pinned flow on the remote machine (uses `/remote-bench`) |
296
-
|`scripts/benchmark_chonk.sh`| Synthetic `chonk_bench` on remote |
297
289
|`scripts/wasmtime.sh`| wasmtime wrapper with standard flags |
298
290
|`scripts/extract_component_benchmarks.py`| Extract component timings from hierarchical breakdown |
299
291
@@ -307,7 +299,7 @@ These use Google Benchmark's `compare.py` for statistical analysis. Note: these
307
299
-**WASM preset:**`wasm-threads`. Build dir is `build-wasm-threads/`. The preset enables `ENABLE_WASM_BENCH=ON` automatically.
308
300
-**WASM is ~2.8x slower than native** — this ratio is consistent across all circuit types.
309
301
-**CRS:** Ensure `~/.bb-crs` exists. For WASM, wasmtime needs `--dir=$HOME/.bb-crs`.
310
-
-**`BB_BENCH=1` vs `--print_bench`:** Either activates profiling. `--print_bench` also triggers the hierarchical tree output to stderr. In `chonk_bench`, the `GOOGLE_BB_BENCH_REPORTER` macro enables it automatically when `BB_BENCH=1` is set.
302
+
-**`BB_BENCH=1` vs `--print_bench`:** Either activates profiling. `--print_bench` also triggers the hierarchical tree output to stderr. In Google-Benchmark targets that wrap their loops with `GOOGLE_BB_BENCH_REPORTER`, the same activation happens automatically when `BB_BENCH=1` is set.
311
303
-**Dashboard:** CI uploads breakdown data to `bench/bb-breakdown/` on S3. The dashboard at `ci3/dashboard/chonk-breakdowns/` visualizes it.
312
304
-**Rebuilding after instrumentation changes:** Only `ninja bb` is needed — no need to reconfigure.
Copy file name to clipboardExpand all lines: barretenberg/.claude/skills/remote-bench/SKILL.md
+5-8Lines changed: 5 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
name: remote-bench
3
3
description: Run benchmarks on the dedicated remote EC2 benchmarking machine for noise-free, single-run results. Handles env var validation, lock management, binary transfer, and result collection. Use with /benchmark-chonk or any BB benchmark target.
4
-
argument-hint: <target> e.g. "bb", "chonk_bench", "ultra_honk_bench", "wasm bb"
4
+
argument-hint: <target> e.g. "bb", "ultra_honk_bench", "wasm bb"
5
5
---
6
6
7
7
# Remote Bench
@@ -95,7 +95,7 @@ The standard flow used by `scripts/benchmark_remote.sh`:
95
95
```bash
96
96
cd barretenberg/cpp
97
97
98
-
BENCHMARK="bb"# or chonk_bench, ultra_honk_bench, etc.
98
+
BENCHMARK="bb"# or ultra_honk_bench, etc. (Chonk: use bb with --scheme chonk on real example flows — there is no synthetic chonk benchmark)
99
99
PRESET="clang20-no-avm"# or clang20
100
100
BUILD_DIR="build-no-avm"# matches preset
101
101
@@ -204,14 +204,14 @@ Compare current branch vs baseline (builds and runs both on remote):
For Chonk A/B, do not use a synthetic benchmark — measure `bb prove --scheme chonk` against pinned `ivc-inputs.msgpack` for both branches and compare manually.
214
+
215
215
These use Google Benchmark's `compare.py` for statistical analysis. Note: comparison scripts check out the baseline branch locally, so your working tree must be clean.
216
216
217
217
## Scripts reference
@@ -220,10 +220,7 @@ These use Google Benchmark's `compare.py` for statistical analysis. Note: compar
220
220
|--------|---------|
221
221
|`scripts/benchmark_remote.sh`| Generic: build locally, scp, run remotely |
222
222
|`scripts/benchmark_wasm_remote.sh`| Same for WASM (wasmtime on remote) |
223
-
|`scripts/benchmark_example_ivc_flow_remote.sh`| Chonk with pinned inputs on remote |
224
-
|`scripts/benchmark_chonk.sh`| Synthetic chonk_bench on remote |
Copy file name to clipboardExpand all lines: barretenberg/cpp/scripts/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,8 @@ There are scripts that:
28
28
4. If `ssh` worked, the setup is complete.
29
29
30
30
## How
31
-
-`./scripts/benchmark_chonk.sh` lets you run `chonk_bench` remotely and analyze the results.
32
31
-`./scripts/benchmark_example_ivc_flow_remote.sh` copies the example flow input you'd like to run to the remote machine, runs `bb prove`, and analyze the results.
33
32
- For the script to work you need to have the example flows downloaded locally, by `AZTEC_CACHE_COMMIT=origin/next~3 FORCE_CACHE_DOWNLOAD=1 yarn-project/end-to-end/bootstrap.sh build_bench`
34
33
- If you have other special needs, look inside the above scripts and see what parameters you can give, or use `./scripts/benchmark_remote.sh`.
34
+
35
+
Chonk proving must always be measured on real example app flows via `benchmark_example_ivc_flow_remote.sh` — there is no synthetic chonk benchmark, and there should not be one. Running synthetic Chonk benchmarks gives misleading numbers because the mock circuits do not reflect production proving costs.
0 commit comments