State Transition
When an identity adds a new claim to her Claims Tree, the root of the tree and, consequently, the identity state change. The process of moving from one state to another is defined using State Transition Function.
Before performing changing states of identity, State Contract verifies the State Transition Function proof.
This proof can be: * A ZK proof generated by the prover using the State Transition Circuit and BJJ keys. * An Ethereum transaction executed by the identity owner (for Ethereum-controlled Identities).
ZK State Transition Verifier
State Contract has transitState
smart contract function, which verifies proof of stateTransition
circuit, which represents a set of rules that identity holder needs to follow to complete the state transition such as:
- The prover is the owner of the identity (checked using a digital signature by the private key corresponding the
authClaim
) - The
authClaim
of the prover hasn't been revoked.
The identity state gets updated by calling the transitState
smart contract function. To call this function, it is necessary to pass in the proof generated previously.
Ethereum State Transition Verifier
Ethereum State Transition requires a msg.sender
of an Ethereum transaction to match identifier provided.
State Transition Process
After successful verification, the identities
mapping gets updated associating the ID
with a new IdState
, and GIST gets updated with the new IdState
value.
This tutorial is split in 3 parts:
Note: The Identity State Transition happens not only when an identity adds a new claim to the Claims Tree, but also when a claim gets updated or revoked (by adding it to the revocation tree).