Skip to content

feat: the proof timing report from the browser, on every pull request - #20

Closed
sergeytimoshin wants to merge 1 commit into
mainfrom
sergei/proof-timing
Closed

sergeytimoshin wants to merge 1 commit into
mainfrom
sergei/proof-timing

Conversation

@sergeytimoshin

@sergeytimoshin sergeytimoshin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

The browser prover gets the proof timing report the mobile SDK has: four scenarios for every shape, before and after a change, commented on every pull request, with a history of main.

  • examples/browser/scripts/proof-timing.mjs: drives the benchmark page in headless Chrome (selenium, as test:browser) through first run including the key's fetch and decode, warm, first run after a page reload (raw-key cache) and repeated, for transfers of 1 to 24 notes and a merge of 24 (ZOLANA_TIMING_SHAPES narrows it); a failed or stalled shape prints an error line and the others run in a new browser.
  • scripts/proof-timing-report.mjs (+ test): the table with before/after rows, the download bracket, the stage split and failed shapes; proof-timing-ci.sh takes the baseline from the history and writes the job summary and one PR comment; proof-timing-history.{mjs,sh} append each main report to the proof-timing branch and rewrite its README.
  • wasm/prover-wasm/testdata: transfer-{1,2,4,8,16,24}x2.json and merge-24x1.json, valid requests on trees of their own (the mobile SDK's tools/prove-fixtures wrote them), with Go tests of their shapes; build-wasm.sh stages the transfer requests.
  • ci.yml: a bench job beside check, cancelled by a newer push to the PR, and a proof-timing-history job with contents: write after each push to main.
  • README and CHANGELOG.

On this branch's runtime (0.1.0) 24x2 crashes the browser and the merge stalls at the kernel's 1 GiB memory cap, so the report shows both failed until #21 and #22 bring runtime 0.2.0. The proof-timing branch appears with the first push to main after merge; until then the PR comment has no before rows.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Proof timing: chrome

After: this pull request at 049c300. No report of main to compare with yet.

Medians of one browser, by shape (notes → outputs). Runner numbers are for comparing commits, not for how fast a device is.

scenario 1 → 2 2 → 2 4 → 2 8 → 2 16 → 2 24 → 2 merge 24 → 1
first run, including download 12.17 s (download: 2.29 s, 8.8 MiB) 15.89 s (download: 0.62 s, 15.6 MiB) 30.89 s (download: 2.69 s, 28.9 MiB) 58.51 s (download: 3.81 s, 55.9 MiB) 112.74 s (download: 5.85 s, 109.5 MiB) failed failed
warm 1.64 s 2.37 s 4.29 s 8.25 s 16.03 s failed failed
first run after restart 2.19 s 3.21 s 5.45 s 10.03 s 19.26 s failed failed
repeated after restart 1.39 s 2.37 s 4.32 s 8.20 s 16.02 s failed failed
stage 1 → 2 2 → 2 4 → 2 8 → 2 16 → 2 24 → 2 merge 24 → 1
key load 0.25 s 0.42 s 0.70 s 1.33 s 2.57 s
witness 0.00 s 0.00 s 0.00 s 0.00 s 0.00 s
prove 1.48 s 2.31 s 4.23 s 8.16 s 15.94 s
verify 0.02 s 0.01 s 0.01 s 0.02 s 0.03 s

Failed:

  • 24 → 2, fresh run: Wait timed out after 300008ms
  • merge 24 → 1, fresh run: Wait timed out after 300000ms

@sergeytimoshin
sergeytimoshin force-pushed the sergei/proof-timing branch 2 times, most recently from 98cd74f to ccbfc20 Compare October 16, 2026 18:29
`examples/browser/scripts/proof-timing.mjs` drives the benchmark page in
headless Chrome through the four scenarios the mobile SDK reports (first
run including the key's fetch and decode, warm, first run after a reload
with the key in the raw-key cache, repeated) for transfers of 1 to 24
notes and a merge of 24, and prints one `ZOLANA_TIMING` line per proof;
`scripts/proof-timing-report.mjs` renders the table before and after a
change. A bench job beside the checks comments the report on every pull
request against the last commit of main, and after each push to main the
report joins the history on the proof-timing branch.
@sergeytimoshin

Copy link
Copy Markdown
Collaborator Author

Superseded: this change reached main as cc95006 within #23 (together with runtime 0.2.0, which is why the bench here was red: on this branch's base, runtime 0.1.0's 1 GiB kernel cap stalls 24→2 and the merge). The bench is green on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant