Skip to main content
Version: 1.0.1

Epoch Transition

  • 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.
currentEpoch is increased by one.
  • After the EpochEnded event is emitted, all epoch keys attested during this epoch will have their hash chains 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)
currentEpoch is increased by one.
  • 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.