mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-18 17:14:10 +02:00
Mention state resolution algorithm
This commit is contained in:
parent
7d32717c9b
commit
f09e5a676f
|
|
@ -267,6 +267,22 @@ State Resolution
|
||||||
|
|
||||||
**TODO**
|
**TODO**
|
||||||
|
|
||||||
|
When two branches in the event graph merge, the state of those branches might
|
||||||
|
differ, so a *state resolution* algorithm must be used to determine the current
|
||||||
|
state of the resultant merge.
|
||||||
|
|
||||||
|
The properties of the state resolution algorithm are:
|
||||||
|
|
||||||
|
- Must only depend on the event graph, and not local server state.
|
||||||
|
- When two state events are comparable, the descendant one should be picked.
|
||||||
|
- Must not require the full event graph.
|
||||||
|
|
||||||
|
The following algorithm satisfies these requirements; given two or more events,
|
||||||
|
pick the one with the greatest:
|
||||||
|
|
||||||
|
#. Depth.
|
||||||
|
#. Hash of event_id.
|
||||||
|
|
||||||
|
|
||||||
Appendix
|
Appendix
|
||||||
========
|
========
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue