Skip to main content

Module dag_schema

Module dag_schema 

Source
Expand description

Tables of the room DAG layer (see f3.rs): events with their edges, forward extremities and state groups. Created together with the rest of the messenger schema, always (they are empty unless the f3-hash-ids feature has made a room a DAG room), idempotently, inside the single writer’s boot step, so a database can switch the feature on or off without a migration.

  • dag_rooms: rooms that are DAG rooms. Every other room is legacy and never appears here.
  • dag_events: one row per event the room knows (accepted, soft-failed, or imported as an outlier). pdu is the signed wire JSON, or its skeleton once the content was erased.
  • dag_edges / dag_auth: prev_events and auth_events of each event.
  • dag_extremities: the room’s forward extremities.
  • dag_state_groups + dag_state_group_entries: full state snapshots; dag_event_state maps an event to the snapshot of the room state after it. A message shares its parent’s group.

Functions§

create_dag_schema