Frequency User Data
On Frequency, User Data and select Announcements are mapped to Schemas which use Stateful Storage for storage and retrieval of the data.
User Data Sets
User Data Set | Schema Id Mainnet | Schema Id Rococo | Frequency Model Type | Frequency Payload Location | Settings |
---|---|---|---|---|---|
Public Follows | 8 | 13 | AvroBinary | Paginated | None |
Private Follows | 9 | 14 | AvroBinary | Paginated | None |
Private Connections | 10 | 15 | AvroBinary | Paginated | None |
Pseudonymous Relationship Identifiers (PRIds) are stored along side Private Connections in the same Stateful Storage page.
Source code for each schema is located in the LibertyDSNP/schemas repository.
Announcements
Announcement | Schema Id Mainnet | Schema Id Rococo | Frequency Model Type | Frequency Payload Location | Settings |
---|---|---|---|---|---|
Public Key | 7 | 7 (v1.3.0+) | AvroBinary | Itemized | Append Only, Signature Required |
Read Operation Mapping
Stateful data is retrieved via state queries (pallet.stateQuery
) or RPC calls (pallet.rpcCall()
).
Model Type | DSNP Properties | Query/Call |
---|---|---|
Itemized | Entity Tag | stateful_storage.getItemizedStorage() |
Paginated | Entity Tag, Chunked | stateful_storage.getPaginatedStorage() |
Write Operation Mapping
Write operations are via Transactions (also called Extrinsics): pallet::extrinsic()
Model Type | Operation | Pallet::Extrinsic |
---|---|---|
Itemized | Insert, Update, Delete | stateful_storage::apply_item_actions() stateful_storage::apply_item_actions_with_signature() |
Paginated | Insert, Update | stateful_storage::upsert_page() stateful_storage::upsert_page_with_signature() |
Paginated | Delete | stateful_storage::delete_page() stateful_storage::delete_page_with_signature() |
Entity Tags
Frequency requires the hash of current state for any Stateful Storage change.