Skip to content

Commit 3265eb1

Browse files
committed
fix(demo): force en-US locale on R1CS constraint count + refresh evidence
End-to-end test pass on this commit produced two cosmetic + content updates: 1. Constraint count rendered as "1.026" on locales that pick a European thousands separator. Three call sites of `Number.toLocaleString()` without an explicit locale arg were hardcoded to en-US via the existing `formatNumber` helper: - aside heading ("1,026 R1CS constraints") - table footer total - PLONK comparison's Groth16 circuit row Confirmed in the live preview: all three now read "1,026". 2. evidence.json regenerated by re-running the generator binary. The numbers stayed reproducible (same setup/prove seeds, same SHA-256 digests of the .bin artifacts); only the wall-clock timing fields drifted by 1-3 ms (setup 80→83 ms) and the `generated_at` timestamp moved forward. Re-shipping the fresh evidence so the demo's "Captured at" line matches the live commit. End-to-end test recap before this fix: ✓ 5/5 mosaic-demo-sudoku unit tests pass ✓ generate-fixtures runs clean: arkworks accept, Mosaic accept, tampered reject (PointNotOnCurve), PLONK accept (2 ms via mosaic-plonk on the snarkjs 0.7.6 mul-circuit fixture) ✓ pnpm next build clean: /demo/sudoku route 12.6 kB / 162 kB FLJ ✓ Browser preview exercise: - 81 cells, 21 clue cells highlighted - Hero mark = /assets/mosaic.webp (Mosaic mark, not Wiener) - Hover center cell (idx 40) → 1 focused + 20 in-group cells (8 row + 8 col + 4 box-non-overlap), readout shows the coordinate + role + value + in-circuit work breakdown - "Reveal solution" toggle: 21 → 81 filled, back to 21 on undo - Proof anatomy: 8 chunks rendered with real hex from proof_valid.bin, click chunk #3 (B.x.c0) → detail card shows "G2 affine x (Fq2 real)" with ADR-0003 Fq2 ordering note - Verify tabs swap correctly; tampered tab activates as "Verify tampered proof" - PLONK comparison panel: 2 columns populated, second heading "KZG-PLONK · BN254", both digest links present - 2 terminals on page (verify panel + page-07 runtime evidence)
1 parent ea5353b commit 3265eb1

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

site/app/demo/sudoku/SudokuDemo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export function SudokuDemo() {
561561
<header className="demo-aside-header">
562562
<span className="tag">CIRCUIT</span>
563563
<h2 className="sub-display">
564-
{evidence.constraint_count.toLocaleString()} R1CS constraints
564+
{formatNumber(evidence.constraint_count)} R1CS constraints
565565
</h2>
566566
</header>
567567
<table className="demo-table">
@@ -582,7 +582,7 @@ export function SudokuDemo() {
582582
))}
583583
<tr className="demo-table-total">
584584
<td colSpan={2}>Total</td>
585-
<td className="demo-table-num">{cb.total.toLocaleString()}</td>
585+
<td className="demo-table-num">{formatNumber(cb.total)}</td>
586586
</tr>
587587
</tbody>
588588
</table>
@@ -847,7 +847,7 @@ export function SudokuDemo() {
847847
<div>
848848
<dt>Circuit</dt>
849849
<dd>
850-
Sudoku 9×9, {evidence.constraint_count.toLocaleString()} R1CS, {evidence.public_input_count}{" "}
850+
Sudoku 9×9, {formatNumber(evidence.constraint_count)} R1CS, {evidence.public_input_count}{" "}
851851
public inputs
852852
</dd>
853853
</div>

site/public/demo/sudoku/evidence.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"schema_version": 1,
3-
"generated_at": "2026-05-11T19:10:12Z",
3+
"generated_at": "2026-05-11T19:20:06Z",
44
"workspace_version": "0.9.15-onchain-compressed-verify",
5-
"repo_commit_sha": "473841b",
5+
"repo_commit_sha": "ea5353b",
66
"puzzle_source": "Inkala 2010 (21-clue hardest-class)",
77
"puzzle": [
88
8,
@@ -186,7 +186,7 @@
186186
"setup_seed": "0xc0ffeedead42beef",
187187
"prove_seed": "0xb16b00b5deadc0de",
188188
"timings": {
189-
"setup_ms": 77,
189+
"setup_ms": 83,
190190
"prove_ms": 22,
191191
"verify_arkworks_ms": 1,
192192
"verify_mosaic_valid_ms": 2,

0 commit comments

Comments
 (0)