Versions in this module Expand all Collapse all v0 v0.9.3 Nov 20, 2020 v0.9.0 Oct 19, 2020 Changes in this version + const AttributeKeyEvidenceHash + const AttributeValueCategory + const BehaviourCountDelayBlock + const CodeEvidenceExists + const CodeInvalidEvidence + const CodeNoEvidenceExists + const CodeNoEvidenceHandlerExists + const DefaultParamspace + const EventTypeSubmitEvidence + const ModuleName + const QuerierRoute + const QueryAllEvidence + const QueryEvidence + const RouterKey + const StoreKey + const TypeMsgSubmitEvidence + var AllBehaviourKeys = []string + var ConfirmedVoteKey = []byte + var DsignBehaviourKey = "dsign" + var EvidencePrefixKey = []byte + var KeyBehaviourSlashFraction = []byte("BehaviourSlashFraction") + var KeyBehaviourWindow = []byte("BehaviourWindow") + var KeyMaxMisbehaviourCount = []byte("MaxMisbehaviourCount") + var ModuleCdc *codec.Codec + var ValidatorBehaviourBitArrayKey = []byte + var ValidatorBehaviourKey = []byte + var VoteBehaviourKey = "Vote" + var VoteBoxKey = []byte + func DecodeConfirmedVoteKey(key []byte) (uint64, string) + func ErrEvidenceExists(hash string) sdk.Error + func ErrInvalidEvidence(msg string) sdk.Error + func ErrNoEvidenceExists(hash string) sdk.Error + func ErrNoEvidenceHandlerExists(route string) sdk.Error + func GetConfirmedVoteKeyPrefix(height uint64) []byte + func GetValidatorBehaviourBitArrayKey(behaviourName string, v sdk.ValAddress, i int64) []byte + func GetValidatorBehaviourBitArrayPrefixKey(behaviourName string, v sdk.ValAddress) []byte + func GetValidatorBehaviourKey(behaviourName string, v sdk.ValAddress) []byte + func GetVoteBoxKey(voteID string) []byte + func NewVoteBox(confirmThreshold int) exported.VoteBox + func ParamKeyTable() params.KeyTable + func RegisterCodec(cdc *codec.Codec) + func ValidateGenesis(GenesisState) error + type BehaviourParams struct + BehaviourSlashFraction sdk.Dec + BehaviourWindow int64 + MaxMisbehaviourCount int64 + func DefaultBehaviourParams() BehaviourParams + func NewBehaviourParams(behaviourWindow int64, maxMisbehaviourCount int64, ...) BehaviourParams + func (p *BehaviourParams) ParamSetPairs() params.ParamSetPairs + func (p BehaviourParams) String() string + type BoolVote bool + type GenesisState struct + BehaviourParams map[string]BehaviourParams + func DefaultGenesisState() GenesisState + func NewGenesisState(behaviourParams map[string]BehaviourParams) GenesisState + type Handler func(sdk.Context, exported.Evidence) error + type MsgSubmitEvidence struct + Evidence exported.Evidence + Submitter sdk.CUAddress + func NewMsgSubmitEvidence(e exported.Evidence, s sdk.CUAddress) MsgSubmitEvidence + func (m MsgSubmitEvidence) GetSignBytes() []byte + func (m MsgSubmitEvidence) GetSigners() []sdk.CUAddress + func (m MsgSubmitEvidence) Route() string + func (m MsgSubmitEvidence) Type() string + func (m MsgSubmitEvidence) ValidateBasic() sdk.Error + type ParamSubspace interface + Get func(ctx sdk.Context, key []byte, ptr interface{}) + GetParamSet func(ctx sdk.Context, ps params.ParamSet) + GetParamSetWithSubkey func(ctx sdk.Context, key []byte, ps params.ParamSet) + GetWithSubkey func(ctx sdk.Context, key, subkey []byte, ptr interface{}) + SetParamSet func(ctx sdk.Context, ps params.ParamSet) + SetParamSetWithSubkey func(ctx sdk.Context, key []byte, ps params.ParamSet) + WithKeyTable func(table params.KeyTable) params.Subspace + type QueryAllEvidenceParams struct + Limit int + Page int + func NewQueryAllEvidenceParams(page, limit int) QueryAllEvidenceParams + type QueryEvidenceParams struct + EvidenceHash string + func NewQueryEvidenceParams(hash string) QueryEvidenceParams + type Router interface + AddRoute func(r string, h Handler) Router + GetRoute func(path string) Handler + HasRoute func(r string) bool + Seal func() + Sealed func() bool + func NewRouter() Router + type StakingKeeper interface + GetCurrentEpoch func(ctx sdk.Context) sdk.Epoch + GetEpochByHeight func(ctx sdk.Context, height uint64) sdk.Epoch + JailByOperator func(ctx sdk.Context, operator sdk.ValAddress) + SlashByOperator func(sdk.Context, sdk.ValAddress, int64, sdk.Dec) + type ValidatorBehaviour struct + IndexOffset int64 + MisbehaviourCounter int64 + type VoteBox struct + ConfirmThreshold int + Confirmed bool + Result exported.Vote + VoteItems []*exported.VoteItem + func (v *VoteBox) AddVote(voter sdk.CUAddress, vote exported.Vote) bool + func (v *VoteBox) HasConfirmed() bool + func (v *VoteBox) ValidVotes() []*exported.VoteItem