Expand description
Pure height-to-epoch arithmetic. Filled by the height_epoch_arithmetic
domain (HEA-*).
§arithmetic — pure height-to-epoch mapping functions
Introduced by: STR-002 — Module hierarchy (SPEC §13).
Owners: HEA-001 through HEA-004 (Phase 4).
Spec reference: SPEC.md §5
Functions§
- ensure_
checkpoint_ block_ empty - Enforces the empty-checkpoint-block invariant.
- epoch_
checkpoint_ height - Returns the checkpoint (last) L2 block height in the given epoch.
- epoch_
for_ block_ height - Maps an L2 block height to its epoch number.
- first_
height_ in_ epoch - Returns the first L2 block height in the given epoch.
- is_
checkpoint_ class_ block - Returns true if
heightis genesis or an epoch checkpoint block. - is_
epoch_ checkpoint_ block - Returns true if
heightis an epoch checkpoint block (divisible by BLOCKS_PER_EPOCH). - is_
first_ block_ after_ epoch_ checkpoint - Returns true if
heightis the first block after an epoch checkpoint. - is_
genesis_ checkpoint_ block - Returns true if
heightis the genesis checkpoint block (height == GENESIS_HEIGHT). - l1_
range_ for_ epoch - Returns the
(start_l1_height, end_l1_height)for a given epoch. - last_
committed_ height_ in_ epoch - Returns the last L2 height included in this epoch’s checkpoint.