From 9455e69bc10d204214de914ee1bbea4508595507 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 29 Apr 2022 19:45:32 +0100 Subject: [PATCH] Opinionated rewrite of unconflicted state map --- content/rooms/fragments/v2-state-res.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/content/rooms/fragments/v2-state-res.md b/content/rooms/fragments/v2-state-res.md index b238e1d8..9d9db779 100644 --- a/content/rooms/fragments/v2-state-res.md +++ b/content/rooms/fragments/v2-state-res.md @@ -31,11 +31,14 @@ the `membership` is `leave` or `ban` and the `sender` does not match the might remove someone's ability to do something in the room. **Unconflicted state map and conflicted state set.** -The *unconflicted state map* is the state where the value of each key -exists and is the same in each state *S**i*. The *conflicted -state set* is the set of all other state events. Note that the -unconflicted state map only has one event per `(event_type, state_key)`, -whereas the conflicted state set may have multiple events. +The key-value pairs across all state maps *Si* can be divided into +two collections. If a given key *K* is present in every *Si* with the +same value *V* in each state map, then the pair (*K*, *V*) belongs to the +*unconflicted state map*. Otherwise (*K*, *V*) belongs to the +*conflicted state set*. + +Note that the unconflicted state map only has one event per `(event_type, state_key)`, +whereas the conflicted state set may associate multiple events to the same key. **Auth difference.** The *auth difference* is calculated by first calculating the full auth