Versions in this module Expand all Collapse all v0 v0.23.1 Jul 27, 2018 Changes in this version + const MaxBondDenominatorPrecision + const MsgType + var MsgCdc *wire.Codec + func AssertInvariants(t *testing.T, msg string, pOrig Pool, cOrig []Validator, pMod Pool, ...) + func ErrBadDelegationAmount(codespace sdk.CodespaceType) sdk.Error + func ErrBadDelegatorAddr(codespace sdk.CodespaceType) sdk.Error + func ErrBadDenom(codespace sdk.CodespaceType) sdk.Error + func ErrBadRedelegationDst(codespace sdk.CodespaceType) sdk.Error + func ErrBadRemoveValidator(codespace sdk.CodespaceType) sdk.Error + func ErrBadSharesAmount(codespace sdk.CodespaceType) sdk.Error + func ErrBadSharesPercent(codespace sdk.CodespaceType) sdk.Error + func ErrBadSharesPrecision(codespace sdk.CodespaceType) sdk.Error + func ErrBothShareMsgsGiven(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionHuge(codespace sdk.CodespaceType) sdk.Error + func ErrCommissionNegative(codespace sdk.CodespaceType) sdk.Error + func ErrDelegationValidatorEmpty(codespace sdk.CodespaceType) sdk.Error + func ErrDescriptionLength(codespace sdk.CodespaceType, descriptor string, got, max int) sdk.Error + func ErrInsufficientShares(codespace sdk.CodespaceType) sdk.Error + func ErrMissingSignature(codespace sdk.CodespaceType) sdk.Error + func ErrNeitherShareMsgsGiven(codespace sdk.CodespaceType) sdk.Error + func ErrNilDelegatorAddr(codespace sdk.CodespaceType) sdk.Error + func ErrNilValidatorAddr(codespace sdk.CodespaceType) sdk.Error + func ErrNoDelegation(codespace sdk.CodespaceType) sdk.Error + func ErrNoDelegatorForAddress(codespace sdk.CodespaceType) sdk.Error + func ErrNoRedelegation(codespace sdk.CodespaceType) sdk.Error + func ErrNoUnbondingDelegation(codespace sdk.CodespaceType) sdk.Error + func ErrNoValidatorFound(codespace sdk.CodespaceType) sdk.Error + func ErrNotEnoughDelegationShares(codespace sdk.CodespaceType, shares string) sdk.Error + func ErrNotMature(codespace sdk.CodespaceType, operation, descriptor string, got, min int64) sdk.Error + func ErrTransitiveRedelegation(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorOwnerExists(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorPubKeyExists(codespace sdk.CodespaceType) sdk.Error + func ErrValidatorRevoked(codespace sdk.CodespaceType) sdk.Error + func MustMarshalDelegation(cdc *wire.Codec, delegation Delegation) []byte + func MustMarshalRED(cdc *wire.Codec, red Redelegation) []byte + func MustMarshalUBD(cdc *wire.Codec, ubd UnbondingDelegation) []byte + func MustMarshalValidator(cdc *wire.Codec, validator Validator) []byte + func OpAddTokens(r *rand.Rand, pool Pool, validator Validator) (Pool, Validator, sdk.Rat, string) + func OpBondOrUnbond(r *rand.Rand, pool Pool, validator Validator) (Pool, Validator, sdk.Rat, string) + func OpRemoveShares(r *rand.Rand, pool Pool, validator Validator) (Pool, Validator, sdk.Rat, string) + func RandomSetup(r *rand.Rand, numValidators int) (Pool, []Validator) + func RegisterWire(cdc *wire.Codec) + type BechValidator struct + BondHeight int64 + BondIntraTxCounter int16 + Commission sdk.Rat + CommissionChangeRate sdk.Rat + CommissionChangeToday sdk.Rat + CommissionMax sdk.Rat + DelegatorShares sdk.Rat + Description Description + LastBondedTokens sdk.Rat + Owner sdk.AccAddress + ProposerRewardPool sdk.Coins + PubKey string + Revoked bool + Status sdk.BondStatus + Tokens sdk.Rat + type CodeType = sdk.CodeType + const CodeInternal + const CodeInvalidDelegation + const CodeInvalidInput + const CodeInvalidValidator + const CodeUnauthorized + const CodeUnknownRequest + const CodeValidatorJailed + const DefaultCodespace + type Delegation struct + DelegatorAddr sdk.AccAddress + Height int64 + Shares sdk.Rat + ValidatorAddr sdk.AccAddress + func MustUnmarshalDelegation(cdc *wire.Codec, key, value []byte) Delegation + func UnmarshalDelegation(cdc *wire.Codec, key, value []byte) (delegation Delegation, err error) + func (d Delegation) Equal(d2 Delegation) bool + func (d Delegation) GetBondShares() sdk.Rat + func (d Delegation) GetDelegator() sdk.AccAddress + func (d Delegation) GetValidator() sdk.AccAddress + func (d Delegation) HumanReadableString() (string, error) + type Description struct + Details string + Identity string + Moniker string + Website string + func NewDescription(moniker, identity, website, details string) Description + func (d Description) EnsureLength() (Description, sdk.Error) + func (d Description) UpdateDescription(d2 Description) (Description, sdk.Error) + type GenesisState struct + Bonds []Delegation + Params Params + Pool Pool + Validators []Validator + func DefaultGenesisState() GenesisState + func NewGenesisState(pool Pool, params Params, validators []Validator, bonds []Delegation) GenesisState + type MsgBeginRedelegate struct + DelegatorAddr sdk.AccAddress + SharesAmount sdk.Rat + ValidatorDstAddr sdk.AccAddress + ValidatorSrcAddr sdk.AccAddress + func NewMsgBeginRedelegate(delegatorAddr, validatorSrcAddr, validatorDstAddr sdk.AccAddress, ...) MsgBeginRedelegate + func (msg MsgBeginRedelegate) GetSignBytes() []byte + func (msg MsgBeginRedelegate) GetSigners() []sdk.AccAddress + func (msg MsgBeginRedelegate) Type() string + func (msg MsgBeginRedelegate) ValidateBasic() sdk.Error + type MsgBeginUnbonding struct + DelegatorAddr sdk.AccAddress + SharesAmount sdk.Rat + ValidatorAddr sdk.AccAddress + func NewMsgBeginUnbonding(delegatorAddr, validatorAddr sdk.AccAddress, sharesAmount sdk.Rat) MsgBeginUnbonding + func (msg MsgBeginUnbonding) GetSignBytes() []byte + func (msg MsgBeginUnbonding) GetSigners() []sdk.AccAddress + func (msg MsgBeginUnbonding) Type() string + func (msg MsgBeginUnbonding) ValidateBasic() sdk.Error + type MsgCompleteRedelegate struct + DelegatorAddr sdk.AccAddress + ValidatorDstAddr sdk.AccAddress + ValidatorSrcAddr sdk.AccAddress + func NewMsgCompleteRedelegate(delegatorAddr, validatorSrcAddr, validatorDstAddr sdk.AccAddress) MsgCompleteRedelegate + func (msg MsgCompleteRedelegate) GetSignBytes() []byte + func (msg MsgCompleteRedelegate) GetSigners() []sdk.AccAddress + func (msg MsgCompleteRedelegate) Type() string + func (msg MsgCompleteRedelegate) ValidateBasic() sdk.Error + type MsgCompleteUnbonding struct + DelegatorAddr sdk.AccAddress + ValidatorAddr sdk.AccAddress + func NewMsgCompleteUnbonding(delegatorAddr, validatorAddr sdk.AccAddress) MsgCompleteUnbonding + func (msg MsgCompleteUnbonding) GetSignBytes() []byte + func (msg MsgCompleteUnbonding) GetSigners() []sdk.AccAddress + func (msg MsgCompleteUnbonding) Type() string + func (msg MsgCompleteUnbonding) ValidateBasic() sdk.Error + type MsgCreateValidator struct + Delegation sdk.Coin + DelegatorAddr sdk.AccAddress + PubKey crypto.PubKey + ValidatorAddr sdk.AccAddress + func NewMsgCreateValidator(validatorAddr sdk.AccAddress, pubkey crypto.PubKey, selfDelegation sdk.Coin, ...) MsgCreateValidator + func NewMsgCreateValidatorOnBehalfOf(delegatorAddr, validatorAddr sdk.AccAddress, pubkey crypto.PubKey, ...) MsgCreateValidator + func (msg MsgCreateValidator) GetSignBytes() []byte + func (msg MsgCreateValidator) GetSigners() []sdk.AccAddress + func (msg MsgCreateValidator) Type() string + func (msg MsgCreateValidator) ValidateBasic() sdk.Error + type MsgDelegate struct + Delegation sdk.Coin + DelegatorAddr sdk.AccAddress + ValidatorAddr sdk.AccAddress + func NewMsgDelegate(delegatorAddr, validatorAddr sdk.AccAddress, delegation sdk.Coin) MsgDelegate + func (msg MsgDelegate) GetSignBytes() []byte + func (msg MsgDelegate) GetSigners() []sdk.AccAddress + func (msg MsgDelegate) Type() string + func (msg MsgDelegate) ValidateBasic() sdk.Error + type MsgEditValidator struct + ValidatorAddr sdk.AccAddress + func NewMsgEditValidator(validatorAddr sdk.AccAddress, description Description) MsgEditValidator + func (msg MsgEditValidator) GetSignBytes() []byte + func (msg MsgEditValidator) GetSigners() []sdk.AccAddress + func (msg MsgEditValidator) Type() string + func (msg MsgEditValidator) ValidateBasic() sdk.Error + type Operation func(r *rand.Rand, pool Pool, c Validator) (Pool, Validator, sdk.Rat, string) + func RandomOperation(r *rand.Rand) Operation + type Params struct + BondDenom string + GoalBonded sdk.Rat + InflationMax sdk.Rat + InflationMin sdk.Rat + InflationRateChange sdk.Rat + MaxValidators uint16 + UnbondingTime int64 + func DefaultParams() Params + func (p Params) Equal(p2 Params) bool + type Pool struct + BondedTokens sdk.Rat + DateLastCommissionReset int64 + Inflation sdk.Rat + InflationLastTime int64 + LooseTokens sdk.Rat + PrevBondedShares sdk.Rat + func InitialPool() Pool + func (p Pool) BondedRatio() sdk.Rat + func (p Pool) Equal(p2 Pool) bool + func (p Pool) NextInflation(params Params) (inflation sdk.Rat) + func (p Pool) ProcessProvisions(params Params) Pool + func (p Pool) TokenSupply() sdk.Rat + type Redelegation struct + Balance sdk.Coin + CreationHeight int64 + DelegatorAddr sdk.AccAddress + InitialBalance sdk.Coin + MinTime int64 + SharesDst sdk.Rat + SharesSrc sdk.Rat + ValidatorDstAddr sdk.AccAddress + ValidatorSrcAddr sdk.AccAddress + func MustUnmarshalRED(cdc *wire.Codec, key, value []byte) Redelegation + func UnmarshalRED(cdc *wire.Codec, key, value []byte) (red Redelegation, err error) + func (d Redelegation) Equal(d2 Redelegation) bool + func (d Redelegation) HumanReadableString() (string, error) + type UnbondingDelegation struct + Balance sdk.Coin + CreationHeight int64 + DelegatorAddr sdk.AccAddress + InitialBalance sdk.Coin + MinTime int64 + ValidatorAddr sdk.AccAddress + func MustUnmarshalUBD(cdc *wire.Codec, key, value []byte) UnbondingDelegation + func UnmarshalUBD(cdc *wire.Codec, key, value []byte) (ubd UnbondingDelegation, err error) + func (d UnbondingDelegation) Equal(d2 UnbondingDelegation) bool + func (d UnbondingDelegation) HumanReadableString() (string, error) + type Validator struct + BondHeight int64 + BondIntraTxCounter int16 + Commission sdk.Rat + CommissionChangeRate sdk.Rat + CommissionChangeToday sdk.Rat + CommissionMax sdk.Rat + DelegatorShares sdk.Rat + Description Description + LastBondedTokens sdk.Rat + Owner sdk.AccAddress + ProposerRewardPool sdk.Coins + PubKey crypto.PubKey + Revoked bool + Status sdk.BondStatus + Tokens sdk.Rat + func MustUnmarshalValidator(cdc *wire.Codec, ownerAddr, value []byte) Validator + func NewValidator(owner sdk.AccAddress, pubKey crypto.PubKey, description Description) Validator + func UnmarshalValidator(cdc *wire.Codec, ownerAddr, value []byte) (validator Validator, err error) + func (v Validator) ABCIValidator() abci.Validator + func (v Validator) ABCIValidatorZero() abci.Validator + func (v Validator) AddTokensFromDel(pool Pool, amount int64) (Validator, Pool, sdk.Rat) + func (v Validator) Bech32Validator() (BechValidator, error) + func (v Validator) BondedTokens() sdk.Rat + func (v Validator) DelegatorShareExRate() sdk.Rat + func (v Validator) Equal(c2 Validator) bool + func (v Validator) GetBondHeight() int64 + func (v Validator) GetDelegatorShares() sdk.Rat + func (v Validator) GetMoniker() string + func (v Validator) GetOwner() sdk.AccAddress + func (v Validator) GetPower() sdk.Rat + func (v Validator) GetPubKey() crypto.PubKey + func (v Validator) GetRevoked() bool + func (v Validator) GetStatus() sdk.BondStatus + func (v Validator) HumanReadableString() (string, error) + func (v Validator) RemoveDelShares(pool Pool, delShares sdk.Rat) (Validator, Pool, sdk.Rat) + func (v Validator) RemoveTokens(pool Pool, tokens sdk.Rat) (Validator, Pool) + func (v Validator) UpdateStatus(pool Pool, NewStatus sdk.BondStatus) (Validator, Pool)