Announcement Publishing

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

EnumAnnouncementTypeDeployed Schema IdFrequency Model TypeFrequency Payload Location
0TombstoneBatchedMainnet: 16
Testnet (Paseo): 16
Parquet
IPFS
2BroadcastBatchedMainnet: 17
Testnet (Paseo): 17
Parquet
IPFS
3ReplyBatchedMainnet: 18
Testnet (Paseo): 18
Parquet
IPFS
4ReactionBatchedMainnet: 4
Testnet (Paseo): 4
Parquet
IPFS
6UpdateBatchedMainnet: 19
Testnet (Paseo): 19
Parquet
IPFS
8User Attribute SetBatchedMainnet: 20
Testnet (Paseo): 20
Parquet
IPFS
9DSNP Content Attribute SetBatchedMainnet: 12
Testnet (Paseo): 12
Parquet
IPFS
10External Content Attribute SetBatchedMainnet: 13
Testnet (Paseo): 13
Parquet
IPFS

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.