Documentation ¶
Overview ¶
NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov controlled execution of MsgUpdateParams messages. These types remains solely for migration purposes and will be removed in a future release.
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func AddrPubkeyRelationKey(addr []byte) []byte
- func ParamKeyTable() paramtypes.KeyTabledeprecated
- 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 MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (this *MsgUpdateParams) Equal(that interface{}) bool
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- func (msg MsgUpdateParams) GetSignBytes() []byte
- func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateParams) ValidateBasic() error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (this *MsgUpdateParamsResponse) Equal(that interface{}) bool
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) 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.ParamSetPairsdeprecated
- 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 (p Params) Validate() 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" AttributeKeyBurnedCoins = "burned_coins" AttributeValueUnspecified = "unspecified" AttributeValueDoubleSign = "double_sign" AttributeValueMissingSignature = "missing_signature" )
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 )
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 ( ParamsKey = []byte{0x00} // Prefix for params key ValidatorSigningInfoKeyPrefix = []byte{0x01} // Prefix for signing info ValidatorMissedBlockBitArrayKeyPrefix = []byte{0x02} // Prefix for missed block bit array AddrPubkeyRelationKeyPrefix = []byte{0x03} // Prefix for address-pubkey relation )
var ( DefaultMinSignedPerWindow = sdk.NewDecWithPrec(5, 1) DefaultSlashFractionDoubleSign = math.LegacyNewDec(1).Quo(math.LegacyNewDec(20)) DefaultSlashFractionDowntime = math.LegacyNewDec(1).Quo(math.LegacyNewDec(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 = codec.NewAminoCodec(amino)
)
Functions ¶
func AddrPubkeyRelationKey ¶
AddrPubkeyRelationKey gets pubkey relation key used to get the pubkey from the address
func ParamKeyTable
deprecated
func ParamKeyTable() paramtypes.KeyTable
Deprecated: ParamKeyTable for slashing module
func RegisterInterfaces ¶ added in v0.40.0
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the interfaces types with the Interface Registry.
func RegisterLegacyAminoCodec ¶ added in v0.40.0
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers concrete types on LegacyAmino codec
func RegisterMsgServer ¶ added in v0.40.0
func RegisterQueryHandler ¶ added in v0.40.0
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶ added in v0.40.0
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 ¶ added in v0.40.0
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 ¶ added in v0.40.0
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 ¶ added in v0.40.0
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 parameters of the module. 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"` // 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"` }
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 ¶ added in v0.40.0
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetMissedBlocks ¶ added in v0.40.0
func (m *GenesisState) GetMissedBlocks() []ValidatorMissedBlocks
func (*GenesisState) GetParams ¶ added in v0.40.0
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetSigningInfos ¶ added in v0.40.0
func (m *GenesisState) GetSigningInfos() []SigningInfo
func (*GenesisState) Marshal ¶ added in v0.40.0
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalTo ¶ added in v0.40.0
func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
func (*GenesisState) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶ added in v0.40.0
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶ added in v0.40.0
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶ added in v0.40.0
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶ added in v0.40.0
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶ added in v0.40.0
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶ added in v0.40.0
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶ added in v0.40.0
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶ added in v0.40.0
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶ added in v0.40.0
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 ¶ added in v0.40.0
func (*MissedBlock) Descriptor() ([]byte, []int)
func (*MissedBlock) GetIndex ¶ added in v0.40.0
func (m *MissedBlock) GetIndex() int64
func (*MissedBlock) GetMissed ¶ added in v0.40.0
func (m *MissedBlock) GetMissed() bool
func (*MissedBlock) Marshal ¶ added in v0.40.0
func (m *MissedBlock) Marshal() (dAtA []byte, err error)
func (*MissedBlock) MarshalTo ¶ added in v0.40.0
func (m *MissedBlock) MarshalTo(dAtA []byte) (int, error)
func (*MissedBlock) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *MissedBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MissedBlock) ProtoMessage ¶ added in v0.40.0
func (*MissedBlock) ProtoMessage()
func (*MissedBlock) Reset ¶ added in v0.40.0
func (m *MissedBlock) Reset()
func (*MissedBlock) Size ¶ added in v0.40.0
func (m *MissedBlock) Size() (n int)
func (*MissedBlock) String ¶ added in v0.40.0
func (m *MissedBlock) String() string
func (*MissedBlock) Unmarshal ¶ added in v0.40.0
func (m *MissedBlock) Unmarshal(dAtA []byte) error
func (*MissedBlock) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *MissedBlock) XXX_DiscardUnknown()
func (*MissedBlock) XXX_Marshal ¶ added in v0.40.0
func (m *MissedBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MissedBlock) XXX_Merge ¶ added in v0.40.0
func (m *MissedBlock) XXX_Merge(src proto.Message)
func (*MissedBlock) XXX_Size ¶ added in v0.40.0
func (m *MissedBlock) XXX_Size() int
func (*MissedBlock) XXX_Unmarshal ¶ added in v0.40.0
func (m *MissedBlock) XXX_Unmarshal(b []byte) error
type MsgClient ¶ added in v0.40.0
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) // UpdateParams defines a governance operation for updating the x/slashing module // parameters. The authority defaults to the x/gov module account. // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 ¶ added in v0.40.0
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶ added in v0.40.0
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) // UpdateParams defines a governance operation for updating the x/slashing module // parameters. The authority defaults to the x/gov module account. // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, 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"`
}
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
GetSigners returns the expected signers for MsgUnjail.
func (*MsgUnjail) MarshalToSizedBuffer ¶
func (*MsgUnjail) ProtoMessage ¶
func (*MsgUnjail) ProtoMessage()
func (MsgUnjail) ValidateBasic ¶
ValidateBasic does a sanity check on the provided message.
func (*MsgUnjail) XXX_DiscardUnknown ¶
func (m *MsgUnjail) XXX_DiscardUnknown()
func (*MsgUnjail) XXX_Marshal ¶
func (*MsgUnjail) XXX_Unmarshal ¶
type MsgUnjailResponse ¶ added in v0.40.0
type MsgUnjailResponse struct { }
MsgUnjailResponse defines the Msg/Unjail response type
func (*MsgUnjailResponse) Descriptor ¶ added in v0.40.0
func (*MsgUnjailResponse) Descriptor() ([]byte, []int)
func (*MsgUnjailResponse) Equal ¶ added in v0.40.0
func (this *MsgUnjailResponse) Equal(that interface{}) bool
func (*MsgUnjailResponse) Marshal ¶ added in v0.40.0
func (m *MsgUnjailResponse) Marshal() (dAtA []byte, err error)
func (*MsgUnjailResponse) MarshalTo ¶ added in v0.40.0
func (m *MsgUnjailResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUnjailResponse) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *MsgUnjailResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUnjailResponse) ProtoMessage ¶ added in v0.40.0
func (*MsgUnjailResponse) ProtoMessage()
func (*MsgUnjailResponse) Reset ¶ added in v0.40.0
func (m *MsgUnjailResponse) Reset()
func (*MsgUnjailResponse) Size ¶ added in v0.40.0
func (m *MsgUnjailResponse) Size() (n int)
func (*MsgUnjailResponse) String ¶ added in v0.40.0
func (m *MsgUnjailResponse) String() string
func (*MsgUnjailResponse) Unmarshal ¶ added in v0.40.0
func (m *MsgUnjailResponse) Unmarshal(dAtA []byte) error
func (*MsgUnjailResponse) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *MsgUnjailResponse) XXX_DiscardUnknown()
func (*MsgUnjailResponse) XXX_Marshal ¶ added in v0.40.0
func (m *MsgUnjailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUnjailResponse) XXX_Merge ¶ added in v0.40.0
func (m *MsgUnjailResponse) XXX_Merge(src proto.Message)
func (*MsgUnjailResponse) XXX_Size ¶ added in v0.40.0
func (m *MsgUnjailResponse) XXX_Size() int
func (*MsgUnjailResponse) XXX_Unmarshal ¶ added in v0.40.0
func (m *MsgUnjailResponse) XXX_Unmarshal(b []byte) error
type MsgUpdateParams ¶ added in v0.47.0
type MsgUpdateParams struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params defines the x/slashing parameters to update. // // NOTE: All parameters must be supplied. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgUpdateParams is the Msg/UpdateParams request type.
Since: cosmos-sdk 0.47
func (*MsgUpdateParams) Descriptor ¶ added in v0.47.0
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) Equal ¶ added in v0.47.0
func (this *MsgUpdateParams) Equal(that interface{}) bool
func (*MsgUpdateParams) GetAuthority ¶ added in v0.47.0
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶ added in v0.47.0
func (m *MsgUpdateParams) GetParams() Params
func (MsgUpdateParams) GetSignBytes ¶ added in v0.47.0
func (msg MsgUpdateParams) GetSignBytes() []byte
GetSignBytes implements the LegacyMsg interface.
func (*MsgUpdateParams) GetSigners ¶ added in v0.47.0
func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress
GetSigners returns the expected signers for a MsgUpdateParams message.
func (*MsgUpdateParams) Marshal ¶ added in v0.47.0
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalTo ¶ added in v0.47.0
func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶ added in v0.47.0
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶ added in v0.47.0
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶ added in v0.47.0
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶ added in v0.47.0
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶ added in v0.47.0
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶ added in v0.47.0
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) ValidateBasic ¶ added in v0.47.0
func (msg *MsgUpdateParams) ValidateBasic() error
ValidateBasic does a sanity check on the provided data.
func (*MsgUpdateParams) XXX_DiscardUnknown ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶ added in v0.47.0
type MsgUpdateParamsResponse struct { }
MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.
Since: cosmos-sdk 0.47
func (*MsgUpdateParamsResponse) Descriptor ¶ added in v0.47.0
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Equal ¶ added in v0.47.0
func (this *MsgUpdateParamsResponse) Equal(that interface{}) bool
func (*MsgUpdateParamsResponse) Marshal ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶ added in v0.47.0
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) 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 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"` MinSignedPerWindow github_com_cosmos_cosmos_sdk_types.Dec `` /* 159-byte string literal not displayed */ DowntimeJailDuration time.Duration `protobuf:"bytes,3,opt,name=downtime_jail_duration,json=downtimeJailDuration,proto3,stdduration" json:"downtime_jail_duration"` SlashFractionDoubleSign github_com_cosmos_cosmos_sdk_types.Dec `` /* 174-byte string literal not displayed */ SlashFractionDowntime github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-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 ¶ added in v0.40.0
func (*Params) GetDowntimeJailDuration ¶ added in v0.40.0
func (*Params) GetSignedBlocksWindow ¶ added in v0.40.0
func (*Params) MarshalToSizedBuffer ¶ added in v0.40.0
func (*Params) ParamSetPairs
deprecated
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
Deprecated: ParamSetPairs implements params.ParamSet
func (*Params) ProtoMessage ¶ added in v0.40.0
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶ added in v0.40.0
func (*Params) XXX_Unmarshal ¶ added in v0.40.0
type QueryClient ¶ added in v0.40.0
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 ¶ added in v0.40.0
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶ added in v0.40.0
type QueryParamsRequest struct { }
QueryParamsRequest is the request type for the Query/Params RPC method
func (*QueryParamsRequest) Descriptor ¶ added in v0.40.0
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶ added in v0.40.0
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶ added in v0.40.0
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶ added in v0.40.0
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶ added in v0.40.0
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶ added in v0.40.0
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶ added in v0.40.0
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶ added in v0.40.0
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶ added in v0.40.0
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶ added in v0.40.0
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶ added in v0.40.0
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶ added in v0.40.0
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶ added in v0.40.0
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 ¶ added in v0.40.0
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶ added in v0.40.0
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶ added in v0.40.0
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶ added in v0.40.0
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶ added in v0.40.0
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶ added in v0.40.0
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶ added in v0.40.0
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶ added in v0.40.0
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶ added in v0.40.0
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶ added in v0.40.0
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶ added in v0.40.0
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶ added in v0.40.0
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶ added in v0.40.0
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶ added in v0.40.0
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 ¶ added in v0.40.0
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 ¶ added in v0.40.0
func (*QuerySigningInfoRequest) Descriptor() ([]byte, []int)
func (*QuerySigningInfoRequest) GetConsAddress ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) GetConsAddress() string
func (*QuerySigningInfoRequest) Marshal ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) Marshal() (dAtA []byte, err error)
func (*QuerySigningInfoRequest) MarshalTo ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) MarshalTo(dAtA []byte) (int, error)
func (*QuerySigningInfoRequest) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySigningInfoRequest) ProtoMessage ¶ added in v0.40.0
func (*QuerySigningInfoRequest) ProtoMessage()
func (*QuerySigningInfoRequest) Reset ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) Reset()
func (*QuerySigningInfoRequest) Size ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) Size() (n int)
func (*QuerySigningInfoRequest) String ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) String() string
func (*QuerySigningInfoRequest) Unmarshal ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) Unmarshal(dAtA []byte) error
func (*QuerySigningInfoRequest) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) XXX_DiscardUnknown()
func (*QuerySigningInfoRequest) XXX_Marshal ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySigningInfoRequest) XXX_Merge ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) XXX_Merge(src proto.Message)
func (*QuerySigningInfoRequest) XXX_Size ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) XXX_Size() int
func (*QuerySigningInfoRequest) XXX_Unmarshal ¶ added in v0.40.0
func (m *QuerySigningInfoRequest) XXX_Unmarshal(b []byte) error
type QuerySigningInfoResponse ¶ added in v0.40.0
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 ¶ added in v0.40.0
func (*QuerySigningInfoResponse) Descriptor() ([]byte, []int)
func (*QuerySigningInfoResponse) GetValSigningInfo ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) GetValSigningInfo() ValidatorSigningInfo
func (*QuerySigningInfoResponse) Marshal ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) Marshal() (dAtA []byte, err error)
func (*QuerySigningInfoResponse) MarshalTo ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) MarshalTo(dAtA []byte) (int, error)
func (*QuerySigningInfoResponse) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySigningInfoResponse) ProtoMessage ¶ added in v0.40.0
func (*QuerySigningInfoResponse) ProtoMessage()
func (*QuerySigningInfoResponse) Reset ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) Reset()
func (*QuerySigningInfoResponse) Size ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) Size() (n int)
func (*QuerySigningInfoResponse) String ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) String() string
func (*QuerySigningInfoResponse) Unmarshal ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) Unmarshal(dAtA []byte) error
func (*QuerySigningInfoResponse) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) XXX_DiscardUnknown()
func (*QuerySigningInfoResponse) XXX_Marshal ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySigningInfoResponse) XXX_Merge ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) XXX_Merge(src proto.Message)
func (*QuerySigningInfoResponse) XXX_Size ¶ added in v0.40.0
func (m *QuerySigningInfoResponse) XXX_Size() int
func (*QuerySigningInfoResponse) XXX_Unmarshal ¶ added in v0.40.0
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 ¶ added in v0.40.0
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 ¶ added in v0.40.0
func (*QuerySigningInfosRequest) Descriptor() ([]byte, []int)
func (*QuerySigningInfosRequest) GetPagination ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) GetPagination() *query.PageRequest
func (*QuerySigningInfosRequest) Marshal ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) Marshal() (dAtA []byte, err error)
func (*QuerySigningInfosRequest) MarshalTo ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) MarshalTo(dAtA []byte) (int, error)
func (*QuerySigningInfosRequest) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySigningInfosRequest) ProtoMessage ¶ added in v0.40.0
func (*QuerySigningInfosRequest) ProtoMessage()
func (*QuerySigningInfosRequest) Reset ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) Reset()
func (*QuerySigningInfosRequest) Size ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) Size() (n int)
func (*QuerySigningInfosRequest) String ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) String() string
func (*QuerySigningInfosRequest) Unmarshal ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) Unmarshal(dAtA []byte) error
func (*QuerySigningInfosRequest) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) XXX_DiscardUnknown()
func (*QuerySigningInfosRequest) XXX_Marshal ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySigningInfosRequest) XXX_Merge ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) XXX_Merge(src proto.Message)
func (*QuerySigningInfosRequest) XXX_Size ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) XXX_Size() int
func (*QuerySigningInfosRequest) XXX_Unmarshal ¶ added in v0.40.0
func (m *QuerySigningInfosRequest) XXX_Unmarshal(b []byte) error
type QuerySigningInfosResponse ¶ added in v0.40.0
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 ¶ added in v0.40.0
func (*QuerySigningInfosResponse) Descriptor() ([]byte, []int)
func (*QuerySigningInfosResponse) GetInfo ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) GetInfo() []ValidatorSigningInfo
func (*QuerySigningInfosResponse) GetPagination ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) GetPagination() *query.PageResponse
func (*QuerySigningInfosResponse) Marshal ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) Marshal() (dAtA []byte, err error)
func (*QuerySigningInfosResponse) MarshalTo ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) MarshalTo(dAtA []byte) (int, error)
func (*QuerySigningInfosResponse) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySigningInfosResponse) ProtoMessage ¶ added in v0.40.0
func (*QuerySigningInfosResponse) ProtoMessage()
func (*QuerySigningInfosResponse) Reset ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) Reset()
func (*QuerySigningInfosResponse) Size ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) Size() (n int)
func (*QuerySigningInfosResponse) String ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) String() string
func (*QuerySigningInfosResponse) Unmarshal ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) Unmarshal(dAtA []byte) error
func (*QuerySigningInfosResponse) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) XXX_DiscardUnknown()
func (*QuerySigningInfosResponse) XXX_Marshal ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySigningInfosResponse) XXX_Merge ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) XXX_Merge(src proto.Message)
func (*QuerySigningInfosResponse) XXX_Size ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) XXX_Size() int
func (*QuerySigningInfosResponse) XXX_Unmarshal ¶ added in v0.40.0
func (m *QuerySigningInfosResponse) XXX_Unmarshal(b []byte) error
type SigningInfo ¶ added in v0.40.0
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 `protobuf:"bytes,2,opt,name=validator_signing_info,json=validatorSigningInfo,proto3" json:"validator_signing_info"` }
SigningInfo stores validator signing info of corresponding address.
func (*SigningInfo) Descriptor ¶ added in v0.40.0
func (*SigningInfo) Descriptor() ([]byte, []int)
func (*SigningInfo) GetAddress ¶ added in v0.40.0
func (m *SigningInfo) GetAddress() string
func (*SigningInfo) GetValidatorSigningInfo ¶ added in v0.40.0
func (m *SigningInfo) GetValidatorSigningInfo() ValidatorSigningInfo
func (*SigningInfo) Marshal ¶ added in v0.40.0
func (m *SigningInfo) Marshal() (dAtA []byte, err error)
func (*SigningInfo) MarshalTo ¶ added in v0.40.0
func (m *SigningInfo) MarshalTo(dAtA []byte) (int, error)
func (*SigningInfo) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *SigningInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SigningInfo) ProtoMessage ¶ added in v0.40.0
func (*SigningInfo) ProtoMessage()
func (*SigningInfo) Reset ¶ added in v0.40.0
func (m *SigningInfo) Reset()
func (*SigningInfo) Size ¶ added in v0.40.0
func (m *SigningInfo) Size() (n int)
func (*SigningInfo) String ¶ added in v0.40.0
func (m *SigningInfo) String() string
func (*SigningInfo) Unmarshal ¶ added in v0.40.0
func (m *SigningInfo) Unmarshal(dAtA []byte) error
func (*SigningInfo) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *SigningInfo) XXX_DiscardUnknown()
func (*SigningInfo) XXX_Marshal ¶ added in v0.40.0
func (m *SigningInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SigningInfo) XXX_Merge ¶ added in v0.40.0
func (m *SigningInfo) XXX_Merge(src proto.Message)
func (*SigningInfo) XXX_Size ¶ added in v0.40.0
func (m *SigningInfo) XXX_Size() int
func (*SigningInfo) XXX_Unmarshal ¶ added in v0.40.0
func (m *SigningInfo) XXX_Unmarshal(b []byte) error
type StakingHooks ¶
type StakingHooks interface { AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error // Must be called when a validator is created BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error // Must be called when a validator's state changes AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is deleted AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is bonded AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator begins unbonding BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is created BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation is removed AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error }
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) math.Int SlashWithInfractionReason(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec, stakingtypes.Infraction) math.Int 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 GetAllValidators(ctx sdk.Context) (validators []stakingtypes.Validator) // MaxValidators returns the maximum amount of bonded validators MaxValidators(sdk.Context) uint32 // IsValidatorJailed returns if the validator is jailed. IsValidatorJailed(ctx sdk.Context, addr sdk.ConsAddress) bool }
StakingKeeper expected staking keeper
type UnimplementedMsgServer ¶ added in v0.40.0
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Unjail ¶ added in v0.40.0
func (*UnimplementedMsgServer) Unjail(ctx context.Context, req *MsgUnjail) (*MsgUnjailResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶ added in v0.47.0
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶ added in v0.40.0
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶ added in v0.40.0
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) SigningInfo ¶ added in v0.40.0
func (*UnimplementedQueryServer) SigningInfo(ctx context.Context, req *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error)
func (*UnimplementedQueryServer) SigningInfos ¶ added in v0.40.0
func (*UnimplementedQueryServer) SigningInfos(ctx context.Context, req *QuerySigningInfosRequest) (*QuerySigningInfosResponse, error)
type ValidatorMissedBlocks ¶ added in v0.40.0
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"` }
ValidatorMissedBlocks contains array of missed blocks of corresponding address.
func (*ValidatorMissedBlocks) Descriptor ¶ added in v0.40.0
func (*ValidatorMissedBlocks) Descriptor() ([]byte, []int)
func (*ValidatorMissedBlocks) GetAddress ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) GetAddress() string
func (*ValidatorMissedBlocks) GetMissedBlocks ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) GetMissedBlocks() []MissedBlock
func (*ValidatorMissedBlocks) Marshal ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) Marshal() (dAtA []byte, err error)
func (*ValidatorMissedBlocks) MarshalTo ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) MarshalTo(dAtA []byte) (int, error)
func (*ValidatorMissedBlocks) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorMissedBlocks) ProtoMessage ¶ added in v0.40.0
func (*ValidatorMissedBlocks) ProtoMessage()
func (*ValidatorMissedBlocks) Reset ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) Reset()
func (*ValidatorMissedBlocks) Size ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) Size() (n int)
func (*ValidatorMissedBlocks) String ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) String() string
func (*ValidatorMissedBlocks) Unmarshal ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) Unmarshal(dAtA []byte) error
func (*ValidatorMissedBlocks) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) XXX_DiscardUnknown()
func (*ValidatorMissedBlocks) XXX_Marshal ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorMissedBlocks) XXX_Merge ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) XXX_Merge(src proto.Message)
func (*ValidatorMissedBlocks) XXX_Size ¶ added in v0.40.0
func (m *ValidatorMissedBlocks) XXX_Size() int
func (*ValidatorMissedBlocks) XXX_Unmarshal ¶ added in v0.40.0
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"` // 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"` // 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"` // 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 `protobuf:"varint,6,opt,name=missed_blocks_counter,json=missedBlocksCounter,proto3" json:"missed_blocks_counter,omitempty"` }
ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity.
func NewValidatorSigningInfo ¶
func NewValidatorSigningInfo( consAddr 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 UnmarshalValSigningInfo unmarshals 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