-
Notifications
You must be signed in to change notification settings - Fork 22
refactor: make CRS deterministic [skip-line-limit] #1347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
74ce2cf
update configs to support mode for config circuit
0xjei 11f8216
move crp to fhe-params and make fhe the gateway
0xjei db255c1
default to deterministic CRP
0xjei c19bb7d
remove crp from pk_generation inputs and add to configs
0xjei 522a59f
remove unused or dead code
0xjei 056b945
update lockfiles
0xjei f4aba5f
Update crates/fhe-params/src/crp.rs
0xjei b5a9c92
small nits
0xjei be829a4
update locks and remove unused deps
0xjei ef0c9f1
Update crates/zk-helpers/src/circuits/threshold/pk_generation/codegen.rs
0xjei 2da2d13
format
0xjei 6ca6e7e
remove crs a from keyshare request
0xjei 1afea74
rebase main
0xjei badf376
fix r1_bound computation for pk_generation
0xjei 65edaae
remove a_raw
0xjei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Circuit benchmarks | ||
|
|
||
| Benchmark the ZK circuits. Configuration is in `config.json` (circuit list, mode, oracles, metrics). | ||
|
|
||
| ## How to run | ||
|
|
||
| From the **benchmarks** directory: | ||
|
|
||
| ```bash | ||
| ./run_benchmarks.sh [options] | ||
| ``` | ||
|
|
||
| Or from **scripts**: | ||
|
|
||
| ```bash | ||
| ./scripts/run_benchmarks.sh [options] | ||
| ``` | ||
|
|
||
| Both use `config.json` in the benchmarks directory by default. | ||
|
|
||
| ### Options | ||
|
|
||
| | Option | Description | | ||
| | --------------------------- | ----------------------------------------------------------------------------------------------------------- | | ||
| | `--mode insecure \| secure` | Run in insecure (default) or secure mode. Overrides `config.json`’s `mode`. | | ||
| | `--circuit <path>` | Run only this circuit (e.g. `dkg/pk` or `config`). If not in `config.json`, runs anyway if the path exists. | | ||
| | `--config <file>` | Use a different config file instead of `config.json`. | | ||
| | `--skip-compile` | Reuse existing build artifacts; skip compilation. | | ||
| | `--clean` | Remove circuit `target/` directories after the run. | | ||
|
|
||
| ### Examples | ||
|
|
||
| ```bash | ||
| # Default: insecure mode, all circuits from config (config circuit is skipped) | ||
| ./run_benchmarks.sh | ||
|
|
||
| # Secure mode (includes the config circuit) | ||
| ./run_benchmarks.sh --mode secure | ||
|
|
||
| # Single circuit | ||
| ./run_benchmarks.sh --circuit threshold/pk_generation | ||
| ./run_benchmarks.sh --mode secure --circuit config | ||
|
|
||
| # Re-run without recompiling | ||
| ./run_benchmarks.sh --skip-compile | ||
| ``` | ||
|
|
||
| ### Results | ||
|
|
||
| Output goes under `results_<mode>/` (e.g. `results_insecure/`, `results_secure/`). A Markdown report | ||
| is written to `results_<mode>/report.md`. Raw JSON is kept in `results_<mode>/raw/` so that a run | ||
| with `--circuit` only overwrites that circuit’s file and the report is regenerated from all data | ||
| (existing + updated). View the report with `cat results_<mode>/report.md` or | ||
| `open results_<mode>/report.md` (macOS). | ||
|
|
||
| ## Secure-only circuits | ||
|
|
||
| The **config** circuit (validates secure configs only) is listed in `config.json` with | ||
| `"modes": ["secure"]` so it is only run in secure mode. With the default `"mode": "insecure"` it is | ||
| skipped. The script `scripts/run_benchmarks.sh` respects this by filtering circuits by the `modes` | ||
| field in `config.json` before running; see the “Circuit-specific modes” comment and the loop that | ||
| builds `RUN_CIRCUITS` there. |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.