Integration of verification with anagolay
Verification pallet update
The verification
pallet is intended to be used by the substrate community; however, the statements
and poe
pallets are modified to integrate these previous verification steps and to allow the holder of a successful verification request to produce a Statement of ownership out of the verification result.
At the moment the verification key is produced, a ProofGenerator<T>
is called. This is loosely coupled with the proofs
pallet to allow the creation of proofs associated to the VerificationContext
; in the absence of the proofs
pallet, the proof generation can be delegated to a ProofGenerator
internal to the verification pallet.
Types
-
ProofGenerator<T>
default trait implementation (as-is)
Proofs pallet update
Storage
-
ProofIdsByVerificationContext
indexesVec<ProofId>
values byVerificationContext
keys: this can be performantly queried. The value is a collection coherently with the fact that anagolay can generate multiple proofs for a subject, but it will contain a single element in this scenario.
Types
-
ProofGenerator<T>
similar to default trait implementation but stores aProof
inProofByProofIdAndAccountId
andProofIdsByVerificationContext
Statement pallet update (NOT IMPLEMENTED)
Extrinsics
- The modified
create_ownership()
for thestatements
pallet retrieves the Proof associated to theVerificationContext
and verifies it is issued by the verification holder of a successfulVerificationRequest
. After these checks are successful it behaves just like oldcreate_ownership
to create the statement
sequenceDiagram
title Statement creation
participant Alice
participant OnChain
activate OnChain
OnChain-->>Alice:VerificationSuccessful
activate Alice
deactivate OnChain
Alice->>OnChain: query ProofIdsByVerificationContext
OnChain-->>Alice: Vec<ProofId>
Alice->>Alice: create and sign the Claim using the ProofId
Alice->>OnChain: create_ownership()
deactivate Alice
activate OnChain
OnChain-->>Alice: OwnershipCreated
deactivate OnChain
Edited by Adriano Dalpane