staking

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	QueryValidators                    = querier.QueryValidators
	QueryValidator                     = querier.QueryValidator
	QueryValidatorDelegations          = querier.QueryValidatorDelegations
	QueryValidatorRedelegations        = querier.QueryValidatorRedelegations
	QueryValidatorUnbondingDelegations = querier.QueryValidatorUnbondingDelegations
	QueryDelegation                    = querier.QueryDelegation
	QueryUnbondingDelegation           = querier.QueryUnbondingDelegation
	QueryDelegatorDelegations          = querier.QueryDelegatorDelegations
	QueryDelegatorUnbondingDelegations = querier.QueryDelegatorUnbondingDelegations
	QueryRedelegations                 = querier.QueryRedelegations
	QueryDelegatorValidators           = querier.QueryDelegatorValidators
	QueryDelegatorValidator            = querier.QueryDelegatorValidator
	QueryPool                          = querier.QueryPool
	QueryParameters                    = querier.QueryParameters
)
View Source
const (
	StoreKey              = types.StoreKey
	TStoreKey             = types.TStoreKey
	QuerierRoute          = types.QuerierRoute
	RouterKey             = types.RouterKey
	DefaultCodespace      = types.DefaultCodespace
	CodeInvalidValidator  = types.CodeInvalidValidator
	CodeInvalidDelegation = types.CodeInvalidDelegation
	CodeInvalidInput      = types.CodeInvalidInput
	CodeValidatorJailed   = types.CodeValidatorJailed
	CodeUnauthorized      = types.CodeUnauthorized
	CodeInternal          = types.CodeInternal
	CodeUnknownRequest    = types.CodeUnknownRequest
)

Variables

View Source
var (
	NewKeeper = keeper.NewKeeper

	GetValidatorKey              = keeper.GetValidatorKey
	GetValidatorByConsAddrKey    = keeper.GetValidatorByConsAddrKey
	GetValidatorsByPowerIndexKey = keeper.GetValidatorsByPowerIndexKey
	GetDelegationKey             = keeper.GetDelegationKey
	GetDelegationsKey            = keeper.GetDelegationsKey
	PoolKey                      = keeper.PoolKey
	LastValidatorPowerKey        = keeper.LastValidatorPowerKey
	LastTotalPowerKey            = keeper.LastTotalPowerKey
	ValidatorsKey                = keeper.ValidatorsKey
	ValidatorsByConsAddrKey      = keeper.ValidatorsByConsAddrKey
	ValidatorsByPowerIndexKey    = keeper.ValidatorsByPowerIndexKey
	DelegationKey                = keeper.DelegationKey
	GetUBDKey                    = keeper.GetUBDKey
	GetUBDByValIndexKey          = keeper.GetUBDByValIndexKey
	GetUBDsKey                   = keeper.GetUBDsKey
	GetUBDsByValIndexKey         = keeper.GetUBDsByValIndexKey
	GetREDKey                    = keeper.GetREDKey
	GetREDByValSrcIndexKey       = keeper.GetREDByValSrcIndexKey
	GetREDByValDstIndexKey       = keeper.GetREDByValDstIndexKey
	GetREDsKey                   = keeper.GetREDsKey
	GetREDsFromValSrcIndexKey    = keeper.GetREDsFromValSrcIndexKey
	GetREDsToValDstIndexKey      = keeper.GetREDsToValDstIndexKey
	GetREDsByDelToValDstIndexKey = keeper.GetREDsByDelToValDstIndexKey
	TestingUpdateValidator       = keeper.TestingUpdateValidator
	UnbondingQueueKey            = keeper.UnbondingQueueKey
	RedelegationQueueKey         = keeper.RedelegationQueueKey
	ValidatorQueueKey            = keeper.ValidatorQueueKey

	DefaultParamspace = keeper.DefaultParamspace
	KeyUnbondingTime  = types.KeyUnbondingTime
	KeyMaxValidators  = types.KeyMaxValidators
	KeyBondDenom      = types.KeyBondDenom

	DefaultParams         = types.DefaultParams
	InitialPool           = types.InitialPool
	NewValidator          = types.NewValidator
	NewDescription        = types.NewDescription
	NewCommission         = types.NewCommission
	NewCommissionMsg      = types.NewCommissionMsg
	NewCommissionWithTime = types.NewCommissionWithTime
	NewGenesisState       = types.NewGenesisState
	DefaultGenesisState   = types.DefaultGenesisState
	RegisterCodec         = types.RegisterCodec

	NewMsgCreateValidator = types.NewMsgCreateValidator
	NewMsgEditValidator   = types.NewMsgEditValidator
	NewMsgDelegate        = types.NewMsgDelegate
	NewMsgUndelegate      = types.NewMsgUndelegate
	NewMsgBeginRedelegate = types.NewMsgBeginRedelegate

	NewQuerier              = querier.NewQuerier
	NewQueryDelegatorParams = querier.NewQueryDelegatorParams
	NewQueryValidatorParams = querier.NewQueryValidatorParams
	NewQueryBondsParams     = querier.NewQueryBondsParams
)
View Source
var (
	ErrNilValidatorAddr               = types.ErrNilValidatorAddr
	ErrNoValidatorFound               = types.ErrNoValidatorFound
	ErrValidatorOwnerExists           = types.ErrValidatorOwnerExists
	ErrValidatorPubKeyExists          = types.ErrValidatorPubKeyExists
	ErrValidatorPubKeyTypeUnsupported = types.ErrValidatorPubKeyTypeNotSupported
	ErrValidatorJailed                = types.ErrValidatorJailed
	ErrBadRemoveValidator             = types.ErrBadRemoveValidator
	ErrDescriptionLength              = types.ErrDescriptionLength
	ErrCommissionNegative             = types.ErrCommissionNegative
	ErrCommissionHuge                 = types.ErrCommissionHuge

	ErrNilDelegatorAddr          = types.ErrNilDelegatorAddr
	ErrBadDenom                  = types.ErrBadDenom
	ErrBadDelegationAmount       = types.ErrBadDelegationAmount
	ErrNoDelegation              = types.ErrNoDelegation
	ErrBadDelegatorAddr          = types.ErrBadDelegatorAddr
	ErrNoDelegatorForAddress     = types.ErrNoDelegatorForAddress
	ErrInsufficientShares        = types.ErrInsufficientShares
	ErrDelegationValidatorEmpty  = types.ErrDelegationValidatorEmpty
	ErrNotEnoughDelegationShares = types.ErrNotEnoughDelegationShares
	ErrBadSharesAmount           = types.ErrBadSharesAmount
	ErrBadSharesPercent          = types.ErrBadSharesPercent

	ErrNotMature             = types.ErrNotMature
	ErrNoUnbondingDelegation = types.ErrNoUnbondingDelegation
	ErrNoRedelegation        = types.ErrNoRedelegation
	ErrBadRedelegationDst    = types.ErrBadRedelegationDst

	ErrBothShareMsgsGiven    = types.ErrBothShareMsgsGiven
	ErrNeitherShareMsgsGiven = types.ErrNeitherShareMsgsGiven
	ErrMissingSignature      = types.ErrMissingSignature

	ErrMinSelfDelegationInvalid   = types.ErrMinSelfDelegationInvalid
	ErrMinSelfDelegationDecreased = types.ErrMinSelfDelegationDecreased
	ErrSelfDelegationBelowMinimum = types.ErrSelfDelegationBelowMinimum
)
View Source
var (
	ActionCompleteUnbonding    = tags.ActionCompleteUnbonding
	ActionCompleteRedelegation = tags.ActionCompleteRedelegation

	TagAction       = tags.Action
	TagSrcValidator = tags.SrcValidator
	TagDstValidator = tags.DstValidator
	TagDelegator    = tags.Delegator
	TagMoniker      = tags.Moniker
	TagIdentity     = tags.Identity
)

Functions

func EndBlocker added in v0.30.0

func EndBlocker(ctx sdk.Context, k keeper.Keeper) ([]abci.ValidatorUpdate, sdk.Tags)

Called every block, update validator set

func ExportGenesis added in v0.30.0

func ExportGenesis(ctx sdk.Context, keeper Keeper) types.GenesisState

ExportGenesis returns a GenesisState for a given context and keeper. The GenesisState will contain the pool, params, validators, and bonds found in the keeper.

func InitGenesis added in v0.30.0

func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState) (res []abci.ValidatorUpdate, err error)

InitGenesis sets the pool and parameters for the provided keeper. For each validator in data, it sets that validator in the keeper along with manually setting the indexes. In addition, it also sets any delegations found in data. Finally, it updates the bonded validators. Returns final validator set after applying all declaration and delegations

func NewHandler

func NewHandler(k keeper.Keeper) sdk.Handler

func ValidateGenesis added in v0.30.0

func ValidateGenesis(data types.GenesisState) error

ValidateGenesis validates the provided staking genesis state to ensure the expected invariants holds. (i.e. params in correct bounds, no duplicate validators)

func WriteValidators added in v0.30.0

func WriteValidators(ctx sdk.Context, keeper Keeper) (vals []tmtypes.GenesisValidator)

WriteValidators returns a slice of bonded genesis validators.

Types

type BankKeeper added in v0.32.0

type BankKeeper = types.BankKeeper

type Commission added in v0.30.0

type Commission = types.Commission

type CommissionMsg added in v0.31.0

type CommissionMsg = types.CommissionMsg

type Delegation added in v0.30.0

type Delegation = types.Delegation

type Delegations added in v0.30.0

type Delegations = types.Delegations

type Description added in v0.30.0

type Description = types.Description

type DistributionKeeper added in v0.32.0

type DistributionKeeper = types.DistributionKeeper

type FeeCollectionKeeper added in v0.32.0

type FeeCollectionKeeper = types.FeeCollectionKeeper

type GenesisState added in v0.30.0

type GenesisState = types.GenesisState

type Keeper added in v0.30.0

type Keeper = keeper.Keeper

type MsgBeginRedelegate added in v0.30.0

type MsgBeginRedelegate = types.MsgBeginRedelegate

type MsgCreateValidator added in v0.30.0

type MsgCreateValidator = types.MsgCreateValidator

func NewTestMsgCreateValidator added in v0.30.0

func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey crypto.PubKey, amt sdk.Int) MsgCreateValidator

func NewTestMsgCreateValidatorWithCommission added in v0.30.0

func NewTestMsgCreateValidatorWithCommission(address sdk.ValAddress, pubKey crypto.PubKey,
	amt sdk.Int, commissionRate sdk.Dec) MsgCreateValidator

func NewTestMsgCreateValidatorWithMinSelfDelegation added in v0.31.0

func NewTestMsgCreateValidatorWithMinSelfDelegation(address sdk.ValAddress, pubKey crypto.PubKey,
	amt sdk.Int, minSelfDelegation sdk.Int) MsgCreateValidator

type MsgDelegate added in v0.30.0

type MsgDelegate = types.MsgDelegate

func NewTestMsgDelegate added in v0.30.0

func NewTestMsgDelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt sdk.Int) MsgDelegate

type MsgEditValidator added in v0.30.0

type MsgEditValidator = types.MsgEditValidator

type MsgUndelegate added in v0.30.0

type MsgUndelegate = types.MsgUndelegate

type Params added in v0.30.0

type Params = types.Params

type Pool added in v0.30.0

type Pool = types.Pool

type QueryBondsParams added in v0.30.0

type QueryBondsParams = querier.QueryBondsParams

type QueryDelegatorParams added in v0.30.0

type QueryDelegatorParams = querier.QueryDelegatorParams

type QueryRedelegationParams added in v0.30.0

type QueryRedelegationParams = querier.QueryRedelegationParams

type QueryValidatorParams added in v0.30.0

type QueryValidatorParams = querier.QueryValidatorParams

type Redelegation added in v0.30.0

type Redelegation = types.Redelegation

type Redelegations added in v0.30.0

type Redelegations = types.Redelegations

type UnbondingDelegation added in v0.30.0

type UnbondingDelegation = types.UnbondingDelegation

type UnbondingDelegations added in v0.30.0

type UnbondingDelegations = types.UnbondingDelegations

type Validator added in v0.30.0

type Validator = types.Validator

type Validators added in v0.30.0

type Validators = types.Validators

Directories

Path Synopsis
cli
nolint
nolint
nolint
nolint

Jump to

Keyboard shortcuts

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