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.
|Announcement Type Enum||Announcement||Type||Schema Id Mainnet||Schema Id Rococo||Frequency Model Type||Frequency Payload Location|
Source code for each schema is located in the LibertyDSNP/schemas repository.
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.
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).
Frequency Messages are well ordered:
- Frequency: Block number ascending
- Frequency: Block index ascending (unique)
- DSNP Standard: Order Announcements in a Batch Publication File by row appearance 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.
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.
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.