Epoch Transition

Definition of epoch transition in UniRep

  • Epoch transition happens when someone calls beginEpochTransition() and the current block is epochLength blocks more since last transitioned block.

  • In beginEpochTransition()

    • An EpochEnded event is emitted and currentEpoch increases by 1.

  • After the EpochEnded event is emitted, all epoch keys attested during this epoch will have their hash chain sealed

    • 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)

  • After hash chain of the epoch keys are sealed, these epoch keys and their hash chain will be inserted into the epoch tree of this epoch

    • there's only one epoch tree for every epoch.

Last updated