Skip to content

Managing Changes

Moderation decisions change over time, they are not a static set of values. Currently moderation decisions in the Fediverse are shared through static snapshots as CSV files. This means that in order to know what changed you have to be able to calculate the difference between the CSV file at time A and time B to know what was changed.

With FediMod FIRES, one of the core principles is that a dataset is append-only. We never modify or delete existing data, we simply append a change record to the dataset. This is inspired by Change Data Capture and how databases perform replication of data between servers.

Whenever a moderation decision changes, we append a new change record to the database, with each change record having a change_id property which is time-sortable unique identifier.

By only ever appending data, when consumers want to synchronise their local state with the current state of the dataset on the FIRES server, the consumer sends a request for change records where the change_id is greater than the last known change_id that the consumer has. This allows for really simple replication of data between the FIRES server hosting the dataset and the consumer.

The change_id is a UUID v7 identifier, which can be stored in a standard PostgreSQL uuid column. They can be efficiently indexed and queried within a database, without the chance of conflicts when inserting new records in quick succession.

Change Records

FediMod FIRES is designed to go beyond just blocking domains, and is designed to support sharing moderation decisions about many kinds of entities within the Fediverse.

Every change record has a specific type, and refers to specific entity through the entity_key and entity_kind properties.

The moderation decisions that can be shared through a FIRES dataset are one of four different types of change records:

  • Advisory — early warnings about an entity, pending further investigation.
  • Recommendation – moderation recommendations about an entity.
  • Retraction — reverses a previous moderation recommendation or advisory.
  • Tombstone — signals the permanent removal an entity from the dataset.

The type of a change record is specified by the type property, and is always a lowercase string: advisory, recommendation, retraction, or tombstone.