Announcement Validation
DSNP Announcements on Ethereum are validated at read time.
- Read
DSNPBatchPublication
events. - Fetch and validate the Batch Publication.
- Validate the chain of delegation from the Announcement's
fromId
to the sender of the transaction with theDSNPBatchPublication
event.
Batch Publication Validation
- Hash the batch publication file using keccak-256.
- Retrieve the published hash for the given file from the
DSNPBatchPublication
Event. - The file hash MUST match the retrieved hash from the
DSNPBatchPublication
event.
Announcement Validation
- Get the Ethereum address of the sender for the transaction from the Batch (aka the Batch Publisher).
- Find the Identity Contract for the Announcement's
fromId
. - Test the Batch Publisher's Ethereum address against the Identity Contract via
IDelegation.isAuthorizedTo
with the permissionANNOUNCE
and the block number from theDSNPBatchPublication
event.
Announcement Duplicates
Duplicate Announcements MUST be rejected or ignored.