Frequency User Data
On Frequency, User Data is mapped to Schemas which use Stateful Storage for storage and retrieval of the data.
User Data Sets
User Data Set | Deployed Schema Ids | Frequency Model Type | Frequency Payload Location | Settings |
---|---|---|---|---|
Public Key (Key Agreement) | Mainnet: 7 Testnet (Paseo): 7 | AvroBinary | Itemized | Append Only, Signature Required |
Public Follows | Mainnet: 8 Testnet (Paseo): 8 | AvroBinary | Paginated | None |
Private Follows | Mainnet: 9 Testnet (Paseo): 9 | AvroBinary | Paginated | None |
Private Connections | Mainnet: 10 Testnet (Paseo): 10 | AvroBinary | Paginated | None |
Public Key (Assertion Method) | Mainnet: 14 Testnet (Paseo): 14 | AvroBinary | Itemized | Signature Required |
Profile Resources | Mainnet: 15 Testnet (Paseo): 15 | AvroBinary | Itemized | None |
Private Connection Pseudonymous Relationship Identifiers (PRIds) are stored alongside Private Connections in the same Stateful Storage page.
For historical reasons, bytes for the Public Key (Key Agreement) schema are serialized to the corresponding Avro bytes
field without the leading multicodec identifier.
Readers should prepend or assume leading 0xec 0x01
bytes (indicating the x25519-pub
multicodec).
Writers should omit these leading bytes when inserting new items.
Source code for each schema is located in the LibertyDSNP/schemas repository.
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.