github.com/Finschia/finschia-sdk@v0.48.1/x/slashing/spec/02_state.md (about)

     1  <!--
     2  order: 2
     3  -->
     4  
     5  # State
     6  
     7  ## Signing Info (Liveness)
     8  
     9  Every block includes a set of precommits by the validators for the previous block,
    10  known as the `LastCommitInfo` provided by Tendermint. A `LastCommitInfo` is valid so
    11  long as it contains precommits from +2/3 of total voting power.
    12  
    13  Proposers are incentivized to include precommits from all validators in the Tendermint `LastCommitInfo`
    14  by receiving additional fees proportional to the difference between the voting
    15  power included in the `LastCommitInfo` and +2/3 (see [fee distribution](x/distribution/spec/03_begin_block.md)).
    16  
    17  ```
    18  type LastCommitInfo struct {
    19  	Round int32
    20  	Votes []VoteInfo
    21  }
    22  ```
    23  
    24  Validators are penalized for failing to be included in the `LastCommitInfo` for some
    25  number of blocks by being automatically jailed, potentially slashed, and unbonded.
    26  
    27  Information about validator's liveness activity is tracked through `ValidatorSigningInfo`.
    28  It is indexed in the store as follows:
    29  
    30  - ValidatorSigningInfo: `0x01 | ConsAddrLen (1 byte) | ConsAddress -> ProtocolBuffer(ValSigningInfo)`
    31  - MissedBlocksBitArray: `0x02 | ConsAddrLen (1 byte) | ConsAddress | LittleEndianUint64(signArrayIndex) -> VarInt(didMiss)` (varint is a number encoding format)
    32  
    33  The first mapping allows us to easily lookup the recent signing info for a
    34  validator based on the validator's consensus address.
    35  
    36  The second mapping (`MissedBlocksBitArray`) acts
    37  as a bit-array of size `SignedBlocksWindow` that tells us if the validator missed
    38  the block for a given index in the bit-array. The index in the bit-array is given
    39  as little endian uint64.
    40  The result is a `varint` that takes on `0` or `1`, where `0` indicates the
    41  validator did not miss (did sign) the corresponding block, and `1` indicates
    42  they missed the block (did not sign).
    43  
    44  Note that the `MissedBlocksBitArray` is not explicitly initialized up-front. Keys
    45  are added as we progress through the first `SignedBlocksWindow` blocks for a newly
    46  bonded validator. The `SignedBlocksWindow` parameter defines the size
    47  (number of blocks) of the sliding window used to track validator liveness.
    48  
    49  The information stored for tracking validator liveness is as follows:
    50  
    51  +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/slashing/v1beta1/slashing.proto#L11-L33