This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Description
Part of #12997.
Definitions
Safe chain: Chain of events created by local users since (and including) the join event sent in /send_join and up to and including the most recent event we have created.
Events in the safe chain are safe to divulge to remote homeservers that we believe to be in the room (i.e. because they're on the list that we received from partial /send_join)
Forward safe chain event(s): Set of locally-created events in the safe chain that do not have any locally-created events naming them as prev_events. Analogous to forward extremities; we'll use these for the prev_events of the next event we create.
Typically the most recent event we have created.

Open questions:
- can there be multiple 'forward safe chain events' — I think typically not, but @H-Shay's experiments with speeding up event creation at one point did support sending parallel events, so maybe we shouldn't design ourselves out of allowing that. (If so, does this mean we have to call the 'safe chain' the 'safe DAG' or 'safe connected component' or something..)?
What needs doing