Batch Publication Validation

The Frequency Message for a Batch Publication has several important fields for validation:

FieldDescription
provider_msa_idMSA Id of the provider sending the message
cidThe Content IDentifier v1 for IPFS content
payload_lengthExpected length of the content from IPFS
block_numberBlock number that the message was recorded on the chain.

File Validation

  1. Retrieve the file from the IPFS network using the cid.
  2. Verify the file hash by comparing it to the hash included in the cid. (Required for non-trusted IPFS nodes.)
  3. Verify that the byte length of the retrieved file matches the payload_length.

Publication Announcements Validation

  1. Collect the unique set of fromId values.
  2. Use the Custom RPC msa.checkDelegations() with the fromId values as the delegator_msa_ids and the provider_msa_id at the block_number.
  3. The fromId values that msa.checkDelegations() verifies as having a delegation at block_number are valid Announcements.
  4. Set the schema_id parameter to the Schema Id used in the Frequency Message

Announcement Duplicates

Duplicate Announcements MUST be rejected or ignored.