Skip to content

fix: require threshold_n nodes for committee finalization#1167

Merged
ctrlc03 merged 5 commits into
mainfrom
fix/finalize-buffer-increase
Jan 17, 2026
Merged

fix: require threshold_n nodes for committee finalization#1167
ctrlc03 merged 5 commits into
mainfrom
fix/finalize-buffer-increase

Conversation

@hmzakhalid

@hmzakhalid hmzakhalid commented Jan 15, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes

    • Increased finalization delay to reduce premature processing.
    • Corrected which committee threshold is used during finalization.
  • Chores

    • Added prominent warning logs during network keypair auto-generation for clearer guidance.
    • Reduced log verbosity for peer-ID mismatch events to cut noise.
    • Updated deployed contract records (implementation addresses and block numbers).

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Jan 15, 2026

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
crisp Ready Ready Preview, Comment Jan 17, 2026 2:55pm
enclave-docs Ready Ready Preview, Comment Jan 17, 2026 2:55pm

Request Review

@coderabbitai

coderabbitai Bot commented Jan 15, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Increased a finalization buffer, added warning logs when no libp2p keypair is found, lowered a peer-removal log level, changed a solidity threshold index, and updated deployed contract addresses/block numbers. No public function signatures changed. (≤50 words)

Changes

Cohort / File(s) Summary
Committee finalization timeout
crates/aggregator/src/committee_finalizer.rs
Increased FINALIZATION_BUFFER_SECONDS from 1 to 5, affecting the computed delay before dispatching CommitteeFinalizeRequested.
Keypair generation logging
crates/entrypoint/src/net/keypair/generate.rs
Imported tracing::warn and added warn! logs in autonetkey when no existing libp2p keypair is found; warns about autogeneration and non-persistent environments.
Peer removal log level
crates/net/src/net_interface.rs
Lowered the log level from info! to debug! for the "Removing stale peer ... due to peer ID mismatch" path in process_swarm_event.
Solidity threshold index
packages/enclave-contracts/contracts/registry/CiphernodeRegistryOwnable.sol
In finalizeCommittee, changed threshold check from c.threshold[0] to c.threshold[1].
Deployed contracts metadata
packages/enclave-contracts/deployed_contracts.json
Updated sepolia.PoseidonT3.blockNumber and sepolia.CiphernodeRegistryOwnable.proxyRecords.implementationAddress.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • ryardley
  • cedoor

Poem

🐰 I hopped through code with nimble paws and bright, attentive eyes,
I warned of keys that come and go beneath the moonlit skies.
I softened logs and nudged a timeout, then checked the chain’s new tune,
I changed a number, flipped an index, and left a tiny rune.
Carrots, cheers, and careful hops — I celebrate this prune. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: require threshold_n nodes for committee finalization' directly addresses the primary change in the Solidity contract, where the threshold check was updated from c.threshold[0] to c.threshold[1] for committee finalization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

ctrlc03
ctrlc03 previously approved these changes Jan 15, 2026
@vercel vercel Bot temporarily deployed to Preview – crisp January 15, 2026 21:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – enclave-docs January 15, 2026 21:18 Inactive
@hmzakhalid hmzakhalid changed the title chore: increase committee finalization buffer fix: require threshold_n nodes for committee finalization & increase finalization buffer Jan 15, 2026
ctrlc03
ctrlc03 previously approved these changes Jan 15, 2026
@vercel vercel Bot temporarily deployed to Preview – crisp January 15, 2026 21:22 Inactive
@vercel vercel Bot temporarily deployed to Preview – enclave-docs January 15, 2026 21:22 Inactive
@hmzakhalid hmzakhalid changed the title fix: require threshold_n nodes for committee finalization & increase finalization buffer fix: require threshold_n nodes for committee finalization Jan 16, 2026
@ctrlc03 ctrlc03 force-pushed the fix/finalize-buffer-increase branch from bef062b to f2ff532 Compare January 16, 2026 14:08
@ctrlc03 ctrlc03 enabled auto-merge (squash) January 16, 2026 14:10
@ctrlc03 ctrlc03 force-pushed the fix/finalize-buffer-increase branch from f2ff532 to 4c38776 Compare January 16, 2026 14:26
@ctrlc03 ctrlc03 self-requested a review January 16, 2026 14:27
ctrlc03
ctrlc03 previously approved these changes Jan 16, 2026
Comment thread crates/entrypoint/src/net/keypair/generate.rs Outdated
ctrlc03
ctrlc03 previously approved these changes Jan 17, 2026
@ctrlc03 ctrlc03 merged commit 1167728 into main Jan 17, 2026
25 checks passed
@ctrlc03 ctrlc03 deleted the fix/finalize-buffer-increase branch January 17, 2026 17:56
@coderabbitai coderabbitai Bot mentioned this pull request Feb 7, 2026
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.

3 participants