Announcement Publishing

On Frequency, Announcements are mapped to Schemas which in turn publish Frequency Messages or Stateful Storage changes. Frequency Messages are either individual Announcements from a particular user, or a Batch Publication with a multitude of possible users. Frequency Stateful Storage is either direct Announcements from a particular user or User Data changes.

EnumAnnouncementTypeDeployed Schema IdFrequency Model TypeFrequency Payload Location
0TombstoneBatchedMainnet: 1
Testnet (Paseo): 1
Testnet (Rococo): 1
ParquetIPFS
2BroadcastBatchedMainnet: 2
Testnet (Paseo): 2
Testnet (Rococo): 2
ParquetIPFS
3ReplyBatchedMainnet: 3
Testnet (Paseo): 3
Testnet (Rococo): 3
ParquetIPFS
4ReactionBatchedMainnet: 4
Testnet (Paseo): 4
Testnet (Rococo): 4
ParquetIPFS
5ProfileBatchedMainnet: 6
Testnet (Paseo): 6
Testnet (Rococo): 5
ParquetIPFS
6UpdateBatchedMainnet: 5
Testnet (Paseo): 5
Testnet (Rococo): 6
ParquetIPFS
7Public KeyStatefulMainnet: 7
Testnet (Paseo): 7
Testnet (Rococo): 18
AvroBinaryItemized

Source code for each schema is located in the LibertyDSNP/schemas repository.

Batch Publications

Frequency uses DSNP Batch Publications for some types of Announcements. Parquet files are stored on IPFS, but are discovered through Frequency Messages.

DSNP Batch Publications MUST be validated upon fetching to ensure data and permission integrity.

Announcement Validation

DSNP Announcements are validated differently depending on the type of Announcement. Non-batched Announcements are on chain, are validated at write time, and do not need to be re-validated at read time. Batched Announcements are off chain and MUST be validated at read time (See: Validation).

Ordering Announcements

Frequency Messages are well ordered:

  1. Frequency: Block number ascending
  2. Frequency: Block index ascending (unique)
  3. DSNP Standard: Order Announcements in a Batch Publication File by row appearance order.

Human Order

Due to the asynchronous nature of networks and batching, it is possible that the canonical ordering of Announcements is wrong from a human viewpoint. With dependent Announcements, where one Announcement refers to another Announcement, the order may be inferred differently than the canonical ordering. It is left to user interfaces to handle these situations.

Retrieval

Frequency nodes provide an RPC interface messages.getBySchemaId() with paginated responses that differ based on the Schema.

Frequency nodes can provide a websocket interface that will emit an event for each block that has one or more messages of a given schema in that block. The messages::MessagesStored event can be used to know when to call the RPC interface to retrieve the messages.

See the Frequency Documentation for more details on Message retrieval.