Repository navigation
refactor(crypto): centralize BFV protocol identity derivation - #2341
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Shared identity API and compatibility vectors crates/fhe-params/src/*, crates/fhe-params/tests/*, crates/fhe-params/Cargo.toml, crates/fhe-params/README.md, AGENTS.md |
e3-fhe-params exposes BFV scheme, parameter-hash, and configuration-ID helpers. Frozen current and historical vectors drive compatibility tests, including checks for exact encoded parameter bytes. Documentation describes the vectors and identity constraints. |
Identity use in runtime and build code crates/zk/build/src/*, crates/zk/build/templates/*, crates/evm/src/interfold/events.rs, crates/indexer/src/indexer.rs, docs/architecture/* |
The builder, EVM event decoder, and indexer use shared identity helpers for current or historical configuration IDs. Tests use fixture values or shared helpers. Architecture docs describe protocol identity ownership. |
CI pull request branch coverage
| Layer / File(s) | Summary |
|---|---|
Pull request trigger scope .github/workflows/ci.yml |
The pull_request trigger no longer limits CI runs to pull requests targeting main or dev. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Refactor
Possibly related issues
theinterfold/interfold#2319: The changes implement the issue’s described BFV parameter and circuit/configuration identity consolidation.theinterfold/CRISP#2: The changes centralize BFV identity formulas and add compatibility checks for downstream consumers.
Suggested reviewers: ctrlc03, hmzakhalid
Merge Risk: 
Minimal · up to 62ec6
-
The BFV identity refactor preserves current and historical behavior while broadening pull-request CI coverage. No material merge-blocking risk is established.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 8 files. (2 skipped: 2 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
3f96a03 to
ee46ab8
Compare
Share parameter hashing and current circuit domains across the builder, node admission, and indexer. Preserve ABI bytes, configuration IDs, and explicit historical v1 verification. Keep circuit message width in e3-zk-config. Related to #2197; foundation for the configuration-consolidation stack.
Dependent review layers target the preceding feature branch. Do not silently skip the main CI workflow merely because the PR base is not main or dev; retain the existing path-based job selection and publication protections.
Remove the implementation proposal, trim source-derived README inventories, and put the concise documentation rule in the first stack layer. Retain independent protocol compatibility tests and fixture provenance unchanged.
Restore the existing artifact and proof documentation without the added implementation summaries. Preserve only the formatter-required line wrap; README compatibility guidance, fixture provenance, AGENTS policy, and tests remain unchanged.
ee46ab8 to
5f0d129
Compare
What and why
Part 1/6 of #2197's BFV configuration stack, based on main. Review and merge predecessors first; review follow-ups are kept in #2353.
e3-fhe-params.Current baseline and verification
Restacked on main
ea058724ef630d864614ddcd1887033e2793fdc4, including #2349's coordinated Noir rc.3 / BB 6.0.0 upgrade. Protocol 9, generation 2, and BFV domain v5 are inherited; this layer adds no counter change. Published #2341 was already on this baseline and its tip is preserved.Whole-stack current evidence is recorded in #2353, not in architecture documentation. It includes frozen identity/metadata/source checks, 300 independently rederived latest VKs and 12 Solidity verifiers, a fresh default-source build matching all 102 published key/hash/anchor files, 853 prepared contract tests, seven SDK WASM proof tests, and nine native leaf plus three fold/node proof tests against latest. Do not treat historical beta.26/BB5.2 results as current qualification.
Matching CI run 40299772538 passed for
5f0d129f8721. All seven matching stack CI runs are green, and #2353 is ready for review. Rewritten branches were published using recorded exact leases and ordinary hooks. These cumulative whole-stack results do not claim every follow-up fix already exists in this individual layer.Compatibility and limits
Relative to current main, the read-only review found no further parameter/configuration-ID/domain, committee order, T+1/H, proof multiplicity, public-input layout, production ABI/storage/events, durable-schema, or wire-format change. Frozen vectors remain independent; current slot-0/slot-2 admission and explicit historical handling remain intact. Human protocol review is still required.
Review references: artifact boundaries, proof statements, threshold decryption, protocol history, and upgrades.
#2346 explicitly reconciles 18/42 catalogue expectations with main's already-breaking toolchain cutover. Main's matching rc.3/BB6 verifier/artifact combination remains supported; protocol-8/beta.26/BB5.2 compatibility is not promised. Source stamps are preserved, not relabelled. Old-data replay and mixed-peer formats are unchanged, but no new live mixed-fleet/replay qualification is claimed. Rollback stays within the matching protocol-9 baseline and never decreases counters.
Fresh all-pair source-bound release qualification, historical #2195 replay/recurring-file measurement, exhaustive live-fleet/release qualification, and matching immutable public pins/public-release E2E for CRISP draft #6 remain separate. CRISP stays release-blocked. No migration, governance action, merge, tag, release, deployment, or artifact publication is performed or authorized.
Stack: #2341 → #2342 → #2343 → #2344 → #2345 → #2346 → #2353.
Summary by CodeRabbit
New Features
Documentation