Skip to content

fix: do not broadcast sk_poly_sum and es_poly_sum#1505

Merged
ctrlc03 merged 1 commit into
mainfrom
fix/do-not-broadcast-sk-esm
Apr 2, 2026
Merged

fix: do not broadcast sk_poly_sum and es_poly_sum#1505
ctrlc03 merged 1 commit into
mainfrom
fix/do-not-broadcast-sk-esm

Conversation

@ctrlc03

@ctrlc03 ctrlc03 commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Refactor
    • Simplified internal event structures by removing redundant data fields from the decryption key sharing process. These changes optimize the system's event handling and reduce payload size during key agreement operations.

@ctrlc03 ctrlc03 requested review from 0xjei and cedoor April 2, 2026 09:15
@vercel

vercel Bot commented Apr 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
crisp Ready Ready Preview, Comment Apr 2, 2026 9:16am
enclave-docs Ready Ready Preview, Comment Apr 2, 2026 9:16am

Request Review

@coderabbitai

coderabbitai Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eb7aff72-16e7-45f1-a622-faae9ec78680

📥 Commits

Reviewing files that changed from the base of the PR and between 35c4657 and ea092f4.

📒 Files selected for processing (4)
  • crates/events/src/enclave_event/decryption_key_shared.rs
  • crates/events/src/enclave_event/decryption_share_proofs.rs
  • crates/keyshare/src/threshold_keyshare.rs
  • crates/zk-prover/src/actors/proof_request.rs
💤 Files with no reviewable changes (3)
  • crates/events/src/enclave_event/decryption_key_shared.rs
  • crates/keyshare/src/threshold_keyshare.rs
  • crates/zk-prover/src/actors/proof_request.rs

📝 Walkthrough

Walkthrough

This PR removes the sk_poly_sum and es_poly_sum polynomial fields from the decryption key sharing event flow, eliminating their storage and propagation across DecryptionKeyShared, DecryptionShareProofsPending, and related proof handling components.

Changes

Cohort / File(s) Summary
Decryption Key Event Structs
crates/events/src/enclave_event/decryption_key_shared.rs, crates/events/src/enclave_event/decryption_share_proofs.rs
Removed sk_poly_sum: ArcBytes and es_poly_sum: Vec<ArcBytes> public fields from DecryptionKeyShared and DecryptionShareProofsPending structs; updated doc comments to reflect removal of aggregated polynomial data.
Proof Derivation Logic
crates/keyshare/src/threshold_keyshare.rs
Removed derivation and conversion of sk_poly_sum_bytes and es_poly_sum_bytes in handle_calculate_decryption_key_response handler; eliminated their population into DecryptionShareProofsPending event payload.
Proof Request State
crates/zk-prover/src/actors/proof_request.rs
Removed sk_poly_sum and es_poly_sum field storage from PendingDecryptionProofs struct; stopped copying and threading these fields through DecryptionShareProofsPending message handling and DecryptionKeyShared event publication.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • cedoor
  • 0xjei

Poem

🐰 Polynomials have had their day,
Simplifying the cryptic way,
Less data flows through ev'ry gate,
The proofs still work, now light and straight!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing broadcast of sk_poly_sum and es_poly_sum fields across multiple modules.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/do-not-broadcast-sk-esm

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.

@cedoor cedoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@0xjei 0xjei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ctrlc03 ctrlc03 merged commit b5b9601 into main Apr 2, 2026
33 checks passed
@ctrlc03 ctrlc03 deleted the fix/do-not-broadcast-sk-esm branch April 2, 2026 09:52
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