types

package
v0.0.0-...-21d70e9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 26 Imported by: 11

Documentation

Index

Constants

View Source
const (
	EventTypeCompleteUnstaking       = "complete_unstaking"
	EventTypeCreateValidator         = "create_validator"
	EventTypeStake                   = "stake"
	EventTypeBeginUnstake            = "begin_unstake"
	EventTypeWaitingToBeginUnstaking = "waiting_to_begin_unstaking"
	EventTypeUnstake                 = "unstake"
	EventTypeProposerReward          = "proposer_reward"
	EventTypeDAOAllocation           = "dao_allocation"
	EventTypeSlash                   = "slash"
	EventTypeJail                    = "jail"
	EventTypeLiveness                = "liveness"
	AttributeKeyAddress              = "address"
	AttributeKeyHeight               = "height"
	AttributeKeyPower                = "power"
	AttributeKeyReason               = "reason"
	AttributeKeyJailed               = "jailed"
	AttributeKeyMissedBlocks         = "missed_blocks"
	AttributeValueDoubleSign         = "double_sign"
	AttributeValueMissingSignature   = "missing_signature"
	AttributeKeyValidator            = "validator"
	AttributeValueCategory           = ModuleName
)

pos module event types

View Source
const (
	StakeFee   = 10000
	UnstakeFee = 10000
	UnjailFee  = 10000
	SendFee    = 10000
)
View Source
const (
	ModuleName   = "pos"                     // nodes module is called 'pos' for proof of stake
	StoreKey     = ModuleName                // StoreKey is the string store representation
	TStoreKey    = "transient_" + ModuleName // TStoreKey is the string transient store representation
	QuerierRoute = ModuleName                // QuerierRoute is the querier route for the staking module
	RouterKey    = ModuleName                // RouterKey is the msg router key for the staking module
)
View Source
const (
	MsgStakeName   = "stake_validator"
	MsgUnstakeName = "begin_unstake_validator"
	MsgUnjailName  = "unjail_validator"
	MsgSendName    = "send"
)
View Source
const (
	// DefaultParamspace for params keeper
	DefaultRelaysToTokensMultiplier     int64 = 1000
	DefaultParamspace                         = ModuleName
	DefaultUnstakingTime                      = time.Hour * 24 * 7 * 3
	DefaultMaxValidators                int64 = 5000
	DefaultMinStake                     int64 = 1000000
	DefaultMaxEvidenceAge                     = 60 * 2 * time.Second
	DefaultSignedBlocksWindow                 = int64(100)
	DefaultDowntimeJailDuration               = 60 * 10 * time.Second
	DefaultSessionBlocktime                   = 25
	DefaultProposerAllocation                 = 1
	DefaultDAOAllocation                      = 10
	DefaultMaxChains                          = 15
	DefaultMaxJailedBlocks                    = 1000
	DefaultServicerStakeFloorMultiplier int64 = 15000000000
	DefaultServicerStakeWeightCeiling   int64 = 15000000000
)

POS params default values

View Source
const (
	QueryValidators     = "validators"
	QueryValidator      = "validator"
	QueryStakedPool     = "stakedPool"
	QueryUnstakedPool   = "unstakedPool"
	QueryParameters     = "parameters"
	QueryTotalSupply    = "total_supply"
	QuerySigningInfo    = "signingInfo"
	QuerySigningInfos   = "signingInfos"
	QueryAccountBalance = "account_balance"
	QueryAccount        = "account"
)

query endpoints supported by the staking Querier

View Source
const (
	NetworkIdentifierLength = 2
)
View Source
const (
	StakedPoolName = "staked_tokens_pool"
)

names used as root for pool module accounts: - StakingPool -> "staked_tokens_pool"

Variables

View Source
var (
	ProposerKey                     = []byte{0x01} // key for the proposer address used for rewards
	ValidatorSigningInfoKey         = []byte{0x11} // Prefix for signing info used in slashing
	ValidatorMissedBlockBitArrayKey = []byte{0x12} // Prefix for missed block bit array used in slashing
	AllValidatorsKey                = []byte{0x21} // prefix for each key to a validator
	StakedValidatorsByNetIDKey      = []byte{0x22} // prefix for validators staked by networkID
	StakedValidatorsKey             = []byte{0x23} // prefix for each key to a staked validator index, sorted by power
	PrevStateValidatorsPowerKey     = []byte{0x31} // prefix for the key to the validators of the prevState state
	PrevStateTotalPowerKey          = []byte{0x32} // prefix for the total power of the prevState state
	UnstakingValidatorsKey          = []byte{0x41} // prefix for unstaking validator
	AwardValidatorKey               = []byte{0x51} // prefix for awarding validators
	BurnValidatorKey                = []byte{0x52} // prefix for awarding validators
	WaitingToBeginUnstakingKey      = []byte{0x43} // prefix for waiting validators
)
View Source
var (
	ErrInvalidLengthMsg        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsg          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNodes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNodes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNodes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyUnstakingTime                            = []byte("UnstakingTime")
	KeyMaxValidators                            = []byte("MaxValidators")
	KeyStakeDenom                               = []byte("StakeDenom")
	KeyStakeMinimum                             = []byte("StakeMinimum")
	KeyMaxEvidenceAge                           = []byte("MaxEvidenceAge")
	KeySignedBlocksWindow                       = []byte("SignedBlocksWindow")
	KeyMinSignedPerWindow                       = []byte("MinSignedPerWindow")
	KeyDowntimeJailDuration                     = []byte("DowntimeJailDuration")
	KeySlashFractionDoubleSign                  = []byte("SlashFractionDoubleSign")
	KeySlashFractionDowntime                    = []byte("SlashFractionDowntime")
	KeyRelaysToTokensMultiplier                 = []byte("RelaysToTokensMultiplier")
	KeyRelaysToTokensMultiplierMap              = []byte("RelaysToTokensMultiplierMap")
	KeySessionBlock                             = []byte("BlocksPerSession")
	KeyDAOAllocation                            = []byte("DAOAllocation")
	KeyProposerAllocation                       = []byte("ProposerPercentage")
	KeyMaxChains                                = []byte("MaximumChains")
	KeyMaxJailedBlocks                          = []byte("MaxJailedBlocks")
	KeyServicerStakeFloorMultiplier             = []byte("ServicerStakeFloorMultiplier")
	KeyServicerStakeWeightMultiplier            = []byte("ServicerStakeWeightMultiplier")
	KeyServicerStakeWeightCeiling               = []byte("ServicerStakeWeightCeiling")
	KeyServicerStakeFloorMultiplierExponent     = []byte("ServicerStakeFloorMultiplierExponent")
	DefaultServicerStakeWeightMultiplier        = sdk.NewDec(1)
	DefaultServicerStakeFloorMultiplierExponent = sdk.NewDec(1)
	DoubleSignJailEndTime                       = time.Unix(253402300799, 0) // forever
	DefaultMinSignedPerWindow                   = sdk.NewDecWithPrec(5, 1)
	DefaultSlashFractionDoubleSign              = sdk.NewDec(1).Quo(sdk.NewDec(20))
	DefaultSlashFractionDowntime                = sdk.NewDec(1).Quo(sdk.NewDec(100))
)

- Keys for parameter access

View Source
var (
	DefaultRelaysToTokensMultiplierMap map[string]int64 = map[string]int64{}
)

POS params non-const default values

View Source
var ModuleCdc *codec.Codec // generic sealed codec to be used throughout this module
View Source
var (
	NodeFeeMap = map[string]int64{
		MsgStakeName:   StakeFee,
		MsgUnstakeName: UnstakeFee,
		MsgUnjailName:  UnjailFee,
		MsgSendName:    SendFee,
	}
)
View Source
var ValidatorCacheSize int64 = 10000

Functions

func AddressForValidatorByNetworkIDKey

func AddressForValidatorByNetworkIDKey(key, networkID []byte) sdk.Address

func AddressFromKey

func AddressFromKey(key []byte) []byte

Removes the prefix bytes from a key to expose true address

func CompareSlices

func CompareSlices[T comparable](a, b []T) bool

func CompareStringMaps

func CompareStringMaps[T comparable](a, b map[string]T) bool

True if two maps are equivalent. Nil is considered to be the same as an empty map.

func ErrBadDelegationAmount

func ErrBadDelegationAmount(codespace sdk.CodespaceType) sdk.Error

func ErrBadDenom

func ErrBadDenom(codespace sdk.CodespaceType) sdk.Error

func ErrBadSendAmount

func ErrBadSendAmount(codespace sdk.CodespaceType) sdk.Error

func ErrCantHandleEvidence

func ErrCantHandleEvidence(codespace sdk.CodespaceType) sdk.Error

func ErrDisallowedOutputAddressEdit

func ErrDisallowedOutputAddressEdit(codespace sdk.CodespaceType) sdk.Error

func ErrDisallowedRewardDelegatorEdit

func ErrDisallowedRewardDelegatorEdit(codespace sdk.CodespaceType) sdk.Error

func ErrInvalidNetworkIdentifier

func ErrInvalidNetworkIdentifier(codespace sdk.CodespaceType, err error) sdk.Error

func ErrInvalidRewardDelegators

func ErrInvalidRewardDelegators(codespace sdk.CodespaceType, reason string) sdk.Error

func ErrInvalidServiceURL

func ErrInvalidServiceURL(codespace sdk.CodespaceType, err error) sdk.Error

func ErrMinimumEditStake

func ErrMinimumEditStake(codespace sdk.CodespaceType) sdk.Error

func ErrMinimumStake

func ErrMinimumStake(codespace sdk.CodespaceType) sdk.Error

func ErrMissingSelfDelegation

func ErrMissingSelfDelegation(codespace sdk.CodespaceType) sdk.Error

func ErrNilOutputAddr

func ErrNilOutputAddr(codespace sdk.CodespaceType) sdk.Error

func ErrNilSignerAddr

func ErrNilSignerAddr(codespace sdk.CodespaceType) sdk.Error

func ErrNilValidatorAddr

func ErrNilValidatorAddr(codespace sdk.CodespaceType) sdk.Error

func ErrNoChains

func ErrNoChains(codespace sdk.CodespaceType) sdk.Error

func ErrNoServiceURL

func ErrNoServiceURL(codespace sdk.CodespaceType) sdk.Error

func ErrNoSigningInfoFound

func ErrNoSigningInfoFound(codespace sdk.CodespaceType, consAddr sdk.Address) sdk.Error

func ErrNoValidatorForAddress

func ErrNoValidatorForAddress(codespace sdk.CodespaceType) sdk.Error

func ErrNoValidatorFound

func ErrNoValidatorFound(codespace sdk.CodespaceType) sdk.Error

func ErrNotEnoughCoins

func ErrNotEnoughCoins(codespace sdk.CodespaceType) sdk.Error

func ErrSameBinEditStake

func ErrSameBinEditStake(codespace sdk.CodespaceType) sdk.Error

func ErrSelfDelegationTooLowToUnjail

func ErrSelfDelegationTooLowToUnjail(codespace sdk.CodespaceType) sdk.Error

func ErrStateConversion

func ErrStateConversion(codespace sdk.CodespaceType, err error) sdk.Error

func ErrTooManyChains

func ErrTooManyChains(codespace sdk.CodespaceType) sdk.Error

func ErrUnauthorizedSigner

func ErrUnauthorizedSigner(codespace sdk.CodespaceType) sdk.Error

func ErrUnequalOutputAddr

func ErrUnequalOutputAddr(codespace sdk.CodespaceType) sdk.Error

func ErrValidatorJailed

func ErrValidatorJailed(codespace sdk.CodespaceType) sdk.Error

func ErrValidatorNotJailed

func ErrValidatorNotJailed(codespace sdk.CodespaceType) sdk.Error

func ErrValidatorPubKeyExists

func ErrValidatorPubKeyExists(codespace sdk.CodespaceType) sdk.Error

func ErrValidatorPubKeyTypeNotSupported

func ErrValidatorPubKeyTypeNotSupported(codespace sdk.CodespaceType, keyType string, supportedTypes []string) sdk.Error

func ErrValidatorStatus

func ErrValidatorStatus(codespace sdk.CodespaceType) sdk.Error

func ErrValidatorTombstoned

func ErrValidatorTombstoned(codespace sdk.CodespaceType) sdk.Error

func ErrValidatorWaitingToUnstake

func ErrValidatorWaitingToUnstake(codespace sdk.CodespaceType) sdk.Error

func GetValMissedBlockKey

func GetValMissedBlockKey(v sdk.Address, i int64) []byte

generates the key for missing val who missed block through consensus addr

func GetValMissedBlockPrefixKey

func GetValMissedBlockPrefixKey(v sdk.Address) []byte

generates the prefix key for missing val who missed block through consensus addr

func GetValidatorSigningInfoAddress

func GetValidatorSigningInfoAddress(key []byte) (addr sdk.Address, err error)

extract the address from a validator signing info key

func InitConfig

func InitConfig(validatorCacheSize int64)

func KeyForUnstakingValidators

func KeyForUnstakingValidators(unstakingTime time.Time) []byte

generates the key for unstaking validators by the unstakingtime

func KeyForValByAllVals

func KeyForValByAllVals(addr sdk.Address) []byte

generates the key for the validator with address

func KeyForValWaitingToBeginUnstaking

func KeyForValWaitingToBeginUnstaking(addr sdk.Address) []byte

func KeyForValidatorAward

func KeyForValidatorAward(address sdk.Address) []byte

generates the award key for a validator in the current state

func KeyForValidatorBurn

func KeyForValidatorBurn(address sdk.Address) []byte

func KeyForValidatorByNetworkID

func KeyForValidatorByNetworkID(addr sdk.Address, networkID []byte) []byte

func KeyForValidatorInStakingSet

func KeyForValidatorInStakingSet(validator Validator) []byte

generates the key for a validator in the staking set

func KeyForValidatorPrevStateStateByPower

func KeyForValidatorPrevStateStateByPower(address sdk.Address) []byte

generates the key for a validator in the prevState state

func KeyForValidatorSigningInfo

func KeyForValidatorSigningInfo(v sdk.Address) []byte

generates the key for validator signing information by consensus addr

func KeyForValidatorsByNetworkID

func KeyForValidatorsByNetworkID(networkID []byte) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register concrete types on codec

func ValidateNetworkIdentifier

func ValidateNetworkIdentifier(chain string) sdk.Error

func ValidateServiceURL

func ValidateServiceURL(u string) sdk.Error

Types

type AddressAndShare

type AddressAndShare struct {
	Address     sdk.Address
	RewardShare uint32 // always positive
}

func NormalizeRewardDelegators

func NormalizeRewardDelegators(
	delegators map[string]uint32,
) ([]AddressAndShare, sdk.Error)

NormalizeRewardDelegators returns an slice of delegator addresses and their shares if the map is valid.

type AuthKeeper

type AuthKeeper interface {
	GetSupply(ctx sdk.Ctx) authexported.SupplyI
	SetSupply(ctx sdk.Ctx, supply authexported.SupplyI)
	GetModuleAddress(name string) sdk.Address
	GetModuleAccount(ctx sdk.Ctx, moduleName string) authexported.ModuleAccountI
	SetModuleAccount(sdk.Ctx, authexported.ModuleAccountI)
	SendCoinsFromModuleToModule(ctx sdk.Ctx, senderModule, recipientModule string, amt sdk.Coins) sdk.Error
	SendCoinsFromModuleToAccount(ctx sdk.Ctx, senderModule string, recipientAddr sdk.Address, amt sdk.Coins) sdk.Error
	SendCoinsFromAccountToModule(ctx sdk.Ctx, senderAddr sdk.Address, recipientModule string, amt sdk.Coins) sdk.Error
	MintCoins(ctx sdk.Ctx, moduleName string, amt sdk.Coins) sdk.Error
	BurnCoins(ctx sdk.Ctx, name string, amt sdk.Coins) sdk.Error
	IterateAccounts(ctx sdk.Ctx, process func(authexported.Account) (stop bool))
	GetCoins(ctx sdk.Ctx, addr sdk.Address) sdk.Coins
	SetCoins(ctx sdk.Ctx, addr sdk.Address, amt sdk.Coins) sdk.Error
	HasCoins(ctx sdk.Ctx, addr sdk.Address, amt sdk.Coins) bool
	SendCoins(ctx sdk.Ctx, fromAddr sdk.Address, toAddr sdk.Address, amt sdk.Coins) sdk.Error
	GetAccount(ctx sdk.Ctx, addr sdk.Address) authexported.Account
	GetFee(ctx sdk.Ctx, msg sdk.Msg) sdk.BigInt
}

AuthKeeper defines the expected supply Keeper (noalias)

type CodeType

type CodeType = sdk.CodeType
const (
	DefaultCodespace                  sdk.CodespaceType = ModuleName
	CodeInvalidValidator              CodeType          = 101
	CodeInvalidDelegation             CodeType          = 102
	CodeInvalidInput                  CodeType          = 103
	CodeValidatorJailed               CodeType          = 104
	CodeValidatorNotJailed            CodeType          = 105
	CodeMissingSelfDelegation         CodeType          = 106
	CodeMissingSigningInfo            CodeType          = 108
	CodeBadSend                       CodeType          = 109
	CodeInvalidStatus                 CodeType          = 110
	CodeMinimumStake                  CodeType          = 111
	CodeNotEnoughCoins                CodeType          = 112
	CodeValidatorTombstoned           CodeType          = 113
	CodeCantHandleEvidence            CodeType          = 114
	CodeNoChains                      CodeType          = 115
	CodeNoServiceURL                  CodeType          = 116
	CodeWaitingValidator              CodeType          = 117
	CodeInvalidServiceURL             CodeType          = 118
	CodeInvalidNetworkIdentifier      CodeType          = 119
	CodeTooManyChains                 CodeType          = 120
	CodeStateConvertError             CodeType          = 121
	CodeMinimumEditStake              CodeType          = 122
	CodeNilOutputAddr                 CodeType          = 123
	CodeUnequalOutputAddr             CodeType          = 124
	CodeUnauthorizedSigner            CodeType          = 125
	CodeNilSigner                     CodeType          = 126
	CodeDisallowedOutputAddressEdit   CodeType          = 127
	CodeInvalidRewardDelegators       CodeType          = 128
	CodeDisallowedRewardDelegatorEdit CodeType          = 129
)

type GenesisState

type GenesisState struct {
	Params                   Params                          `json:"params" yaml:"params"`
	PrevStateTotalPower      sdk.BigInt                      `json:"prevState_total_power" yaml:"prevState_total_power"`
	PrevStateValidatorPowers []PrevStatePowerMapping         `json:"prevState_validator_powers" yaml:"prevState_validator_powers"`
	Validators               []Validator                     `json:"validators" yaml:"validators"`
	Exported                 bool                            `json:"exported" yaml:"exported"`
	SigningInfos             map[string]ValidatorSigningInfo `json:"signing_infos" yaml:"signing_infos"`
	MissedBlocks             map[string][]MissedBlock        `json:"missed_blocks" yaml:"missed_blocks"`
	PreviousProposer         sdk.Address                     `json:"previous_proposer" yaml:"previous_proposer"`
}

GenesisState - all staking state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

get raw genesis raw message for testing

type JSONValidator

type JSONValidator struct {
	Address                 sdk.Address     `json:"address" yaml:"address"`               // address of the validator; hex encoded in JSON
	PublicKey               string          `json:"public_key" yaml:"public_key"`         // the consensus public key of the validator; hex encoded in JSON
	Jailed                  bool            `json:"jailed" yaml:"jailed"`                 // has the validator been jailed from staked status?
	Status                  sdk.StakeStatus `json:"status" yaml:"status"`                 // validator status (staked/unstaking/unstaked)
	Chains                  []string        `json:"chains" yaml:"chains"`                 // validator non native blockchains
	ServiceURL              string          `json:"service_url" yaml:"service_url"`       // url where the pocket service api is hosted
	StakedTokens            sdk.BigInt      `json:"tokens" yaml:"tokens"`                 // tokens staked in the network
	UnstakingCompletionTime time.Time       `json:"unstaking_time" yaml:"unstaking_time"` // if unstaking, min time for the validator to complete unstaking
	OutputAddress           sdk.Address     `json:"output_address" yaml:"output_address"` // custodial output address of tokens
	// Mapping from delegated-to addresses to a percentage of rewards
	RewardDelegators map[string]uint32 `json:"reward_delegators" yaml:"reward_delegators"`
}

type LegacyMsgBeginUnstake

type LegacyMsgBeginUnstake struct {
	Address github_com_pokt_network_pocket_core_types.Address `` /* 151-byte string literal not displayed */
}

func (*LegacyMsgBeginUnstake) Descriptor

func (*LegacyMsgBeginUnstake) Descriptor() ([]byte, []int)

func (*LegacyMsgBeginUnstake) Equal

func (this *LegacyMsgBeginUnstake) Equal(that interface{}) bool

func (LegacyMsgBeginUnstake) GetFee

func (m LegacyMsgBeginUnstake) GetFee() sdk.BigInt

func (LegacyMsgBeginUnstake) GetRecipient

func (m LegacyMsgBeginUnstake) GetRecipient() sdk.Address

func (LegacyMsgBeginUnstake) GetSignBytes

func (m LegacyMsgBeginUnstake) GetSignBytes() []byte

func (LegacyMsgBeginUnstake) GetSigners

func (m LegacyMsgBeginUnstake) GetSigners() []sdk.Address

func (*LegacyMsgBeginUnstake) Marshal

func (m *LegacyMsgBeginUnstake) Marshal() (dAtA []byte, err error)

func (*LegacyMsgBeginUnstake) MarshalTo

func (m *LegacyMsgBeginUnstake) MarshalTo(dAtA []byte) (int, error)

func (*LegacyMsgBeginUnstake) MarshalToSizedBuffer

func (m *LegacyMsgBeginUnstake) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LegacyMsgBeginUnstake) ProtoMessage

func (*LegacyMsgBeginUnstake) ProtoMessage()

func (*LegacyMsgBeginUnstake) Reset

func (m *LegacyMsgBeginUnstake) Reset()

func (LegacyMsgBeginUnstake) Route

func (m LegacyMsgBeginUnstake) Route() string

func (*LegacyMsgBeginUnstake) Size

func (m *LegacyMsgBeginUnstake) Size() (n int)

func (*LegacyMsgBeginUnstake) String

func (m *LegacyMsgBeginUnstake) String() string

func (LegacyMsgBeginUnstake) Type

func (m LegacyMsgBeginUnstake) Type() string

func (*LegacyMsgBeginUnstake) Unmarshal

func (m *LegacyMsgBeginUnstake) Unmarshal(dAtA []byte) error

func (LegacyMsgBeginUnstake) ValidateBasic

func (m LegacyMsgBeginUnstake) ValidateBasic() sdk.Error

func (*LegacyMsgBeginUnstake) XXX_DiscardUnknown

func (m *LegacyMsgBeginUnstake) XXX_DiscardUnknown()

func (*LegacyMsgBeginUnstake) XXX_Marshal

func (m *LegacyMsgBeginUnstake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LegacyMsgBeginUnstake) XXX_Merge

func (m *LegacyMsgBeginUnstake) XXX_Merge(src proto.Message)

func (*LegacyMsgBeginUnstake) XXX_MessageName

func (*LegacyMsgBeginUnstake) XXX_MessageName() string

func (*LegacyMsgBeginUnstake) XXX_Size

func (m *LegacyMsgBeginUnstake) XXX_Size() int

func (*LegacyMsgBeginUnstake) XXX_Unmarshal

func (m *LegacyMsgBeginUnstake) XXX_Unmarshal(b []byte) error

type LegacyMsgProtoStake

type LegacyMsgProtoStake struct {
	Publickey  []byte                                           `protobuf:"bytes,1,opt,name=Publickey,proto3" json:"public_key" yaml:"public_key"`
	Chains     []string                                         `protobuf:"bytes,2,rep,name=Chains,proto3" json:"chains" yaml:"chains"`
	Value      github_com_pokt_network_pocket_core_types.BigInt `` /* 126-byte string literal not displayed */
	ServiceUrl string                                           `protobuf:"bytes,4,opt,name=ServiceUrl,proto3" json:"service_url" yaml:"service_url"`
}

func (*LegacyMsgProtoStake) Descriptor

func (*LegacyMsgProtoStake) Descriptor() ([]byte, []int)

func (*LegacyMsgProtoStake) Equal

func (this *LegacyMsgProtoStake) Equal(that interface{}) bool

func (*LegacyMsgProtoStake) Marshal

func (m *LegacyMsgProtoStake) Marshal() (dAtA []byte, err error)

func (*LegacyMsgProtoStake) MarshalTo

func (m *LegacyMsgProtoStake) MarshalTo(dAtA []byte) (int, error)

func (*LegacyMsgProtoStake) MarshalToSizedBuffer

func (m *LegacyMsgProtoStake) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LegacyMsgProtoStake) ProtoMessage

func (*LegacyMsgProtoStake) ProtoMessage()

func (*LegacyMsgProtoStake) Reset

func (m *LegacyMsgProtoStake) Reset()

func (*LegacyMsgProtoStake) Size

func (m *LegacyMsgProtoStake) Size() (n int)

func (*LegacyMsgProtoStake) String

func (m *LegacyMsgProtoStake) String() string

func (*LegacyMsgProtoStake) Unmarshal

func (m *LegacyMsgProtoStake) Unmarshal(dAtA []byte) error

func (*LegacyMsgProtoStake) XXX_DiscardUnknown

func (m *LegacyMsgProtoStake) XXX_DiscardUnknown()

func (*LegacyMsgProtoStake) XXX_Marshal

func (m *LegacyMsgProtoStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LegacyMsgProtoStake) XXX_Merge

func (m *LegacyMsgProtoStake) XXX_Merge(src proto.Message)

func (*LegacyMsgProtoStake) XXX_MessageName

func (*LegacyMsgProtoStake) XXX_MessageName() string

func (*LegacyMsgProtoStake) XXX_Size

func (m *LegacyMsgProtoStake) XXX_Size() int

func (*LegacyMsgProtoStake) XXX_Unmarshal

func (m *LegacyMsgProtoStake) XXX_Unmarshal(b []byte) error

type LegacyMsgStake

type LegacyMsgStake struct {
	PublicKey  crypto.PublicKey `json:"public_key" yaml:"public_key"`
	Chains     []string         `json:"chains" yaml:"chains"`
	Value      sdk.BigInt       `json:"value" yaml:"value"`
	ServiceUrl string           `json:"service_url" yaml:"service_url"`
}

stake legacy

func (LegacyMsgStake) GetFee

func (m LegacyMsgStake) GetFee() sdk.BigInt

func (LegacyMsgStake) GetRecipient

func (m LegacyMsgStake) GetRecipient() sdk.Address

func (LegacyMsgStake) GetSignBytes

func (m LegacyMsgStake) GetSignBytes() []byte

func (LegacyMsgStake) GetSigners

func (m LegacyMsgStake) GetSigners() []sdk.Address

func (*LegacyMsgStake) LegacyToProto

func (m *LegacyMsgStake) LegacyToProto() LegacyMsgProtoStake

GetFee get fee for msg

func (*LegacyMsgStake) Marshal

func (msg *LegacyMsgStake) Marshal() ([]byte, error)

func (*LegacyMsgStake) MarshalTo

func (msg *LegacyMsgStake) MarshalTo(data []byte) (n int, err error)

func (*LegacyMsgStake) MarshalToSizedBuffer

func (msg *LegacyMsgStake) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LegacyMsgStake) ProtoMessage

func (m *LegacyMsgStake) ProtoMessage()

func (*LegacyMsgStake) Reset

func (m *LegacyMsgStake) Reset()

func (LegacyMsgStake) Route

func (m LegacyMsgStake) Route() string

func (*LegacyMsgStake) Size

func (msg *LegacyMsgStake) Size() int

func (*LegacyMsgStake) String

func (m *LegacyMsgStake) String() string

func (LegacyMsgStake) Type

func (m LegacyMsgStake) Type() string

func (*LegacyMsgStake) Unmarshal

func (msg *LegacyMsgStake) Unmarshal(data []byte) error

func (LegacyMsgStake) ValidateBasic

func (m LegacyMsgStake) ValidateBasic() sdk.Error

func (*LegacyMsgStake) XXX_MessageName

func (msg *LegacyMsgStake) XXX_MessageName() string

type LegacyMsgUnjail

type LegacyMsgUnjail struct {
	ValidatorAddr github_com_pokt_network_pocket_core_types.Address `` /* 137-byte string literal not displayed */
}

func (*LegacyMsgUnjail) Descriptor

func (*LegacyMsgUnjail) Descriptor() ([]byte, []int)

func (*LegacyMsgUnjail) Equal

func (this *LegacyMsgUnjail) Equal(that interface{}) bool

func (LegacyMsgUnjail) GetFee

func (m LegacyMsgUnjail) GetFee() sdk.BigInt

func (LegacyMsgUnjail) GetRecipient

func (m LegacyMsgUnjail) GetRecipient() sdk.Address

func (LegacyMsgUnjail) GetSignBytes

func (m LegacyMsgUnjail) GetSignBytes() []byte

func (LegacyMsgUnjail) GetSigners

func (m LegacyMsgUnjail) GetSigners() []sdk.Address

func (*LegacyMsgUnjail) Marshal

func (m *LegacyMsgUnjail) Marshal() (dAtA []byte, err error)

func (*LegacyMsgUnjail) MarshalTo

func (m *LegacyMsgUnjail) MarshalTo(dAtA []byte) (int, error)

func (*LegacyMsgUnjail) MarshalToSizedBuffer

func (m *LegacyMsgUnjail) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LegacyMsgUnjail) ProtoMessage

func (*LegacyMsgUnjail) ProtoMessage()

func (*LegacyMsgUnjail) Reset

func (m *LegacyMsgUnjail) Reset()

func (LegacyMsgUnjail) Route

func (m LegacyMsgUnjail) Route() string

func (*LegacyMsgUnjail) Size

func (m *LegacyMsgUnjail) Size() (n int)

func (*LegacyMsgUnjail) String

func (m *LegacyMsgUnjail) String() string

func (LegacyMsgUnjail) Type

func (m LegacyMsgUnjail) Type() string

func (*LegacyMsgUnjail) Unmarshal

func (m *LegacyMsgUnjail) Unmarshal(dAtA []byte) error

func (LegacyMsgUnjail) ValidateBasic

func (m LegacyMsgUnjail) ValidateBasic() sdk.Error

func (*LegacyMsgUnjail) XXX_DiscardUnknown

func (m *LegacyMsgUnjail) XXX_DiscardUnknown()

func (*LegacyMsgUnjail) XXX_Marshal

func (m *LegacyMsgUnjail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LegacyMsgUnjail) XXX_Merge

func (m *LegacyMsgUnjail) XXX_Merge(src proto.Message)

func (*LegacyMsgUnjail) XXX_MessageName

func (*LegacyMsgUnjail) XXX_MessageName() string

func (*LegacyMsgUnjail) XXX_Size

func (m *LegacyMsgUnjail) XXX_Size() int

func (*LegacyMsgUnjail) XXX_Unmarshal

func (m *LegacyMsgUnjail) XXX_Unmarshal(b []byte) error

type LegacyProtoValidator

type LegacyProtoValidator struct {
	Address                 github_com_pokt_network_pocket_core_types.Address `` /* 131-byte string literal not displayed */
	PublicKey               []byte                                            `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"public_key" yaml:"public_key"`
	Jailed                  bool                                              `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed"`
	Status                  int32                                             `protobuf:"varint,4,opt,name=status,proto3" json:"status"`
	Chains                  []string                                          `protobuf:"bytes,5,rep,name=Chains,proto3" json:"chains"`
	ServiceURL              string                                            `protobuf:"bytes,6,opt,name=ServiceURL,proto3" json:"service_url"`
	StakedTokens            github_com_pokt_network_pocket_core_types.BigInt  `protobuf:"bytes,7,opt,name=StakedTokens,proto3,customtype=github.com/pokt-network/pocket-core/types.BigInt" json:"tokens"`
	UnstakingCompletionTime time.Time                                         `protobuf:"bytes,8,opt,name=UnstakingCompletionTime,proto3,stdtime" json:"unstaking_time" yaml:"unstaking_time"`
}

func (*LegacyProtoValidator) Descriptor

func (*LegacyProtoValidator) Descriptor() ([]byte, []int)

func (*LegacyProtoValidator) Equal

func (this *LegacyProtoValidator) Equal(that interface{}) bool

func (LegacyProtoValidator) FromProto

func (v LegacyProtoValidator) FromProto() (LegacyValidator, error)

FromProto converts the Protobuf structure to Validator

func (*LegacyProtoValidator) Marshal

func (m *LegacyProtoValidator) Marshal() (dAtA []byte, err error)

func (*LegacyProtoValidator) MarshalTo

func (m *LegacyProtoValidator) MarshalTo(dAtA []byte) (int, error)

func (*LegacyProtoValidator) MarshalToSizedBuffer

func (m *LegacyProtoValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LegacyProtoValidator) ProtoMessage

func (*LegacyProtoValidator) ProtoMessage()

func (*LegacyProtoValidator) Reset

func (m *LegacyProtoValidator) Reset()

func (*LegacyProtoValidator) Size

func (m *LegacyProtoValidator) Size() (n int)

func (*LegacyProtoValidator) String

func (m *LegacyProtoValidator) String() string

func (*LegacyProtoValidator) Unmarshal

func (m *LegacyProtoValidator) Unmarshal(dAtA []byte) error

func (*LegacyProtoValidator) XXX_DiscardUnknown

func (m *LegacyProtoValidator) XXX_DiscardUnknown()

func (*LegacyProtoValidator) XXX_Marshal

func (m *LegacyProtoValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LegacyProtoValidator) XXX_Merge

func (m *LegacyProtoValidator) XXX_Merge(src proto.Message)

func (*LegacyProtoValidator) XXX_Size

func (m *LegacyProtoValidator) XXX_Size() int

func (*LegacyProtoValidator) XXX_Unmarshal

func (m *LegacyProtoValidator) XXX_Unmarshal(b []byte) error

type LegacyValidator

type LegacyValidator struct {
	Address                 sdk.Address      `json:"address" yaml:"address"`               // address of the validator; hex encoded in JSON
	PublicKey               crypto.PublicKey `json:"public_key" yaml:"public_key"`         // the consensus public key of the validator; hex encoded in JSON
	Jailed                  bool             `json:"jailed" yaml:"jailed"`                 // has the validator been jailed from staked status?
	Status                  sdk.StakeStatus  `json:"status" yaml:"status"`                 // validator status (staked/unstaking/unstaked)
	Chains                  []string         `json:"chains" yaml:"chains"`                 // validator non native blockchains
	ServiceURL              string           `json:"service_url" yaml:"service_url"`       // url where the pocket service api is hosted
	StakedTokens            sdk.BigInt       `json:"tokens" yaml:"tokens"`                 // tokens staked in the network
	UnstakingCompletionTime time.Time        `json:"unstaking_time" yaml:"unstaking_time"` // if unstaking, min time for the validator to complete unstaking
}

func (LegacyValidator) Equals

func (v LegacyValidator) Equals(v2 LegacyValidator) bool

func (*LegacyValidator) GetAddress

func (v *LegacyValidator) GetAddress() sdk.Address

func (*LegacyValidator) GetChains

func (v *LegacyValidator) GetChains() []string

func (*LegacyValidator) GetConsensusPower

func (v *LegacyValidator) GetConsensusPower() int64

func (*LegacyValidator) GetPublicKey

func (v *LegacyValidator) GetPublicKey() crypto.PublicKey

func (*LegacyValidator) GetStatus

func (v *LegacyValidator) GetStatus() sdk.StakeStatus

func (*LegacyValidator) GetTokens

func (v *LegacyValidator) GetTokens() sdk.BigInt

func (*LegacyValidator) IsJailed

func (v *LegacyValidator) IsJailed() bool

func (*LegacyValidator) IsStaked

func (v *LegacyValidator) IsStaked() bool

func (*LegacyValidator) IsUnstaked

func (v *LegacyValidator) IsUnstaked() bool

func (*LegacyValidator) IsUnstaking

func (v *LegacyValidator) IsUnstaking() bool

func (*LegacyValidator) Marshal

func (v *LegacyValidator) Marshal() ([]byte, error)

func (*LegacyValidator) MarshalTo

func (v *LegacyValidator) MarshalTo(data []byte) (n int, err error)

func (*LegacyValidator) MarshalToSizedBuffer

func (v *LegacyValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (LegacyValidator) ProtoMessage

func (v LegacyValidator) ProtoMessage()

func (*LegacyValidator) Reset

func (v *LegacyValidator) Reset()

func (*LegacyValidator) Size

func (v *LegacyValidator) Size() int

func (LegacyValidator) String

func (v LegacyValidator) String() string

func (LegacyValidator) ToProto

ToProto converts the validator to Protobuf compatible structure

func (LegacyValidator) ToValidator

func (v LegacyValidator) ToValidator() Validator

func (*LegacyValidator) Unmarshal

func (v *LegacyValidator) Unmarshal(data []byte) error

type MissedBlock

type MissedBlock struct {
	Index  int64 `json:"index" yaml:"index"`
	Missed bool  `json:"missed" yaml:"missed"`
}

MissedBlock

type MsgBeginUnstake

type MsgBeginUnstake struct {
	Address github_com_pokt_network_pocket_core_types.Address `` /* 151-byte string literal not displayed */
	Signer  github_com_pokt_network_pocket_core_types.Address `` /* 154-byte string literal not displayed */
}

func (*MsgBeginUnstake) Descriptor

func (*MsgBeginUnstake) Descriptor() ([]byte, []int)

func (*MsgBeginUnstake) Equal

func (this *MsgBeginUnstake) Equal(that interface{}) bool

func (MsgBeginUnstake) GetFee

func (msg MsgBeginUnstake) GetFee() sdk.BigInt

GetFee get fee for msg

func (MsgBeginUnstake) GetRecipient

func (msg MsgBeginUnstake) GetRecipient() sdk.Address

func (MsgBeginUnstake) GetSignBytes

func (msg MsgBeginUnstake) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgBeginUnstake) GetSigners

func (msg MsgBeginUnstake) GetSigners() []sdk.Address

---------------------------------------------------------------------------------------------------------------------- GetSigners return address(es) that must sign over msg.GetSignBytes()

func (*MsgBeginUnstake) Marshal

func (m *MsgBeginUnstake) Marshal() (dAtA []byte, err error)

func (*MsgBeginUnstake) MarshalTo

func (m *MsgBeginUnstake) MarshalTo(dAtA []byte) (int, error)

func (*MsgBeginUnstake) MarshalToSizedBuffer

func (m *MsgBeginUnstake) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgBeginUnstake) ProtoMessage

func (*MsgBeginUnstake) ProtoMessage()

func (*MsgBeginUnstake) Reset

func (m *MsgBeginUnstake) Reset()

func (MsgBeginUnstake) Route

func (msg MsgBeginUnstake) Route() string

Route provides router key for msg

func (*MsgBeginUnstake) Size

func (m *MsgBeginUnstake) Size() (n int)

func (*MsgBeginUnstake) String

func (m *MsgBeginUnstake) String() string

func (MsgBeginUnstake) Type

func (msg MsgBeginUnstake) Type() string

Type provides msg name

func (*MsgBeginUnstake) Unmarshal

func (m *MsgBeginUnstake) Unmarshal(dAtA []byte) error

func (MsgBeginUnstake) ValidateBasic

func (msg MsgBeginUnstake) ValidateBasic() sdk.Error

ValidateBasic quick validity check, stateless

func (*MsgBeginUnstake) XXX_DiscardUnknown

func (m *MsgBeginUnstake) XXX_DiscardUnknown()

func (*MsgBeginUnstake) XXX_Marshal

func (m *MsgBeginUnstake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgBeginUnstake) XXX_Merge

func (m *MsgBeginUnstake) XXX_Merge(src proto.Message)

func (*MsgBeginUnstake) XXX_MessageName

func (*MsgBeginUnstake) XXX_MessageName() string

func (*MsgBeginUnstake) XXX_Size

func (m *MsgBeginUnstake) XXX_Size() int

func (*MsgBeginUnstake) XXX_Unmarshal

func (m *MsgBeginUnstake) XXX_Unmarshal(b []byte) error

type MsgProtoStake

type MsgProtoStake struct {
	Publickey     []byte                                            `protobuf:"bytes,1,opt,name=Publickey,proto3" json:"public_key" yaml:"public_key"`
	Chains        []string                                          `protobuf:"bytes,2,rep,name=Chains,proto3" json:"chains" yaml:"chains"`
	Value         github_com_pokt_network_pocket_core_types.BigInt  `` /* 126-byte string literal not displayed */
	ServiceUrl    string                                            `protobuf:"bytes,4,opt,name=ServiceUrl,proto3" json:"service_url" yaml:"service_url"`
	OutputAddress github_com_pokt_network_pocket_core_types.Address `` /* 161-byte string literal not displayed */
	// Mapping from delegated-to addresses to a percentage of rewards.
	RewardDelegators map[string]uint32 `` /* 200-byte string literal not displayed */
}

func (*MsgProtoStake) Descriptor

func (*MsgProtoStake) Descriptor() ([]byte, []int)

func (*MsgProtoStake) Equal

func (this *MsgProtoStake) Equal(that interface{}) bool

func (*MsgProtoStake) Marshal

func (m *MsgProtoStake) Marshal() (dAtA []byte, err error)

func (*MsgProtoStake) MarshalTo

func (m *MsgProtoStake) MarshalTo(dAtA []byte) (int, error)

func (*MsgProtoStake) MarshalToSizedBuffer

func (m *MsgProtoStake) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgProtoStake) ProtoMessage

func (*MsgProtoStake) ProtoMessage()

func (*MsgProtoStake) Reset

func (m *MsgProtoStake) Reset()

func (*MsgProtoStake) Size

func (m *MsgProtoStake) Size() (n int)

func (*MsgProtoStake) String

func (m *MsgProtoStake) String() string

func (*MsgProtoStake) Unmarshal

func (m *MsgProtoStake) Unmarshal(dAtA []byte) error

func (*MsgProtoStake) XXX_DiscardUnknown

func (m *MsgProtoStake) XXX_DiscardUnknown()

func (*MsgProtoStake) XXX_Marshal

func (m *MsgProtoStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgProtoStake) XXX_Merge

func (m *MsgProtoStake) XXX_Merge(src proto.Message)

func (*MsgProtoStake) XXX_MessageName

func (*MsgProtoStake) XXX_MessageName() string

func (*MsgProtoStake) XXX_Size

func (m *MsgProtoStake) XXX_Size() int

func (*MsgProtoStake) XXX_Unmarshal

func (m *MsgProtoStake) XXX_Unmarshal(b []byte) error

type MsgSend

type MsgSend struct {
	FromAddress github_com_pokt_network_pocket_core_types.Address `` /* 145-byte string literal not displayed */
	ToAddress   github_com_pokt_network_pocket_core_types.Address `` /* 139-byte string literal not displayed */
	Amount      github_com_pokt_network_pocket_core_types.BigInt  `` /* 129-byte string literal not displayed */
}

func (*MsgSend) Descriptor

func (*MsgSend) Descriptor() ([]byte, []int)

func (*MsgSend) Equal

func (this *MsgSend) Equal(that interface{}) bool

func (MsgSend) GetFee

func (msg MsgSend) GetFee() sdk.BigInt

GetFee get fee for msg

func (*MsgSend) GetFromAddress

func (MsgSend) GetRecipient

func (msg MsgSend) GetRecipient() sdk.Address

func (MsgSend) GetSignBytes

func (msg MsgSend) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgSend) GetSigners

func (msg MsgSend) GetSigners() []sdk.Address

GetSigners return address(es) that must sign over msg.GetSignBytes()

func (*MsgSend) GetToAddress

func (*MsgSend) Marshal

func (m *MsgSend) Marshal() (dAtA []byte, err error)

func (*MsgSend) MarshalTo

func (m *MsgSend) MarshalTo(dAtA []byte) (int, error)

func (*MsgSend) MarshalToSizedBuffer

func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSend) ProtoMessage

func (*MsgSend) ProtoMessage()

func (*MsgSend) Reset

func (m *MsgSend) Reset()

func (MsgSend) Route

func (msg MsgSend) Route() string

Route provides router key for msg

func (*MsgSend) Size

func (m *MsgSend) Size() (n int)

func (*MsgSend) String

func (m *MsgSend) String() string

func (MsgSend) Type

func (msg MsgSend) Type() string

Type provides msg name

func (*MsgSend) Unmarshal

func (m *MsgSend) Unmarshal(dAtA []byte) error

func (MsgSend) ValidateBasic

func (msg MsgSend) ValidateBasic() sdk.Error

ValidateBasic quick validity check, stateless

func (*MsgSend) XXX_DiscardUnknown

func (m *MsgSend) XXX_DiscardUnknown()

func (*MsgSend) XXX_Marshal

func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSend) XXX_Merge

func (m *MsgSend) XXX_Merge(src proto.Message)

func (*MsgSend) XXX_MessageName

func (*MsgSend) XXX_MessageName() string

func (*MsgSend) XXX_Size

func (m *MsgSend) XXX_Size() int

func (*MsgSend) XXX_Unmarshal

func (m *MsgSend) XXX_Unmarshal(b []byte) error

type MsgStake

type MsgStake struct {
	PublicKey        crypto.PublicKey  `json:"public_key" yaml:"public_key"`
	Chains           []string          `json:"chains" yaml:"chains"`
	Value            sdk.BigInt        `json:"value" yaml:"value"`
	ServiceUrl       string            `json:"service_url" yaml:"service_url"`
	Output           sdk.Address       `json:"output_address,omitempty" yaml:"output_address"`
	RewardDelegators map[string]uint32 `json:"reward_delegators,omitempty" yaml:"reward_delegators"`
}

MsgStake - struct for staking transactions

func (MsgStake) CheckRewardDelegators

func (msg MsgStake) CheckRewardDelegators() sdk.Error

func (MsgStake) CheckServiceUrlLength

func (msg MsgStake) CheckServiceUrlLength(url string) sdk.Error

func (MsgStake) GetFee

func (msg MsgStake) GetFee() sdk.BigInt

GetFee get fee for msg

func (MsgStake) GetRecipient

func (msg MsgStake) GetRecipient() sdk.Address

func (MsgStake) GetSignBytes

func (msg MsgStake) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgStake) GetSigners

func (msg MsgStake) GetSigners() []sdk.Address

GetSigners return address(es) that could sign over msg.GetSignBytes()

func (MsgStake) LegacyToProto

func (msg MsgStake) LegacyToProto() LegacyMsgProtoStake

GetFee get fee for msg

func (*MsgStake) Marshal

func (msg *MsgStake) Marshal() ([]byte, error)

func (*MsgStake) MarshalTo

func (msg *MsgStake) MarshalTo(data []byte) (n int, err error)

func (*MsgStake) MarshalToSizedBuffer

func (msg *MsgStake) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgStake) ProtoMessage

func (msg *MsgStake) ProtoMessage()

func (*MsgStake) Reset

func (msg *MsgStake) Reset()

func (MsgStake) Route

func (msg MsgStake) Route() string

Route provides router key for msg

func (*MsgStake) Size

func (msg *MsgStake) Size() int

func (MsgStake) String

func (msg MsgStake) String() string

func (MsgStake) ToProto

func (msg MsgStake) ToProto() MsgProtoStake

GetFee get fee for msg

func (MsgStake) Type

func (msg MsgStake) Type() string

Type provides msg name

func (*MsgStake) Unmarshal

func (msg *MsgStake) Unmarshal(data []byte) error

func (MsgStake) ValidateBasic

func (msg MsgStake) ValidateBasic() sdk.Error

ValidateBasic quick validity check, stateless

func (*MsgStake) XXX_MessageName

func (msg *MsgStake) XXX_MessageName() string

type MsgUnjail

type MsgUnjail struct {
	ValidatorAddr github_com_pokt_network_pocket_core_types.Address `` /* 137-byte string literal not displayed */
	Signer        github_com_pokt_network_pocket_core_types.Address `` /* 144-byte string literal not displayed */
}

func (*MsgUnjail) Descriptor

func (*MsgUnjail) Descriptor() ([]byte, []int)

func (*MsgUnjail) Equal

func (this *MsgUnjail) Equal(that interface{}) bool

func (MsgUnjail) GetFee

func (msg MsgUnjail) GetFee() sdk.BigInt

GetFee get fee for msg

func (MsgUnjail) GetRecipient

func (msg MsgUnjail) GetRecipient() sdk.Address

func (MsgUnjail) GetSignBytes

func (msg MsgUnjail) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgUnjail) GetSigners

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

GetSigners return address(es) that must sign over msg.GetSignBytes()

func (*MsgUnjail) Marshal

func (m *MsgUnjail) Marshal() (dAtA []byte, err error)

func (*MsgUnjail) MarshalTo

func (m *MsgUnjail) MarshalTo(dAtA []byte) (int, error)

func (*MsgUnjail) MarshalToSizedBuffer

func (m *MsgUnjail) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUnjail) ProtoMessage

func (*MsgUnjail) ProtoMessage()

func (*MsgUnjail) Reset

func (m *MsgUnjail) Reset()

func (MsgUnjail) Route

func (msg MsgUnjail) Route() string

Route provides router key for msg

func (*MsgUnjail) Size

func (m *MsgUnjail) Size() (n int)

func (*MsgUnjail) String

func (m *MsgUnjail) String() string

func (MsgUnjail) Type

func (msg MsgUnjail) Type() string

Type provides msg name

func (*MsgUnjail) Unmarshal

func (m *MsgUnjail) Unmarshal(dAtA []byte) error

func (MsgUnjail) ValidateBasic

func (msg MsgUnjail) ValidateBasic() sdk.Error

ValidateBasic quick validity check, stateless

func (*MsgUnjail) XXX_DiscardUnknown

func (m *MsgUnjail) XXX_DiscardUnknown()

func (*MsgUnjail) XXX_Marshal

func (m *MsgUnjail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUnjail) XXX_Merge

func (m *MsgUnjail) XXX_Merge(src proto.Message)

func (*MsgUnjail) XXX_MessageName

func (*MsgUnjail) XXX_MessageName() string

func (*MsgUnjail) XXX_Size

func (m *MsgUnjail) XXX_Size() int

func (*MsgUnjail) XXX_Unmarshal

func (m *MsgUnjail) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	RelaysToTokensMultiplier             int64            `json:"relays_to_tokens_multiplier" yaml:"relays_to_tokens_multiplier"`
	RelaysToTokensMultiplierMap          map[string]int64 `json:"relays_to_tokens_multiplier_map" yaml:"relays_to_tokens_multiplier_map"`
	UnstakingTime                        time.Duration    `json:"unstaking_time" yaml:"unstaking_time"`                   // how much time must pass between the begin_unstaking_tx and the node going to -> unstaked status
	MaxValidators                        int64            `json:"max_validators" yaml:"max_validators"`                   // maximum number of validators in the network at any given block
	StakeDenom                           string           `json:"stake_denom" yaml:"stake_denom"`                         // the monetary denomination of the coins in the network `uPOKT` or `uAtom` or `Wei`
	StakeMinimum                         int64            `json:"stake_minimum" yaml:"stake_minimum"`                     // minimum amount of `uPOKT` needed to stake in the network as a node
	SessionBlockFrequency                int64            `json:"session_block_frequency" yaml:"session_block_frequency"` // how many blocks are in a session (pocket network unit)
	DAOAllocation                        int64            `json:"dao_allocation" yaml:"dao_allocation"`
	ProposerAllocation                   int64            `json:"proposer_allocation" yaml:"proposer_allocation"`
	MaximumChains                        int64            `json:"maximum_chains" yaml:"maximum_chains"`
	MaxJailedBlocks                      int64            `json:"max_jailed_blocks" yaml:"max_jailed_blocks"`
	MaxEvidenceAge                       time.Duration    `json:"max_evidence_age" yaml:"max_evidence_age"`                     // maximum age of tendermint evidence that is still valid (currently not implemented in Cosmos or Pocket-Core)
	SignedBlocksWindow                   int64            `json:"signed_blocks_window" yaml:"signed_blocks_window"`             // window of time in blocks (unit) used for signature verification -> specifically in not signing (missing) blocks
	MinSignedPerWindow                   sdk.BigDec       `json:"min_signed_per_window" yaml:"min_signed_per_window"`           // minimum number of blocks the node must sign per window
	DowntimeJailDuration                 time.Duration    `json:"downtime_jail_duration" yaml:"downtime_jail_duration"`         // minimum amount of time node must spend in jail after missing blocks
	SlashFractionDoubleSign              sdk.BigDec       `json:"slash_fraction_double_sign" yaml:"slash_fraction_double_sign"` // the factor of which a node is slashed for a double sign
	SlashFractionDowntime                sdk.BigDec       `json:"slash_fraction_downtime" yaml:"slash_fraction_downtime"`       // the factor of which a node is slashed for missing blocks
	ServicerStakeFloorMultiplier         int64            `json:"servicer_stake_floor_multipler" yaml:"servicer_stake_floor_multipler"`
	ServicerStakeWeightMultiplier        sdk.BigDec       `json:"servicer_stake_weight_multipler" yaml:"servicer_stake_weight_multipler"`
	ServicerStakeWeightCeiling           int64            `json:"servicer_stake_weight_ceiling" yaml:"servicer_stake_weight_cieling"`
	ServicerStakeFloorMultiplierExponent sdk.BigDec       `json:"servicer_stake_floor_multiplier_exponent" yaml:"servicer_stake_floor_multiplier_exponent"`
}

Params defines the high level settings for pos module

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func (Params) Equal

func (p Params) Equal(p2 Params) bool

Checks the equality of two param objects

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() sdk.ParamSetPairs

Implements sdk.ParamSet

func (Params) String

func (p Params) String() string

String returns a human readable string representation of the parameters.

func (Params) Validate

func (p Params) Validate() error

validate a set of params

type PocketKeeper

type PocketKeeper interface {
	// clear the cache of validators for sessions and relays
	ClearSessionCache()
}

type Pool

type Pool struct {
	Tokens sdk.BigInt
}

func NewPool

func NewPool(tokens sdk.BigInt) Pool

NewPool creates a new Tokens instance used for queries

type PrevStatePowerMapping

type PrevStatePowerMapping struct {
	Address sdk.Address
	Power   int64
}

PrevState validator power, needed for validator set update logic

type ProtoValidator

type ProtoValidator struct {
	Address                 github_com_pokt_network_pocket_core_types.Address `` /* 131-byte string literal not displayed */
	PublicKey               []byte                                            `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"public_key" yaml:"public_key"`
	Jailed                  bool                                              `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed"`
	Status                  int32                                             `protobuf:"varint,4,opt,name=status,proto3" json:"status"`
	Chains                  []string                                          `protobuf:"bytes,5,rep,name=Chains,proto3" json:"chains"`
	ServiceURL              string                                            `protobuf:"bytes,6,opt,name=ServiceURL,proto3" json:"service_url"`
	StakedTokens            github_com_pokt_network_pocket_core_types.BigInt  `protobuf:"bytes,7,opt,name=StakedTokens,proto3,customtype=github.com/pokt-network/pocket-core/types.BigInt" json:"tokens"`
	UnstakingCompletionTime time.Time                                         `protobuf:"bytes,8,opt,name=UnstakingCompletionTime,proto3,stdtime" json:"unstaking_time" yaml:"unstaking_time"`
	OutputAddress           github_com_pokt_network_pocket_core_types.Address `` /* 161-byte string literal not displayed */
	RewardDelegators        map[string]uint32                                 `` /* 201-byte string literal not displayed */
}

func (*ProtoValidator) Descriptor

func (*ProtoValidator) Descriptor() ([]byte, []int)

func (*ProtoValidator) Equal

func (this *ProtoValidator) Equal(that interface{}) bool

func (ProtoValidator) FromProto

func (v ProtoValidator) FromProto() (Validator, error)

FromProto converts the Protobuf structure to Validator

func (*ProtoValidator) Marshal

func (m *ProtoValidator) Marshal() (dAtA []byte, err error)

func (*ProtoValidator) MarshalTo

func (m *ProtoValidator) MarshalTo(dAtA []byte) (int, error)

func (*ProtoValidator) MarshalToSizedBuffer

func (m *ProtoValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProtoValidator) ProtoMessage

func (*ProtoValidator) ProtoMessage()

func (*ProtoValidator) Reset

func (m *ProtoValidator) Reset()

func (*ProtoValidator) Size

func (m *ProtoValidator) Size() (n int)

func (*ProtoValidator) String

func (m *ProtoValidator) String() string

func (*ProtoValidator) Unmarshal

func (m *ProtoValidator) Unmarshal(dAtA []byte) error

func (*ProtoValidator) XXX_DiscardUnknown

func (m *ProtoValidator) XXX_DiscardUnknown()

func (*ProtoValidator) XXX_Marshal

func (m *ProtoValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProtoValidator) XXX_Merge

func (m *ProtoValidator) XXX_Merge(src proto.Message)

func (*ProtoValidator) XXX_Size

func (m *ProtoValidator) XXX_Size() int

func (*ProtoValidator) XXX_Unmarshal

func (m *ProtoValidator) XXX_Unmarshal(b []byte) error

type QueryAccountBalanceParams

type QueryAccountBalanceParams struct {
	sdk.Address
}

type QueryAccountParams

type QueryAccountParams struct {
	sdk.Address
}

type QuerySigningInfoParams

type QuerySigningInfoParams struct {
	Address sdk.Address
}

func NewQuerySigningInfoParams

func NewQuerySigningInfoParams(consAddr sdk.Address) QuerySigningInfoParams

type QuerySigningInfosParams

type QuerySigningInfosParams struct {
	Page, Limit int
}

func NewQuerySigningInfosParams

func NewQuerySigningInfosParams(page, limit int) QuerySigningInfosParams

type QueryStakedValidatorsParams

type QueryStakedValidatorsParams struct {
	Page, Limit int
}

func NewQueryStakedValidatorsParams

func NewQueryStakedValidatorsParams(page, limit int) QueryStakedValidatorsParams

type QueryUnstakedValidatorsParams

type QueryUnstakedValidatorsParams struct {
	Page, Limit int
}

func NewQueryUnstakedValidatorsParams

func NewQueryUnstakedValidatorsParams(page, limit int) QueryUnstakedValidatorsParams

type QueryUnstakingValidatorsParams

type QueryUnstakingValidatorsParams struct {
	Page, Limit int
}

func NewQueryUnstakingValidatorsParams

func NewQueryUnstakingValidatorsParams(page, limit int) QueryUnstakingValidatorsParams

type QueryValidatorParams

type QueryValidatorParams struct {
	Address sdk.Address
}

func NewQueryValidatorParams

func NewQueryValidatorParams(validatorAddr sdk.Address) QueryValidatorParams

type QueryValidatorsParams

type QueryValidatorsParams struct {
	StakingStatus sdk.StakeStatus `json:"staking_status"`
	JailedStatus  int             `json:"jailed_status"`
	Blockchain    string          `json:"blockchain"`
	Page          int             `json:"page"`
	Limit         int             `json:"per_page"`
}

func (QueryValidatorsParams) IsValid

func (opts QueryValidatorsParams) IsValid(val Validator) bool

"IsValid" - Checks that the validator is valid for the options passed

type StakingPool

type StakingPool Pool

Tokens - tracking staked token supply

func (StakingPool) String

func (bp StakingPool) String() string

String returns a human readable string representation of a pool.

type Validator

type Validator struct {
	Address                 sdk.Address      `json:"address" yaml:"address"`                         // address of the validator; hex encoded in JSON
	PublicKey               crypto.PublicKey `json:"public_key" yaml:"public_key"`                   // the consensus public key of the validator; hex encoded in JSON
	Jailed                  bool             `json:"jailed" yaml:"jailed"`                           // has the validator been jailed from staked status?
	Status                  sdk.StakeStatus  `json:"status" yaml:"status"`                           // validator status (staked/unstaking/unstaked)
	Chains                  []string         `json:"chains" yaml:"chains"`                           // validator non native blockchains
	ServiceURL              string           `json:"service_url" yaml:"service_url"`                 // url where the pocket service api is hosted
	StakedTokens            sdk.BigInt       `json:"tokens" yaml:"tokens"`                           // tokens staked in the network
	UnstakingCompletionTime time.Time        `json:"unstaking_time" yaml:"unstaking_time"`           // if unstaking, min time for the validator to complete unstaking
	OutputAddress           sdk.Address      `json:"output_address,omitempty" yaml:"output_address"` // the custodial output address of the validator
	// Mapping from delegated-to addresses to a percentage of rewards
	RewardDelegators map[string]uint32 `json:"reward_delegators,omitempty" yaml:"reward_delegators"`
}

func NewValidator

func NewValidator(addr sdk.Address, consPubKey crypto.PublicKey, chains []string, serviceURL string, tokensToStake sdk.BigInt, outputAddress sdk.Address) Validator

NewValidator - initialize a new validator

func NewValidatorFromMsg

func NewValidatorFromMsg(msg MsgStake) Validator

func (Validator) ABCIValidatorUpdate

func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate

ABCIValidatorUpdate returns an abci.ValidatorUpdate from a staking validator type with the full validator power

func (Validator) ABCIValidatorZeroUpdate

func (v Validator) ABCIValidatorZeroUpdate() abci.ValidatorUpdate

ABCIValidatorUpdate returns an abci.ValidatorUpdate from a staking validator type with the full validator power

func (Validator) AddStakedTokens

func (v Validator) AddStakedTokens(tokens sdk.BigInt) (Validator, error)

AddStakedTokens tokens to staked field for a validator

func (Validator) ConsensusPower

func (v Validator) ConsensusPower() int64

get the consensus-engine power a reduction of 10^6 from validator tokens is applied

func (Validator) Equals

func (v Validator) Equals(v2 Validator) bool

compares the vital fields of two validator structures

func (Validator) GetAddress

func (v Validator) GetAddress() sdk.Address

func (Validator) GetChains

func (v Validator) GetChains() []string

func (Validator) GetConsensusPower

func (v Validator) GetConsensusPower() int64

func (Validator) GetPublicKey

func (v Validator) GetPublicKey() crypto.PublicKey

func (Validator) GetServiceURL

func (v Validator) GetServiceURL() string

func (Validator) GetStatus

func (v Validator) GetStatus() sdk.StakeStatus

func (Validator) GetTokens

func (v Validator) GetTokens() sdk.BigInt

func (Validator) HasChain

func (v Validator) HasChain(netID string) bool

func (Validator) IsJailed

func (v Validator) IsJailed() bool

func (Validator) IsStaked

func (v Validator) IsStaked() bool

func (Validator) IsUnstaked

func (v Validator) IsUnstaked() bool

func (Validator) IsUnstaking

func (v Validator) IsUnstaking() bool

func (Validator) Marshal

func (v Validator) Marshal() ([]byte, error)

func (Validator) MarshalJSON

func (v Validator) MarshalJSON() ([]byte, error)

MarshalJSON marshals the validator to JSON using Hex

func (Validator) MarshalTo

func (v Validator) MarshalTo(data []byte) (n int, err error)

func (Validator) MarshalToSizedBuffer

func (v Validator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (Validator) ProtoMessage

func (v Validator) ProtoMessage()

func (Validator) RemoveStakedTokens

func (v Validator) RemoveStakedTokens(tokens sdk.BigInt) (Validator, error)

RemoveStakedTokens removes tokens from a validator

func (*Validator) Reset

func (v *Validator) Reset()

func (Validator) Size

func (v Validator) Size() int

func (Validator) String

func (v Validator) String() string

String returns a human readable string representation of a validator.

func (Validator) ToLegacy

func (v Validator) ToLegacy() LegacyValidator

func (Validator) ToProto

func (v Validator) ToProto() ProtoValidator

ToProto converts the validator to Protobuf compatible structure

func (*Validator) Unmarshal

func (v *Validator) Unmarshal(data []byte) error

func (*Validator) UnmarshalJSON

func (v *Validator) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals the validator from JSON using Hex

func (Validator) UpdateStatus

func (v Validator) UpdateStatus(newStatus sdk.StakeStatus) Validator

UpdateStatus updates the staking status

type ValidatorSet

type ValidatorSet interface {
	// iterate through validators by address, execute func for each validator
	IterateAndExecuteOverVals(sdk.Ctx, func(index int64, validator posexported.ValidatorI) (stop bool))
	// iterate through staked validators by address, execute func for each validator
	IterateAndExecuteOverStakedVals(sdk.Ctx, func(index int64, validator posexported.ValidatorI) (stop bool))
	// iterate through the validator set of the prevState block by address, execute func for each validator
	IterateAndExecuteOverPrevStateVals(sdk.Ctx, func(index int64, validator posexported.ValidatorI) (stop bool))
	// get a particular validator by address
	Validator(sdk.Ctx, sdk.Address) posexported.ValidatorI
	// total staked tokens within the validator set
	TotalTokens(sdk.Ctx) sdk.BigInt
	// jail a validator
	JailValidator(sdk.Ctx, sdk.Address)
	// unjail a validator
	UnjailValidator(sdk.Ctx, sdk.Address)
	// MaxValidators returns the maximum amount of staked validators
	MaxValidators(sdk.Ctx) int64
}

ValidatorSet expected properties for the set of all validators (noalias)

type ValidatorSigningInfo

type ValidatorSigningInfo struct {
	Address github_com_pokt_network_pocket_core_types.Address `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/pokt-network/pocket-core/types.Address" json:"address"`
	// 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" yaml:"start_height"`
	// index offset into signed block bit array
	Index int64 `protobuf:"varint,3,opt,name=Index,proto3" json:"index_offset" yaml:"index_offset"`
	// timestamp validator cannot be unjailed until
	JailedUntil time.Time `protobuf:"bytes,4,opt,name=jailed_until,json=jailedUntil,proto3,stdtime" json:"jailed_until" yaml:"jailed_until"`
	// missed blocks counter (to avoid scanning the array every time)
	MissedBlocksCounter int64 `` /* 140-byte string literal not displayed */
	JailedBlocksCounter int64 `` /* 140-byte string literal not displayed */
}

ValidatorSigningInfo defines the signing info for a validator

func (*ValidatorSigningInfo) Descriptor

func (*ValidatorSigningInfo) Descriptor() ([]byte, []int)

func (*ValidatorSigningInfo) Equal

func (this *ValidatorSigningInfo) Equal(that interface{}) bool

func (*ValidatorSigningInfo) GetAddress

func (*ValidatorSigningInfo) GetIndex

func (m *ValidatorSigningInfo) GetIndex() int64

func (*ValidatorSigningInfo) GetJailedBlocksCounter

func (m *ValidatorSigningInfo) GetJailedBlocksCounter() 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) 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) ResetSigningInfo

func (i *ValidatorSigningInfo) ResetSigningInfo()

func (*ValidatorSigningInfo) Size

func (m *ValidatorSigningInfo) Size() (n int)

func (ValidatorSigningInfo) String

func (i ValidatorSigningInfo) String() string

Return human readable signing info

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

type Validators

type Validators []Validator

Validators is a collection of Validator

func (Validators) String

func (v Validators) String() (out string)

type ValidatorsPage

type ValidatorsPage struct {
	Result Validators `json:"result"`
	Total  int        `json:"total_pages"`
	Page   int        `json:"page"`
}

func (ValidatorsPage) String

func (vP ValidatorsPage) String() string

String returns a human readable string representation of a validator page

Jump to

Keyboard shortcuts

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