Turmoil simulation tests for AVSS, FPMul, FPDiv, RanSha and batch reconstruction#94
Merged
Merged
Conversation
Applied cargo fmt and cargo clippy fixes across the codebase to ensure clean CI builds. Updated CI workflow to use targeted test command that runs only the stoffelmpc-mpc library tests. Changes: - CI: Updated test command from `cargo test` to `cargo test -p stoffelmpc-mpc --lib` - Formatting: Applied cargo fmt to 33 files across mpc/ and network/ crates - Linting: Fixed clippy warnings including unused imports, style issues - Added crate-level lint allows in mpc/src/lib.rs for acceptable style patterns Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- implemented Pedersen commitments with basic tests. - Avss and Random share generation with avss - Rand() function added
- Implement missing `rand` trait method in HoneyBadgerMPCNode - Update SubProtocolCounters to use Mutex<Option<u8>> type - Add async .await to get_next() counter calls - Fix unused imports in pedersen.rs test module with #[cfg(test)] - Add LimitError variant to RandBitError enum - Update get_or_create_storage to return Result for session limits - Fix Box::from_raw to use drop() for proper memory freeing - Prefix unused sessionid variable with underscore - Fix test to properly check session storage limit Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace fixed 500ms sleep with a polling loop that waits for specific conditions to be met. This fixes intermittent CI failures caused by the sleep not being long enough on slower machines. The polling loop checks every 50ms with a 10 second timeout, ensuring the test is both fast on fast machines and reliable on slow ones. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added a new mpc protocol for ADKG - Added triple generation, removed unnecessary traits, redefined feldman shares for avss mpc - Added multiplication for avss, tests,removed unused imports
- Added session ID trait, protocol specific message wrappers and corressponding changes
This change improves concurrency safety and robustness across async MPC subprotocols. - Replace indefinite channel waits with explicit wait_for_result functions - Add configurable and increased timeouts for protocol phases - Fix race conditions in PRandBit, truncation, triple generation,AVSS multiplication, etc - Remove session-ending treated as errors in RBC - Remove blocking wait_for_ok phase - Improve message ordering and async flow guarantees under concurrent execution
- Implements distributed input and output handling for the AVSS MPC protocol using Feldman-committed shares - Renames Adkg* types to AvssMPC* for consistency across the codebase - Adds AvssInputServer and AvssInputClient with ProtocolType::Input routing in AvssMPCNode::process() - Adds AvssOutputServer and AvssOutputClient with ProtocolType::Output routing - Introduces AvssMPCClient for client-side participation in AVSS protocols - Wires new protocol variants (ProtocolType::Input, ProtocolType::Output) and message variants (AvssWrappedMessage::Input, AvssWrappedMessage::Output) into the main node dispatch loop
Merge store fixes to dev
- It implements the Goldilocks field. - It includes local tests for RandBit, PRandBitD, TruncPr, FPMult with the new field
- setup turmoil for testing and added new tests - replaced BadFakeNetwork with turmoil network
Fixes as a consequence of turmoil tests
- Benchmarking mpc protocols
…n Share Reconstruction
…of Service and Preprocessing Corruption
…later to the network
In this commit I checked that the Trail of Bits errors reported on the blog are not happening in our case. They don't happen because our interpolation points are roots of unity.
9688bc7 to
35912be
Compare
GarryFCR
reviewed
Jun 2, 2026
GarryFCR
requested changes
Jun 2, 2026
Mikerah
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Turmoil-based deterministic simulation tests for several MPC protocols, covering both the happy path and a range of adverse network conditions. Also includes a Shamir secret-sharing sanity check against known Trail of Bits findings and a couple of HoneyBadger lint fixes.
Tests added
Protocols covered: AVSS, FPMul, FPDiv, RanSha, and batch reconstruction.
Beyond the happy path, the tests exercise:
Other changes
feat(shamir): verified that the Trail of Bits Shamir interpolation pitfalls do not apply here, since our nterpolation points are roots of unity.fix(honeybadger): resolved Clippy warnings.Issues addressed