cosmos-sdk: github.com/cosmos/cosmos-sdk/x/evidence/types Index | Files

package types

import "github.com/cosmos/cosmos-sdk/x/evidence/types"

DONTCOVER

Index

Package Files

codec.go errors.go events.go evidence.go evidence.pb.go expected_keepers.go genesis.go genesis.pb.go keys.go msgs.go params.go querier.go query.pb.go router.go tx.pb.go

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 = "evidence"

    // 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 (
    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 (
    ErrInvalidLengthEvidence        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowEvidence          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupEvidence = fmt.Errorf("proto: unexpected end of group")
)
var (
    ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
var (
    ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
var (
    ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
var DoubleSignJailEndTime = time.Unix(253402300799, 0)

DoubleSignJailEndTime period ends at Max Time supported by Amino (Dec 31, 9999 - 23:59:59 GMT).

var (
    KeyPrefixEvidence = []byte{0x00}
)

KVStore key prefixes

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.
    ModuleCdc = codec.NewAminoCodec(amino)
)

func ConvertDuplicateVoteEvidence Uses

func ConvertDuplicateVoteEvidence(dupVote abci.Evidence) exported.Evidence

ConvertDuplicateVoteEvidence converts a Tendermint concrete Evidence type to SDK Evidence using Equivocation as the concrete type.

func RegisterCodec Uses

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers all the necessary types and interfaces for the evidence module.

func RegisterInterfaces Uses

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterQueryServer Uses

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

type Equivocation Uses

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 `protobuf:"bytes,4,opt,name=consensus_address,json=consensusAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"consensus_address,omitempty" yaml:"consensus_address"`
}

Equivocation implements the Evidence interface and defines evidence of double signing misbehavior.

func (*Equivocation) Descriptor Uses

func (*Equivocation) Descriptor() ([]byte, []int)

func (*Equivocation) Equal Uses

func (this *Equivocation) Equal(that interface{}) bool

func (Equivocation) GetConsensusAddress Uses

func (e Equivocation) GetConsensusAddress() sdk.ConsAddress

GetConsensusAddress returns the validator's consensus address at time of the Equivocation infraction.

func (Equivocation) GetHeight Uses

func (e Equivocation) GetHeight() int64

GetHeight returns the height at time of the Equivocation infraction.

func (Equivocation) GetTime Uses

func (e Equivocation) GetTime() time.Time

GetTime returns the time at time of the Equivocation infraction.

func (Equivocation) GetTotalPower Uses

func (e Equivocation) GetTotalPower() int64

GetTotalPower is a no-op for the Equivocation type.

func (Equivocation) GetValidatorPower Uses

func (e Equivocation) GetValidatorPower() int64

GetValidatorPower returns the validator's power at time of the Equivocation infraction.

func (*Equivocation) Hash Uses

func (e *Equivocation) Hash() tmbytes.HexBytes

Hash returns the hash of an Equivocation object.

func (*Equivocation) Marshal Uses

func (m *Equivocation) Marshal() (dAtA []byte, err error)

func (*Equivocation) MarshalTo Uses

func (m *Equivocation) MarshalTo(dAtA []byte) (int, error)

func (*Equivocation) MarshalToSizedBuffer Uses

func (m *Equivocation) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Equivocation) ProtoMessage Uses

func (*Equivocation) ProtoMessage()

func (*Equivocation) Reset Uses

func (m *Equivocation) Reset()

func (*Equivocation) Route Uses

func (e *Equivocation) Route() string

Route returns the Evidence Handler route for an Equivocation type.

func (*Equivocation) Size Uses

func (m *Equivocation) Size() (n int)

func (*Equivocation) String Uses

func (e *Equivocation) String() string

func (*Equivocation) Type Uses

func (e *Equivocation) Type() string

Type returns the Evidence Handler type for an Equivocation type.

func (*Equivocation) Unmarshal Uses

func (m *Equivocation) Unmarshal(dAtA []byte) error

func (*Equivocation) ValidateBasic Uses

func (e *Equivocation) ValidateBasic() error

ValidateBasic performs basic stateless validation checks on an Equivocation object.

func (*Equivocation) XXX_DiscardUnknown Uses

func (m *Equivocation) XXX_DiscardUnknown()

func (*Equivocation) XXX_Marshal Uses

func (m *Equivocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Equivocation) XXX_Merge Uses

func (m *Equivocation) XXX_Merge(src proto.Message)

func (*Equivocation) XXX_Size Uses

func (m *Equivocation) XXX_Size() int

func (*Equivocation) XXX_Unmarshal Uses

func (m *Equivocation) XXX_Unmarshal(b []byte) error

type GenesisState Uses

type GenesisState struct {
    // evidence defines all the evidences at genesis.
    Evidence []*types.Any `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"`
}

GenesisState defines the evidence module's genesis state.

func DefaultGenesisState Uses

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns the evidence module's default genesis state.

func NewGenesisState Uses

func NewGenesisState(e []exported.Evidence) *GenesisState

NewGenesisState creates a new genesis state for the evidence module.

func (*GenesisState) Descriptor Uses

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetEvidence Uses

func (m *GenesisState) GetEvidence() []*types.Any

func (*GenesisState) Marshal Uses

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo Uses

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer Uses

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage Uses

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset Uses

func (m *GenesisState) Reset()

func (*GenesisState) Size Uses

func (m *GenesisState) Size() (n int)

func (*GenesisState) String Uses

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal Uses

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) UnpackInterfaces Uses

func (gs GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (GenesisState) Validate Uses

func (gs GenesisState) Validate() error

Validate performs basic gensis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown Uses

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal Uses

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge Uses

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size Uses

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal Uses

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type Handler Uses

type Handler func(sdk.Context, exported.Evidence) error

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 Uses

type MsgSubmitEvidence struct {
    Submitter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=submitter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"submitter,omitempty"`
    Evidence  *types.Any                                    `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"`
}

MsgSubmitEvidence defines an sdk.Msg type that supports submitting arbitrary Evidence.

func NewMsgSubmitEvidence Uses

func NewMsgSubmitEvidence(s sdk.AccAddress, evi exported.Evidence) (*MsgSubmitEvidence, error)

NewMsgSubmitEvidence returns a new MsgSubmitEvidence with a signer/submitter.

func (*MsgSubmitEvidence) Descriptor Uses

func (*MsgSubmitEvidence) Descriptor() ([]byte, []int)

func (*MsgSubmitEvidence) Equal Uses

func (this *MsgSubmitEvidence) Equal(that interface{}) bool

func (MsgSubmitEvidence) GetEvidence Uses

func (m MsgSubmitEvidence) GetEvidence() exported.Evidence

func (MsgSubmitEvidence) GetSignBytes Uses

func (m MsgSubmitEvidence) GetSignBytes() []byte

GetSignBytes returns the raw bytes a signer is expected to sign when submitting a MsgSubmitEvidence message.

func (MsgSubmitEvidence) GetSigners Uses

func (m MsgSubmitEvidence) GetSigners() []sdk.AccAddress

GetSigners returns the single expected signer for a MsgSubmitEvidence.

func (MsgSubmitEvidence) GetSubmitter Uses

func (m MsgSubmitEvidence) GetSubmitter() sdk.AccAddress

func (*MsgSubmitEvidence) Marshal Uses

func (m *MsgSubmitEvidence) Marshal() (dAtA []byte, err error)

func (*MsgSubmitEvidence) MarshalTo Uses

func (m *MsgSubmitEvidence) MarshalTo(dAtA []byte) (int, error)

func (*MsgSubmitEvidence) MarshalToSizedBuffer Uses

func (m *MsgSubmitEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSubmitEvidence) ProtoMessage Uses

func (*MsgSubmitEvidence) ProtoMessage()

func (*MsgSubmitEvidence) Reset Uses

func (m *MsgSubmitEvidence) Reset()

func (MsgSubmitEvidence) Route Uses

func (m MsgSubmitEvidence) Route() string

Route returns the MsgSubmitEvidence's route.

func (*MsgSubmitEvidence) Size Uses

func (m *MsgSubmitEvidence) Size() (n int)

func (*MsgSubmitEvidence) String Uses

func (m *MsgSubmitEvidence) String() string

func (MsgSubmitEvidence) Type Uses

func (m MsgSubmitEvidence) Type() string

Type returns the MsgSubmitEvidence's type.

func (*MsgSubmitEvidence) Unmarshal Uses

func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error

func (MsgSubmitEvidence) UnpackInterfaces Uses

func (m MsgSubmitEvidence) UnpackInterfaces(ctx types.AnyUnpacker) error

func (MsgSubmitEvidence) ValidateBasic Uses

func (m MsgSubmitEvidence) ValidateBasic() error

ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitEvidence.

func (*MsgSubmitEvidence) XXX_DiscardUnknown Uses

func (m *MsgSubmitEvidence) XXX_DiscardUnknown()

func (*MsgSubmitEvidence) XXX_Marshal Uses

func (m *MsgSubmitEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSubmitEvidence) XXX_Merge Uses

func (m *MsgSubmitEvidence) XXX_Merge(src proto.Message)

func (*MsgSubmitEvidence) XXX_Size Uses

func (m *MsgSubmitEvidence) XXX_Size() int

func (*MsgSubmitEvidence) XXX_Unmarshal Uses

func (m *MsgSubmitEvidence) XXX_Unmarshal(b []byte) error

type QueryAllEvidenceParams Uses

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 Uses

func NewQueryAllEvidenceParams(page, limit int) QueryAllEvidenceParams

type QueryAllEvidenceRequest Uses

type QueryAllEvidenceRequest struct {
    // pagination defines an optional pagination for the request.
    Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryEvidenceRequest is the request type for the Query/AllEvidence RPC method.

func NewQueryAllEvidenceRequest Uses

func NewQueryAllEvidenceRequest(pageReq *query.PageRequest) *QueryAllEvidenceRequest

NewQueryAllEvidenceRequest creates a new instance of QueryAllEvidenceRequest.

func (*QueryAllEvidenceRequest) Descriptor Uses

func (*QueryAllEvidenceRequest) Descriptor() ([]byte, []int)

func (*QueryAllEvidenceRequest) GetPagination Uses

func (m *QueryAllEvidenceRequest) GetPagination() *query.PageRequest

func (*QueryAllEvidenceRequest) Marshal Uses

func (m *QueryAllEvidenceRequest) Marshal() (dAtA []byte, err error)

func (*QueryAllEvidenceRequest) MarshalTo Uses

func (m *QueryAllEvidenceRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllEvidenceRequest) MarshalToSizedBuffer Uses

func (m *QueryAllEvidenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllEvidenceRequest) ProtoMessage Uses

func (*QueryAllEvidenceRequest) ProtoMessage()

func (*QueryAllEvidenceRequest) Reset Uses

func (m *QueryAllEvidenceRequest) Reset()

func (*QueryAllEvidenceRequest) Size Uses

func (m *QueryAllEvidenceRequest) Size() (n int)

func (*QueryAllEvidenceRequest) String Uses

func (m *QueryAllEvidenceRequest) String() string

func (*QueryAllEvidenceRequest) Unmarshal Uses

func (m *QueryAllEvidenceRequest) Unmarshal(dAtA []byte) error

func (*QueryAllEvidenceRequest) XXX_DiscardUnknown Uses

func (m *QueryAllEvidenceRequest) XXX_DiscardUnknown()

func (*QueryAllEvidenceRequest) XXX_Marshal Uses

func (m *QueryAllEvidenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllEvidenceRequest) XXX_Merge Uses

func (m *QueryAllEvidenceRequest) XXX_Merge(src proto.Message)

func (*QueryAllEvidenceRequest) XXX_Size Uses

func (m *QueryAllEvidenceRequest) XXX_Size() int

func (*QueryAllEvidenceRequest) XXX_Unmarshal Uses

func (m *QueryAllEvidenceRequest) XXX_Unmarshal(b []byte) error

type QueryAllEvidenceResponse Uses

type QueryAllEvidenceResponse struct {
    // evidence returns all evidences.
    Evidence []*types.Any `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"`
    // pagination defines the pagination in the response.
    Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method.

func (*QueryAllEvidenceResponse) Descriptor Uses

func (*QueryAllEvidenceResponse) Descriptor() ([]byte, []int)

func (*QueryAllEvidenceResponse) GetEvidence Uses

func (m *QueryAllEvidenceResponse) GetEvidence() []*types.Any

func (*QueryAllEvidenceResponse) GetPagination Uses

func (m *QueryAllEvidenceResponse) GetPagination() *query.PageResponse

func (*QueryAllEvidenceResponse) Marshal Uses

func (m *QueryAllEvidenceResponse) Marshal() (dAtA []byte, err error)

func (*QueryAllEvidenceResponse) MarshalTo Uses

func (m *QueryAllEvidenceResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllEvidenceResponse) MarshalToSizedBuffer Uses

func (m *QueryAllEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllEvidenceResponse) ProtoMessage Uses

func (*QueryAllEvidenceResponse) ProtoMessage()

func (*QueryAllEvidenceResponse) Reset Uses

func (m *QueryAllEvidenceResponse) Reset()

func (*QueryAllEvidenceResponse) Size Uses

func (m *QueryAllEvidenceResponse) Size() (n int)

func (*QueryAllEvidenceResponse) String Uses

func (m *QueryAllEvidenceResponse) String() string

func (*QueryAllEvidenceResponse) Unmarshal Uses

func (m *QueryAllEvidenceResponse) Unmarshal(dAtA []byte) error

func (*QueryAllEvidenceResponse) XXX_DiscardUnknown Uses

func (m *QueryAllEvidenceResponse) XXX_DiscardUnknown()

func (*QueryAllEvidenceResponse) XXX_Marshal Uses

func (m *QueryAllEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllEvidenceResponse) XXX_Merge Uses

func (m *QueryAllEvidenceResponse) XXX_Merge(src proto.Message)

func (*QueryAllEvidenceResponse) XXX_Size Uses

func (m *QueryAllEvidenceResponse) XXX_Size() int

func (*QueryAllEvidenceResponse) XXX_Unmarshal Uses

func (m *QueryAllEvidenceResponse) XXX_Unmarshal(b []byte) error

type QueryClient Uses

type QueryClient interface {
    // Evidence queries evidence based on evidence hash.
    Evidence(ctx context.Context, in *QueryEvidenceRequest, opts ...grpc.CallOption) (*QueryEvidenceResponse, error)
    // AllEvidence queries all evidence.
    AllEvidence(ctx context.Context, in *QueryAllEvidenceRequest, opts ...grpc.CallOption) (*QueryAllEvidenceResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient Uses

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryEvidenceRequest Uses

type QueryEvidenceRequest struct {
    // evidence_hash defines the hash of the requested evidence.
    EvidenceHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=evidence_hash,json=evidenceHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"evidence_hash,omitempty"`
}

QueryEvidenceRequest is the request type for the Query/Evidence RPC method.

func NewQueryEvidenceRequest Uses

func NewQueryEvidenceRequest(hash tmbytes.HexBytes) *QueryEvidenceRequest

NewQueryEvidenceRequest creates a new instance of QueryEvidenceRequest.

func (*QueryEvidenceRequest) Descriptor Uses

func (*QueryEvidenceRequest) Descriptor() ([]byte, []int)

func (*QueryEvidenceRequest) GetEvidenceHash Uses

func (m *QueryEvidenceRequest) GetEvidenceHash() github_com_tendermint_tendermint_libs_bytes.HexBytes

func (*QueryEvidenceRequest) Marshal Uses

func (m *QueryEvidenceRequest) Marshal() (dAtA []byte, err error)

func (*QueryEvidenceRequest) MarshalTo Uses

func (m *QueryEvidenceRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryEvidenceRequest) MarshalToSizedBuffer Uses

func (m *QueryEvidenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryEvidenceRequest) ProtoMessage Uses

func (*QueryEvidenceRequest) ProtoMessage()

func (*QueryEvidenceRequest) Reset Uses

func (m *QueryEvidenceRequest) Reset()

func (*QueryEvidenceRequest) Size Uses

func (m *QueryEvidenceRequest) Size() (n int)

func (*QueryEvidenceRequest) String Uses

func (m *QueryEvidenceRequest) String() string

func (*QueryEvidenceRequest) Unmarshal Uses

func (m *QueryEvidenceRequest) Unmarshal(dAtA []byte) error

func (*QueryEvidenceRequest) XXX_DiscardUnknown Uses

func (m *QueryEvidenceRequest) XXX_DiscardUnknown()

func (*QueryEvidenceRequest) XXX_Marshal Uses

func (m *QueryEvidenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryEvidenceRequest) XXX_Merge Uses

func (m *QueryEvidenceRequest) XXX_Merge(src proto.Message)

func (*QueryEvidenceRequest) XXX_Size Uses

func (m *QueryEvidenceRequest) XXX_Size() int

func (*QueryEvidenceRequest) XXX_Unmarshal Uses

func (m *QueryEvidenceRequest) XXX_Unmarshal(b []byte) error

type QueryEvidenceResponse Uses

type QueryEvidenceResponse struct {
    // evidence returns the requested evidence.
    Evidence *types.Any `protobuf:"bytes,1,opt,name=evidence,proto3" json:"evidence,omitempty"`
}

QueryEvidenceResponse is the response type for the Query/Evidence RPC method.

func (*QueryEvidenceResponse) Descriptor Uses

func (*QueryEvidenceResponse) Descriptor() ([]byte, []int)

func (*QueryEvidenceResponse) GetEvidence Uses

func (m *QueryEvidenceResponse) GetEvidence() *types.Any

func (*QueryEvidenceResponse) Marshal Uses

func (m *QueryEvidenceResponse) Marshal() (dAtA []byte, err error)

func (*QueryEvidenceResponse) MarshalTo Uses

func (m *QueryEvidenceResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryEvidenceResponse) MarshalToSizedBuffer Uses

func (m *QueryEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryEvidenceResponse) ProtoMessage Uses

func (*QueryEvidenceResponse) ProtoMessage()

func (*QueryEvidenceResponse) Reset Uses

func (m *QueryEvidenceResponse) Reset()

func (*QueryEvidenceResponse) Size Uses

func (m *QueryEvidenceResponse) Size() (n int)

func (*QueryEvidenceResponse) String Uses

func (m *QueryEvidenceResponse) String() string

func (*QueryEvidenceResponse) Unmarshal Uses

func (m *QueryEvidenceResponse) Unmarshal(dAtA []byte) error

func (*QueryEvidenceResponse) XXX_DiscardUnknown Uses

func (m *QueryEvidenceResponse) XXX_DiscardUnknown()

func (*QueryEvidenceResponse) XXX_Marshal Uses

func (m *QueryEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryEvidenceResponse) XXX_Merge Uses

func (m *QueryEvidenceResponse) XXX_Merge(src proto.Message)

func (*QueryEvidenceResponse) XXX_Size Uses

func (m *QueryEvidenceResponse) XXX_Size() int

func (*QueryEvidenceResponse) XXX_Unmarshal Uses

func (m *QueryEvidenceResponse) XXX_Unmarshal(b []byte) error

type QueryServer Uses

type QueryServer interface {
    // Evidence queries evidence based on evidence hash.
    Evidence(context.Context, *QueryEvidenceRequest) (*QueryEvidenceResponse, error)
    // AllEvidence queries all evidence.
    AllEvidence(context.Context, *QueryAllEvidenceRequest) (*QueryAllEvidenceResponse, error)
}

QueryServer is the server API for Query service.

type Router Uses

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.

func NewRouter Uses

func NewRouter() Router

type SlashingKeeper Uses

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 Uses

type StakingKeeper interface {
    ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingexported.ValidatorI
}

StakingKeeper defines the staking module interface contract needed by the evidence module.

type UnimplementedQueryServer Uses

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AllEvidence Uses

func (*UnimplementedQueryServer) AllEvidence(ctx context.Context, req *QueryAllEvidenceRequest) (*QueryAllEvidenceResponse, error)

func (*UnimplementedQueryServer) Evidence Uses

func (*UnimplementedQueryServer) Evidence(ctx context.Context, req *QueryEvidenceRequest) (*QueryEvidenceResponse, error)

Package types imports 29 packages (graph) and is imported by 8 packages. Updated 2020-08-13. Refresh now. Tools for package owners.