Documentation ¶
Index ¶
- Constants
- Variables
- func AddressForValidatorByNetworkIDKey(key, networkID []byte) sdk.Address
- func AddressFromKey(key []byte) []byte
- func CompareSlices[T comparable](a, b []T) bool
- func CompareStringMaps[T comparable](a, b map[string]T) bool
- func ErrBadDelegationAmount(codespace sdk.CodespaceType) sdk.Error
- func ErrBadDenom(codespace sdk.CodespaceType) sdk.Error
- func ErrBadSendAmount(codespace sdk.CodespaceType) sdk.Error
- func ErrCantHandleEvidence(codespace sdk.CodespaceType) sdk.Error
- func ErrDisallowedOutputAddressEdit(codespace sdk.CodespaceType) sdk.Error
- func ErrDisallowedRewardDelegatorEdit(codespace sdk.CodespaceType) sdk.Error
- func ErrInvalidNetworkIdentifier(codespace sdk.CodespaceType, err error) sdk.Error
- func ErrInvalidRewardDelegators(codespace sdk.CodespaceType, reason string) sdk.Error
- func ErrInvalidServiceURL(codespace sdk.CodespaceType, err error) sdk.Error
- func ErrMinimumEditStake(codespace sdk.CodespaceType) sdk.Error
- func ErrMinimumStake(codespace sdk.CodespaceType) sdk.Error
- func ErrMissingSelfDelegation(codespace sdk.CodespaceType) sdk.Error
- func ErrNilOutputAddr(codespace sdk.CodespaceType) sdk.Error
- func ErrNilSignerAddr(codespace sdk.CodespaceType) sdk.Error
- func ErrNilValidatorAddr(codespace sdk.CodespaceType) sdk.Error
- func ErrNoChains(codespace sdk.CodespaceType) sdk.Error
- func ErrNoServiceURL(codespace sdk.CodespaceType) sdk.Error
- func ErrNoSigningInfoFound(codespace sdk.CodespaceType, consAddr sdk.Address) sdk.Error
- func ErrNoValidatorForAddress(codespace sdk.CodespaceType) sdk.Error
- func ErrNoValidatorFound(codespace sdk.CodespaceType) sdk.Error
- func ErrNotEnoughCoins(codespace sdk.CodespaceType) sdk.Error
- func ErrSameBinEditStake(codespace sdk.CodespaceType) sdk.Error
- func ErrSelfDelegationTooLowToUnjail(codespace sdk.CodespaceType) sdk.Error
- func ErrStateConversion(codespace sdk.CodespaceType, err error) sdk.Error
- func ErrTooManyChains(codespace sdk.CodespaceType) sdk.Error
- func ErrUnauthorizedSigner(codespace sdk.CodespaceType) sdk.Error
- func ErrUnequalOutputAddr(codespace sdk.CodespaceType) sdk.Error
- func ErrValidatorJailed(codespace sdk.CodespaceType) sdk.Error
- func ErrValidatorNotJailed(codespace sdk.CodespaceType) sdk.Error
- func ErrValidatorPubKeyExists(codespace sdk.CodespaceType) sdk.Error
- func ErrValidatorPubKeyTypeNotSupported(codespace sdk.CodespaceType, keyType string, supportedTypes []string) sdk.Error
- func ErrValidatorStatus(codespace sdk.CodespaceType) sdk.Error
- func ErrValidatorTombstoned(codespace sdk.CodespaceType) sdk.Error
- func ErrValidatorWaitingToUnstake(codespace sdk.CodespaceType) sdk.Error
- func GetValMissedBlockKey(v sdk.Address, i int64) []byte
- func GetValMissedBlockPrefixKey(v sdk.Address) []byte
- func GetValidatorSigningInfoAddress(key []byte) (addr sdk.Address, err error)
- func InitConfig(validatorCacheSize int64)
- func KeyForUnstakingValidators(unstakingTime time.Time) []byte
- func KeyForValByAllVals(addr sdk.Address) []byte
- func KeyForValWaitingToBeginUnstaking(addr sdk.Address) []byte
- func KeyForValidatorAward(address sdk.Address) []byte
- func KeyForValidatorBurn(address sdk.Address) []byte
- func KeyForValidatorByNetworkID(addr sdk.Address, networkID []byte) []byte
- func KeyForValidatorInStakingSet(validator Validator) []byte
- func KeyForValidatorPrevStateStateByPower(address sdk.Address) []byte
- func KeyForValidatorSigningInfo(v sdk.Address) []byte
- func KeyForValidatorsByNetworkID(networkID []byte) []byte
- func RegisterCodec(cdc *codec.Codec)
- func ValidateNetworkIdentifier(chain string) sdk.Error
- func ValidateServiceURL(u string) sdk.Error
- type AddressAndShare
- type AuthKeeper
- type CodeType
- type GenesisState
- type JSONValidator
- type LegacyMsgBeginUnstake
- func (*LegacyMsgBeginUnstake) Descriptor() ([]byte, []int)
- func (this *LegacyMsgBeginUnstake) Equal(that interface{}) bool
- func (m LegacyMsgBeginUnstake) GetFee() sdk.BigInt
- func (m LegacyMsgBeginUnstake) GetRecipient() sdk.Address
- func (m LegacyMsgBeginUnstake) GetSignBytes() []byte
- func (m LegacyMsgBeginUnstake) GetSigners() []sdk.Address
- func (m *LegacyMsgBeginUnstake) Marshal() (dAtA []byte, err error)
- func (m *LegacyMsgBeginUnstake) MarshalTo(dAtA []byte) (int, error)
- func (m *LegacyMsgBeginUnstake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LegacyMsgBeginUnstake) ProtoMessage()
- func (m *LegacyMsgBeginUnstake) Reset()
- func (m LegacyMsgBeginUnstake) Route() string
- func (m *LegacyMsgBeginUnstake) Size() (n int)
- func (m *LegacyMsgBeginUnstake) String() string
- func (m LegacyMsgBeginUnstake) Type() string
- func (m *LegacyMsgBeginUnstake) Unmarshal(dAtA []byte) error
- func (m LegacyMsgBeginUnstake) ValidateBasic() sdk.Error
- func (m *LegacyMsgBeginUnstake) XXX_DiscardUnknown()
- func (m *LegacyMsgBeginUnstake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LegacyMsgBeginUnstake) XXX_Merge(src proto.Message)
- func (*LegacyMsgBeginUnstake) XXX_MessageName() string
- func (m *LegacyMsgBeginUnstake) XXX_Size() int
- func (m *LegacyMsgBeginUnstake) XXX_Unmarshal(b []byte) error
- type LegacyMsgProtoStake
- func (*LegacyMsgProtoStake) Descriptor() ([]byte, []int)
- func (this *LegacyMsgProtoStake) Equal(that interface{}) bool
- func (m *LegacyMsgProtoStake) Marshal() (dAtA []byte, err error)
- func (m *LegacyMsgProtoStake) MarshalTo(dAtA []byte) (int, error)
- func (m *LegacyMsgProtoStake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LegacyMsgProtoStake) ProtoMessage()
- func (m *LegacyMsgProtoStake) Reset()
- func (m *LegacyMsgProtoStake) Size() (n int)
- func (m *LegacyMsgProtoStake) String() string
- func (m *LegacyMsgProtoStake) Unmarshal(dAtA []byte) error
- func (m *LegacyMsgProtoStake) XXX_DiscardUnknown()
- func (m *LegacyMsgProtoStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LegacyMsgProtoStake) XXX_Merge(src proto.Message)
- func (*LegacyMsgProtoStake) XXX_MessageName() string
- func (m *LegacyMsgProtoStake) XXX_Size() int
- func (m *LegacyMsgProtoStake) XXX_Unmarshal(b []byte) error
- type LegacyMsgStake
- func (m LegacyMsgStake) GetFee() sdk.BigInt
- func (m LegacyMsgStake) GetRecipient() sdk.Address
- func (m LegacyMsgStake) GetSignBytes() []byte
- func (m LegacyMsgStake) GetSigners() []sdk.Address
- func (m *LegacyMsgStake) LegacyToProto() LegacyMsgProtoStake
- func (msg *LegacyMsgStake) Marshal() ([]byte, error)
- func (msg *LegacyMsgStake) MarshalTo(data []byte) (n int, err error)
- func (msg *LegacyMsgStake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *LegacyMsgStake) ProtoMessage()
- func (m *LegacyMsgStake) Reset()
- func (m LegacyMsgStake) Route() string
- func (msg *LegacyMsgStake) Size() int
- func (m *LegacyMsgStake) String() string
- func (m LegacyMsgStake) Type() string
- func (msg *LegacyMsgStake) Unmarshal(data []byte) error
- func (m LegacyMsgStake) ValidateBasic() sdk.Error
- func (msg *LegacyMsgStake) XXX_MessageName() string
- type LegacyMsgUnjail
- func (*LegacyMsgUnjail) Descriptor() ([]byte, []int)
- func (this *LegacyMsgUnjail) Equal(that interface{}) bool
- func (m LegacyMsgUnjail) GetFee() sdk.BigInt
- func (m LegacyMsgUnjail) GetRecipient() sdk.Address
- func (m LegacyMsgUnjail) GetSignBytes() []byte
- func (m LegacyMsgUnjail) GetSigners() []sdk.Address
- func (m *LegacyMsgUnjail) Marshal() (dAtA []byte, err error)
- func (m *LegacyMsgUnjail) MarshalTo(dAtA []byte) (int, error)
- func (m *LegacyMsgUnjail) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LegacyMsgUnjail) ProtoMessage()
- func (m *LegacyMsgUnjail) Reset()
- func (m LegacyMsgUnjail) Route() string
- func (m *LegacyMsgUnjail) Size() (n int)
- func (m *LegacyMsgUnjail) String() string
- func (m LegacyMsgUnjail) Type() string
- func (m *LegacyMsgUnjail) Unmarshal(dAtA []byte) error
- func (m LegacyMsgUnjail) ValidateBasic() sdk.Error
- func (m *LegacyMsgUnjail) XXX_DiscardUnknown()
- func (m *LegacyMsgUnjail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LegacyMsgUnjail) XXX_Merge(src proto.Message)
- func (*LegacyMsgUnjail) XXX_MessageName() string
- func (m *LegacyMsgUnjail) XXX_Size() int
- func (m *LegacyMsgUnjail) XXX_Unmarshal(b []byte) error
- type LegacyProtoValidator
- func (*LegacyProtoValidator) Descriptor() ([]byte, []int)
- func (this *LegacyProtoValidator) Equal(that interface{}) bool
- func (v LegacyProtoValidator) FromProto() (LegacyValidator, error)
- func (m *LegacyProtoValidator) Marshal() (dAtA []byte, err error)
- func (m *LegacyProtoValidator) MarshalTo(dAtA []byte) (int, error)
- func (m *LegacyProtoValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LegacyProtoValidator) ProtoMessage()
- func (m *LegacyProtoValidator) Reset()
- func (m *LegacyProtoValidator) Size() (n int)
- func (m *LegacyProtoValidator) String() string
- func (m *LegacyProtoValidator) Unmarshal(dAtA []byte) error
- func (m *LegacyProtoValidator) XXX_DiscardUnknown()
- func (m *LegacyProtoValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LegacyProtoValidator) XXX_Merge(src proto.Message)
- func (m *LegacyProtoValidator) XXX_Size() int
- func (m *LegacyProtoValidator) XXX_Unmarshal(b []byte) error
- type LegacyValidator
- func (v LegacyValidator) Equals(v2 LegacyValidator) bool
- func (v *LegacyValidator) GetAddress() sdk.Address
- func (v *LegacyValidator) GetChains() []string
- func (v *LegacyValidator) GetConsensusPower() int64
- func (v *LegacyValidator) GetPublicKey() crypto.PublicKey
- func (v *LegacyValidator) GetStatus() sdk.StakeStatus
- func (v *LegacyValidator) GetTokens() sdk.BigInt
- func (v *LegacyValidator) IsJailed() bool
- func (v *LegacyValidator) IsStaked() bool
- func (v *LegacyValidator) IsUnstaked() bool
- func (v *LegacyValidator) IsUnstaking() bool
- func (v *LegacyValidator) Marshal() ([]byte, error)
- func (v *LegacyValidator) MarshalTo(data []byte) (n int, err error)
- func (v *LegacyValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (v LegacyValidator) ProtoMessage()
- func (v *LegacyValidator) Reset()
- func (v *LegacyValidator) Size() int
- func (v LegacyValidator) String() string
- func (v LegacyValidator) ToProto() LegacyProtoValidator
- func (v LegacyValidator) ToValidator() Validator
- func (v *LegacyValidator) Unmarshal(data []byte) error
- type MissedBlock
- type MsgBeginUnstake
- func (*MsgBeginUnstake) Descriptor() ([]byte, []int)
- func (this *MsgBeginUnstake) Equal(that interface{}) bool
- func (msg MsgBeginUnstake) GetFee() sdk.BigInt
- func (msg MsgBeginUnstake) GetRecipient() sdk.Address
- func (msg MsgBeginUnstake) GetSignBytes() []byte
- func (msg MsgBeginUnstake) GetSigners() []sdk.Address
- func (m *MsgBeginUnstake) Marshal() (dAtA []byte, err error)
- func (m *MsgBeginUnstake) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBeginUnstake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBeginUnstake) ProtoMessage()
- func (m *MsgBeginUnstake) Reset()
- func (msg MsgBeginUnstake) Route() string
- func (m *MsgBeginUnstake) Size() (n int)
- func (m *MsgBeginUnstake) String() string
- func (msg MsgBeginUnstake) Type() string
- func (m *MsgBeginUnstake) Unmarshal(dAtA []byte) error
- func (msg MsgBeginUnstake) ValidateBasic() sdk.Error
- func (m *MsgBeginUnstake) XXX_DiscardUnknown()
- func (m *MsgBeginUnstake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBeginUnstake) XXX_Merge(src proto.Message)
- func (*MsgBeginUnstake) XXX_MessageName() string
- func (m *MsgBeginUnstake) XXX_Size() int
- func (m *MsgBeginUnstake) XXX_Unmarshal(b []byte) error
- type MsgProtoStake
- func (*MsgProtoStake) Descriptor() ([]byte, []int)
- func (this *MsgProtoStake) Equal(that interface{}) bool
- func (m *MsgProtoStake) Marshal() (dAtA []byte, err error)
- func (m *MsgProtoStake) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgProtoStake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgProtoStake) ProtoMessage()
- func (m *MsgProtoStake) Reset()
- func (m *MsgProtoStake) Size() (n int)
- func (m *MsgProtoStake) String() string
- func (m *MsgProtoStake) Unmarshal(dAtA []byte) error
- func (m *MsgProtoStake) XXX_DiscardUnknown()
- func (m *MsgProtoStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgProtoStake) XXX_Merge(src proto.Message)
- func (*MsgProtoStake) XXX_MessageName() string
- func (m *MsgProtoStake) XXX_Size() int
- func (m *MsgProtoStake) XXX_Unmarshal(b []byte) error
- type MsgSend
- func (*MsgSend) Descriptor() ([]byte, []int)
- func (this *MsgSend) Equal(that interface{}) bool
- func (msg MsgSend) GetFee() sdk.BigInt
- func (m *MsgSend) GetFromAddress() github_com_pokt_network_pocket_core_types.Address
- func (msg MsgSend) GetRecipient() sdk.Address
- func (msg MsgSend) GetSignBytes() []byte
- func (msg MsgSend) GetSigners() []sdk.Address
- func (m *MsgSend) GetToAddress() github_com_pokt_network_pocket_core_types.Address
- func (m *MsgSend) Marshal() (dAtA []byte, err error)
- func (m *MsgSend) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSend) ProtoMessage()
- func (m *MsgSend) Reset()
- func (msg MsgSend) Route() string
- func (m *MsgSend) Size() (n int)
- func (m *MsgSend) String() string
- func (msg MsgSend) Type() string
- func (m *MsgSend) Unmarshal(dAtA []byte) error
- func (msg MsgSend) ValidateBasic() sdk.Error
- func (m *MsgSend) XXX_DiscardUnknown()
- func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSend) XXX_Merge(src proto.Message)
- func (*MsgSend) XXX_MessageName() string
- func (m *MsgSend) XXX_Size() int
- func (m *MsgSend) XXX_Unmarshal(b []byte) error
- type MsgStake
- func (msg MsgStake) CheckRewardDelegators() sdk.Error
- func (msg MsgStake) CheckServiceUrlLength(url string) sdk.Error
- func (msg MsgStake) GetFee() sdk.BigInt
- func (msg MsgStake) GetRecipient() sdk.Address
- func (msg MsgStake) GetSignBytes() []byte
- func (msg MsgStake) GetSigners() []sdk.Address
- func (msg MsgStake) LegacyToProto() LegacyMsgProtoStake
- func (msg *MsgStake) Marshal() ([]byte, error)
- func (msg *MsgStake) MarshalTo(data []byte) (n int, err error)
- func (msg *MsgStake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (msg *MsgStake) ProtoMessage()
- func (msg *MsgStake) Reset()
- func (msg MsgStake) Route() string
- func (msg *MsgStake) Size() int
- func (msg MsgStake) String() string
- func (msg MsgStake) ToProto() MsgProtoStake
- func (msg MsgStake) Type() string
- func (msg *MsgStake) Unmarshal(data []byte) error
- func (msg MsgStake) ValidateBasic() sdk.Error
- func (msg *MsgStake) XXX_MessageName() string
- type MsgUnjail
- func (*MsgUnjail) Descriptor() ([]byte, []int)
- func (this *MsgUnjail) Equal(that interface{}) bool
- func (msg MsgUnjail) GetFee() sdk.BigInt
- func (msg MsgUnjail) GetRecipient() sdk.Address
- func (msg MsgUnjail) GetSignBytes() []byte
- func (msg MsgUnjail) GetSigners() []sdk.Address
- func (m *MsgUnjail) Marshal() (dAtA []byte, err error)
- func (m *MsgUnjail) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUnjail) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUnjail) ProtoMessage()
- func (m *MsgUnjail) Reset()
- func (msg MsgUnjail) Route() string
- func (m *MsgUnjail) Size() (n int)
- func (m *MsgUnjail) String() string
- func (msg MsgUnjail) Type() string
- func (m *MsgUnjail) Unmarshal(dAtA []byte) error
- func (msg MsgUnjail) ValidateBasic() sdk.Error
- func (m *MsgUnjail) XXX_DiscardUnknown()
- func (m *MsgUnjail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUnjail) XXX_Merge(src proto.Message)
- func (*MsgUnjail) XXX_MessageName() string
- func (m *MsgUnjail) XXX_Size() int
- func (m *MsgUnjail) XXX_Unmarshal(b []byte) error
- type Params
- type PocketKeeper
- type Pool
- type PrevStatePowerMapping
- type ProtoValidator
- func (*ProtoValidator) Descriptor() ([]byte, []int)
- func (this *ProtoValidator) Equal(that interface{}) bool
- func (v ProtoValidator) FromProto() (Validator, error)
- func (m *ProtoValidator) Marshal() (dAtA []byte, err error)
- func (m *ProtoValidator) MarshalTo(dAtA []byte) (int, error)
- func (m *ProtoValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProtoValidator) ProtoMessage()
- func (m *ProtoValidator) Reset()
- func (m *ProtoValidator) Size() (n int)
- func (m *ProtoValidator) String() string
- func (m *ProtoValidator) Unmarshal(dAtA []byte) error
- func (m *ProtoValidator) XXX_DiscardUnknown()
- func (m *ProtoValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProtoValidator) XXX_Merge(src proto.Message)
- func (m *ProtoValidator) XXX_Size() int
- func (m *ProtoValidator) XXX_Unmarshal(b []byte) error
- type QueryAccountBalanceParams
- type QueryAccountParams
- type QuerySigningInfoParams
- type QuerySigningInfosParams
- type QueryStakedValidatorsParams
- type QueryUnstakedValidatorsParams
- type QueryUnstakingValidatorsParams
- type QueryValidatorParams
- type QueryValidatorsParams
- type StakingPool
- type Validator
- func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate
- func (v Validator) ABCIValidatorZeroUpdate() abci.ValidatorUpdate
- func (v Validator) AddStakedTokens(tokens sdk.BigInt) (Validator, error)
- func (v Validator) ConsensusPower() int64
- func (v Validator) Equals(v2 Validator) bool
- func (v Validator) GetAddress() sdk.Address
- func (v Validator) GetChains() []string
- func (v Validator) GetConsensusPower() int64
- func (v Validator) GetPublicKey() crypto.PublicKey
- func (v Validator) GetServiceURL() string
- func (v Validator) GetStatus() sdk.StakeStatus
- func (v Validator) GetTokens() sdk.BigInt
- func (v Validator) HasChain(netID string) bool
- func (v Validator) IsJailed() bool
- func (v Validator) IsStaked() bool
- func (v Validator) IsUnstaked() bool
- func (v Validator) IsUnstaking() bool
- func (v Validator) Marshal() ([]byte, error)
- func (v Validator) MarshalJSON() ([]byte, error)
- func (v Validator) MarshalTo(data []byte) (n int, err error)
- func (v Validator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (v Validator) ProtoMessage()
- func (v Validator) RemoveStakedTokens(tokens sdk.BigInt) (Validator, error)
- func (v *Validator) Reset()
- func (v Validator) Size() int
- func (v Validator) String() string
- func (v Validator) ToLegacy() LegacyValidator
- func (v Validator) ToProto() ProtoValidator
- func (v *Validator) Unmarshal(data []byte) error
- func (v *Validator) UnmarshalJSON(data []byte) error
- func (v Validator) UpdateStatus(newStatus sdk.StakeStatus) Validator
- type ValidatorSet
- type ValidatorSigningInfo
- func (*ValidatorSigningInfo) Descriptor() ([]byte, []int)
- func (this *ValidatorSigningInfo) Equal(that interface{}) bool
- func (m *ValidatorSigningInfo) GetAddress() github_com_pokt_network_pocket_core_types.Address
- func (m *ValidatorSigningInfo) GetIndex() int64
- func (m *ValidatorSigningInfo) GetJailedBlocksCounter() int64
- func (m *ValidatorSigningInfo) GetJailedUntil() time.Time
- func (m *ValidatorSigningInfo) GetMissedBlocksCounter() int64
- func (m *ValidatorSigningInfo) GetStartHeight() int64
- func (m *ValidatorSigningInfo) Marshal() (dAtA []byte, err error)
- func (m *ValidatorSigningInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorSigningInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorSigningInfo) ProtoMessage()
- func (m *ValidatorSigningInfo) Reset()
- func (i *ValidatorSigningInfo) ResetSigningInfo()
- func (m *ValidatorSigningInfo) Size() (n int)
- func (i ValidatorSigningInfo) String() string
- func (m *ValidatorSigningInfo) Unmarshal(dAtA []byte) error
- func (m *ValidatorSigningInfo) XXX_DiscardUnknown()
- func (m *ValidatorSigningInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorSigningInfo) XXX_Merge(src proto.Message)
- func (m *ValidatorSigningInfo) XXX_Size() int
- func (m *ValidatorSigningInfo) XXX_Unmarshal(b []byte) error
- type Validators
- type ValidatorsPage
Constants ¶
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
const ( StakeFee = 10000 UnstakeFee = 10000 UnjailFee = 10000 SendFee = 10000 )
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 )
const ( MsgStakeName = "stake_validator" MsgUnstakeName = "begin_unstake_validator" MsgUnjailName = "unjail_validator" MsgSendName = "send" )
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
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
const (
NetworkIdentifierLength = 2
)
const (
StakedPoolName = "staked_tokens_pool"
)
names used as root for pool module accounts: - StakingPool -> "staked_tokens_pool"
Variables ¶
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 )
var ( ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthNodes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNodes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupNodes = fmt.Errorf("proto: unexpected end of group") )
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
var (
DefaultRelaysToTokensMultiplierMap map[string]int64 = map[string]int64{}
)
POS params non-const default values
var ModuleCdc *codec.Codec // generic sealed codec to be used throughout this module
var ( NodeFeeMap = map[string]int64{ MsgStakeName: StakeFee, MsgUnstakeName: UnstakeFee, MsgUnjailName: UnjailFee, MsgSendName: SendFee, } )
var ValidatorCacheSize int64 = 10000
Functions ¶
func AddressFromKey ¶
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 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 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 ¶
generates the key for missing val who missed block through consensus addr
func GetValMissedBlockPrefixKey ¶
generates the prefix key for missing val who missed block through consensus addr
func GetValidatorSigningInfoAddress ¶
extract the address from a validator signing info key
func InitConfig ¶
func InitConfig(validatorCacheSize int64)
func KeyForUnstakingValidators ¶
generates the key for unstaking validators by the unstakingtime
func KeyForValByAllVals ¶
generates the key for the validator with address
func KeyForValidatorAward ¶
generates the award key for a validator in the current state
func KeyForValidatorBurn ¶
func KeyForValidatorInStakingSet ¶
generates the key for a validator in the staking set
func KeyForValidatorPrevStateStateByPower ¶
generates the key for a validator in the prevState state
func KeyForValidatorSigningInfo ¶
generates the key for validator signing information by consensus addr
func ValidateServiceURL ¶
Types ¶
type AddressAndShare ¶
type AddressAndShare struct {}
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 ¶
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 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) 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 ¶
func (v LegacyValidator) ToProto() LegacyProtoValidator
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) 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) 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) 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) GetFromAddress ¶
func (m *MsgSend) GetFromAddress() github_com_pokt_network_pocket_core_types.Address
func (MsgSend) GetRecipient ¶
func (MsgSend) GetSignBytes ¶
GetSignBytes returns the message bytes to sign over.
func (MsgSend) GetSigners ¶
GetSigners return address(es) that must sign over msg.GetSignBytes()
func (*MsgSend) GetToAddress ¶
func (m *MsgSend) GetToAddress() github_com_pokt_network_pocket_core_types.Address
func (*MsgSend) MarshalToSizedBuffer ¶
func (*MsgSend) ProtoMessage ¶
func (*MsgSend) ProtoMessage()
func (MsgSend) ValidateBasic ¶
ValidateBasic quick validity check, stateless
func (*MsgSend) XXX_DiscardUnknown ¶
func (m *MsgSend) XXX_DiscardUnknown()
func (*MsgSend) XXX_Marshal ¶
func (*MsgSend) XXX_MessageName ¶
func (*MsgSend) XXX_Unmarshal ¶
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 (MsgStake) CheckServiceUrlLength ¶
func (MsgStake) GetRecipient ¶
func (MsgStake) GetSignBytes ¶
GetSignBytes returns the message bytes to sign over.
func (MsgStake) GetSigners ¶
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) MarshalToSizedBuffer ¶
func (*MsgStake) ProtoMessage ¶
func (msg *MsgStake) ProtoMessage()
func (MsgStake) ValidateBasic ¶
ValidateBasic quick validity check, stateless
func (*MsgStake) XXX_MessageName ¶
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) GetRecipient ¶
func (MsgUnjail) GetSignBytes ¶
GetSignBytes returns the message bytes to sign over.
func (MsgUnjail) GetSigners ¶
GetSigners return address(es) that must sign over msg.GetSignBytes()
func (*MsgUnjail) MarshalToSizedBuffer ¶
func (*MsgUnjail) ProtoMessage ¶
func (*MsgUnjail) ProtoMessage()
func (MsgUnjail) ValidateBasic ¶
ValidateBasic quick validity check, stateless
func (*MsgUnjail) XXX_DiscardUnknown ¶
func (m *MsgUnjail) XXX_DiscardUnknown()
func (*MsgUnjail) XXX_Marshal ¶
func (*MsgUnjail) XXX_MessageName ¶
func (*MsgUnjail) XXX_Unmarshal ¶
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 (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() sdk.ParamSetPairs
Implements sdk.ParamSet
type PocketKeeper ¶
type PocketKeeper interface {
// clear the cache of validators for sessions and relays
ClearSessionCache()
}
type PrevStatePowerMapping ¶
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) 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 QueryAccountParams ¶
type QuerySigningInfoParams ¶
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 ¶
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 (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 ¶
AddStakedTokens tokens to staked field for a validator
func (Validator) ConsensusPower ¶
get the consensus-engine power a reduction of 10^6 from validator tokens is applied
func (Validator) GetAddress ¶
func (Validator) GetConsensusPower ¶
func (Validator) GetPublicKey ¶
func (Validator) GetServiceURL ¶
func (Validator) GetStatus ¶
func (v Validator) GetStatus() sdk.StakeStatus
func (Validator) IsUnstaked ¶
func (Validator) IsUnstaking ¶
func (Validator) MarshalJSON ¶
MarshalJSON marshals the validator to JSON using Hex
func (Validator) MarshalToSizedBuffer ¶
func (Validator) ProtoMessage ¶
func (v Validator) ProtoMessage()
func (Validator) RemoveStakedTokens ¶
RemoveStakedTokens removes tokens from 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) UnmarshalJSON ¶
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 (m *ValidatorSigningInfo) GetAddress() github_com_pokt_network_pocket_core_types.Address
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