A test harness for exploring OpenMLS proposal and commit behavior.
This project provides a comprehensive test suite for understanding how OpenMLS handles various proposal and commit scenarios in MLS (Messaging Layer Security) groups. It's designed to document edge cases, conflict resolution, and the behavior of selective commits.
- Rust 2024 edition
- OpenMLS 0.7.x
git clone git@github.com:marmot-protocol/propose.git
cd propose
cargo buildRun all tests:
cargo testRun tests with output:
cargo test -- --nocaptureRun specific test categories:
cargo test selective_commit # Selective commit tests
cargo test last_resort # Last resort KeyPackage testsAll group members must receive and store proposals before processing a commit that references them. Missing proposals result in InvalidCommit(MissingProposal).
| Scenario | Result |
|---|---|
| Duplicate remove proposals (same target) | Succeeds (deduplicated) |
| Duplicate add proposals (same KeyPackage) | Fails (DuplicateSignatureKey) |
| Mutual removal (A removes B, B removes A) | Succeeds (both removed) |
| Self-removal committed by others | Succeeds |
| Self-removal committed by self | Fails (CannotRemoveSelf) |
| Proposer removed in same commit | Succeeds (proposal still valid) |
| Scenario | Result |
|---|---|
| Reuse while member is in group | Fails (DuplicateSignatureKey) |
| Reuse after member is removed | Succeeds |
The commit_builder API allows filtering which proposals to include:
- Filter by proposal type (Add, Remove)
- Filter by sender
- Filter out all proposals (creates self-update commit)
Important: The proposal queue is completely cleared on every commit. Filtered-out proposals are lost and must be resubmitted for the new epoch.
- Empty commits (no proposals) are valid epoch advances
- Single-member groups are valid
- No practical limit on proposals per commit (10+ tested)
- Commits from removed members are rejected (
WrongEpoch)
See FINDINGS.md for detailed documentation of all 22 tested scenarios with code examples.
MIT License - see LICENSE for details.