# BeginBlock
# Liveness Tracking
At the beginning of each block, we update the ValidatorSigningInfo
for each
validator and check if they've crossed below the liveness threshold over a
sliding window. This sliding window is defined by SignedBlocksWindow
and the
index in this window is determined by IndexOffset
found in the validator's
ValidatorSigningInfo
. For each block processed, the IndexOffset
is incremented
regardless if the validator signed or not. Once the index is determined, the
MissedBlocksBitArray
and MissedBlocksCounter
are updated accordingly.
Finally, in order to determine if a validator crosses below the liveness threshold,
we fetch the maximum number of blocks missed, maxMissed
, which is
SignedBlocksWindow - (MinSignedPerWindow * SignedBlocksWindow)
and the minimum
height at which we can determine liveness, minHeight
. If the current block is
greater than minHeight
and the validator's MissedBlocksCounter
is greater than
maxMissed
, they will be slashed by SlashFractionDowntime
, will be jailed
for DowntimeJailDuration
, and have the following values reset:
MissedBlocksBitArray
, MissedBlocksCounter
, and IndexOffset
.
Note: Liveness slashes do NOT lead to a tombstombing.