Hooks

In this section we describe the "hooks" - slashing module code that runs when other events happen.

Validator Bonded

Upon successful first-time bonding of a new validator, we create a new ValidatorSigningInfo structure for the now-bonded validator, which StartHeight of the current block.

onValidatorBonded(address sdk.ValAddress)

  signingInfo, found = getValidatorSigningInfo(address)
  if !found {
    signingInfo = ValidatorSigningInfo {
      StartHeight         : CurrentHeight,
      IndexOffset         : 0,
      JailedUntil         : time.Unix(0, 0),
      Tombstone           : false,
      MissedBloskCounter  : 0
    }
    setValidatorSigningInfo(signingInfo)
  }
  
  return
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last Updated: 2/21/2019, 2:21:57 AM