Skip to content

fix(contracts): let committee:new request the active parameter set - #2134

Merged
hmzakhalid merged 1 commit into
mainfrom
fix/committee-new-param-set
Oct 3, 2026
Merged

hmzakhalid merged 1 commit into
mainfrom
fix/committee-new-param-set

Conversation

@hmzakhalid

@hmzakhalid hmzakhalid commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

What

Fixes the #2068 item "committee:new always requests parameter set 0". PR 2 of the Stack 4 stack; base: PR 1.

  • Before: the task set paramSet = 0. A local deployment from a secure-8192 build registers only set 1, so the task could not request an E3 there.
  • Now: --param-set, with ACTIVE_BFV_PARAM_SET from scripts/utils.ts (the generated constant of the active circuit build) as the default. The task derives the expected crypto config ID from the selected set. Before its first transaction, it stops for an unknown set and for a set that the Interfold deployment has not registered (paramSetRegistry(paramSet) is empty). getE3Quote also rejects an unregistered set, but the contracts build strips revert strings (revertStrings: "strip"), so that revert has no reason.
  • cryptoConfigIdForParamSet stays in tasks/interfold.ts, because scripts/check-committee.sh compares it with ActiveCryptoConfig.sol. feat!: upgrade fhe.rs & refresh BFV circuits [skip-line-limit] #1996 changes the same function; the second PR to merge adapts.

Verification

The task needs a deployed system on a node (--network localhost), so it has no Hardhat test. On the test host, against a private anvil, after deploy:mocks and three ciphernode:admin-add registrations:

  • no option: the request uses paramSet: 0 and config ID 0x20d76557…; the E3 is requested.
  • --param-set 2: Unsupported BFV parameter set: 2; no transaction (deployer nonce unchanged).
  • --param-set 1 before registration: BFV parameter set 1 is not registered on this Interfold deployment. No E3 was requested.; no transaction. Without the pre-check, the quote reverts with empty data.
  • --param-set 1 after setParamSet(1, …): the request uses paramSet: 1 and config ID 0x3115e08e…; the E3 is requested.

The issue's own case also ran (Codex review): after pnpm build:circuits sync-config --preset secure-8192 --committee minimum and a ZK-path deployment, which registers only set 1, the task requested set 1 by default (0x3115e08e…); --param-set 2 and the unregistered --param-set 0 stopped with no transaction; after registering set 0, --param-set 0 requested an E3 (0x20d76557…).

Checklist

  • Verified — the runs above; tsc --noEmit -p packages/interfold-contracts; prettier.
  • Harness docs — no statement in agent/ changes; the commit carries [skip-doc-sync] with the reason.
  • Invariants — one invariant-reviewer pass: no finding. The cryptoConfigIdForParamSet block that scripts/check-committee.sh reads is unchanged; the config ID still comes from the selected set.
  • Breaking? — no. Rollout class — none (developer task).
  • Review — Claude and Codex (gpt-6-astra, max) reviewed on their own and checked each other's findings with tests. Neither found a defect; both note the same gap: no automated test drives the task (it needs a deployed system on a node), so the runs above are the evidence.

Summary by CodeRabbit

  • New Features

    • Committee creation now uses the BFV parameter set for the active circuit build by default. You can also select a supported set explicitly.
    • The task checks that the selected set is supported and registered on the deployment before proceeding.
  • Documentation

    • Updated ciphernode registration guidance with parameter-set options and what happens when a set is not registered.

@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
crisp Ready Ready Preview Oct 3, 2026 5:39pm UTC
interfold-dashboard Ready Ready Preview Oct 3, 2026 5:39pm UTC
interfold-docs Ready Ready Preview Oct 3, 2026 5:39pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – interfold-docs October 3, 2026 15:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – crisp October 3, 2026 15:26 Inactive
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: theinterfold/interfold/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ee59764d-f3ee-48d3-abe6-9ae949a11dc9
📥 Commits

Reviewing files that changed from the base of the PR and between 885f839 and 99b2598.

📒 Files selected for processing (2)
  • packages/interfold-contracts/README.md
  • packages/interfold-contracts/tasks/interfold.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: theinterfold/interfold/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b4a38ae9-0973-4d19-8b21-33a02caf9da0
📥 Commits

Reviewing files that changed from the base of the PR and between 885f839 and 99b2598.

📒 Files selected for processing (2)
  • packages/interfold-contracts/README.md
  • packages/interfold-contracts/tasks/interfold.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

committee:new now defaults to the active build’s BFV parameter set and accepts an explicit set selection. It rejects unsupported or unregistered sets before sending transactions, then uses the selected set’s crypto configuration ID in the E3 quote parameters.

Changes

Committee parameter-set selection

Layer / File(s) Summary
Select and validate the parameter set
packages/interfold-contracts/tasks/interfold.ts, packages/interfold-contracts/README.md
The task defaults to the active build’s parameter set and accepts set 0 or 1. It rejects unsupported IDs and sets not registered on Interfold before sending transactions. The selected set determines expectedCryptoConfigId; the README documents these options and checks.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: 0xjei

Merge Risk: ⚪ Minimal · up to 99b25

Committee creation can now select either documented parameter set and stops before sending if it is unavailable. No new merge-blocking behavior is established.

Architecture Summary

Architecture risk: 🔵 Low · up to 99b25

The change affects 1 system.

Changed systems: packages/interfold-contracts

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/interfold-contracts (library) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in packages/interfold-contracts/README.md: Documents the default parameter-set selection for committee:new, the two supported --param-set values, and that the task halts before sending a transaction if the deployment lacks the requested set.
  • observed — Modified behavior in packages/interfold-contracts/tasks/interfold.ts: The script-utils import now also brings in ACTIVE_BFV_PARAM_SET.
  • observed — Modified behavior in packages/interfold-contracts/tasks/interfold.ts: committee:new adds an integer paramSet option, defaulting to ACTIVE_BFV_PARAM_SET, with descriptions for sets 0 and 1.
  • observed — Modified behavior in packages/interfold-contracts/tasks/interfold.ts: The task action now reads the selected paramSet.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: committee:new can request the active BFV parameter set.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hmzakhalid

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 59 minutes.

committee:new always requested BFV parameter set 0. A local deployment
from a secure-8192 build registers only set 1, so the task could not
request an E3 there.

The task takes --param-set, with ACTIVE_BFV_PARAM_SET from
scripts/utils.ts as the default, and derives the expected crypto config
ID from the selected set. Before it sends a transaction, it rejects an
unknown set and a set that the Interfold deployment has not registered.
getE3Quote also rejects an unregistered set, but the contracts build
strips revert strings, so that revert carries no reason.

Refs #2068

[skip-doc-sync]: no statement in agent/ changes; flow-trace 03 still
describes the committee:new owner-capacity check correctly.
@hmzakhalid

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 52 minutes.

@hmzakhalid
hmzakhalid merged commit 4f46dd3 into main Oct 3, 2026
39 checks passed

This branch was successfully deployed

3 active deployments
Preview – crisp — 99b2598c Deployed Oct 3, 2026 by vercel[bot]
Preview – interfold-docs — 99b2598c Deployed Oct 3, 2026 by vercel[bot]
Preview – interfold-dashboard — 99b2598c Deployed Oct 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant