Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
📝 WalkthroughWalkthroughChanged single-polynomial flows to per-modulus arrays ([Polynomial; L]), introduced a domain-separated commitments API (compute_commitments and wrappers), and updated callers across TRBFV PK, share verification, BFV enc/dec, Greco, examples, and SDK to use per-modulus commitment/challenge functions. Changes
Sequence Diagram(s)sequenceDiagram
participant Main as rgba(10,90,200,0.5) Main
participant PK as rgba(20,160,60,0.5) TrbfvPublicKey
participant Comm as rgba(200,100,20,0.5) Commitments
participant Verifier as rgba(150,40,180,0.5) Verifier
Main->>PK: TrbfvPublicKey::new(..., e_sm_array, ...)
PK->>Comm: compute_secret_sk_commitment(sk)
PK->>Comm: compute_secret_e_sm_commitment(e_sm_array)
PK->>Comm: compute_pk_trbfv_commitment(pk0, pk1)
Verifier->>Comm: compute_pk_trbfv_challenge::<L>(inputs)
Verifier->>Comm: compute_aggregated_shares_commitment::<N,L,BIT>(aggregated_shares)
Verifier->>PK: verify commitments & per-modulus range checks
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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
🤖 Fix all issues with AI agents
In `@circuits/lib/src/core/trbfv_verify_shares.nr`:
- Line 1: Remove the stray top-of-file documentation artifact '///
crates/generator/commitments' from trbfv_verify_shares.nr; simply delete that
line so the file no longer begins with the misplaced comment and the module
starts with the intended code content.
🧹 Nitpick comments (2)
circuits/lib/src/core/trbfv_verify_shares.nr (1)
8-12: LGTM!The import of
prepare_l_polynomial_commitment_payloadon a separate line is functionally correct. Consider consolidating it with the existing import block for cleaner organization.♻️ Optional consolidation
use crate::math::commitments::{ compute_secret_commitment, compute_shares_party_modulus_commitment, - prepare_shares_party_modulus_commitment_payload, prepare_single_polynomial_commitment_payload, + prepare_l_polynomial_commitment_payload, prepare_shares_party_modulus_commitment_payload, + prepare_single_polynomial_commitment_payload, }; -use crate::math::commitments::prepare_l_polynomial_commitment_payload;circuits/lib/src/math/commitments.nr (1)
57-63: Clarify the helper’s purpose as “L‑polynomial” payload.The current doc still reads like the old aggregated-shares helper; a small rename improves intent.
✏️ Suggested doc tweak
-/// Prepares the payload for aggregated shares commitment. -/// Used in C1, C2, C4. +/// Prepares the payload for L-polynomial commitment (L polynomials). +/// Used in C1, C2, C4.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@circuits/lib/src/core/trbfv_verify_shares.nr`:
- Around line 175-179: The docstring is wrong: compute_secret_e_sm_commitment
(which calls multiple_polynomial_payload::<N, L, BIT_E_SM>) hashes all L modulus
polynomials, not just the first modulus; update the docstring near
compute_secret_e_sm_commitment/compute_secret_e_sm_commitment::<N, L, BIT_E_SM>
to state that the commitment is computed over all L RNS polynomials (matching
multiple_polynomial_payload's behavior), or alternatively change the
implementation to only hash the first modulus — but prefer the docstring change
so the assertion comparing compute_secret_e_sm_commitment(self.secret_e_sm) to
self.expected_secret_commitment correctly documents that all L polynomials are
included.
|
we need gnosisguild/zkfhe-generator#72 merged and check the CI again (I think the |
cedoor
left a comment
There was a problem hiding this comment.
After merging gnosisguild/zkfhe-generator#72 and updating the zkfhe-generator crates, the CRISP ZK verifier also needs to be updated.
|
nnnamo |
see #1184
Summary by CodeRabbit
Refactor
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.