feat: configure new param set [skip-line-limit]#1576
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughUpdates secure BFV/DKG parameters and search defaults, adds a large committee with generated parity matrices, regenerates parity matrices for other committee sizes, removes ChangesFHE Parameters, Committee Configuration, Event Schema, and Tooling
Benchmark Pipeline and Secure Aggregation Test Artifacts
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@circuits/benchmarks/results_secure_agg_micro/report.md`:
- Line 21: The report's λ value is incorrect (shows 55) — update the micro
benchmark report to match the preset and outputs by changing the "λ (smudging /
error)" entry from 55 to 50; verify this aligns with DEFAULT_SECURE_LAMBDA and
the secure-8192 preset (and the integration_summary.json/crisp_verify_gas.json
which show "lambda": 50).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c1aec693-5566-41e6-a3f6-18add39d38d1
📒 Files selected for processing (28)
circuits/benchmarks/results_secure_agg_medium/benchmark_run_meta.jsoncircuits/benchmarks/results_secure_agg_medium/crisp_verify_gas.jsoncircuits/benchmarks/results_secure_agg_medium/integration_summary.jsoncircuits/benchmarks/results_secure_agg_medium/report.mdcircuits/benchmarks/results_secure_agg_micro/benchmark_run_meta.jsoncircuits/benchmarks/results_secure_agg_micro/crisp_verify_gas.jsoncircuits/benchmarks/results_secure_agg_micro/integration_summary.jsoncircuits/benchmarks/results_secure_agg_micro/report.mdcircuits/lib/src/configs/committee/large/mod.nrcircuits/lib/src/configs/committee/large/parity_insecure.nrcircuits/lib/src/configs/committee/large/parity_secure.nrcircuits/lib/src/configs/committee/medium/parity_secure.nrcircuits/lib/src/configs/committee/micro/parity_secure.nrcircuits/lib/src/configs/committee/mod.nrcircuits/lib/src/configs/committee/small/parity_secure.nrcircuits/lib/src/configs/default/mod.nrcircuits/lib/src/configs/secure/dkg.nrcircuits/lib/src/configs/secure/threshold.nrcrates/events/src/enclave_event/ciphernode_selected.rscrates/events/src/enclave_event/e3_requested.rscrates/evm/src/domain/enclave_events.rscrates/fhe-params/src/constants.rscrates/request/src/meta.rscrates/sortition/src/actors/ciphernode_selector.rscrates/tests/tests/integration.rsscripts/build-circuits.tsscripts/circuit-constants.tsscripts/generate-verifiers.ts
💤 Files with no reviewable changes (5)
- crates/events/src/enclave_event/ciphernode_selected.rs
- crates/request/src/meta.rs
- crates/events/src/enclave_event/e3_requested.rs
- crates/sortition/src/actors/ciphernode_selector.rs
- crates/tests/tests/integration.rs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@circuits/benchmarks/scripts/run_benchmarks.sh`:
- Around line 389-393: INTEGRATION_SNAPSHOT is only written on successful
extraction so a previous snapshot can be reused when extraction fails; update
the logic around the INTEGRATION_SNAPSHOT/GAS_JSON_FILE handling so that when
the extraction condition fails you proactively remove/truncate the existing
"${INTEGRATION_SNAPSHOT}" (and analogous snapshots at the other blocks
referenced) instead of leaving stale files; locate the block using the
INTEGRATION_SNAPSHOT and GAS_JSON_FILE variables and add an else branch that
checks for the existing snapshot and deletes or empties it to guarantee
downstream stages cannot read a stale snapshot.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5e2409e8-dbe8-450a-804a-566a63047df2
📒 Files selected for processing (2)
circuits/benchmarks/results_secure_agg_micro/report.mdcircuits/benchmarks/scripts/run_benchmarks.sh
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/fhe-params/src/presets.rs (1)
537-550: ⚡ Quick winAdd assertions for
bandb_chiin search-default tests.
search_defaults()now threads dedicated insecureb/b_chi, but the test only validatesn/k/z/lambda. Add explicit checks so regressions on error bounds are caught.Proposed test update
let preset = BfvPreset::InsecureThreshold512; let defaults = preset.search_defaults().unwrap(); assert_eq!(defaults.n, INSECURE_SEARCH_N); assert_eq!(defaults.k, INSECURE_SEARCH_K); assert_eq!(defaults.z, INSECURE_SEARCH_Z); assert_eq!(defaults.lambda, DEFAULT_INSECURE_LAMBDA as u32); + assert_eq!(defaults.b, INSECURE_B); + assert_eq!(defaults.b_chi, INSECURE_B_CHI); let preset = BfvPreset::SecureThreshold8192; let defaults = preset.search_defaults().unwrap(); assert_eq!(defaults.n, SEARCH_N); assert_eq!(defaults.k, SEARCH_K); assert_eq!(defaults.z, SEARCH_Z); assert_eq!(defaults.lambda, DEFAULT_SECURE_LAMBDA as u32); + assert_eq!(defaults.b, B); + assert_eq!(defaults.b_chi, B_CHI);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/fhe-params/src/presets.rs` around lines 537 - 550, The test test_search_defaults() currently checks only n/k/z/lambda; update it to also assert the returned error bounds by adding checks for defaults.b and defaults.b_chi for both presets: for BfvPreset::InsecureThreshold512 assert defaults.b equals INSECURE_SEARCH_B and defaults.b_chi equals INSECURE_SEARCH_B_CHI, and for BfvPreset::SecureThreshold8192 assert defaults.b equals SEARCH_B and defaults.b_chi equals SEARCH_B_CHI; locate these in the same test around the existing search_defaults() calls and add the two corresponding assert_eq! lines for each preset.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@crates/fhe-params/src/presets.rs`:
- Around line 537-550: The test test_search_defaults() currently checks only
n/k/z/lambda; update it to also assert the returned error bounds by adding
checks for defaults.b and defaults.b_chi for both presets: for
BfvPreset::InsecureThreshold512 assert defaults.b equals INSECURE_SEARCH_B and
defaults.b_chi equals INSECURE_SEARCH_B_CHI, and for
BfvPreset::SecureThreshold8192 assert defaults.b equals SEARCH_B and
defaults.b_chi equals SEARCH_B_CHI; locate these in the same test around the
existing search_defaults() calls and add the two corresponding assert_eq! lines
for each preset.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: caf8a3d1-9ff0-436c-93f2-57a58c73afe2
📒 Files selected for processing (2)
crates/fhe-params/src/constants.rscrates/fhe-params/src/presets.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/fhe-params/src/constants.rs
esi_per_ctSummary by CodeRabbit
New Features
Chores