Type Definition dock_runtime::attest::pallet::Attestations
source · pub type Attestations<T>where
T: Config, = StorageMap<_GeneratedPrefixForStorageAttestations<T>, Blake2_128Concat, Attester, Attestation<T>, ValueQuery, GetDefault, GetDefault>;
Expand description
The priority value provides replay protection and also gives attestations a partial ordering. Signatures with lesser or equal priority to those previously posted by the same entity are not accepted by the chain.
Notice that priority is not a block-number. This is intentional as it yields some desired properties and allows some potential use-cases:
- When publishing consecutive attestations, the attester need not care at which block a a previous attestation was included. This means attestations can be made over a mono-directional channel.
- Timestamps may be used as priority when available.
- A timeline of future attestations may be constructed by encrypting multiple signatures, each with the output of a verifiable delay function. A “final” attestation may be selected by assigning it the highest priority in the batch. The “final” attestation will be acceptable by the runtime regardless of whether its predecessors were submitted.
An attestation on chain with iri set to None is semantically meaningless. Setting the iri to None is equivalent to attesting to the empty claimgraph.
When Attestations::get(did).iri == Some(dat) and dat is a valid utf-8 Iri:
[did dock:attestsDocumentContents dat]
.