Epoch Key And Proof
User generates an epoch key and a proof of this epoch key
An epoch key is the only way that a user can receive reputation.
A user can generate an epoch key with a nonce, the nonce should be less than
numEpochKeyNoncePerEpoch.A user generates the epoch key with a circom circuit and the epoch key and proof can be verified by attesters and other users.
genEpochKeyAndProof
genEpochKeyAndProofnpx ts-node cli/index.ts genEpochKeyAndProof
[-h]
[-e ETH_PROVIDER]
-id IDENTITY
-n EPOCH_KEY_NONCE
-x CONTRACTepoch key and base64url encoded epoch key proof and public signals will be printed
A string with
Unirep.epk.proofprefix is the proof of this epoch keyA string with
Unirep.epk.publicSignalsprefix is the public signals of this proof The public signals includesthe current epoch
the epoch key
the global state tree root.
Attesters and other users can verify if the epoch key is in the current epoch and if the user has a leaf in the global state tree.
Options
Options inherited from parent commands
verifyEpochKeyProof
verifyEpochKeyProofThis command will help other users with an epoch key proof with
Unirep.epk.proofprefix and it public signals withUnirep.epk.publicSignalsprefix to call the Unirep smart contract to verify the proof.
Options
Options inherited from parent commands
submitEpochKeyProof
submitEpochKeyProofEpoch key proof should be submitted to UniRep and get the index of the proof.
Then the attester can submit attestation to the epoch key with a valid proof index.
Only if the epoch key proof is valid, the attestation can be processed.
Options
Options inherited from parent commands
Last updated
Was this helpful?