Epoch Transition
Definition of epoch transition in UniRep
Last updated
Was this helpful?
Definition of epoch transition in UniRep
Last updated
Was this helpful?
Epoch transition happens when someone calls and the current block is epochLength
blocks more since last transitioned block.
In beginEpochTransition()
An EpochEnded
event is emitted and currentEpoch
increases by 1.
by sealed it means that the hash chain is hashed again with 1
, e.g.,
hash(1, originalHashChain)
if an epoch key received no attestation, it's hash chain would be hash(1, 0)
there's only one epoch tree for every epoch.
After the EpochEnded
event is emitted, all epoch keys attested during this epoch will have their sealed
After hash chain of the epoch keys are sealed, these epoch keys and their hash chain will be inserted into the of this epoch
There will be a new for each epoch.
And after epoch transition, user needs to perform to transition his user state into the latest epoch
currentEpoch
is increased by one.