Skip to content

fix(contracts): prepare the Sepolia cutover for the large committee - #2540

Closed
ctrlc03 wants to merge 7 commits into
large/release-largefrom
large/sepolia-cutover-large
Closed

ctrlc03 wants to merge 7 commits into
large/release-largefrom
large/sepolia-cutover-large

Conversation

@ctrlc03

@ctrlc03 ctrlc03 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Split from #2398 (Zara's work). Stacked on #2537 (large/release-large); review that one first.

Prepares live Sepolia for the Large committee that #2537 routes there.

  • sepolia-protocol.config.json raises dkgWindow to 7200 s: one Large node measured 1,213 s of
    DKG proving on secure-8192. Live Sepolia holds 1800 s (the file's earlier 1200 s was stale). The
    value applies to every Sepolia E3: the worst-case committee setup, and CRISP's
    earliestVotingStart(), become 8,316 s after the request.
  • upgrade:v19 now prepares a batch when the live implementation predates a configured committee
    size (Sepolia, size 3): it treats the revert as an unset threshold instead of stopping.
  • upgrade:v19 validate, which resume runs first, compares getTimeoutConfig() with the
    configured windows and refuses while they differ, so Sepolia cannot resume on the old 1800 s
    dkgWindow if the manual setTimeoutConfig was missed.
  • docs/architecture/upgrades.md states the Sepolia cutover steps for Large.

Verification

Static checks only; CI runs the tests.

  • Prettier. No blueprint ref points into the edited files, so the change adds no drift
    (node scripts/blueprint/check.mjs still exits 1 on drift that predates this stack). tsc --noEmit
    ran before the resume check; the check itself was not type-checked locally (no node_modules), so
    CI's tsc and contract tests cover it.
  • Live read-only getTimeoutConfig: Sepolia (1800, 604800, 21600); Mainnet
    (21600, 604800, 21600), equal to its configuration, so the new check does not block Mainnet.
  • V19Cutover.spec.ts pins that the shipped Sepolia configuration rejects the live 1800 s window.

Compatibility

  • A Sepolia in-place batch carries setCommitteeThresholds(3, [34, 45]) (prepared by
    upgrade:v19) and setTimeoutConfig (added by hand); see docs/architecture/upgrades.md.
  • Mainnet's batch is unchanged. validate now also compares Mainnet's live windows, which equal its
    configuration, so Mainnet passes the new check.

Follow-ups (not in this stack)

  • The Sepolia resume gates (nodeRelease.ts, resumeVrfSortition.ts) now need 45 active
    operators.

Update 2026-11-21: rebased onto main (#2524–#2530) and Fable review fixes

  • 34bbe1544, 57ffdb0fe: prepare's empty-revert handling is readCommitteeThreshold, which reads only Large (the size this release adds) as unset and rethrows otherwise; tested with Sepolia's empty revert, size 0 and a transport failure.
  • 386ed2085 and earlier docs: script names, the 1,213 s hardware (16 cores / 32 threads), 7200 s for every Sepolia size, no node-release raise on Sepolia, too few Sepolia operators for Large yet, and the persisted Large variant with its rollback.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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 59 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

Commits

Reviewing files that changed from the base of the PR and between 424a24c and 386ed20.

Files selected for processing: 4

  • docs/architecture/upgrades.md
  • packages/interfold-contracts/deploy/protocol/sepolia-protocol.config.json
  • packages/interfold-contracts/scripts/upgrade/v19Cutover.ts
  • packages/interfold-contracts/test/Deployment/V19Cutover.spec.ts
  • 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.

Share

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
interfold-dashboard Ready Ready Preview Nov 21, 2026 3:27pm UTC
interfold-docs Ready Ready Preview Nov 21, 2026 3:27pm UTC

Request Review

ctrlc03 and others added 7 commits November 21, 2026 14:27
One Large node measured 1,213 s of DKG proving on secure-8192. Live
Sepolia holds a 1,800 s window (this file said 1,200 s), which leaves
little margin. Use the 7,200 s the example configuration uses.
…onfigured size

The Sepolia configuration now lists committee size 3. `upgrade:v19` reads each configured size from the implementation that the batch replaces, and the live Sepolia Interfold reverts without data on size 3, because its `CommitteeSize` has three members. Read that revert as an unset size, so the batch sets it after the upgrade.
…mittee

`upgrade:v19` applies the committee thresholds of the configuration but not its timeout windows. Live Sepolia holds a 1800 s DKG window, so the 7200 s of the configuration needs `setTimeoutConfig` in the Sepolia batch.
…fer from the configuration

The cutover batch does not set the timeout windows, so a Sepolia batch without the manual setTimeoutConfig kept dkgWindow at 1800 s and validate, which resume runs first, still passed. Validation now compares getTimeoutConfig() with the configured windows. Live Mainnet already matches its configuration (21600, 604800, 21600).
…ase knows

prepare treated any empty revert of committeeThresholds as unset. The read is now readCommitteeThreshold, which rethrows unless the size is one this release routes, and it is tested with Sepolia's empty revert, an unknown size and a transport failure. The Sepolia paragraph now names the upgrade:v19:validate and upgrade:v19:resume scripts, the 1,213 s hardware, that 7200 s applies to every Sepolia size, that the Sepolia batch raises no node release, and that Sepolia lacks 45 operators. The timeout test is named after the predicate it checks.
…tion lacks it

readCommitteeThreshold accepted an empty revert for every size the chain routes, so a data-less revert on Minimum, Micro or Small would have queued a silent re-set. Only SIZES_ADDED_BY_RELEASE (Large) may read as unset; the test now shows an empty revert on size 0 is rethrown.
@ctrlc03

ctrlc03 commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #2537 so that each PR in the stack passes CI on its own: main requires template_integration, which cannot pass on a PR that changes circuits without their regenerated outputs. This PR's commits and description are unchanged inside #2537; its review threads stay here.

@ctrlc03 ctrlc03 closed this Nov 21, 2026

This branch was successfully deployed

2 active deployments
Preview – interfold-dashboard — 386ed208 Deployed Nov 21, 2026 by vercel[bot]
Preview – interfold-docs — 386ed208 Deployed Nov 21, 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