Versions in this module Expand all Collapse all v0 v0.0.2 Apr 3, 2019 Changes in this version + const DefaultDowntimeJailDuration + const DefaultMaxEvidenceAge + const DefaultParamspace + const DefaultSignedBlocksWindow + const ModuleName + const QuerierRoute + const QueryParameters + const RouterKey + const StoreKey + var AddrPubkeyRelationKey = []byte + var DefaultMinSignedPerWindow = sdk.NewDecWithPrec(5, 1) + var DefaultSlashFractionDoubleSign = sdk.NewDec(1).Quo(sdk.NewDec(20)) + var DefaultSlashFractionDowntime = sdk.NewDec(1).Quo(sdk.NewDec(100)) + var DoubleSignJailEndTime = time.Unix(253402300799, 0) + var KeyDowntimeJailDuration = []byte("DowntimeJailDuration") + var KeyMaxEvidenceAge = []byte("MaxEvidenceAge") + var KeyMinSignedPerWindow = []byte("MinSignedPerWindow") + var KeySignedBlocksWindow = []byte("SignedBlocksWindow") + var KeySlashFractionDoubleSign = []byte("SlashFractionDoubleSign") + var KeySlashFractionDowntime = []byte("SlashFractionDowntime") + var ValidatorMissedBlockBitArrayKey = []byte + var ValidatorSigningInfoKey = []byte + var ValidatorSlashingPeriodKey = []byte + func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, sk Keeper) sdk.Tags + func ErrBadValidatorAddr(codespace sdk.CodespaceType) sdk.Error + func ErrMissingSelfDelegation(codespace sdk.CodespaceType) sdk.Error + func ErrNoValidatorForAddress(codespace sdk.CodespaceType) sdk.Error + func ErrSelfDelegationTooLowToUnjail(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorJailed(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorNotJailed(codespace sdk.CodespaceType) sdk.Error + func GetValidatorMissedBlockBitArrayKey(v sdk.ConsAddress, i int64) []byte + func GetValidatorMissedBlockBitArrayPrefixKey(v sdk.ConsAddress) []byte + func GetValidatorSigningInfoAddress(key []byte) (v sdk.ConsAddress) + func GetValidatorSigningInfoKey(v sdk.ConsAddress) []byte + func GetValidatorSlashingPeriodKey(v sdk.ConsAddress, startHeight int64) []byte + func GetValidatorSlashingPeriodPrefix(v sdk.ConsAddress) []byte + func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState, validators []sdk.Validator) + func NewHandler(k Keeper) sdk.Handler + func NewQuerier(k Keeper, cdc *codec.Codec) sdk.Querier + func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey crypto.PubKey, amt sdk.Int) staking.MsgCreateValidator + func ParamKeyTable() params.KeyTable + func RegisterCodec(cdc *codec.Codec) + func ValidateGenesis(data GenesisState) error + type CodeType = sdk.CodeType + const CodeInvalidValidator + const CodeMissingSelfDelegation + const CodeSelfDelegationTooLow + const CodeValidatorJailed + const CodeValidatorNotJailed + const DefaultCodespace + type GenesisState struct + MissedBlocks map[string][]MissedBlock + Params Params + SigningInfos map[string]ValidatorSigningInfo + func DefaultGenesisState() GenesisState + func ExportGenesis(ctx sdk.Context, keeper Keeper) (data GenesisState) + type Hooks struct + func (h Hooks) AfterDelegationModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) + func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) + func (h Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) + func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) + func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, _ sdk.ValAddress) + func (h Hooks) BeforeDelegationCreated(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) + func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) + func (h Hooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) + func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) + func (h Hooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec) + type Keeper struct + func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, vs sdk.ValidatorSet, ...) Keeper + func (k Keeper) AfterValidatorBonded(ctx sdk.Context, address sdk.ConsAddress, _ sdk.ValAddress) + func (k Keeper) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) + func (k Keeper) AfterValidatorRemoved(ctx sdk.Context, address sdk.ConsAddress) + func (k Keeper) DowntimeJailDuration(ctx sdk.Context) (res time.Duration) + func (k Keeper) GetParams(ctx sdk.Context) (params Params) + func (k Keeper) Hooks() Hooks + func (k Keeper) IterateValidatorMissedBlockBitArray(ctx sdk.Context, address sdk.ConsAddress, ...) + func (k Keeper) IterateValidatorSigningInfos(ctx sdk.Context, ...) + func (k Keeper) MaxEvidenceAge(ctx sdk.Context) (res time.Duration) + func (k Keeper) MinSignedPerWindow(ctx sdk.Context) int64 + func (k Keeper) SetValidatorSigningInfo(ctx sdk.Context, address sdk.ConsAddress, info ValidatorSigningInfo) + func (k Keeper) SignedBlocksWindow(ctx sdk.Context) (res int64) + func (k Keeper) SlashFractionDoubleSign(ctx sdk.Context) (res sdk.Dec) + func (k Keeper) SlashFractionDowntime(ctx sdk.Context) (res sdk.Dec) + type MissedBlock struct + Index int64 + Missed bool + type MsgUnjail struct + ValidatorAddr sdk.ValAddress + func NewMsgUnjail(validatorAddr sdk.ValAddress) MsgUnjail + func (msg MsgUnjail) GetSignBytes() []byte + func (msg MsgUnjail) GetSigners() []sdk.AccAddress + func (msg MsgUnjail) Route() string + func (msg MsgUnjail) Type() string + func (msg MsgUnjail) ValidateBasic() sdk.Error + type Params struct + DowntimeJailDuration time.Duration + MaxEvidenceAge time.Duration + MinSignedPerWindow sdk.Dec + SignedBlocksWindow int64 + SlashFractionDoubleSign sdk.Dec + SlashFractionDowntime sdk.Dec + func DefaultParams() Params + func (p *Params) ParamSetPairs() params.ParamSetPairs + func (p Params) String() string + type ValidatorSigningInfo struct + IndexOffset int64 + JailedUntil time.Time + MissedBlocksCounter int64 + StartHeight int64 + Tombstoned bool + func NewValidatorSigningInfo(startHeight, indexOffset int64, jailedUntil time.Time, tombstoned bool, ...) ValidatorSigningInfo + func (i ValidatorSigningInfo) String() string