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
fromId
values. - Use the Custom RPC
msa.checkDelegations()
with thefromId
values as thedelegator_msa_ids
and theprovider_msa_id
at theblock_number
. - The
fromId
values thatmsa.checkDelegations()
verifies as having a delegation atblock_number
are valid Announcements. - Set the
schema_id
parameter to the Schema Id used in the Frequency Message
Announcement Duplicates
Duplicate Announcements MUST be rejected or ignored.