Expand description
Pure commit validation rules.
These functions read an OpenMLS group, a staged commit, and the group’s
AppData dictionary. They do not read the client database or fetch
identities. xmtp_mls runs them inside ValidatedCommit and adds the
identity and installation checks that need stored state.
Structs§
- AppData
Update InCommit - One
AppDataUpdateproposal in a commit, with its sender’s authority. - Commit
Participant - Inbox
- Membership
Validation Info - Membership authorization has no metadata or permission diff fields. Each component update is checked against its authenticated proposer.
- Metadata
Changes - Actual metadata changes, used only for transcripts and status updates. Component policies authorize these changes before this summary is built.
- Metadata
Field Change - Proposal
Changes
Enums§
- Commit
Rule Error - A commit breaks a validation rule, or its group state cannot be read.
Functions§
- build_
inbox_ with_ proposer - extract_
commit_ participant - Extracts the
CommitParticipantfrom the [LeafNodeIndex] - extract_
committer_ and_ proposers - Takes a [
StagedCommit] and extracts the committer and all unique proposers. - extract_
group_ membership - Get
GroupMembershipfrom the AppData dictionary. - extract_
readded_ installations - Superadmins are permitted to readd installations, e.g. for fork recovery We can take these readded installations out of the list of installations to validate
- get_
current_ group_ members - get_
latest_ group_ membership - Extracts the latest
GroupMembershipfrom the staged commit. - get_
proposal_ changes - Extracts the installations added and removed via proposals in the commit. Also returns a list of credentials from existing members that need verification (caused by update proposals) Tracks which proposer created each proposal for permission validation.
- inbox_
id_ from_ credential - Extracts the inbox ID from a credential.
- metadata_
changes_ between - read_
committed_ metadata - read_
post_ commit_ mutable_ metadata - Read committed metadata once through the active extension representation. Decode the post-commit metadata for messages, callbacks, and admin side effects.
- validate_
app_ data_ update_ proposals_ in_ commit - Validate every
AppDataUpdateproposal carried bystaged_commitagainst the group’s component registry. - validate_
app_ data_ update_ sequence - Validate a commit’s
AppDataUpdateproposals in order and return each touched component’s state after the last of them (Noneonce removed). - validate_
committed_ proposals - Validate the complete proposal list of a commit before any proposal is interpreted.
- validate_
identity_ sequence_ order - Require each identity sequence
Nto precede group envelope sequenceS.N >= Sis invalid on every receiver, independent of cache or replica state. - validate_
membership_ diff - Validate that the new group membership is a valid state transition from the old group membership. Enforces Rule 1 from above
- validate_
one_ app_ data_ update - Validate a single
AppDataUpdate(component_id + operation) againstregistryon behalf ofactor.