Skip to content

marmot-protocol/propose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

propose

A test harness for exploring OpenMLS proposal and commit behavior.

Overview

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.

Requirements

  • Rust 2024 edition
  • OpenMLS 0.7.x

Installation

git clone git@github.com:marmot-protocol/propose.git
cd propose
cargo build

Usage

Run all tests:

cargo test

Run tests with output:

cargo test -- --nocapture

Run specific test categories:

cargo test selective_commit   # Selective commit tests
cargo test last_resort        # Last resort KeyPackage tests

Key Findings

Proposal Distribution

All group members must receive and store proposals before processing a commit that references them. Missing proposals result in InvalidCommit(MissingProposal).

Conflict Resolution

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)

KeyPackage Behavior (Last Resort)

Scenario Result
Reuse while member is in group Fails (DuplicateSignatureKey)
Reuse after member is removed Succeeds

Selective Commits

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.

Other Findings

  • 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)

Documentation

See FINDINGS.md for detailed documentation of all 22 tested scenarios with code examples.

License

MIT License - see LICENSE for details.

About

Testing various MLS proposal and commit scenarios

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages