slashing

package
v0.0.0-...-f705c6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package slashing provides the ability to access the interface of the IRISHUB slashing module

In Proof-of-Stake blockchain, validators will get block provisions by staking their token. But if they failed to keep online, they will be punished by slashing a small portion of their staked tokens. The offline validators will be removed from the validator set and put into jail, which means their voting power is zero. During the jail period, these nodes are not even validator candidates. Once the jail period ends, they can send [[unjail]] transactions to free themselves and become validator candidates again.

[More Details](https://www.junjie-bianjie.org/docs/features/slashing.html)

As a quick start:

validators, err := sts.Staking().QueryValidators(1, 10)
require.NoError(sts.T(), err)
require.NotEmpty(sts.T(), validators)

signingInfo, err := sts.Slashing().QueryValidatorSigningInfo(validators[0].ConsensusPubkey)
require.NoError(sts.T(), err)
require.NotEmpty(sts.T(), signingInfo)

Index

Constants

View Source
const (
	ModuleName = "slashing"
)

Variables

This section is empty.

Functions

func Create

func Create(ac sdk.BaseClient) rpc.Slashing

Types

type MsgUnjail

type MsgUnjail struct {
	ValidatorAddr sdk.ValAddress `json:"address"` // address of the validator operator
}

func (MsgUnjail) GetSignBytes

func (msg MsgUnjail) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgUnjail) GetSigners

func (msg MsgUnjail) GetSigners() []sdk.AccAddress

func (MsgUnjail) Route

func (msg MsgUnjail) Route() string

nolint

func (MsgUnjail) Type

func (msg MsgUnjail) Type() string

func (MsgUnjail) ValidateBasic

func (msg MsgUnjail) ValidateBasic() error

quick validity check

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL