Use this file to discover all available pages before exploring further.
When different group members merge conflicting commits, the group state becomes forked. Members in different partitions have different keys and cannot decrypt each other’s messages. OpenMLS provides helpers to resolve forks and restore group consistency.
Forks should not occur during normal operation. These tools are designed for recovery from exceptional situations like bugs or network partitions.
Determine which members are in your partition (see Fork Detection):
// Alice knows she and Charlie are in one partition// Bob merged a different commit and needs to be re-addedlet own_partition = vec![alice_group.own_leaf_index()];
// Bob deletes his old forked groupbob_group.delete(provider.storage()).unwrap();// Bob joins using the Welcome messagelet welcome: MlsMessageIn = welcome.unwrap().into();let welcome = welcome.into_welcome().unwrap();let ratchet_tree = alice_group.export_ratchet_tree();let new_bob_group = StagedWelcome::new_from_welcome( provider, alice_group.configuration(), welcome, Some(ratchet_tree.into()),).unwrap().into_group(provider).unwrap();
Retrieve old group context extensions and update them for the new group:
// Get old extensionslet old_extensions = reboot_builder.old_group_context_extensions();// Application updates extensions as needed// For example, update group ID referenceslet new_extensions = Extensions::empty();
// Get list of members (excluding self)let old_members: Vec<_> = reboot_builder.old_members().collect();// Collect new key packages for all memberslet new_members = vec![ bob_new_kpb.key_package().clone(), charlie_new_kpb.key_package().clone(),];
For the re-add strategy, use commit hash exchange:
// After merging a commit, send its hash to the group// (encrypted for the previous epoch)let commit_hash = compute_commit_hash(&commit);let hash_message = old_epoch_group.create_message( provider, &signer, &commit_hash,).unwrap();// Members receiving different commit hashes know they're in different partitions
Members who merged the same commit are in the same partition.