Documentation
¶
Index ¶
Constants ¶
View Source
const ( // default bond denomination DefaultBondDenom = "kratos/kts" // Delay, in blocks, between when validator updates are returned to the // consensus-engine and when they are applied. For example, if // ValidatorUpdateDelay is set to X, and if a validator set update is // returned with new validators at the end of block 10, then the new // validators are expected to sign blocks beginning at block 11+X. // // This value is constant as this should not change without a hard fork. // For Tendermint this should be set to 1 block, for more details see: // https://tendermint.com/docs/spec/abci/apps.html#endblock ValidatorUpdateDelay int64 = 1 )
staking constants
View Source
const ( Unbonded BondStatus = 1 Unbonding BondStatus = 2 Bonded BondStatus = 3 BondStatusUnbonded = "Unbonded" BondStatusUnbonding = "Unbonding" BondStatusBonded = "Bonded" )
staking constants
Variables ¶
View Source
var PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil))
PowerReduction is the amount of staking tokens required for 1 unit of consensus-engine power
Functions ¶
func TokensFromConsensusPower ¶
TokensFromConsensusPower - convert input power to tokens
func TokensToConsensusPower ¶
TokensToConsensusPower - convert input tokens to potential consensus-engine power
Types ¶
type BondStatus ¶
type BondStatus int32
BondStatus is the status of a validator
func (BondStatus) Equal ¶
func (b BondStatus) Equal(b2 BondStatus) bool
Equal compares two BondStatus instances
func (BondStatus) String ¶
func (b BondStatus) String() string
String implements the Stringer interface for BondStatus.
type DelegationI ¶
type DelegationI interface { // FIXME: delete Addr GetDelegatorAccountID() types.AccountID // delegator sdk.AccAddress for the bond GetValidatorAccountID() types.AccountID // validator operator address }
DelegationI delegation bond for a delegated proof of stake system
type ValidatorI ¶
type ValidatorI interface { IsJailed() bool // whether the validator is jailed GetMoniker() string // moniker of the validator GetStatus() BondStatus // status of the validator IsBonded() bool // check if has a bonded status IsUnbonded() bool // check if has status unbonded IsUnbonding() bool // check if has status unbonding GetOperator() sdk.ValAddress // operator address to receive/return validators coins GetOperatorAccountID() types.AccountID // operator account to receive/return validators coins GetConsPubKey() crypto.PubKey // validation consensus pubkey GetConsAddr() sdk.ConsAddress // validation consensus address GetTokens() sdk.Int // validation tokens GetBondedTokens() sdk.Int // validator bonded tokens GetConsensusPower() int64 // validation power in tendermint GetCommission() sdk.Dec // validator commission rate GetMinSelfDelegation() sdk.Int // validator minimum self delegation }
ValidatorI expected validator functions
Click to show internal directories.
Click to hide internal directories.