Repository navigation
test(contracts): prove and verify every mock circuit in a benchmark - #316
Draft
nicolasLuduena wants to merge 12 commits into
Draft
nicolasLuduena wants to merge 12 commits into
nicolasLuduena wants to merge 12 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…ions - Remove this run's proof server containers when the run is interrupted: the vitest process labels them and removes them on exit, since its watchdog SIGKILLs the worker; the worker also removes its container on SIGINT, SIGTERM and exit, and detaches those handlers in stop(). - Read the options once, before any server starts: BENCH_RUNS must be an integer of at least 1, a trailing slash on PROOF_SERVER_URL is dropped, a relative BENCH_OUT resolves against INIT_CWD, and zkir-v3 is the entry under ~/.compact that has the binary. A non-zero zkir-v3 exit fails. - Never flag a fresh server's first proof as cached. - Cover the even-length median and the empty warm list.
…hmark # Conflicts: # package.json # packages/contracts/package.json # packages/contracts/tsconfig.json
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #192
Part of #309. PR 1 of 6 in the stack (#192 → #310 → #311 → #312 → #313 → #314).
Summary
npm run benchcompiles the mocks with proving keys and proves every circuit of both mocks on a real proof server. It prints k, rows, proving key size, proof size, first and warm proving time, CPU time per warm proof and peak memory for each circuit.BENCH_DOCKER), and so is the parameter cache (BENCH_PARAMS, a named volume by default). See CONTRIBUTING's "Proving benchmark" section.@midnight-ntwrk/ledger-v91.0.2is a new dev dependency of contracts. It builds the/checkand/provepayloads.files, and the README change is docs only.Evidence
The baseline run (
npm run bench, current circuits, nothing optimized):The same benchmark pointed at a server it did not start (
PROOF_SERVER_URL, 1 warm run):After: every circuit of both mocks proves and verifies, including
openAndBindHost, and the README carries the table above.npm test: 781 passed, 4 skipped (the live checks). The benchmark isn't collected.npm run typesandnpm run checkpass.bench-report.test.tscovers the warm median and CPU median, the cached-first-proof flag, the table line, and "not measured" when there is no server cgroup.No verification skill in this repo.
Merge Danger
Door: two-way
A new command, docs and a dev dependency. Nothing shipped changes.
Blast Radius: contributors
MockSim.callnow goes through a publicrun. Test behavior is unchanged. The README numbers come from this machine, and every later ticket in the stack regenerates them.