Documentation ¶
Overview ¶
noalias DONTCOVER
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func AddrPubkeyRelationKey(addr []byte) []byte
- func ParamKeyTable() paramtypes.KeyTable
- 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)
- func ValidateGenesis(data GenesisState) error
- func ValidatorMissedBlockBitArrayKey(v sdk.ConsAddress, i int64) []byte
- func ValidatorMissedBlockBitArrayPrefixKey(v sdk.ConsAddress) []byte
- func ValidatorSigningInfoAddress(key []byte) (v sdk.ConsAddress)
- func ValidatorSigningInfoKey(v sdk.ConsAddress) []byte
- type AccountKeeper
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetMissedBlocks() []ValidatorMissedBlocks
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetSigningInfos() []SigningInfo
- 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 (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 MissedBlock
- func (*MissedBlock) Descriptor() ([]byte, []int)
- func (m *MissedBlock) GetIndex() int64
- func (m *MissedBlock) GetMissed() bool
- func (m *MissedBlock) Marshal() (dAtA []byte, err error)
- func (m *MissedBlock) MarshalTo(dAtA []byte) (int, error)
- func (m *MissedBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MissedBlock) ProtoMessage()
- func (m *MissedBlock) Reset()
- func (m *MissedBlock) Size() (n int)
- func (m *MissedBlock) String() string
- func (m *MissedBlock) Unmarshal(dAtA []byte) error
- func (m *MissedBlock) XXX_DiscardUnknown()
- func (m *MissedBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MissedBlock) XXX_Merge(src proto.Message)
- func (m *MissedBlock) XXX_Size() int
- func (m *MissedBlock) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type MsgUnjail
- func (*MsgUnjail) Descriptor() ([]byte, []int)
- func (this *MsgUnjail) Equal(that interface{}) bool
- func (msg MsgUnjail) GetSignBytes() []byte
- func (msg MsgUnjail) GetSigners() []sdk.AccAddress
- func (m *MsgUnjail) Marshal() (dAtA []byte, err error)
- func (m *MsgUnjail) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUnjail) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUnjail) ProtoMessage()
- func (m *MsgUnjail) Reset()
- func (msg MsgUnjail) Route() string
- func (m *MsgUnjail) Size() (n int)
- func (m *MsgUnjail) String() string
- func (msg MsgUnjail) Type() string
- func (m *MsgUnjail) Unmarshal(dAtA []byte) error
- func (msg MsgUnjail) ValidateBasic() error
- func (m *MsgUnjail) XXX_DiscardUnknown()
- func (m *MsgUnjail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUnjail) XXX_Merge(src proto.Message)
- func (m *MsgUnjail) XXX_Size() int
- func (m *MsgUnjail) XXX_Unmarshal(b []byte) error
- type MsgUnjailResponse
- func (*MsgUnjailResponse) Descriptor() ([]byte, []int)
- func (this *MsgUnjailResponse) Equal(that interface{}) bool
- func (m *MsgUnjailResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUnjailResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUnjailResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUnjailResponse) ProtoMessage()
- func (m *MsgUnjailResponse) Reset()
- func (m *MsgUnjailResponse) Size() (n int)
- func (m *MsgUnjailResponse) String() string
- func (m *MsgUnjailResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUnjailResponse) XXX_DiscardUnknown()
- func (m *MsgUnjailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUnjailResponse) XXX_Merge(src proto.Message)
- func (m *MsgUnjailResponse) XXX_Size() int
- func (m *MsgUnjailResponse) XXX_Unmarshal(b []byte) error
- type ParamSubspace
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetDowntimeJailDuration() time.Duration
- func (m *Params) GetSignedBlocksWindow() int64
- 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() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *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 QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QuerySigningInfoRequest
- func (*QuerySigningInfoRequest) Descriptor() ([]byte, []int)
- func (m *QuerySigningInfoRequest) GetConsAddress() string
- func (m *QuerySigningInfoRequest) Marshal() (dAtA []byte, err error)
- func (m *QuerySigningInfoRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySigningInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySigningInfoRequest) ProtoMessage()
- func (m *QuerySigningInfoRequest) Reset()
- func (m *QuerySigningInfoRequest) Size() (n int)
- func (m *QuerySigningInfoRequest) String() string
- func (m *QuerySigningInfoRequest) Unmarshal(dAtA []byte) error
- func (m *QuerySigningInfoRequest) XXX_DiscardUnknown()
- func (m *QuerySigningInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySigningInfoRequest) XXX_Merge(src proto.Message)
- func (m *QuerySigningInfoRequest) XXX_Size() int
- func (m *QuerySigningInfoRequest) XXX_Unmarshal(b []byte) error
- type QuerySigningInfoResponse
- func (*QuerySigningInfoResponse) Descriptor() ([]byte, []int)
- func (m *QuerySigningInfoResponse) GetValSigningInfo() ValidatorSigningInfo
- func (m *QuerySigningInfoResponse) Marshal() (dAtA []byte, err error)
- func (m *QuerySigningInfoResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySigningInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySigningInfoResponse) ProtoMessage()
- func (m *QuerySigningInfoResponse) Reset()
- func (m *QuerySigningInfoResponse) Size() (n int)
- func (m *QuerySigningInfoResponse) String() string
- func (m *QuerySigningInfoResponse) Unmarshal(dAtA []byte) error
- func (m *QuerySigningInfoResponse) XXX_DiscardUnknown()
- func (m *QuerySigningInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySigningInfoResponse) XXX_Merge(src proto.Message)
- func (m *QuerySigningInfoResponse) XXX_Size() int
- func (m *QuerySigningInfoResponse) XXX_Unmarshal(b []byte) error
- type QuerySigningInfosParams
- type QuerySigningInfosRequest
- func (*QuerySigningInfosRequest) Descriptor() ([]byte, []int)
- func (m *QuerySigningInfosRequest) GetPagination() *query.PageRequest
- func (m *QuerySigningInfosRequest) Marshal() (dAtA []byte, err error)
- func (m *QuerySigningInfosRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySigningInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySigningInfosRequest) ProtoMessage()
- func (m *QuerySigningInfosRequest) Reset()
- func (m *QuerySigningInfosRequest) Size() (n int)
- func (m *QuerySigningInfosRequest) String() string
- func (m *QuerySigningInfosRequest) Unmarshal(dAtA []byte) error
- func (m *QuerySigningInfosRequest) XXX_DiscardUnknown()
- func (m *QuerySigningInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySigningInfosRequest) XXX_Merge(src proto.Message)
- func (m *QuerySigningInfosRequest) XXX_Size() int
- func (m *QuerySigningInfosRequest) XXX_Unmarshal(b []byte) error
- type QuerySigningInfosResponse
- func (*QuerySigningInfosResponse) Descriptor() ([]byte, []int)
- func (m *QuerySigningInfosResponse) GetInfo() []ValidatorSigningInfo
- func (m *QuerySigningInfosResponse) GetPagination() *query.PageResponse
- func (m *QuerySigningInfosResponse) Marshal() (dAtA []byte, err error)
- func (m *QuerySigningInfosResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySigningInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySigningInfosResponse) ProtoMessage()
- func (m *QuerySigningInfosResponse) Reset()
- func (m *QuerySigningInfosResponse) Size() (n int)
- func (m *QuerySigningInfosResponse) String() string
- func (m *QuerySigningInfosResponse) Unmarshal(dAtA []byte) error
- func (m *QuerySigningInfosResponse) XXX_DiscardUnknown()
- func (m *QuerySigningInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySigningInfosResponse) XXX_Merge(src proto.Message)
- func (m *QuerySigningInfosResponse) XXX_Size() int
- func (m *QuerySigningInfosResponse) XXX_Unmarshal(b []byte) error
- type SigningInfo
- func (*SigningInfo) Descriptor() ([]byte, []int)
- func (m *SigningInfo) GetAddress() string
- func (m *SigningInfo) GetValidatorSigningInfo() ValidatorSigningInfo
- func (m *SigningInfo) Marshal() (dAtA []byte, err error)
- func (m *SigningInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *SigningInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SigningInfo) ProtoMessage()
- func (m *SigningInfo) Reset()
- func (m *SigningInfo) Size() (n int)
- func (m *SigningInfo) String() string
- func (m *SigningInfo) Unmarshal(dAtA []byte) error
- func (m *SigningInfo) XXX_DiscardUnknown()
- func (m *SigningInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SigningInfo) XXX_Merge(src proto.Message)
- func (m *SigningInfo) XXX_Size() int
- func (m *SigningInfo) XXX_Unmarshal(b []byte) error
- type StakingHooks
- type StakingKeeper
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) SigningInfo(ctx context.Context, req *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error)
- func (*UnimplementedQueryServer) SigningInfos(ctx context.Context, req *QuerySigningInfosRequest) (*QuerySigningInfosResponse, error)
- type ValidatorMissedBlocks
- func (*ValidatorMissedBlocks) Descriptor() ([]byte, []int)
- func (m *ValidatorMissedBlocks) GetAddress() string
- func (m *ValidatorMissedBlocks) GetMissedBlocks() []MissedBlock
- func (m *ValidatorMissedBlocks) Marshal() (dAtA []byte, err error)
- func (m *ValidatorMissedBlocks) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorMissedBlocks) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorMissedBlocks) ProtoMessage()
- func (m *ValidatorMissedBlocks) Reset()
- func (m *ValidatorMissedBlocks) Size() (n int)
- func (m *ValidatorMissedBlocks) String() string
- func (m *ValidatorMissedBlocks) Unmarshal(dAtA []byte) error
- func (m *ValidatorMissedBlocks) XXX_DiscardUnknown()
- func (m *ValidatorMissedBlocks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorMissedBlocks) XXX_Merge(src proto.Message)
- func (m *ValidatorMissedBlocks) XXX_Size() int
- func (m *ValidatorMissedBlocks) XXX_Unmarshal(b []byte) error
- type ValidatorSigningInfo
- func (*ValidatorSigningInfo) Descriptor() ([]byte, []int)
- func (this *ValidatorSigningInfo) Equal(that interface{}) bool
- func (m *ValidatorSigningInfo) GetAddress() string
- func (m *ValidatorSigningInfo) GetIndexOffset() int64
- func (m *ValidatorSigningInfo) GetJailedUntil() time.Time
- func (m *ValidatorSigningInfo) GetMissedBlocksCounter() int64
- func (m *ValidatorSigningInfo) GetStartHeight() int64
- func (m *ValidatorSigningInfo) GetTombstoned() bool
- func (m *ValidatorSigningInfo) Marshal() (dAtA []byte, err error)
- func (m *ValidatorSigningInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorSigningInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorSigningInfo) ProtoMessage()
- func (m *ValidatorSigningInfo) Reset()
- func (m *ValidatorSigningInfo) Size() (n int)
- func (i ValidatorSigningInfo) String() string
- func (m *ValidatorSigningInfo) Unmarshal(dAtA []byte) error
- func (m *ValidatorSigningInfo) XXX_DiscardUnknown()
- func (m *ValidatorSigningInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorSigningInfo) XXX_Merge(src proto.Message)
- func (m *ValidatorSigningInfo) XXX_Size() int
- func (m *ValidatorSigningInfo) XXX_Unmarshal(b []byte) error
Constants ¶
const ( EventTypeSlash = "slash" EventTypeLiveness = "liveness" AttributeKeyAddress = "address" AttributeKeyHeight = "height" AttributeKeyPower = "power" AttributeKeyReason = "reason" AttributeKeyJailed = "jailed" AttributeKeyMissedBlocks = "missed_blocks" AttributeValueDoubleSign = "double_sign" AttributeValueMissingSignature = "missing_signature" AttributeValueCategory = ModuleName )
Slashing module event types
const ( // ModuleName is the name of the module ModuleName = "slashing" // StoreKey is the store key string for slashing StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute is the querier route for slashing QuerierRoute = ModuleName )
const ( DefaultSignedBlocksWindow = int64(100) DefaultDowntimeJailDuration = 60 * 10 * time.Second )
Default parameter namespace
const ( QueryParameters = "parameters" QuerySigningInfo = "signingInfo" QuerySigningInfos = "signingInfos" )
Query endpoints supported by the slashing querier
const (
TypeMsgUnjail = "unjail"
)
slashing message types
Variables ¶
var ( ErrNoValidatorForAddress = sdkerrors.Register(ModuleName, 2, "address is not associated with any known validator") ErrBadValidatorAddr = sdkerrors.Register(ModuleName, 3, "validator does not exist for that address") ErrValidatorJailed = sdkerrors.Register(ModuleName, 4, "validator still jailed; cannot be unjailed") ErrValidatorNotJailed = sdkerrors.Register(ModuleName, 5, "validator not jailed; cannot be unjailed") ErrMissingSelfDelegation = sdkerrors.Register(ModuleName, 6, "validator has no self-delegation; cannot be unjailed") ErrSelfDelegationTooLowToUnjail = sdkerrors.Register(ModuleName, 7, "validator's self delegation less than minimum; cannot be unjailed") ErrNoSigningInfoFound = sdkerrors.Register(ModuleName, 8, "no validator signing info found") )
x/slashing module sentinel errors
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 ( ValidatorSigningInfoKeyPrefix = []byte{0x01} // Prefix for signing info ValidatorMissedBlockBitArrayKeyPrefix = []byte{0x02} // Prefix for missed block bit array AddrPubkeyRelationKeyPrefix = []byte{0x03} // Prefix for address-pubkey relation )
Keys for slashing store Items are stored with the following key: values
- 0x01<consAddrLen (1 Byte)><consAddress_Bytes>: ValidatorSigningInfo
- 0x02<consAddrLen (1 Byte)><consAddress_Bytes><period_Bytes>: bool
- 0x03<accAddrLen (1 Byte)><accAddr_Bytes>: cryptotypes.PubKey
var ( DefaultMinSignedPerWindow = sdk.NewDecWithPrec(5, 1) DefaultSlashFractionDoubleSign = sdk.NewDec(1).Quo(sdk.NewDec(20)) DefaultSlashFractionDowntime = sdk.NewDec(1).Quo(sdk.NewDec(100)) )
var ( KeySignedBlocksWindow = []byte("SignedBlocksWindow") KeyMinSignedPerWindow = []byte("MinSignedPerWindow") KeyDowntimeJailDuration = []byte("DowntimeJailDuration") KeySlashFractionDoubleSign = []byte("SlashFractionDoubleSign") KeySlashFractionDowntime = []byte("SlashFractionDowntime") )
Parameter store keys
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 ( ErrInvalidLengthSlashing = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSlashing = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSlashing = 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 ( // ModuleCdc references the global x/slashing 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/slashing and // defined at the application level. ModuleCdc = codec.NewAminoCodec(amino) )
Functions ¶
func AddrPubkeyRelationKey ¶
AddrPubkeyRelationKey gets pubkey relation key used to get the pubkey from the address
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers concrete types on LegacyAmino codec
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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the slashing genesis parameters
func ValidatorMissedBlockBitArrayKey ¶
func ValidatorMissedBlockBitArrayKey(v sdk.ConsAddress, i int64) []byte
ValidatorMissedBlockBitArrayKey - stored by *Consensus* address (not operator address)
func ValidatorMissedBlockBitArrayPrefixKey ¶
func ValidatorMissedBlockBitArrayPrefixKey(v sdk.ConsAddress) []byte
ValidatorMissedBlockBitArrayPrefixKey - stored by *Consensus* address (not operator address)
func ValidatorSigningInfoAddress ¶
func ValidatorSigningInfoAddress(key []byte) (v sdk.ConsAddress)
ValidatorSigningInfoAddress - extract the address from a validator signing info key
func ValidatorSigningInfoKey ¶
func ValidatorSigningInfoKey(v sdk.ConsAddress) []byte
ValidatorSigningInfoKey - stored by *Consensus* address (not operator address)
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetAccount(ctx sdk.Context, addr sdk.AccAddress) auth.AccountI IterateAccounts(ctx sdk.Context, process func(auth.AccountI) (stop bool)) }
AccountKeeper expected account keeper
type BankKeeper ¶
type BankKeeper interface { GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins }
BankKeeper defines the expected interface needed to retrieve account balances.
type GenesisState ¶
type GenesisState struct { // params defines all the paramaters of related to deposit. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // signing_infos represents a map between validator addresses and their // signing infos. SigningInfos []SigningInfo `protobuf:"bytes,2,rep,name=signing_infos,json=signingInfos,proto3" json:"signing_infos" yaml:"signing_infos"` // missed_blocks represents a map between validator addresses and their // missed blocks. MissedBlocks []ValidatorMissedBlocks `protobuf:"bytes,3,rep,name=missed_blocks,json=missedBlocks,proto3" json:"missed_blocks" yaml:"missed_blocks"` }
GenesisState defines the slashing module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState - default GenesisState used by Cosmos Hub
func NewGenesisState ¶
func NewGenesisState( params Params, signingInfos []SigningInfo, missedBlocks []ValidatorMissedBlocks, ) *GenesisState
NewGenesisState creates a new GenesisState object
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetMissedBlocks ¶
func (m *GenesisState) GetMissedBlocks() []ValidatorMissedBlocks
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetSigningInfos ¶
func (m *GenesisState) GetSigningInfos() []SigningInfo
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) 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 MissedBlock ¶
type MissedBlock struct { // index is the height at which the block was missed. Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` // missed is the missed status. Missed bool `protobuf:"varint,2,opt,name=missed,proto3" json:"missed,omitempty"` }
MissedBlock contains height and missed status as boolean.
func NewMissedBlock ¶
func NewMissedBlock(index int64, missed bool) MissedBlock
NewMissedBlock creates a new MissedBlock instance
func (*MissedBlock) Descriptor ¶
func (*MissedBlock) Descriptor() ([]byte, []int)
func (*MissedBlock) GetIndex ¶
func (m *MissedBlock) GetIndex() int64
func (*MissedBlock) GetMissed ¶
func (m *MissedBlock) GetMissed() bool
func (*MissedBlock) Marshal ¶
func (m *MissedBlock) Marshal() (dAtA []byte, err error)
func (*MissedBlock) MarshalToSizedBuffer ¶
func (m *MissedBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MissedBlock) ProtoMessage ¶
func (*MissedBlock) ProtoMessage()
func (*MissedBlock) Reset ¶
func (m *MissedBlock) Reset()
func (*MissedBlock) Size ¶
func (m *MissedBlock) Size() (n int)
func (*MissedBlock) String ¶
func (m *MissedBlock) String() string
func (*MissedBlock) Unmarshal ¶
func (m *MissedBlock) Unmarshal(dAtA []byte) error
func (*MissedBlock) XXX_DiscardUnknown ¶
func (m *MissedBlock) XXX_DiscardUnknown()
func (*MissedBlock) XXX_Marshal ¶
func (m *MissedBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MissedBlock) XXX_Merge ¶
func (m *MissedBlock) XXX_Merge(src proto.Message)
func (*MissedBlock) XXX_Size ¶
func (m *MissedBlock) XXX_Size() int
func (*MissedBlock) XXX_Unmarshal ¶
func (m *MissedBlock) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // Unjail defines a method for unjailing a jailed validator, thus returning // them into the bonded validator set, so they can begin receiving provisions // and rewards again. Unjail(ctx context.Context, in *MsgUnjail, opts ...grpc.CallOption) (*MsgUnjailResponse, 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 { // Unjail defines a method for unjailing a jailed validator, thus returning // them into the bonded validator set, so they can begin receiving provisions // and rewards again. Unjail(context.Context, *MsgUnjail) (*MsgUnjailResponse, error) }
MsgServer is the server API for Msg service.
type MsgUnjail ¶
type MsgUnjail struct {
ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"address" yaml:"address"`
}
MsgUnjail defines the Msg/Unjail request type
func NewMsgUnjail ¶
func NewMsgUnjail(validatorAddr sdk.ValAddress) *MsgUnjail
NewMsgUnjail creates a new MsgUnjail instance
func (*MsgUnjail) Descriptor ¶
func (MsgUnjail) GetSignBytes ¶
GetSignBytes gets the bytes for the message signer to sign on
func (MsgUnjail) GetSigners ¶
func (msg MsgUnjail) GetSigners() []sdk.AccAddress
func (*MsgUnjail) MarshalToSizedBuffer ¶
func (*MsgUnjail) ProtoMessage ¶
func (*MsgUnjail) ProtoMessage()
func (MsgUnjail) ValidateBasic ¶
ValidateBasic validity check for the AnteHandler
func (*MsgUnjail) XXX_DiscardUnknown ¶
func (m *MsgUnjail) XXX_DiscardUnknown()
func (*MsgUnjail) XXX_Marshal ¶
func (*MsgUnjail) XXX_Unmarshal ¶
type MsgUnjailResponse ¶
type MsgUnjailResponse struct { }
MsgUnjailResponse defines the Msg/Unjail response type
func (*MsgUnjailResponse) Descriptor ¶
func (*MsgUnjailResponse) Descriptor() ([]byte, []int)
func (*MsgUnjailResponse) Equal ¶
func (this *MsgUnjailResponse) Equal(that interface{}) bool
func (*MsgUnjailResponse) Marshal ¶
func (m *MsgUnjailResponse) Marshal() (dAtA []byte, err error)
func (*MsgUnjailResponse) MarshalTo ¶
func (m *MsgUnjailResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUnjailResponse) MarshalToSizedBuffer ¶
func (m *MsgUnjailResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUnjailResponse) ProtoMessage ¶
func (*MsgUnjailResponse) ProtoMessage()
func (*MsgUnjailResponse) Reset ¶
func (m *MsgUnjailResponse) Reset()
func (*MsgUnjailResponse) Size ¶
func (m *MsgUnjailResponse) Size() (n int)
func (*MsgUnjailResponse) String ¶
func (m *MsgUnjailResponse) String() string
func (*MsgUnjailResponse) Unmarshal ¶
func (m *MsgUnjailResponse) Unmarshal(dAtA []byte) error
func (*MsgUnjailResponse) XXX_DiscardUnknown ¶
func (m *MsgUnjailResponse) XXX_DiscardUnknown()
func (*MsgUnjailResponse) XXX_Marshal ¶
func (m *MsgUnjailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUnjailResponse) XXX_Merge ¶
func (m *MsgUnjailResponse) XXX_Merge(src proto.Message)
func (*MsgUnjailResponse) XXX_Size ¶
func (m *MsgUnjailResponse) XXX_Size() int
func (*MsgUnjailResponse) XXX_Unmarshal ¶
func (m *MsgUnjailResponse) XXX_Unmarshal(b []byte) error
type ParamSubspace ¶
type ParamSubspace interface { HasKeyTable() bool WithKeyTable(table paramtypes.KeyTable) paramtypes.Subspace Get(ctx sdk.Context, key []byte, ptr interface{}) GetParamSet(ctx sdk.Context, ps paramtypes.ParamSet) SetParamSet(ctx sdk.Context, ps paramtypes.ParamSet) }
ParamSubspace defines the expected Subspace interfacace
type Params ¶
type Params struct { SignedBlocksWindow int64 `` /* 146-byte string literal not displayed */ MinSignedPerWindow github_com_cosmos_cosmos_sdk_types.Dec `` /* 195-byte string literal not displayed */ DowntimeJailDuration time.Duration `` /* 155-byte string literal not displayed */ SlashFractionDoubleSign github_com_cosmos_cosmos_sdk_types.Dec `` /* 215-byte string literal not displayed */ SlashFractionDowntime github_com_cosmos_cosmos_sdk_types.Dec `` /* 204-byte string literal not displayed */ }
Params represents the parameters used for by the slashing module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams defines the parameters for this module
func NewParams ¶
func NewParams( signedBlocksWindow int64, minSignedPerWindow sdk.Dec, downtimeJailDuration time.Duration, slashFractionDoubleSign, slashFractionDowntime sdk.Dec, ) Params
NewParams creates a new Params object
func (*Params) Descriptor ¶
func (*Params) GetDowntimeJailDuration ¶
func (*Params) GetSignedBlocksWindow ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs - Implements params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { // Params queries the parameters of slashing module Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // SigningInfo queries the signing info of given cons address SigningInfo(ctx context.Context, in *QuerySigningInfoRequest, opts ...grpc.CallOption) (*QuerySigningInfoResponse, error) // SigningInfos queries signing info of all validators SigningInfos(ctx context.Context, in *QuerySigningInfosRequest, opts ...grpc.CallOption) (*QuerySigningInfosResponse, 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 QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is the request type for the Query/Params RPC method
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse is the response type for the Query/Params RPC method
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params queries the parameters of slashing module Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // SigningInfo queries the signing info of given cons address SigningInfo(context.Context, *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error) // SigningInfos queries signing info of all validators SigningInfos(context.Context, *QuerySigningInfosRequest) (*QuerySigningInfosResponse, error) }
QueryServer is the server API for Query service.
type QuerySigningInfoRequest ¶
type QuerySigningInfoRequest struct { // cons_address is the address to query signing info of ConsAddress string `protobuf:"bytes,1,opt,name=cons_address,json=consAddress,proto3" json:"cons_address,omitempty"` }
QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC method
func (*QuerySigningInfoRequest) Descriptor ¶
func (*QuerySigningInfoRequest) Descriptor() ([]byte, []int)
func (*QuerySigningInfoRequest) GetConsAddress ¶
func (m *QuerySigningInfoRequest) GetConsAddress() string
func (*QuerySigningInfoRequest) Marshal ¶
func (m *QuerySigningInfoRequest) Marshal() (dAtA []byte, err error)
func (*QuerySigningInfoRequest) MarshalTo ¶
func (m *QuerySigningInfoRequest) MarshalTo(dAtA []byte) (int, error)
func (*QuerySigningInfoRequest) MarshalToSizedBuffer ¶
func (m *QuerySigningInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySigningInfoRequest) ProtoMessage ¶
func (*QuerySigningInfoRequest) ProtoMessage()
func (*QuerySigningInfoRequest) Reset ¶
func (m *QuerySigningInfoRequest) Reset()
func (*QuerySigningInfoRequest) Size ¶
func (m *QuerySigningInfoRequest) Size() (n int)
func (*QuerySigningInfoRequest) String ¶
func (m *QuerySigningInfoRequest) String() string
func (*QuerySigningInfoRequest) Unmarshal ¶
func (m *QuerySigningInfoRequest) Unmarshal(dAtA []byte) error
func (*QuerySigningInfoRequest) XXX_DiscardUnknown ¶
func (m *QuerySigningInfoRequest) XXX_DiscardUnknown()
func (*QuerySigningInfoRequest) XXX_Marshal ¶
func (m *QuerySigningInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySigningInfoRequest) XXX_Merge ¶
func (m *QuerySigningInfoRequest) XXX_Merge(src proto.Message)
func (*QuerySigningInfoRequest) XXX_Size ¶
func (m *QuerySigningInfoRequest) XXX_Size() int
func (*QuerySigningInfoRequest) XXX_Unmarshal ¶
func (m *QuerySigningInfoRequest) XXX_Unmarshal(b []byte) error
type QuerySigningInfoResponse ¶
type QuerySigningInfoResponse struct { // val_signing_info is the signing info of requested val cons address ValSigningInfo ValidatorSigningInfo `protobuf:"bytes,1,opt,name=val_signing_info,json=valSigningInfo,proto3" json:"val_signing_info"` }
QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC method
func (*QuerySigningInfoResponse) Descriptor ¶
func (*QuerySigningInfoResponse) Descriptor() ([]byte, []int)
func (*QuerySigningInfoResponse) GetValSigningInfo ¶
func (m *QuerySigningInfoResponse) GetValSigningInfo() ValidatorSigningInfo
func (*QuerySigningInfoResponse) Marshal ¶
func (m *QuerySigningInfoResponse) Marshal() (dAtA []byte, err error)
func (*QuerySigningInfoResponse) MarshalTo ¶
func (m *QuerySigningInfoResponse) MarshalTo(dAtA []byte) (int, error)
func (*QuerySigningInfoResponse) MarshalToSizedBuffer ¶
func (m *QuerySigningInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySigningInfoResponse) ProtoMessage ¶
func (*QuerySigningInfoResponse) ProtoMessage()
func (*QuerySigningInfoResponse) Reset ¶
func (m *QuerySigningInfoResponse) Reset()
func (*QuerySigningInfoResponse) Size ¶
func (m *QuerySigningInfoResponse) Size() (n int)
func (*QuerySigningInfoResponse) String ¶
func (m *QuerySigningInfoResponse) String() string
func (*QuerySigningInfoResponse) Unmarshal ¶
func (m *QuerySigningInfoResponse) Unmarshal(dAtA []byte) error
func (*QuerySigningInfoResponse) XXX_DiscardUnknown ¶
func (m *QuerySigningInfoResponse) XXX_DiscardUnknown()
func (*QuerySigningInfoResponse) XXX_Marshal ¶
func (m *QuerySigningInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySigningInfoResponse) XXX_Merge ¶
func (m *QuerySigningInfoResponse) XXX_Merge(src proto.Message)
func (*QuerySigningInfoResponse) XXX_Size ¶
func (m *QuerySigningInfoResponse) XXX_Size() int
func (*QuerySigningInfoResponse) XXX_Unmarshal ¶
func (m *QuerySigningInfoResponse) XXX_Unmarshal(b []byte) error
type QuerySigningInfosParams ¶
type QuerySigningInfosParams struct {
Page, Limit int
}
QuerySigningInfosParams defines the params for the following queries: - 'custom/slashing/signingInfos'
func NewQuerySigningInfosParams ¶
func NewQuerySigningInfosParams(page, limit int) QuerySigningInfosParams
NewQuerySigningInfosParams creates a new QuerySigningInfosParams instance
type QuerySigningInfosRequest ¶
type QuerySigningInfosRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC method
func (*QuerySigningInfosRequest) Descriptor ¶
func (*QuerySigningInfosRequest) Descriptor() ([]byte, []int)
func (*QuerySigningInfosRequest) GetPagination ¶
func (m *QuerySigningInfosRequest) GetPagination() *query.PageRequest
func (*QuerySigningInfosRequest) Marshal ¶
func (m *QuerySigningInfosRequest) Marshal() (dAtA []byte, err error)
func (*QuerySigningInfosRequest) MarshalTo ¶
func (m *QuerySigningInfosRequest) MarshalTo(dAtA []byte) (int, error)
func (*QuerySigningInfosRequest) MarshalToSizedBuffer ¶
func (m *QuerySigningInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySigningInfosRequest) ProtoMessage ¶
func (*QuerySigningInfosRequest) ProtoMessage()
func (*QuerySigningInfosRequest) Reset ¶
func (m *QuerySigningInfosRequest) Reset()
func (*QuerySigningInfosRequest) Size ¶
func (m *QuerySigningInfosRequest) Size() (n int)
func (*QuerySigningInfosRequest) String ¶
func (m *QuerySigningInfosRequest) String() string
func (*QuerySigningInfosRequest) Unmarshal ¶
func (m *QuerySigningInfosRequest) Unmarshal(dAtA []byte) error
func (*QuerySigningInfosRequest) XXX_DiscardUnknown ¶
func (m *QuerySigningInfosRequest) XXX_DiscardUnknown()
func (*QuerySigningInfosRequest) XXX_Marshal ¶
func (m *QuerySigningInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySigningInfosRequest) XXX_Merge ¶
func (m *QuerySigningInfosRequest) XXX_Merge(src proto.Message)
func (*QuerySigningInfosRequest) XXX_Size ¶
func (m *QuerySigningInfosRequest) XXX_Size() int
func (*QuerySigningInfosRequest) XXX_Unmarshal ¶
func (m *QuerySigningInfosRequest) XXX_Unmarshal(b []byte) error
type QuerySigningInfosResponse ¶
type QuerySigningInfosResponse struct { // info is the signing info of all validators Info []ValidatorSigningInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method
func (*QuerySigningInfosResponse) Descriptor ¶
func (*QuerySigningInfosResponse) Descriptor() ([]byte, []int)
func (*QuerySigningInfosResponse) GetInfo ¶
func (m *QuerySigningInfosResponse) GetInfo() []ValidatorSigningInfo
func (*QuerySigningInfosResponse) GetPagination ¶
func (m *QuerySigningInfosResponse) GetPagination() *query.PageResponse
func (*QuerySigningInfosResponse) Marshal ¶
func (m *QuerySigningInfosResponse) Marshal() (dAtA []byte, err error)
func (*QuerySigningInfosResponse) MarshalTo ¶
func (m *QuerySigningInfosResponse) MarshalTo(dAtA []byte) (int, error)
func (*QuerySigningInfosResponse) MarshalToSizedBuffer ¶
func (m *QuerySigningInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySigningInfosResponse) ProtoMessage ¶
func (*QuerySigningInfosResponse) ProtoMessage()
func (*QuerySigningInfosResponse) Reset ¶
func (m *QuerySigningInfosResponse) Reset()
func (*QuerySigningInfosResponse) Size ¶
func (m *QuerySigningInfosResponse) Size() (n int)
func (*QuerySigningInfosResponse) String ¶
func (m *QuerySigningInfosResponse) String() string
func (*QuerySigningInfosResponse) Unmarshal ¶
func (m *QuerySigningInfosResponse) Unmarshal(dAtA []byte) error
func (*QuerySigningInfosResponse) XXX_DiscardUnknown ¶
func (m *QuerySigningInfosResponse) XXX_DiscardUnknown()
func (*QuerySigningInfosResponse) XXX_Marshal ¶
func (m *QuerySigningInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySigningInfosResponse) XXX_Merge ¶
func (m *QuerySigningInfosResponse) XXX_Merge(src proto.Message)
func (*QuerySigningInfosResponse) XXX_Size ¶
func (m *QuerySigningInfosResponse) XXX_Size() int
func (*QuerySigningInfosResponse) XXX_Unmarshal ¶
func (m *QuerySigningInfosResponse) XXX_Unmarshal(b []byte) error
type SigningInfo ¶
type SigningInfo struct { // address is the validator address. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // validator_signing_info represents the signing info of this validator. ValidatorSigningInfo ValidatorSigningInfo `` /* 143-byte string literal not displayed */ }
SigningInfo stores validator signing info of corresponding address.
func (*SigningInfo) Descriptor ¶
func (*SigningInfo) Descriptor() ([]byte, []int)
func (*SigningInfo) GetAddress ¶
func (m *SigningInfo) GetAddress() string
func (*SigningInfo) GetValidatorSigningInfo ¶
func (m *SigningInfo) GetValidatorSigningInfo() ValidatorSigningInfo
func (*SigningInfo) Marshal ¶
func (m *SigningInfo) Marshal() (dAtA []byte, err error)
func (*SigningInfo) MarshalToSizedBuffer ¶
func (m *SigningInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SigningInfo) ProtoMessage ¶
func (*SigningInfo) ProtoMessage()
func (*SigningInfo) Reset ¶
func (m *SigningInfo) Reset()
func (*SigningInfo) Size ¶
func (m *SigningInfo) Size() (n int)
func (*SigningInfo) String ¶
func (m *SigningInfo) String() string
func (*SigningInfo) Unmarshal ¶
func (m *SigningInfo) Unmarshal(dAtA []byte) error
func (*SigningInfo) XXX_DiscardUnknown ¶
func (m *SigningInfo) XXX_DiscardUnknown()
func (*SigningInfo) XXX_Marshal ¶
func (m *SigningInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SigningInfo) XXX_Merge ¶
func (m *SigningInfo) XXX_Merge(src proto.Message)
func (*SigningInfo) XXX_Size ¶
func (m *SigningInfo) XXX_Size() int
func (*SigningInfo) XXX_Unmarshal ¶
func (m *SigningInfo) XXX_Unmarshal(b []byte) error
type StakingHooks ¶
type StakingHooks interface { AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) // Must be called when a validator is created AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) // Must be called when a validator is deleted AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) // Must be called when a validator is bonded }
StakingHooks event hooks for staking validator object (noalias)
type StakingKeeper ¶
type StakingKeeper interface { // iterate through validators by operator address, execute func for each validator IterateValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI // get a particular validator by operator address ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI // get a particular validator by consensus address // slash the validator and delegators of the validator, specifying offence height, offence power, and slash fraction Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) Jail(sdk.Context, sdk.ConsAddress) // jail a validator Unjail(sdk.Context, sdk.ConsAddress) // unjail a validator // Delegation allows for getting a particular delegation for a given validator // and delegator outside the scope of the staking module. Delegation(sdk.Context, sdk.AccAddress, sdk.ValAddress) stakingtypes.DelegationI // MaxValidators returns the maximum amount of bonded validators MaxValidators(sdk.Context) uint32 }
StakingKeeper expected staking keeper
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Unjail ¶
func (*UnimplementedMsgServer) Unjail(ctx context.Context, req *MsgUnjail) (*MsgUnjailResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) SigningInfo ¶
func (*UnimplementedQueryServer) SigningInfo(ctx context.Context, req *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error)
func (*UnimplementedQueryServer) SigningInfos ¶
func (*UnimplementedQueryServer) SigningInfos(ctx context.Context, req *QuerySigningInfosRequest) (*QuerySigningInfosResponse, error)
type ValidatorMissedBlocks ¶
type ValidatorMissedBlocks struct { // address is the validator address. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // missed_blocks is an array of missed blocks by the validator. MissedBlocks []MissedBlock `protobuf:"bytes,2,rep,name=missed_blocks,json=missedBlocks,proto3" json:"missed_blocks" yaml:"missed_blocks"` }
ValidatorMissedBlocks contains array of missed blocks of corresponding address.
func (*ValidatorMissedBlocks) Descriptor ¶
func (*ValidatorMissedBlocks) Descriptor() ([]byte, []int)
func (*ValidatorMissedBlocks) GetAddress ¶
func (m *ValidatorMissedBlocks) GetAddress() string
func (*ValidatorMissedBlocks) GetMissedBlocks ¶
func (m *ValidatorMissedBlocks) GetMissedBlocks() []MissedBlock
func (*ValidatorMissedBlocks) Marshal ¶
func (m *ValidatorMissedBlocks) Marshal() (dAtA []byte, err error)
func (*ValidatorMissedBlocks) MarshalTo ¶
func (m *ValidatorMissedBlocks) MarshalTo(dAtA []byte) (int, error)
func (*ValidatorMissedBlocks) MarshalToSizedBuffer ¶
func (m *ValidatorMissedBlocks) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorMissedBlocks) ProtoMessage ¶
func (*ValidatorMissedBlocks) ProtoMessage()
func (*ValidatorMissedBlocks) Reset ¶
func (m *ValidatorMissedBlocks) Reset()
func (*ValidatorMissedBlocks) Size ¶
func (m *ValidatorMissedBlocks) Size() (n int)
func (*ValidatorMissedBlocks) String ¶
func (m *ValidatorMissedBlocks) String() string
func (*ValidatorMissedBlocks) Unmarshal ¶
func (m *ValidatorMissedBlocks) Unmarshal(dAtA []byte) error
func (*ValidatorMissedBlocks) XXX_DiscardUnknown ¶
func (m *ValidatorMissedBlocks) XXX_DiscardUnknown()
func (*ValidatorMissedBlocks) XXX_Marshal ¶
func (m *ValidatorMissedBlocks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorMissedBlocks) XXX_Merge ¶
func (m *ValidatorMissedBlocks) XXX_Merge(src proto.Message)
func (*ValidatorMissedBlocks) XXX_Size ¶
func (m *ValidatorMissedBlocks) XXX_Size() int
func (*ValidatorMissedBlocks) XXX_Unmarshal ¶
func (m *ValidatorMissedBlocks) XXX_Unmarshal(b []byte) error
type ValidatorSigningInfo ¶
type ValidatorSigningInfo struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // Height at which validator was first a candidate OR was unjailed StartHeight int64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty" yaml:"start_height"` // Index which is incremented each time the validator was a bonded // in a block and may have signed a precommit or not. This in conjunction with the // `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. IndexOffset int64 `protobuf:"varint,3,opt,name=index_offset,json=indexOffset,proto3" json:"index_offset,omitempty" yaml:"index_offset"` // Timestamp until which the validator is jailed due to liveness downtime. JailedUntil time.Time `protobuf:"bytes,4,opt,name=jailed_until,json=jailedUntil,proto3,stdtime" json:"jailed_until" yaml:"jailed_until"` // Whether or not a validator has been tombstoned (killed out of validator set). It is set // once the validator commits an equivocation or for any other configured misbehiavor. Tombstoned bool `protobuf:"varint,5,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"` // A counter kept to avoid unnecessary array reads. // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. MissedBlocksCounter int64 `` /* 150-byte string literal not displayed */ }
ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity.
func NewValidatorSigningInfo ¶
func NewValidatorSigningInfo( condAddr sdk.ConsAddress, startHeight, indexOffset int64, jailedUntil time.Time, tombstoned bool, missedBlocksCounter int64, ) ValidatorSigningInfo
NewValidatorSigningInfo creates a new ValidatorSigningInfo instance
func UnmarshalValSigningInfo ¶
func UnmarshalValSigningInfo(cdc codec.Codec, value []byte) (signingInfo ValidatorSigningInfo, err error)
unmarshal a validator signing info from a store value
func (*ValidatorSigningInfo) Descriptor ¶
func (*ValidatorSigningInfo) Descriptor() ([]byte, []int)
func (*ValidatorSigningInfo) Equal ¶
func (this *ValidatorSigningInfo) Equal(that interface{}) bool
func (*ValidatorSigningInfo) GetAddress ¶
func (m *ValidatorSigningInfo) GetAddress() string
func (*ValidatorSigningInfo) GetIndexOffset ¶
func (m *ValidatorSigningInfo) GetIndexOffset() int64
func (*ValidatorSigningInfo) GetJailedUntil ¶
func (m *ValidatorSigningInfo) GetJailedUntil() time.Time
func (*ValidatorSigningInfo) GetMissedBlocksCounter ¶
func (m *ValidatorSigningInfo) GetMissedBlocksCounter() int64
func (*ValidatorSigningInfo) GetStartHeight ¶
func (m *ValidatorSigningInfo) GetStartHeight() int64
func (*ValidatorSigningInfo) GetTombstoned ¶
func (m *ValidatorSigningInfo) GetTombstoned() bool
func (*ValidatorSigningInfo) Marshal ¶
func (m *ValidatorSigningInfo) Marshal() (dAtA []byte, err error)
func (*ValidatorSigningInfo) MarshalTo ¶
func (m *ValidatorSigningInfo) MarshalTo(dAtA []byte) (int, error)
func (*ValidatorSigningInfo) MarshalToSizedBuffer ¶
func (m *ValidatorSigningInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorSigningInfo) ProtoMessage ¶
func (*ValidatorSigningInfo) ProtoMessage()
func (*ValidatorSigningInfo) Reset ¶
func (m *ValidatorSigningInfo) Reset()
func (*ValidatorSigningInfo) Size ¶
func (m *ValidatorSigningInfo) Size() (n int)
func (ValidatorSigningInfo) String ¶
func (i ValidatorSigningInfo) String() string
String implements the stringer interface for ValidatorSigningInfo
func (*ValidatorSigningInfo) Unmarshal ¶
func (m *ValidatorSigningInfo) Unmarshal(dAtA []byte) error
func (*ValidatorSigningInfo) XXX_DiscardUnknown ¶
func (m *ValidatorSigningInfo) XXX_DiscardUnknown()
func (*ValidatorSigningInfo) XXX_Marshal ¶
func (m *ValidatorSigningInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorSigningInfo) XXX_Merge ¶
func (m *ValidatorSigningInfo) XXX_Merge(src proto.Message)
func (*ValidatorSigningInfo) XXX_Size ¶
func (m *ValidatorSigningInfo) XXX_Size() int
func (*ValidatorSigningInfo) XXX_Unmarshal ¶
func (m *ValidatorSigningInfo) XXX_Unmarshal(b []byte) error