-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Background
PR #2268 introduced buffer capacity tests across all threshold-signature protocols. Each protocol module has its own test that follows the same pattern:
- Set up participants with
Comms::with_buffer_capacity(usize::MAX) - Run the protocol via
run_protocol() - Assert
comms.buffer_len()matches the expected constant (with coordinator vs non-coordinator handling)
This pattern is duplicated across ~10 files:
confidential_key_derivation/protocol.rsdkg.rsecdsa/ot_based_ecdsa/{presign,sign}.rsecdsa/ot_based_ecdsa/triples/generation.rsecdsa/robust_ecdsa/{presign,sign}.rsfrost/eddsa/sign.rsfrost/mod.rsfrost/redjubjub/sign.rs
Only the protocol-specific setup (building the future) differs between tests; the harness (loop over participants, run protocol, assert buffer lengths) is copy-pasted.
Acceptance Criteria
- Extract a shared test helper (e.g. in
test_utils) that takes a protocol factory closure and expected buffer entries, and handles the setup/run/assert loop. - Each protocol test calls the helper with its specific setup, eliminating the duplicated harness code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels