Skip to content

refactor(fix): relocate bench_utils ckd functions#3634

Merged
gilcu3 merged 1 commit into
mainfrom
3633-move-ckd-bench-helpers-out-of-the-frost_eddsa-bench-utils-module
Jun 22, 2026
Merged

refactor(fix): relocate bench_utils ckd functions#3634
gilcu3 merged 1 commit into
mainfrom
3633-move-ckd-bench-helpers-out-of-the-frost_eddsa-bench-utils-module

Conversation

@gilcu3

@gilcu3 gilcu3 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Closes #3633

@gilcu3 gilcu3 linked an issue Jun 22, 2026 that may be closed by this pull request
@gilcu3 gilcu3 changed the title fix: relocate bench_utils ckd functions refactor(fix): relocate bench_utils ckd functions Jun 22, 2026
@gilcu3 gilcu3 marked this pull request as ready for review June 22, 2026 06:45
@claude

claude Bot commented Jun 22, 2026

Copy link
Copy Markdown

Pull request overview

Pure refactor: relocates prepare_ckd and PreparedCkdPackage out of bench_utils/frost_eddsa.rs (where they didn't belong, since CKD is a distinct protocol) into a new dedicated bench_utils/ckd.rs module, matching the per-protocol split established in #2634 for DKG / OT-ECDSA / robust ECDSA. Satisfies the acceptance criteria of #3633.

Changes:

  • Created benches/bench_utils/ckd.rs containing the moved prepare_ckd and PreparedCkdPackage
  • Registered the new module in benches/bench_utils.rs (mod ckd; + pub use ckd::*;)
  • Dropped the now-unused ckd imports from benches/bench_utils/frost_eddsa.rs

Reviewed changes

Per-file summary
File Description
crates/threshold-signatures/benches/bench_utils.rs Registers the new ckd module and reexports it.
crates/threshold-signatures/benches/bench_utils/ckd.rs New file housing prepare_ckd and PreparedCkdPackage (verbatim move).
crates/threshold-signatures/benches/bench_utils/frost_eddsa.rs Removes the relocated functions and the now-unused confidential_key_derivation imports.

Findings

Verified:

  • The moved function body is identical to the previous version (no logic drift).
  • benches/ckd.rs is the only consumer of prepare_ckd / PreparedCkdPackage and continues to resolve them via bench_utils::prepare_ckd thanks to the pub use ckd::*; glob reexport — no import-site changes required.
  • The remaining imports in frost_eddsa.rs (Rng, MockCryptoRng, generate_participants_with_random_ids, run_keygen, MAX_MALICIOUS) are all still used by the EdDSA prepare functions, so no further pruning is needed.
  • No documentation references the old location, so no doc drift to fix.

No blocking issues. No non-blocking nits worth raising — the change is mechanical and tightly scoped.

✅ Approved

Copilot AI 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.

Pull request overview

Refactors the threshold-signatures benchmark utilities by moving CKD-specific helpers out of the FROST/EdDSA bench-utils module into a dedicated CKD bench-utils module, aligning bench helpers with their respective protocols.

Changes:

  • Removed prepare_ckd and PreparedCkdPackage from bench_utils/frost_eddsa.rs.
  • Added a new bench_utils/ckd.rs containing the CKD bench preparation helpers.
  • Registered and re-exported the new ckd module from benches/bench_utils.rs so existing bench consumers can continue importing from crate::bench_utils.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/threshold-signatures/benches/bench_utils/frost_eddsa.rs Removes CKD bench helpers that don’t belong to the FROST/EdDSA bench-utils module.
crates/threshold-signatures/benches/bench_utils/ckd.rs Introduces a dedicated CKD bench-utils module containing prepare_ckd and PreparedCkdPackage.
crates/threshold-signatures/benches/bench_utils.rs Registers bench_utils/ckd.rs and re-exports its public items via pub use ckd::*;.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gilcu3 gilcu3 enabled auto-merge June 22, 2026 07:01

@netrome netrome left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@gilcu3 gilcu3 added this pull request to the merge queue Jun 22, 2026
Merged via the queue into main with commit e46c70d Jun 22, 2026
22 checks passed
@gilcu3 gilcu3 deleted the 3633-move-ckd-bench-helpers-out-of-the-frost_eddsa-bench-utils-module branch June 22, 2026 07:42
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.

Move CKD bench helpers out of the frost_eddsa bench-utils module

4 participants