@@ -23,33 +23,33 @@ The state resolution algorithm for version 2 rooms uses the following
2323definitions, given the set of room states
2424{* S* <sub >1</sub >, * S* <sub >2</sub >, …}:
2525
26- Power events
26+ ** Power events. **
2727A * power event* is a state event with type ` m.room.power_levels ` or
2828` m.room.join_rules ` , or a state event with type ` m.room.member ` where
2929the ` membership ` is ` leave ` or ` ban ` and the ` sender ` does not match the
3030` state_key ` . The idea behind this is that power events are events that
3131might remove someone's ability to do something in the room.
3232
33- Unconflicted state map and conflicted state set
33+ ** Unconflicted state map and conflicted state set. **
3434The * unconflicted state map* is the state where the value of each key
3535exists and is the same in each state * S* <sub >* i* </sub >. The * conflicted
3636state set* is the set of all other state events. Note that the
3737unconflicted state map only has one event per ` (event_type, state_key) ` ,
3838whereas the conflicted state set may have multiple events.
3939
40- Auth difference
40+ ** Auth difference. **
4141The * auth difference* is calculated by first calculating the full auth
4242chain for each state * S* <sub >* i* </sub >, that is the union of the auth
4343chains for each event in * S* <sub >* i* </sub >, and then taking every event
4444that doesn't appear in every auth chain. If * C* <sub >* i* </sub > is the
4545full auth chain of * S* <sub >* i* </sub >, then the auth difference is
4646 ∪ * C* <sub >* i* </sub > − ∩ * C* <sub >* i* </sub >.
4747
48- Full conflicted set
48+ ** Full conflicted set. **
4949The * full conflicted set* is the union of the conflicted state set and
5050the auth difference.
5151
52- Reverse topological power ordering
52+ ** Reverse topological power ordering. **
5353The * reverse topological power ordering* of a set of events is the
5454lexicographically smallest topological ordering based on the DAG formed
5555by auth events. The reverse topological power ordering is ordered from
@@ -71,7 +71,7 @@ events using Kahn's algorithm for topological sorting, and at each step
7171selecting, among all the candidate vertices, the smallest vertex using
7272the above comparison relation.
7373
74- Mainline ordering
74+ ** Mainline ordering. **
7575Given an ` m.room.power_levels ` event * P* , the * mainline of* * P* is the
7676list of events generated by starting with * P* and recursively taking the
7777` m.room.power_levels ` events from the ` auth_events ` , ordered such that
@@ -96,7 +96,7 @@ events: for events *x* and *y*, *x* < *y* if
9696 same ` origin_server_ts ` , but * x* 's ` event_id ` is * less* than * y* 's
9797 ` event_id ` .
9898
99- Iterative auth checks
99+ ** Iterative auth checks. **
100100The * iterative auth checks algorithm* takes as input an initial room
101101state and a sorted list of state events, and constructs a new room state
102102by iterating through the event list and applying the state event to the
0 commit comments