Trees
The tree structures that are used in UniRep protocol.
User state tree
A user state tree is a sparse merkle tree with it's leaves storing reputation received from each attester, e.g.,
a user state tree leaf = hash of the reputation

Hash of the reputation:
where
posRepis the positive reputation given by the attesternegRepis the negative reputation given by the attestergraffitiis the message given by the attestersignUpindicates if the attester authenticates the user
If there is no reputation from attester, then the leaf stores a default reputation:
Global state tree
A global state tree stores the updated user state after a user signs up and a user performs the user state transition.
It is an incremental merkle tree with it's leaves storing users'
identityCommitments anduserStateRoots, e.g.,a global state tree leaf:
hash(identityCommitment,userStateTreeRoot)The default leaf is
0

Epoch tree
An epoch tree is used to prevent users from omitting any attestation attesting to the user. If the user skip one attestation, the hash chain and the output epoch tree root will be different from others.
An epoch tree is a sparse merkle tree with it's leaves storing hashchain results of each epoch key, e.g.,
leaf index: epoch key
leaf value: sealed hash chain The sealed hash chain is computed by

An attestation includes the following data:
Last updated
Was this helpful?