Skip to main content

validate_committed_proposals

Function validate_committed_proposals 

Source
pub fn validate_committed_proposals<'a>(
    proposals: impl IntoIterator<Item = &'a Proposal>,
    has_state: impl Fn(ComponentId) -> bool,
) -> Result<(), CommitRuleError>
Expand description

Validate the complete proposal list of a commit before any proposal is interpreted.

Only Add, Update, Remove, and AppDataUpdate are allowed. Any other kind except PreSharedKey holds the commit (CommitRuleError::UnsupportedProposalType); a hold outranks every terminal rejection in the same list. PreSharedKey is a terminal rejection.

The AppDataUpdate proposals must form a valid list under draft-ietf-mls-extensions-08 ยง4.7 whether or not a GroupContextExtensions proposal is present: per component, no Update together with a Remove, at most one Remove, and a Remove only for a component that has_state in the pre-commit dictionary.