State
State Objects
The x/epochs
module keeps the following objects in state
:
State Object | Description | Key | Value | Store |
---|---|---|---|---|
| Epoch info bytecode |
|
| KV |
EpochInfo
An EpochInfo
defines several variables:
identifier
keeps an epoch identification stringstart_time
keeps the start time for epoch counting: if block height passesstart_time
, thenepoch_counting_started
is setduration
keeps the target epoch durationcurrent_epoch
keeps the current active epoch numbercurrent_epoch_start_time
keeps the start time of the current epochepoch_counting_started
is a flag set withstart_time
, at which pointepoch_number
will be countedcurrent_epoch_start_height
keeps the start block height of the current epoch
The epochs
module keeps these EpochInfo
objects in state, which are initialized at genesis and are modified on begin blockers or end blockers.
Genesis State
The x/epochs
module's GenesisState
defines the state necessary for initializing the chain from a previously exported height. It contains a slice containing all the EpochInfo
objects kept in state:
Last updated