Documentation ¶
Overview ¶
DONTCOVER
Index ¶
- Constants
- Variables
- func ConvertDuplicateVoteEvidence(dupVote abci.Evidence) exported.Evidence
- func ParamKeyTable() external.ParamsKeyTable
- func RegisterCodec(cdc *codec.Codec)
- type Codec
- type Equivocation
- func (*Equivocation) Descriptor() ([]byte, []int)
- func (this *Equivocation) Equal(that interface{}) bool
- func (e Equivocation) GetConsensusAddress() sdk.ConsAddress
- func (e Equivocation) GetHeight() int64
- func (e Equivocation) GetTime() time.Time
- func (e Equivocation) GetTotalPower() int64
- func (e Equivocation) GetValidatorPower() int64
- func (e Equivocation) Hash() tmbytes.HexBytes
- func (m *Equivocation) Marshal() (dAtA []byte, err error)
- func (m *Equivocation) MarshalTo(dAtA []byte) (int, error)
- func (m *Equivocation) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Equivocation) ProtoMessage()
- func (m *Equivocation) Reset()
- func (e Equivocation) Route() string
- func (m *Equivocation) Size() (n int)
- func (e Equivocation) String() string
- func (e Equivocation) Type() string
- func (m *Equivocation) Unmarshal(dAtA []byte) error
- func (e Equivocation) ValidateBasic() error
- func (m *Equivocation) XXX_DiscardUnknown()
- func (m *Equivocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Equivocation) XXX_Merge(src proto.Message)
- func (m *Equivocation) XXX_Size() int
- func (m *Equivocation) XXX_Unmarshal(b []byte) error
- type Evidence
- func (*Evidence) Descriptor() ([]byte, []int)
- func (this *Evidence) Equal(that interface{}) bool
- func (m *Evidence) GetEquivocation() *Equivocation
- func (this *Evidence) GetEvidence() github_com_cosmos_cosmos_sdk_x_evidence_exported.Evidence
- func (m *Evidence) GetSum() isEvidence_Sum
- func (m *Evidence) Marshal() (dAtA []byte, err error)
- func (m *Evidence) MarshalTo(dAtA []byte) (int, error)
- func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Evidence) ProtoMessage()
- func (m *Evidence) Reset()
- func (this *Evidence) SetEvidence(value github_com_cosmos_cosmos_sdk_x_evidence_exported.Evidence) error
- func (m *Evidence) Size() (n int)
- func (m *Evidence) String() string
- func (m *Evidence) Unmarshal(dAtA []byte) error
- func (m *Evidence) XXX_DiscardUnknown()
- func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Evidence) XXX_Merge(src proto.Message)
- func (*Evidence) XXX_OneofWrappers() []interface{}
- func (m *Evidence) XXX_Size() int
- func (m *Evidence) XXX_Unmarshal(b []byte) error
- type EvidenceCdc
- func (c *EvidenceCdc) MarshalEvidence(evidenceI exported.Evidence) ([]byte, error)
- func (c *EvidenceCdc) MarshalEvidenceJSON(evidence exported.Evidence) ([]byte, error)
- func (c *EvidenceCdc) UnmarshalEvidence(bz []byte) (exported.Evidence, error)
- func (c *EvidenceCdc) UnmarshalEvidenceJSON(bz []byte) (exported.Evidence, error)
- type Evidence_Equivocation
- type GenesisState
- type Handler
- type MsgSubmitEvidence
- func (*MsgSubmitEvidence) Descriptor() ([]byte, []int)
- func (this *MsgSubmitEvidence) Equal(that interface{}) bool
- func (m *MsgSubmitEvidence) Marshal() (dAtA []byte, err error)
- func (m *MsgSubmitEvidence) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSubmitEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSubmitEvidence) ProtoMessage()
- func (m *MsgSubmitEvidence) Reset()
- func (m *MsgSubmitEvidence) Size() (n int)
- func (m *MsgSubmitEvidence) String() string
- func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error
- func (m *MsgSubmitEvidence) XXX_DiscardUnknown()
- func (m *MsgSubmitEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSubmitEvidence) XXX_Merge(src proto.Message)
- func (m *MsgSubmitEvidence) XXX_Size() int
- func (m *MsgSubmitEvidence) XXX_Unmarshal(b []byte) error
- type MsgSubmitEvidenceBase
- func (*MsgSubmitEvidenceBase) Descriptor() ([]byte, []int)
- func (this *MsgSubmitEvidenceBase) Equal(that interface{}) bool
- func (m MsgSubmitEvidenceBase) GetSignBytes() []byte
- func (m MsgSubmitEvidenceBase) GetSigners() []sdk.AccAddress
- func (m *MsgSubmitEvidenceBase) GetSubmitter() types.AccountID
- func (m *MsgSubmitEvidenceBase) Marshal() (dAtA []byte, err error)
- func (m *MsgSubmitEvidenceBase) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSubmitEvidenceBase) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSubmitEvidenceBase) ProtoMessage()
- func (m *MsgSubmitEvidenceBase) Reset()
- func (m MsgSubmitEvidenceBase) Route() string
- func (m *MsgSubmitEvidenceBase) Size() (n int)
- func (m *MsgSubmitEvidenceBase) String() string
- func (m MsgSubmitEvidenceBase) Type() string
- func (m *MsgSubmitEvidenceBase) Unmarshal(dAtA []byte) error
- func (m MsgSubmitEvidenceBase) ValidateBasic() error
- func (m *MsgSubmitEvidenceBase) XXX_DiscardUnknown()
- func (m *MsgSubmitEvidenceBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSubmitEvidenceBase) XXX_Merge(src proto.Message)
- func (m *MsgSubmitEvidenceBase) XXX_Size() int
- func (m *MsgSubmitEvidenceBase) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetDoubleSignJailDuration() time.Duration
- func (m *Params) GetMaxEvidenceAge() time.Duration
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() external.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryAllEvidenceParams
- type QueryEvidenceParams
- type Router
- type SlashingKeeper
- type StakingKeeper
Constants ¶
const ( EventTypeSubmitEvidence = "submit_evidence" AttributeValueCategory = "evidence" AttributeKeyEvidenceHash = "evidence_hash" )
evidence module events
const ( RouteEquivocation = "equivocation" TypeEquivocation = "equivocation" )
Evidence type constants
const ( // ModuleName defines the module name ModuleName = "kuevidence" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey defines the module's message routing key RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName )
const ( DefaultParamspace = ModuleName DefaultMaxEvidenceAge = 60 * 2 * time.Second DefaultDoblesignJailDuration = 60 * 60 * 24 * 14 * time.Second )
Default parameter values
const ( QueryParameters = "parameters" QueryEvidence = "evidence" QueryAllEvidence = "all_evidence" )
Querier routes for the evidence module
const (
TypeMsgSubmitEvidence = "submit_evidence"
)
Message types for the evidence module
Variables ¶
var ( ErrNoEvidenceHandlerExists = sdkerrors.Register(ModuleName, 2, "unregistered handler for evidence type") ErrInvalidEvidence = sdkerrors.Register(ModuleName, 3, "invalid evidence") ErrNoEvidenceExists = sdkerrors.Register(ModuleName, 4, "evidence does not exist") ErrEvidenceExists = sdkerrors.Register(ModuleName, 5, "evidence already exists") )
x/evidence module sentinel errors
var ( KeyMaxEvidenceAge = []byte("MaxEvidenceAge") KeyDoubleSignJailDuration = []byte("DoubleSignJailDuration") // The Double Sign Jail period ends at Max Time supported by Amino // (Dec 31, 9999 - 23:59:59 GMT). DoubleSignJailEndTime = time.Unix(253402300799, 0) )
Parameter store keys
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var ( // ModuleCdc references the global x/evidence module codec. Note, the codec should // ONLY be used in certain instances of tests and for JSON encoding as Amino is // still used for that purpose. // // The actual codec used for serialization should be provided to x/evidence and // defined at the application level. Evidence_Cdc = NewEveidenceCodec(amino) )
var (
KeyPrefixEvidence = []byte{0x00}
)
KVStore key prefixes
Functions ¶
func ConvertDuplicateVoteEvidence ¶
ConvertDuplicateVoteEvidence converts a Tendermint concrete Evidence type to SDK Evidence using Equivocation as the concrete type.
func ParamKeyTable ¶
func ParamKeyTable() external.ParamsKeyTable
ParamKeyTable returns the parameter key table.
func RegisterCodec ¶
RegisterCodec registers all the necessary types and interfaces for the evidence module.
Types ¶
type Codec ¶
type Codec interface { codec.Marshaler MarshalEvidence(exported.Evidence) ([]byte, error) UnmarshalEvidence([]byte) (exported.Evidence, error) MarshalEvidenceJSON(exported.Evidence) ([]byte, error) UnmarshalEvidenceJSON([]byte) (exported.Evidence, error) }
Codec defines the interface required to serialize evidence
type Equivocation ¶
type Equivocation struct { Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` Time time.Time `protobuf:"bytes,2,opt,name=time,proto3,stdtime" json:"time"` Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` ConsensusAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `` /* 190-byte string literal not displayed */ }
Equivocation implements the Evidence interface and defines evidence of double signing misbehavior.
func (*Equivocation) Descriptor ¶
func (*Equivocation) Descriptor() ([]byte, []int)
func (*Equivocation) Equal ¶
func (this *Equivocation) Equal(that interface{}) bool
func (Equivocation) GetConsensusAddress ¶
func (e Equivocation) GetConsensusAddress() sdk.ConsAddress
GetConsensusAddress returns the validator's consensus address at time of the Equivocation infraction.
func (Equivocation) GetHeight ¶
func (e Equivocation) GetHeight() int64
GetHeight returns the height at time of the Equivocation infraction.
func (Equivocation) GetTime ¶
func (e Equivocation) GetTime() time.Time
GetTime returns the time at time of the Equivocation infraction.
func (Equivocation) GetTotalPower ¶
func (e Equivocation) GetTotalPower() int64
GetTotalPower is a no-op for the Equivocation type.
func (Equivocation) GetValidatorPower ¶
func (e Equivocation) GetValidatorPower() int64
GetValidatorPower returns the validator's power at time of the Equivocation infraction.
func (Equivocation) Hash ¶
func (e Equivocation) Hash() tmbytes.HexBytes
Hash returns the hash of an Equivocation object.
func (*Equivocation) Marshal ¶
func (m *Equivocation) Marshal() (dAtA []byte, err error)
func (*Equivocation) MarshalToSizedBuffer ¶
func (m *Equivocation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Equivocation) ProtoMessage ¶
func (*Equivocation) ProtoMessage()
func (*Equivocation) Reset ¶
func (m *Equivocation) Reset()
func (Equivocation) Route ¶
func (e Equivocation) Route() string
Route returns the Evidence Handler route for an Equivocation type.
func (*Equivocation) Size ¶
func (m *Equivocation) Size() (n int)
func (Equivocation) String ¶
func (e Equivocation) String() string
func (Equivocation) Type ¶
func (e Equivocation) Type() string
Type returns the Evidence Handler type for an Equivocation type.
func (*Equivocation) Unmarshal ¶
func (m *Equivocation) Unmarshal(dAtA []byte) error
func (Equivocation) ValidateBasic ¶
func (e Equivocation) ValidateBasic() error
ValidateBasic performs basic stateless validation checks on an Equivocation object.
func (*Equivocation) XXX_DiscardUnknown ¶
func (m *Equivocation) XXX_DiscardUnknown()
func (*Equivocation) XXX_Marshal ¶
func (m *Equivocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Equivocation) XXX_Merge ¶
func (m *Equivocation) XXX_Merge(src proto.Message)
func (*Equivocation) XXX_Size ¶
func (m *Equivocation) XXX_Size() int
func (*Equivocation) XXX_Unmarshal ¶
func (m *Equivocation) XXX_Unmarshal(b []byte) error
type Evidence ¶
type Evidence struct { // sum defines a set of all acceptable concrete Evidence implementations. // // Types that are valid to be assigned to Sum: // *Evidence_Equivocation Sum isEvidence_Sum `protobuf_oneof:"sum"` }
Evidence defines the application-level allowed Evidence to be submitted via a MsgSubmitEvidence message.
func (*Evidence) Descriptor ¶
func (*Evidence) GetEquivocation ¶
func (m *Evidence) GetEquivocation() *Equivocation
func (*Evidence) GetEvidence ¶
func (this *Evidence) GetEvidence() github_com_cosmos_cosmos_sdk_x_evidence_exported.Evidence
func (*Evidence) MarshalToSizedBuffer ¶
func (*Evidence) ProtoMessage ¶
func (*Evidence) ProtoMessage()
func (*Evidence) SetEvidence ¶
func (this *Evidence) SetEvidence(value github_com_cosmos_cosmos_sdk_x_evidence_exported.Evidence) error
func (*Evidence) XXX_DiscardUnknown ¶
func (m *Evidence) XXX_DiscardUnknown()
func (*Evidence) XXX_Marshal ¶
func (*Evidence) XXX_OneofWrappers ¶
func (*Evidence) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Evidence) XXX_Unmarshal ¶
type EvidenceCdc ¶
func NewEveidenceCodec ¶
func NewEveidenceCodec(amino *codec.Codec) *EvidenceCdc
func (*EvidenceCdc) MarshalEvidence ¶
func (c *EvidenceCdc) MarshalEvidence(evidenceI exported.Evidence) ([]byte, error)
MarshalEvidence marshals an Evidence interface. If the given type implements the Marshaler interface, it is treated as a Proto-defined message and serialized that way. Otherwise, it falls back on the internal Amino codec.
func (*EvidenceCdc) MarshalEvidenceJSON ¶
func (c *EvidenceCdc) MarshalEvidenceJSON(evidence exported.Evidence) ([]byte, error)
MarshalEvidenceJSON JSON encodes an evidence object implementing the Evidence interface.
func (*EvidenceCdc) UnmarshalEvidence ¶
func (c *EvidenceCdc) UnmarshalEvidence(bz []byte) (exported.Evidence, error)
UnmarshalEvidence returns an Evidence interface from raw encoded evidence bytes of a Proto-based Evidence type. An error is returned upon decoding failure.
func (*EvidenceCdc) UnmarshalEvidenceJSON ¶
func (c *EvidenceCdc) UnmarshalEvidenceJSON(bz []byte) (exported.Evidence, error)
UnmarshalEvidenceJSON returns an Evidence from JSON encoded bytes
type Evidence_Equivocation ¶
type Evidence_Equivocation struct {
Equivocation *Equivocation `protobuf:"bytes,1,opt,name=equivocation,proto3,oneof" json:"equivocation,omitempty"`
}
func (*Evidence_Equivocation) Equal ¶
func (this *Evidence_Equivocation) Equal(that interface{}) bool
func (*Evidence_Equivocation) MarshalTo ¶
func (m *Evidence_Equivocation) MarshalTo(dAtA []byte) (int, error)
func (*Evidence_Equivocation) MarshalToSizedBuffer ¶
func (m *Evidence_Equivocation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Evidence_Equivocation) Size ¶
func (m *Evidence_Equivocation) Size() (n int)
type GenesisState ¶
type GenesisState struct { Params Params `json:"params" yaml:"params"` Evidence []exported.Evidence `json:"evidence" yaml:"evidence"` }
GenesisState defines the evidence module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns the evidence module's default genesis state.
func NewGenesisState ¶
func NewGenesisState(p Params, e []exported.Evidence) GenesisState
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic gensis state validation returning an error upon any failure.
type Handler ¶
Handler defines an agnostic Evidence handler. The handler is responsible for executing all corresponding business logic necessary for verifying the evidence as valid. In addition, the Handler may execute any necessary slashing and potential jailing.
type MsgSubmitEvidence ¶
type MsgSubmitEvidence struct { Evidence *Evidence `protobuf:"bytes,1,opt,name=evidence,proto3" json:"evidence,omitempty"` MsgSubmitEvidenceBase `protobuf:"bytes,2,opt,name=base,proto3,embedded=base" json:"base"` }
MsgSubmitEvidence defines the application-level message type for handling evidence submission.
func (*MsgSubmitEvidence) Descriptor ¶
func (*MsgSubmitEvidence) Descriptor() ([]byte, []int)
func (*MsgSubmitEvidence) Equal ¶
func (this *MsgSubmitEvidence) Equal(that interface{}) bool
func (*MsgSubmitEvidence) Marshal ¶
func (m *MsgSubmitEvidence) Marshal() (dAtA []byte, err error)
func (*MsgSubmitEvidence) MarshalTo ¶
func (m *MsgSubmitEvidence) MarshalTo(dAtA []byte) (int, error)
func (*MsgSubmitEvidence) MarshalToSizedBuffer ¶
func (m *MsgSubmitEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSubmitEvidence) ProtoMessage ¶
func (*MsgSubmitEvidence) ProtoMessage()
func (*MsgSubmitEvidence) Reset ¶
func (m *MsgSubmitEvidence) Reset()
func (*MsgSubmitEvidence) Size ¶
func (m *MsgSubmitEvidence) Size() (n int)
func (*MsgSubmitEvidence) String ¶
func (m *MsgSubmitEvidence) String() string
func (*MsgSubmitEvidence) Unmarshal ¶
func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error
func (*MsgSubmitEvidence) XXX_DiscardUnknown ¶
func (m *MsgSubmitEvidence) XXX_DiscardUnknown()
func (*MsgSubmitEvidence) XXX_Marshal ¶
func (m *MsgSubmitEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSubmitEvidence) XXX_Merge ¶
func (m *MsgSubmitEvidence) XXX_Merge(src proto.Message)
func (*MsgSubmitEvidence) XXX_Size ¶
func (m *MsgSubmitEvidence) XXX_Size() int
func (*MsgSubmitEvidence) XXX_Unmarshal ¶
func (m *MsgSubmitEvidence) XXX_Unmarshal(b []byte) error
type MsgSubmitEvidenceBase ¶
type MsgSubmitEvidenceBase struct {
Submitter types.AccountID `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter" yaml:"submitter"`
}
MsgSubmitEvidenceBase defines an sdk.Msg type that supports submitting arbitrary Evidence.
Note, this message type provides the basis for which a true MsgSubmitEvidence can be constructed. Since the evidence submitted in the message can be arbitrary, assuming it fulfills the Evidence interface, it must be defined at the application-level and extend MsgSubmitEvidenceBase.
func NewMsgSubmitEvidenceBase ¶
func NewMsgSubmitEvidenceBase(s types.AccountID) MsgSubmitEvidenceBase
NewMsgSubmitEvidenceBase returns a new MsgSubmitEvidenceBase with a signer/submitter. Note, the MsgSubmitEvidenceBase is not to be used as an actual message, but rather to be extended with Evidence.
func (*MsgSubmitEvidenceBase) Descriptor ¶
func (*MsgSubmitEvidenceBase) Descriptor() ([]byte, []int)
func (*MsgSubmitEvidenceBase) Equal ¶
func (this *MsgSubmitEvidenceBase) Equal(that interface{}) bool
func (MsgSubmitEvidenceBase) GetSignBytes ¶
func (m MsgSubmitEvidenceBase) GetSignBytes() []byte
GetSignBytes returns the raw bytes a signer is expected to sign when submitting a MsgSubmitEvidenceBase message.
func (MsgSubmitEvidenceBase) GetSigners ¶
func (m MsgSubmitEvidenceBase) GetSigners() []sdk.AccAddress
GetSigners returns the single expected signer for a MsgSubmitEvidenceBase.
func (*MsgSubmitEvidenceBase) GetSubmitter ¶
func (m *MsgSubmitEvidenceBase) GetSubmitter() types.AccountID
func (*MsgSubmitEvidenceBase) Marshal ¶
func (m *MsgSubmitEvidenceBase) Marshal() (dAtA []byte, err error)
func (*MsgSubmitEvidenceBase) MarshalTo ¶
func (m *MsgSubmitEvidenceBase) MarshalTo(dAtA []byte) (int, error)
func (*MsgSubmitEvidenceBase) MarshalToSizedBuffer ¶
func (m *MsgSubmitEvidenceBase) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSubmitEvidenceBase) ProtoMessage ¶
func (*MsgSubmitEvidenceBase) ProtoMessage()
func (*MsgSubmitEvidenceBase) Reset ¶
func (m *MsgSubmitEvidenceBase) Reset()
func (MsgSubmitEvidenceBase) Route ¶
func (m MsgSubmitEvidenceBase) Route() string
Route returns the MsgSubmitEvidenceBase's route.
func (*MsgSubmitEvidenceBase) Size ¶
func (m *MsgSubmitEvidenceBase) Size() (n int)
func (*MsgSubmitEvidenceBase) String ¶
func (m *MsgSubmitEvidenceBase) String() string
func (MsgSubmitEvidenceBase) Type ¶
func (m MsgSubmitEvidenceBase) Type() string
Type returns the MsgSubmitEvidenceBase's type.
func (*MsgSubmitEvidenceBase) Unmarshal ¶
func (m *MsgSubmitEvidenceBase) Unmarshal(dAtA []byte) error
func (MsgSubmitEvidenceBase) ValidateBasic ¶
func (m MsgSubmitEvidenceBase) ValidateBasic() error
ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitEvidenceBase.
func (*MsgSubmitEvidenceBase) XXX_DiscardUnknown ¶
func (m *MsgSubmitEvidenceBase) XXX_DiscardUnknown()
func (*MsgSubmitEvidenceBase) XXX_Marshal ¶
func (m *MsgSubmitEvidenceBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSubmitEvidenceBase) XXX_Merge ¶
func (m *MsgSubmitEvidenceBase) XXX_Merge(src proto.Message)
func (*MsgSubmitEvidenceBase) XXX_Size ¶
func (m *MsgSubmitEvidenceBase) XXX_Size() int
func (*MsgSubmitEvidenceBase) XXX_Unmarshal ¶
func (m *MsgSubmitEvidenceBase) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { MaxEvidenceAge time.Duration `` /* 131-byte string literal not displayed */ DoubleSignJailDuration time.Duration `` /* 166-byte string literal not displayed */ }
Params defines the total set of parameters for the evidence module
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns the default parameters for the evidence module.
func (*Params) Descriptor ¶
func (*Params) GetDoubleSignJailDuration ¶
func (*Params) GetMaxEvidenceAge ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() external.ParamSetPairs
ParamSetPairs returns the parameter set pairs.
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryAllEvidenceParams ¶
type QueryAllEvidenceParams struct { Page int `json:"page" yaml:"page"` Limit int `json:"limit" yaml:"limit"` }
QueryAllEvidenceParams defines the parameters necessary for querying for all Evidence.
func NewQueryAllEvidenceParams ¶
func NewQueryAllEvidenceParams(page, limit int) QueryAllEvidenceParams
type QueryEvidenceParams ¶
type QueryEvidenceParams struct {
EvidenceHash string `json:"evidence_hash" yaml:"evidence_hash"`
}
QueryEvidenceParams defines the parameters necessary for querying Evidence.
func NewQueryEvidenceParams ¶
func NewQueryEvidenceParams(hash string) QueryEvidenceParams
type Router ¶
type Router interface { AddRoute(r string, h Handler) Router HasRoute(r string) bool GetRoute(path string) Handler Seal() Sealed() bool }
Router defines a contract for which any Evidence handling module must implement in order to route Evidence to registered Handlers.
type SlashingKeeper ¶
type SlashingKeeper interface { GetPubkey(sdk.Context, crypto.Address) (crypto.PubKey, error) IsTombstoned(sdk.Context, sdk.ConsAddress) bool HasValidatorSigningInfo(sdk.Context, sdk.ConsAddress) bool Tombstone(sdk.Context, sdk.ConsAddress) Slash(sdk.Context, sdk.ConsAddress, sdk.Dec, int64, int64) SlashFractionDoubleSign(sdk.Context) sdk.Dec Jail(sdk.Context, sdk.ConsAddress) JailUntil(sdk.Context, sdk.ConsAddress, time.Time) }
SlashingKeeper defines the slashing module interface contract needed by the evidence module.
type StakingKeeper ¶
type StakingKeeper interface {
ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) external.StakingValidatorl
}
StakingKeeper defines the staking module interface contract needed by the evidence module.