diff --git a/changelogs/room_versions/newsfragments/1119.clarification b/changelogs/room_versions/newsfragments/1119.clarification deleted file mode 100644 index 1ce6591a..00000000 --- a/changelogs/room_versions/newsfragments/1119.clarification +++ /dev/null @@ -1 +0,0 @@ -For room version 2 through 10: Note a more efficient way to compute the auth difference during state resolution. diff --git a/content/rooms/fragments/v2-state-res.md b/content/rooms/fragments/v2-state-res.md index 595c8f5a..be650647 100644 --- a/content/rooms/fragments/v2-state-res.md +++ b/content/rooms/fragments/v2-state-res.md @@ -47,20 +47,13 @@ all of *their* auth events, and so on recursively, stretching back to the start of the room. Put differently, these are the events reachable by walking the graph induced by an event's `auth_events` links. -If *S* is a collection of -events, the *full auth chain of S* is the union of the auth chains of every -event *E* in *S*. - **Auth difference.** -For each state *Si*, compute its full auth chain. -The *auth difference* is the set of events which belong to some, but not all, -of these full auth chains. In symbols: if *F*(*S*) is the full auth -chain of a collection of events *S*, the auth difference is - ∪*i* *F*(*Si*) - ∩*i* *F*(*Si*). - -This can be computed more efficiently as - *F*(*C*) - ∩*i* *F*(*S**i* - *C*) , -where *C* is the conflicted state set. +The *auth difference* is calculated by first calculating the full auth +chain for each state *S**i*, that is the union of the auth +chains for each event in *S**i*, and then taking every event +that doesn't appear in every auth chain. If *C**i* is the +full auth chain of *S**i*, then the auth difference is + ∪ *C**i* −  ∩ *C**i*. **Full conflicted set.** The *full conflicted set* is the union of the conflicted state set and