Batch Publication Validation
The Frequency Message for a Batch Publication has several important fields for validation:
| Field | Description |
|---|---|
provider_msa_id | MSA Id of the provider sending the message |
cid | The Content IDentifier v1 for IPFS content |
payload_length | Expected length of the content from IPFS |
block_number | Block number that the message was recorded on the chain. |
File Validation
- Retrieve the file from the IPFS network using the
cid. - Verify the file hash by comparing it to the hash included in the
cid. (Required for non-trusted IPFS nodes.) - Verify that the byte length of the retrieved file matches the
payload_length.
Publication Announcements Validation
- Collect the unique set of
fromIdvalues. - Use the Custom RPC
msa.checkDelegations()with thefromIdvalues as thedelegator_msa_idsand theprovider_msa_idat theblock_number. - The
fromIdvalues thatmsa.checkDelegations()verifies as having a delegation atblock_numberare valid Announcements. - Set the
schema_idparameter to the Schema Id used in the Frequency Message
Announcement Duplicates
Duplicate Announcements MUST be rejected or ignored.