Documentation ¶
Overview ¶
DONTCOVER
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func FromABCIEvidence(e abci.Evidence) exported.Evidence
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type Equivocation
- func (*Equivocation) Descriptor() ([]byte, []int)
- 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 GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetEvidence() []*types.Any
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type Handler
- type MsgClient
- type MsgServer
- type MsgSubmitEvidence
- func (*MsgSubmitEvidence) Descriptor() ([]byte, []int)
- func (m MsgSubmitEvidence) GetEvidence() exported.Evidence
- func (m MsgSubmitEvidence) GetSignBytes() []byte
- func (m MsgSubmitEvidence) GetSigners() []sdk.AccAddress
- func (m MsgSubmitEvidence) GetSubmitter() sdk.AccAddress
- 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) Route() string
- func (m *MsgSubmitEvidence) Size() (n int)
- func (m *MsgSubmitEvidence) String() string
- func (m MsgSubmitEvidence) Type() string
- func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error
- func (m MsgSubmitEvidence) UnpackInterfaces(ctx types.AnyUnpacker) error
- func (m MsgSubmitEvidence) ValidateBasic() 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 MsgSubmitEvidenceResponse
- func (*MsgSubmitEvidenceResponse) Descriptor() ([]byte, []int)
- func (this *MsgSubmitEvidenceResponse) Equal(that interface{}) bool
- func (m *MsgSubmitEvidenceResponse) GetHash() []byte
- func (m *MsgSubmitEvidenceResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSubmitEvidenceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSubmitEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSubmitEvidenceResponse) ProtoMessage()
- func (m *MsgSubmitEvidenceResponse) Reset()
- func (m *MsgSubmitEvidenceResponse) Size() (n int)
- func (m *MsgSubmitEvidenceResponse) String() string
- func (m *MsgSubmitEvidenceResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSubmitEvidenceResponse) XXX_DiscardUnknown()
- func (m *MsgSubmitEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSubmitEvidenceResponse) XXX_Merge(src proto.Message)
- func (m *MsgSubmitEvidenceResponse) XXX_Size() int
- func (m *MsgSubmitEvidenceResponse) XXX_Unmarshal(b []byte) error
- type QueryAllEvidenceParams
- type QueryAllEvidenceRequest
- func (*QueryAllEvidenceRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllEvidenceRequest) GetPagination() *query.PageRequest
- func (m *QueryAllEvidenceRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllEvidenceRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllEvidenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllEvidenceRequest) ProtoMessage()
- func (m *QueryAllEvidenceRequest) Reset()
- func (m *QueryAllEvidenceRequest) Size() (n int)
- func (m *QueryAllEvidenceRequest) String() string
- func (m *QueryAllEvidenceRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllEvidenceRequest) XXX_DiscardUnknown()
- func (m *QueryAllEvidenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllEvidenceRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllEvidenceRequest) XXX_Size() int
- func (m *QueryAllEvidenceRequest) XXX_Unmarshal(b []byte) error
- type QueryAllEvidenceResponse
- func (*QueryAllEvidenceResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllEvidenceResponse) GetEvidence() []*types.Any
- func (m *QueryAllEvidenceResponse) GetPagination() *query.PageResponse
- func (m *QueryAllEvidenceResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllEvidenceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllEvidenceResponse) ProtoMessage()
- func (m *QueryAllEvidenceResponse) Reset()
- func (m *QueryAllEvidenceResponse) Size() (n int)
- func (m *QueryAllEvidenceResponse) String() string
- func (m *QueryAllEvidenceResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllEvidenceResponse) XXX_DiscardUnknown()
- func (m *QueryAllEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllEvidenceResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllEvidenceResponse) XXX_Size() int
- func (m *QueryAllEvidenceResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryEvidenceRequest
- func (*QueryEvidenceRequest) Descriptor() ([]byte, []int)
- func (m *QueryEvidenceRequest) GetEvidenceHash() github_com_tendermint_tendermint_libs_bytes.HexBytes
- func (m *QueryEvidenceRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryEvidenceRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEvidenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEvidenceRequest) ProtoMessage()
- func (m *QueryEvidenceRequest) Reset()
- func (m *QueryEvidenceRequest) Size() (n int)
- func (m *QueryEvidenceRequest) String() string
- func (m *QueryEvidenceRequest) Unmarshal(dAtA []byte) error
- func (m *QueryEvidenceRequest) XXX_DiscardUnknown()
- func (m *QueryEvidenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEvidenceRequest) XXX_Merge(src proto.Message)
- func (m *QueryEvidenceRequest) XXX_Size() int
- func (m *QueryEvidenceRequest) XXX_Unmarshal(b []byte) error
- type QueryEvidenceResponse
- func (*QueryEvidenceResponse) Descriptor() ([]byte, []int)
- func (m *QueryEvidenceResponse) GetEvidence() *types.Any
- func (m *QueryEvidenceResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryEvidenceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEvidenceResponse) ProtoMessage()
- func (m *QueryEvidenceResponse) Reset()
- func (m *QueryEvidenceResponse) Size() (n int)
- func (m *QueryEvidenceResponse) String() string
- func (m *QueryEvidenceResponse) Unmarshal(dAtA []byte) error
- func (m *QueryEvidenceResponse) XXX_DiscardUnknown()
- func (m *QueryEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEvidenceResponse) XXX_Merge(src proto.Message)
- func (m *QueryEvidenceResponse) XXX_Size() int
- func (m *QueryEvidenceResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type Router
- type SlashingKeeper
- type StakingKeeper
- type UnimplementedMsgServer
- type UnimplementedQueryServer
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 = codec.NewAminoCodec(amino)
)
Functions ¶
func FromABCIEvidence ¶
FromABCIEvidence converts a Tendermint concrete Evidence type to SDK Evidence using Equivocation as the concrete type.
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers all the necessary types and interfaces for the evidence module.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
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 string `protobuf:"bytes,4,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty"` }
Equivocation implements the Evidence interface and defines evidence of double signing misbehavior.
func (*Equivocation) Descriptor ¶
func (*Equivocation) Descriptor() ([]byte, []int)
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 GenesisState ¶
type GenesisState struct { // evidence defines all the evidence 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 ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState returns the evidence module's default genesis state.
func NewGenesisState ¶
func NewGenesisState(e []exported.Evidence) *GenesisState
NewGenesisState creates a new genesis state for the evidence module.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetEvidence ¶
func (m *GenesisState) GetEvidence() []*types.Any
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) UnpackInterfaces ¶
func (gs GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
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 MsgClient ¶
type MsgClient interface { // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or // counterfactual signing. SubmitEvidence(ctx context.Context, in *MsgSubmitEvidence, opts ...grpc.CallOption) (*MsgSubmitEvidenceResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶
type MsgServer interface { // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or // counterfactual signing. SubmitEvidence(context.Context, *MsgSubmitEvidence) (*MsgSubmitEvidenceResponse, error) }
MsgServer is the server API for Msg service.
type MsgSubmitEvidence ¶
type MsgSubmitEvidence struct { Submitter string `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter,omitempty"` Evidence *types.Any `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` }
MsgSubmitEvidence represents a message that supports submitting arbitrary Evidence of misbehavior such as equivocation or counterfactual signing.
func NewMsgSubmitEvidence ¶
func NewMsgSubmitEvidence(s sdk.AccAddress, evi exported.Evidence) (*MsgSubmitEvidence, error)
NewMsgSubmitEvidence returns a new MsgSubmitEvidence with a signer/submitter.
func (*MsgSubmitEvidence) Descriptor ¶
func (*MsgSubmitEvidence) Descriptor() ([]byte, []int)
func (MsgSubmitEvidence) GetEvidence ¶
func (m MsgSubmitEvidence) GetEvidence() exported.Evidence
func (MsgSubmitEvidence) GetSignBytes ¶
func (m MsgSubmitEvidence) GetSignBytes() []byte
GetSignBytes returns the raw bytes a signer is expected to sign when submitting a MsgSubmitEvidence message.
func (MsgSubmitEvidence) GetSigners ¶
func (m MsgSubmitEvidence) GetSigners() []sdk.AccAddress
GetSigners returns the single expected signer for a MsgSubmitEvidence.
func (MsgSubmitEvidence) GetSubmitter ¶
func (m MsgSubmitEvidence) GetSubmitter() sdk.AccAddress
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) Route ¶
func (m MsgSubmitEvidence) Route() string
Route returns the MsgSubmitEvidence's route.
func (*MsgSubmitEvidence) Size ¶
func (m *MsgSubmitEvidence) Size() (n int)
func (*MsgSubmitEvidence) String ¶
func (m *MsgSubmitEvidence) String() string
func (MsgSubmitEvidence) Type ¶
func (m MsgSubmitEvidence) Type() string
Type returns the MsgSubmitEvidence's type.
func (*MsgSubmitEvidence) Unmarshal ¶
func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error
func (MsgSubmitEvidence) UnpackInterfaces ¶
func (m MsgSubmitEvidence) UnpackInterfaces(ctx types.AnyUnpacker) error
func (MsgSubmitEvidence) ValidateBasic ¶
func (m MsgSubmitEvidence) ValidateBasic() error
ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitEvidence.
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 MsgSubmitEvidenceResponse ¶
type MsgSubmitEvidenceResponse struct { // hash defines the hash of the evidence. Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` }
MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type.
func (*MsgSubmitEvidenceResponse) Descriptor ¶
func (*MsgSubmitEvidenceResponse) Descriptor() ([]byte, []int)
func (*MsgSubmitEvidenceResponse) Equal ¶
func (this *MsgSubmitEvidenceResponse) Equal(that interface{}) bool
func (*MsgSubmitEvidenceResponse) GetHash ¶
func (m *MsgSubmitEvidenceResponse) GetHash() []byte
func (*MsgSubmitEvidenceResponse) Marshal ¶
func (m *MsgSubmitEvidenceResponse) Marshal() (dAtA []byte, err error)
func (*MsgSubmitEvidenceResponse) MarshalTo ¶
func (m *MsgSubmitEvidenceResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSubmitEvidenceResponse) MarshalToSizedBuffer ¶
func (m *MsgSubmitEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSubmitEvidenceResponse) ProtoMessage ¶
func (*MsgSubmitEvidenceResponse) ProtoMessage()
func (*MsgSubmitEvidenceResponse) Reset ¶
func (m *MsgSubmitEvidenceResponse) Reset()
func (*MsgSubmitEvidenceResponse) Size ¶
func (m *MsgSubmitEvidenceResponse) Size() (n int)
func (*MsgSubmitEvidenceResponse) String ¶
func (m *MsgSubmitEvidenceResponse) String() string
func (*MsgSubmitEvidenceResponse) Unmarshal ¶
func (m *MsgSubmitEvidenceResponse) Unmarshal(dAtA []byte) error
func (*MsgSubmitEvidenceResponse) XXX_DiscardUnknown ¶
func (m *MsgSubmitEvidenceResponse) XXX_DiscardUnknown()
func (*MsgSubmitEvidenceResponse) XXX_Marshal ¶
func (m *MsgSubmitEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSubmitEvidenceResponse) XXX_Merge ¶
func (m *MsgSubmitEvidenceResponse) XXX_Merge(src proto.Message)
func (*MsgSubmitEvidenceResponse) XXX_Size ¶
func (m *MsgSubmitEvidenceResponse) XXX_Size() int
func (*MsgSubmitEvidenceResponse) XXX_Unmarshal ¶
func (m *MsgSubmitEvidenceResponse) XXX_Unmarshal(b []byte) error
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 QueryAllEvidenceRequest ¶
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 ¶
func NewQueryAllEvidenceRequest(pageReq *query.PageRequest) *QueryAllEvidenceRequest
NewQueryAllEvidenceRequest creates a new instance of QueryAllEvidenceRequest.
func (*QueryAllEvidenceRequest) Descriptor ¶
func (*QueryAllEvidenceRequest) Descriptor() ([]byte, []int)
func (*QueryAllEvidenceRequest) GetPagination ¶
func (m *QueryAllEvidenceRequest) GetPagination() *query.PageRequest
func (*QueryAllEvidenceRequest) Marshal ¶
func (m *QueryAllEvidenceRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllEvidenceRequest) MarshalTo ¶
func (m *QueryAllEvidenceRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllEvidenceRequest) MarshalToSizedBuffer ¶
func (m *QueryAllEvidenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllEvidenceRequest) ProtoMessage ¶
func (*QueryAllEvidenceRequest) ProtoMessage()
func (*QueryAllEvidenceRequest) Reset ¶
func (m *QueryAllEvidenceRequest) Reset()
func (*QueryAllEvidenceRequest) Size ¶
func (m *QueryAllEvidenceRequest) Size() (n int)
func (*QueryAllEvidenceRequest) String ¶
func (m *QueryAllEvidenceRequest) String() string
func (*QueryAllEvidenceRequest) Unmarshal ¶
func (m *QueryAllEvidenceRequest) Unmarshal(dAtA []byte) error
func (*QueryAllEvidenceRequest) XXX_DiscardUnknown ¶
func (m *QueryAllEvidenceRequest) XXX_DiscardUnknown()
func (*QueryAllEvidenceRequest) XXX_Marshal ¶
func (m *QueryAllEvidenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllEvidenceRequest) XXX_Merge ¶
func (m *QueryAllEvidenceRequest) XXX_Merge(src proto.Message)
func (*QueryAllEvidenceRequest) XXX_Size ¶
func (m *QueryAllEvidenceRequest) XXX_Size() int
func (*QueryAllEvidenceRequest) XXX_Unmarshal ¶
func (m *QueryAllEvidenceRequest) XXX_Unmarshal(b []byte) error
type QueryAllEvidenceResponse ¶
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 ¶
func (*QueryAllEvidenceResponse) Descriptor() ([]byte, []int)
func (*QueryAllEvidenceResponse) GetEvidence ¶
func (m *QueryAllEvidenceResponse) GetEvidence() []*types.Any
func (*QueryAllEvidenceResponse) GetPagination ¶
func (m *QueryAllEvidenceResponse) GetPagination() *query.PageResponse
func (*QueryAllEvidenceResponse) Marshal ¶
func (m *QueryAllEvidenceResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllEvidenceResponse) MarshalTo ¶
func (m *QueryAllEvidenceResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllEvidenceResponse) MarshalToSizedBuffer ¶
func (m *QueryAllEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllEvidenceResponse) ProtoMessage ¶
func (*QueryAllEvidenceResponse) ProtoMessage()
func (*QueryAllEvidenceResponse) Reset ¶
func (m *QueryAllEvidenceResponse) Reset()
func (*QueryAllEvidenceResponse) Size ¶
func (m *QueryAllEvidenceResponse) Size() (n int)
func (*QueryAllEvidenceResponse) String ¶
func (m *QueryAllEvidenceResponse) String() string
func (*QueryAllEvidenceResponse) Unmarshal ¶
func (m *QueryAllEvidenceResponse) Unmarshal(dAtA []byte) error
func (*QueryAllEvidenceResponse) XXX_DiscardUnknown ¶
func (m *QueryAllEvidenceResponse) XXX_DiscardUnknown()
func (*QueryAllEvidenceResponse) XXX_Marshal ¶
func (m *QueryAllEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllEvidenceResponse) XXX_Merge ¶
func (m *QueryAllEvidenceResponse) XXX_Merge(src proto.Message)
func (*QueryAllEvidenceResponse) XXX_Size ¶
func (m *QueryAllEvidenceResponse) XXX_Size() int
func (*QueryAllEvidenceResponse) XXX_Unmarshal ¶
func (m *QueryAllEvidenceResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
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 ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryEvidenceRequest ¶
type QueryEvidenceRequest struct { // evidence_hash defines the hash of the requested evidence. EvidenceHash github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 159-byte string literal not displayed */ }
QueryEvidenceRequest is the request type for the Query/Evidence RPC method.
func NewQueryEvidenceRequest ¶
func NewQueryEvidenceRequest(hash tmbytes.HexBytes) *QueryEvidenceRequest
NewQueryEvidenceRequest creates a new instance of QueryEvidenceRequest.
func (*QueryEvidenceRequest) Descriptor ¶
func (*QueryEvidenceRequest) Descriptor() ([]byte, []int)
func (*QueryEvidenceRequest) GetEvidenceHash ¶
func (m *QueryEvidenceRequest) GetEvidenceHash() github_com_tendermint_tendermint_libs_bytes.HexBytes
func (*QueryEvidenceRequest) Marshal ¶
func (m *QueryEvidenceRequest) Marshal() (dAtA []byte, err error)
func (*QueryEvidenceRequest) MarshalTo ¶
func (m *QueryEvidenceRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryEvidenceRequest) MarshalToSizedBuffer ¶
func (m *QueryEvidenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEvidenceRequest) ProtoMessage ¶
func (*QueryEvidenceRequest) ProtoMessage()
func (*QueryEvidenceRequest) Reset ¶
func (m *QueryEvidenceRequest) Reset()
func (*QueryEvidenceRequest) Size ¶
func (m *QueryEvidenceRequest) Size() (n int)
func (*QueryEvidenceRequest) String ¶
func (m *QueryEvidenceRequest) String() string
func (*QueryEvidenceRequest) Unmarshal ¶
func (m *QueryEvidenceRequest) Unmarshal(dAtA []byte) error
func (*QueryEvidenceRequest) XXX_DiscardUnknown ¶
func (m *QueryEvidenceRequest) XXX_DiscardUnknown()
func (*QueryEvidenceRequest) XXX_Marshal ¶
func (m *QueryEvidenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEvidenceRequest) XXX_Merge ¶
func (m *QueryEvidenceRequest) XXX_Merge(src proto.Message)
func (*QueryEvidenceRequest) XXX_Size ¶
func (m *QueryEvidenceRequest) XXX_Size() int
func (*QueryEvidenceRequest) XXX_Unmarshal ¶
func (m *QueryEvidenceRequest) XXX_Unmarshal(b []byte) error
type QueryEvidenceResponse ¶
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 ¶
func (*QueryEvidenceResponse) Descriptor() ([]byte, []int)
func (*QueryEvidenceResponse) GetEvidence ¶
func (m *QueryEvidenceResponse) GetEvidence() *types.Any
func (*QueryEvidenceResponse) Marshal ¶
func (m *QueryEvidenceResponse) Marshal() (dAtA []byte, err error)
func (*QueryEvidenceResponse) MarshalTo ¶
func (m *QueryEvidenceResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryEvidenceResponse) MarshalToSizedBuffer ¶
func (m *QueryEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEvidenceResponse) ProtoMessage ¶
func (*QueryEvidenceResponse) ProtoMessage()
func (*QueryEvidenceResponse) Reset ¶
func (m *QueryEvidenceResponse) Reset()
func (*QueryEvidenceResponse) Size ¶
func (m *QueryEvidenceResponse) Size() (n int)
func (*QueryEvidenceResponse) String ¶
func (m *QueryEvidenceResponse) String() string
func (*QueryEvidenceResponse) Unmarshal ¶
func (m *QueryEvidenceResponse) Unmarshal(dAtA []byte) error
func (*QueryEvidenceResponse) XXX_DiscardUnknown ¶
func (m *QueryEvidenceResponse) XXX_DiscardUnknown()
func (*QueryEvidenceResponse) XXX_Marshal ¶
func (m *QueryEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEvidenceResponse) XXX_Merge ¶
func (m *QueryEvidenceResponse) XXX_Merge(src proto.Message)
func (*QueryEvidenceResponse) XXX_Size ¶
func (m *QueryEvidenceResponse) XXX_Size() int
func (*QueryEvidenceResponse) XXX_Unmarshal ¶
func (m *QueryEvidenceResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
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 ¶
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, cryptotypes.Address) (cryptotypes.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) stakingtypes.ValidatorI
}
StakingKeeper defines the staking module interface contract needed by the evidence module.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) SubmitEvidence ¶
func (*UnimplementedMsgServer) SubmitEvidence(ctx context.Context, req *MsgSubmitEvidence) (*MsgSubmitEvidenceResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) AllEvidence ¶
func (*UnimplementedQueryServer) AllEvidence(ctx context.Context, req *QueryAllEvidenceRequest) (*QueryAllEvidenceResponse, error)
func (*UnimplementedQueryServer) Evidence ¶
func (*UnimplementedQueryServer) Evidence(ctx context.Context, req *QueryEvidenceRequest) (*QueryEvidenceResponse, error)