Commit 3265eb1
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
| 585 | + | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
850 | | - | |
| 850 | + | |
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
0 commit comments