DRAFT: Archivists Overview
The job of an Archivist is to permanently store Batch content and DSNP Announcements in a format that is easily validated and retrieved.
The Archivist must be able to access chain data and all DSNP Announcement URLs.
- Signature validation - proof that author provided a real signature
- Signature authentication - proof that the From address is the signer, or that signer is a valid delegate (proof of authorship)
- There is retrievable content at the URL given in the DSNP message
- The content hash is valid - that is, the URL serves the claimed data
All signatures for the announcement are included in the batch regardless of how the signature was requested (or not)
Archive Storage Format
Specify the off-chain Archivist storage format.
- Chain messages are on Ethereum.
- Message data is posted via Ethereum log events.
- Signature algorithm is secp256k1. This allows the use
ecreoverto get public keys. A public key also need not be included in a log event for ease of validation.
- Content hashes are created via the same keccak-256 hashing algorithm used by Ethereum.
An archive entry is a combination of data in a DSNP message and from the block in which it is included. It is a key-value map consisting of the following fields:
|DSNP message type||number/enum. see DSNP Message Types|
|DSNP message data||see fields in DSNP Messages|
|list of signatures for this message||array of Signatures|
- Indicates what type of message this is, useful for indexers and filters.
- This can be encrypted where appropriate. The decrypted, fully deserialized version must be one of the types described in DSNP Messages.
- all the signatures applied to this message at the time of archival.
A Batch is data that is referenced by a Batch Announcement. It consists of one or more ArchiveEntries.
|a set of ArchiveEntries||map|
|keccak-256 hash of content stored at URL||bytes32|
|the block number this message was included in||number|
|social identity of batch announcer,i.e. message sender||bytes|
|the index within the logs of this message||number|
|the index of the transaction this message is associated with||number|
|the location of this archive||string|
The set of ArchiveEntries is a key-value map, with the key
archiveEntryID, which is a:
- The keccak-256 hash of all of the Archive Entry fields in a keccak-256 hash with the archiveEntryID field being blank.
- the keccak-256 hash of content stored at the URL referenced in this batch.
- The block in which this DSNP Message is included.
the social identity of the batch announcer, i.e. the message sender.
- The log index in which this DSNP Message is included
- Signature (see below)
- The signature of this batch announcer
- The transaction index in which this DSNP Message is included
- The permanent URL address where this archive is stored.
A Signature consists of two fields:
signature- A secp256k1 signature
result- Optional, bytes. A result of an operation performed. For example, if a signing entity wished to prove that they had performed some sort of validation or analysis on the message, they would put the result of the analysis in this field. It could be a meaningful number or string, some sort of proof hash, etc.