Documentation ¶
Index ¶
- Constants
- func FilteredPaginate(cdc codec.Codec, prefixStore storetypes.KVStore, storeType int, ...) (*pagiquery.PageResponse, error)
- func GetIterator(prefixStore storetypes.KVStore, start []byte, reverse bool) db.Iterator
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToAdd sdk.Coin) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, ...)
- func (k Keeper) AddMetaNodeToBitMapIdxCache(networkAddr stratos.SdsAddress)
- func (k Keeper) AddResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, ...)
- func (k Keeper) AfterNodeBeginUnbonding(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)
- func (k Keeper) AfterNodeBonded(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)
- func (k Keeper) AfterNodeCreated(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)
- func (k Keeper) AfterNodeRemoved(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)
- func (k Keeper) BeforeNodeModified(ctx sdk.Context, network stratos.SdsAddress, isMetaNode bool)
- func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context)
- func (k Keeper) BondDenom(ctx sdk.Context) (res string)
- func (k *Keeper) CalculatePurchaseAmount(ctx sdk.Context, amount sdkmath.Int) (sdkmath.Int, sdkmath.Int, error)
- func (k Keeper) DecreaseOzoneLimitBySubtractDeposit(ctx sdk.Context, deposit sdkmath.Int) (ozoneLimitChange sdkmath.Int)
- func (k Keeper) DeductSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, coins sdk.Coins, ...) (remaining, deducted sdk.Coins)
- func (k Keeper) DeleteKickMetaNodeVotePool(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress)
- func (k Keeper) DeleteMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress)
- func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []string)
- func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)
- func (k Keeper) GetAllActiveMetaNodes(ctx sdk.Context) (metaNodes []types.MetaNode)
- func (k Keeper) GetAllExpiredKickMetaNodeVotePool(ctx sdk.Context) (votePools []types.KickMetaNodeVotePool)
- func (k Keeper) GetAllKickMetaNodeVotePool(ctx sdk.Context) (votePools []types.KickMetaNodeVotePool)
- func (k Keeper) GetAllMetaNodeRegVotePool(ctx sdk.Context) (votePools []types.MetaNodeRegistrationVotePool)
- func (k Keeper) GetAllMetaNodes(ctx sdk.Context) (metaNodes types.MetaNodes)
- func (k Keeper) GetAllResourceNodes(ctx sdk.Context) (resourceNodes types.ResourceNodes)
- func (k Keeper) GetAllUnbondingNode(ctx sdk.Context) (unbondingNodes []types.UnbondingNode)
- func (k Keeper) GetAllUnbondingNodesTotalBalance(ctx sdk.Context) sdkmath.Int
- func (k Keeper) GetBankKeeper() types.BankKeeper
- func (k Keeper) GetBondedMetaNodeCnt(ctx sdk.Context) (balance sdkmath.Int)
- func (k Keeper) GetBondedResourceNodeCnt(ctx sdk.Context) (balance sdkmath.Int)
- func (k Keeper) GetCurrNozPriceParams(ctx sdk.Context) (St, Pt, Lt sdkmath.Int)
- func (k Keeper) GetDepositInfoByMetaNode(ctx sdk.Context, node types.MetaNode) (types.DepositInfo, error)
- func (k Keeper) GetDepositInfoByResourceNode(ctx sdk.Context, node types.ResourceNode) (types.DepositInfo, error)
- func (k Keeper) GetDepositInfosByMetaNodes(ctx sdk.Context, metaNodes types.MetaNodes) ([]*types.DepositInfo, error)
- func (k Keeper) GetDepositInfosByResourceNodes(ctx sdk.Context, resourceNodes types.ResourceNodes) ([]*types.DepositInfo, error)
- func (k Keeper) GetDepositNozRate(ctx sdk.Context) (depositNozRate sdkmath.LegacyDec)
- func (k Keeper) GetEffectiveTotalDeposit(ctx sdk.Context) (deposit sdkmath.Int)
- func (k Keeper) GetInitialGenesisDepositTotal(ctx sdk.Context) (deposit sdkmath.Int)
- func (k Keeper) GetKickMetaNodeVotePool(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress) (votePool types.KickMetaNodeVotePool, found bool)
- func (k Keeper) GetMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (metaNode types.MetaNode, found bool)
- func (k Keeper) GetMetaNodeBitMapIndex(ctx sdk.Context, networkAddr stratos.SdsAddress) (index int, err error)
- func (k Keeper) GetMetaNodeBondedToken(ctx sdk.Context) (token sdk.Coin)
- func (k Keeper) GetMetaNodeIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetMetaNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin)
- func (k Keeper) GetMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress) (votePool types.MetaNodeRegistrationVotePool, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k *Keeper) GetPrepayParams(ctx sdk.Context) (St, Pt, Lt sdkmath.Int)
- func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdkmath.Int)
- func (k Keeper) GetResourceNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (resourceNode types.ResourceNode, found bool)
- func (k Keeper) GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin)
- func (k Keeper) GetResourceNodeIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetResourceNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin)
- func (k Keeper) GetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress) (res sdkmath.Int)
- func (k Keeper) GetTotalUnissuedPrepay(ctx sdk.Context) (totalUnissuedPrepay sdk.Coin)
- func (k Keeper) GetUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) (ubd types.UnbondingNode, found bool)
- func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.SdsAddress) sdkmath.Int
- func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []string)
- func (k Keeper) HandleVoteForKickMetaNode(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress, ...) (nodeStatus stakingtypes.BondStatus, ozoneLimitChange sdkmath.Int, ...)
- func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetworkAddr stratos.SdsAddress, ...) (ozoneLimitChange sdkmath.Int, nodeStatus stakingtypes.BondStatus, err error)
- func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr stratos.SdsAddress) bool
- func (k Keeper) IncreaseOzoneLimitByAddDeposit(ctx sdk.Context, deposit sdkmath.Int) (ozoneLimitChange sdkmath.Int)
- func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
- func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode, completionTime time.Time)
- func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdkmath.Int) bool
- func (k Keeper) IteratorSlashingInfo(ctx sdk.Context, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MaxEntries(ctx sdk.Context) (res uint32)
- func (k Keeper) OwnActivateMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) bool
- func (k Keeper) OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) bool
- func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ...) error
- func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ...) (ozoneLimitChange sdkmath.Int, err error)
- func (k Keeper) ReloadMetaNodeBitMapIdxCache(ctx sdk.Context)
- func (k Keeper) RemoveExpiredKickMetaNodeVotePool(ctx sdk.Context)
- func (k Keeper) RemoveMetaNodeFromBitMapIdxCache(networkAddr stratos.SdsAddress)
- func (k Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode(ctx sdk.Context, tokenToSub sdk.Coin) error
- func (k Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error
- func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress)
- func (k Keeper) ResourceNodeMinDeposit(ctx sdk.Context) (res sdk.Coin)
- func (k Keeper) ResourceNodeRegEnabled(ctx sdk.Context) (res bool)
- func (k Keeper) SetBondedMetaNodeCnt(ctx sdk.Context, count sdkmath.Int)
- func (k Keeper) SetBondedResourceNodeCnt(ctx sdk.Context, count sdkmath.Int)
- func (k Keeper) SetDepositNozRate(ctx sdk.Context, depositNozRate sdkmath.LegacyDec)
- func (k Keeper) SetEffectiveTotalDeposit(ctx sdk.Context, deposit sdkmath.Int)
- func (k Keeper) SetHooks(sh types.RegisterHooks) Keeper
- func (k Keeper) SetInitialGenesisDepositTotal(ctx sdk.Context, deposit sdkmath.Int)
- func (k Keeper) SetKickMetaNodeVotePool(ctx sdk.Context, votePool types.KickMetaNodeVotePool)
- func (k Keeper) SetMetaNode(ctx sdk.Context, metaNode types.MetaNode)
- func (k Keeper) SetMetaNodeRegistrationVotePool(ctx sdk.Context, votePool types.MetaNodeRegistrationVotePool)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) SetRemainingOzoneLimit(ctx sdk.Context, value sdkmath.Int)
- func (k Keeper) SetResourceNode(ctx sdk.Context, resourceNode types.ResourceNode)
- func (k Keeper) SetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, slashing sdkmath.Int)
- func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)
- func (k Keeper) SetUnbondingNodeEntry(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool, ...) types.UnbondingNode
- func (k Keeper) SetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time, networkAddrs []string)
- func (k Keeper) SubtractMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToSub sdk.Coin) error
- func (k Keeper) SubtractResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error
- func (k Keeper) UnbondMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress, ownerAddress sdk.AccAddress) (ozoneLimitChange sdkmath.Int, depositToRemove sdk.Coin, ...)
- func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress) (depositToRemove sdk.Coin, unbondingMatureTime time.Time, err error)
- func (k Keeper) UnbondingCompletionTime(ctx sdk.Context) (res time.Duration)
- func (k Keeper) UnbondingNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator
- func (k Keeper) UnbondingThreasholdTime(ctx sdk.Context) (res time.Duration)
- func (k Keeper) UpdateEffectiveDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ...) (ozoneLimitChange, effectiveDepositChange sdkmath.Int, ...)
- func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, networkAddr stratos.SdsAddress, ...) error
- func (k Keeper) UpdateMetaNodeBitMapIdxCache(ctx sdk.Context)
- func (k Keeper) UpdateMetaNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, ...) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, ...)
- func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Description, nodeType types.NodeType, ...) error
- func (k Keeper) UpdateResourceNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, ...) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, ...)
- func (k Keeper) VotingPeriod(ctx sdk.Context) (res time.Duration)
- type Migrator
- type Querier
- func (q Querier) BondedMetaNodeCount(c context.Context, _ *types.QueryBondedMetaNodeCountRequest) (*types.QueryBondedMetaNodeCountResponse, error)
- func (q Querier) BondedResourceNodeCount(c context.Context, _ *types.QueryBondedResourceNodeCountRequest) (*types.QueryBondedResourceNodeCountResponse, error)
- func (q Querier) DepositByNode(c context.Context, req *types.QueryDepositByNodeRequest) (*types.QueryDepositByNodeResponse, error)
- func (q Querier) DepositByOwner(c context.Context, req *types.QueryDepositByOwnerRequest) (*types.QueryDepositByOwnerResponse, error)
- func (q Querier) DepositTotal(c context.Context, _ *types.QueryDepositTotalRequest) (*types.QueryDepositTotalResponse, error)
- func (q Querier) MetaNode(c context.Context, req *types.QueryMetaNodeRequest) (*types.QueryMetaNodeResponse, error)
- func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (q Querier) RemainingOzoneLimit(c context.Context, _ *types.QueryRemainingOzoneLimitRequest) (*types.QueryRemainingOzoneLimitResponse, error)
- func (q Querier) ResourceNode(c context.Context, req *types.QueryResourceNodeRequest) (*types.QueryResourceNodeResponse, error)
Constants ¶
const (
KICK_VOTING_POOL_CLEANUP_INTERVAL = 10000 //every 10000 blocks
)
Variables ¶
This section is empty.
Functions ¶
func FilteredPaginate ¶ added in v0.8.0
func FilteredPaginate(cdc codec.Codec, prefixStore storetypes.KVStore, storeType int, queryOwnerAddr sdk.AccAddress, pageRequest *pagiquery.PageRequest, onResult func(key []byte, value []byte, accumulate bool) (bool, error), ) (*pagiquery.PageResponse, error)
storeType : 0-metaNode, 1-resourceNode
func GetIterator ¶ added in v0.8.0
func NewMsgServerImpl ¶ added in v0.8.0
NewMsgServerImpl returns an implementation of the bank MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the register store
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, key storetypes.StoreKey, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper, authority string, ) Keeper
NewKeeper creates a register keeper
func (Keeper) AddMetaNodeDeposit ¶ added in v0.10.0
func (k Keeper) AddMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToAdd sdk.Coin, ) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, err error)
AddMetaNodeDeposit Update the tokens of an existing meta node
func (Keeper) AddMetaNodeToBitMapIdxCache ¶ added in v0.10.0
func (k Keeper) AddMetaNodeToBitMapIdxCache(networkAddr stratos.SdsAddress)
func (Keeper) AddResourceNodeDeposit ¶ added in v0.10.0
func (k Keeper) AddResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin, ) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, err error)
AddResourceNodeDeposit Update the tokens of an existing resource node
func (Keeper) AfterNodeBeginUnbonding ¶ added in v0.4.0
func (k Keeper) AfterNodeBeginUnbonding(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)
AfterNodeBeginUnbonding - call hook if registered
func (Keeper) AfterNodeBonded ¶ added in v0.4.0
AfterNodeBonded - call hook if registered
func (Keeper) AfterNodeCreated ¶ added in v0.4.0
AfterNodeCreated - call hook if registered
func (Keeper) AfterNodeRemoved ¶ added in v0.4.0
AfterNodeRemoved - call hook if registered
func (Keeper) BeforeNodeModified ¶ added in v0.4.0
BeforeNodeModified - call hook if registered
func (Keeper) BlockRegisteredNodesUpdates ¶ added in v0.4.0
BlockRegisteredNodesUpdates Called in each EndBlock
func (*Keeper) CalculatePurchaseAmount ¶ added in v0.10.0
func (Keeper) DecreaseOzoneLimitBySubtractDeposit ¶ added in v0.10.0
func (Keeper) DeductSlashing ¶ added in v0.7.0
func (k Keeper) DeductSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, coins sdk.Coins, slashingDenom string) (remaining, deducted sdk.Coins)
DeductSlashing deduct slashing amount from coins, return the coins that after deduction
func (Keeper) DeleteKickMetaNodeVotePool ¶ added in v0.12.0
func (k Keeper) DeleteKickMetaNodeVotePool(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress)
func (Keeper) DeleteMetaNodeRegistrationVotePool ¶ added in v0.10.0
func (k Keeper) DeleteMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress)
func (Keeper) DequeueAllMatureUBDQueue ¶ added in v0.4.0
func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []string)
DequeueAllMatureUBDQueue returns a concatenated list of all the timeslices inclusively previous to currTime, and deletes the timeslices from the queue Iteration for dequeuing all mature unbonding queue TODO: Unused parameter: currTime
func (Keeper) ExportGenesis ¶ added in v0.12.0
func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)
ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis
func (Keeper) GetAllActiveMetaNodes ¶ added in v0.12.0
GetAllActiveMetaNodes get the set of all bonded & not suspended meta nodes
func (Keeper) GetAllExpiredKickMetaNodeVotePool ¶ added in v0.12.0
func (k Keeper) GetAllExpiredKickMetaNodeVotePool(ctx sdk.Context) (votePools []types.KickMetaNodeVotePool)
func (Keeper) GetAllKickMetaNodeVotePool ¶ added in v0.12.0
func (k Keeper) GetAllKickMetaNodeVotePool(ctx sdk.Context) (votePools []types.KickMetaNodeVotePool)
func (Keeper) GetAllMetaNodeRegVotePool ¶ added in v0.12.0
func (k Keeper) GetAllMetaNodeRegVotePool(ctx sdk.Context) (votePools []types.MetaNodeRegistrationVotePool)
func (Keeper) GetAllMetaNodes ¶ added in v0.8.0
GetAllMetaNodes get the set of all meta nodes with no limits, used during genesis dump Iteration for all meta nodes
func (Keeper) GetAllResourceNodes ¶
func (k Keeper) GetAllResourceNodes(ctx sdk.Context) (resourceNodes types.ResourceNodes)
GetAllResourceNodes get the set of all resource nodes with no limits, used during genesis dump Iteration for all resource nodes
func (Keeper) GetAllUnbondingNode ¶ added in v0.12.0
func (k Keeper) GetAllUnbondingNode(ctx sdk.Context) (unbondingNodes []types.UnbondingNode)
func (Keeper) GetAllUnbondingNodesTotalBalance ¶ added in v0.4.0
GetAllUnbondingNodesTotalBalance Iteration for getting the total balance of all unbonding nodes
func (Keeper) GetBankKeeper ¶ added in v0.10.0
func (k Keeper) GetBankKeeper() types.BankKeeper
func (Keeper) GetBondedMetaNodeCnt ¶ added in v0.8.0
func (Keeper) GetBondedResourceNodeCnt ¶ added in v0.8.0
func (Keeper) GetCurrNozPriceParams ¶ added in v0.11.0
GetCurrNozPriceParams calcs current noz price
func (Keeper) GetDepositInfoByMetaNode ¶ added in v0.12.0
func (Keeper) GetDepositInfoByResourceNode ¶ added in v0.12.0
func (k Keeper) GetDepositInfoByResourceNode(ctx sdk.Context, node types.ResourceNode) (types.DepositInfo, error)
func (Keeper) GetDepositInfosByMetaNodes ¶ added in v0.12.0
func (k Keeper) GetDepositInfosByMetaNodes( ctx sdk.Context, metaNodes types.MetaNodes, ) ([]*types.DepositInfo, error)
GetDepositInfosByMetaNodes Iteration for querying DepositInfos of meta nodes by owner(grpc)
func (Keeper) GetDepositInfosByResourceNodes ¶ added in v0.12.0
func (k Keeper) GetDepositInfosByResourceNodes( ctx sdk.Context, resourceNodes types.ResourceNodes, ) ([]*types.DepositInfo, error)
GetDepositInfosByResourceNodes Iteration for querying DepositInfos of resource nodes by owner(grpc)
func (Keeper) GetDepositNozRate ¶ added in v0.10.0
func (Keeper) GetEffectiveTotalDeposit ¶ added in v0.10.0
func (Keeper) GetInitialGenesisDepositTotal ¶ added in v0.10.0
deprecated
func (Keeper) GetKickMetaNodeVotePool ¶ added in v0.12.0
func (k Keeper) GetKickMetaNodeVotePool(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress) (votePool types.KickMetaNodeVotePool, found bool)
func (Keeper) GetMetaNode ¶ added in v0.8.0
func (k Keeper) GetMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (metaNode types.MetaNode, found bool)
GetMetaNode get a single meta node
func (Keeper) GetMetaNodeBitMapIndex ¶ added in v0.10.0
func (Keeper) GetMetaNodeBondedToken ¶ added in v0.8.0
func (Keeper) GetMetaNodeIterator ¶ added in v0.8.0
func (Keeper) GetMetaNodeNotBondedToken ¶ added in v0.8.0
func (Keeper) GetMetaNodeRegistrationVotePool ¶ added in v0.8.0
func (k Keeper) GetMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress) (votePool types.MetaNodeRegistrationVotePool, found bool)
func (*Keeper) GetPrepayParams ¶ added in v0.11.0
func (Keeper) GetRemainingOzoneLimit ¶
func (Keeper) GetResourceNode ¶
func (k Keeper) GetResourceNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (resourceNode types.ResourceNode, found bool)
GetResourceNode get a single resource node
func (Keeper) GetResourceNodeBondedToken ¶ added in v0.4.0
func (Keeper) GetResourceNodeIterator ¶ added in v0.8.0
func (Keeper) GetResourceNodeNotBondedToken ¶ added in v0.4.0
func (Keeper) GetSlashing ¶ added in v0.7.0
func (Keeper) GetTotalUnissuedPrepay ¶ added in v0.6.2
func (Keeper) GetUnbondingNode ¶ added in v0.4.0
func (k Keeper) GetUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) (ubd types.UnbondingNode, found bool)
GetUnbondingNode return a unbonding node
func (Keeper) GetUnbondingNodeBalance ¶ added in v0.4.0
func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.SdsAddress) sdkmath.Int
GetUnbondingNodeBalance returns an unbonding balance and an UnbondingNode
func (Keeper) GetUnbondingNodeQueueTimeSlice ¶ added in v0.4.0
func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []string)
GetUnbondingNodeQueueTimeSlice gets a specific unbonding queue timeslice. A timeslice is a slice of DVPairs corresponding to unbonding delegations that expire at a certain time.
func (Keeper) HandleVoteForKickMetaNode ¶ added in v0.12.0
func (k Keeper) HandleVoteForKickMetaNode(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress, opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) ( nodeStatus stakingtypes.BondStatus, ozoneLimitChange sdkmath.Int, depositToRemove sdk.Coin, unbondingMatureTime time.Time, err error)
Active meta node kick other meta node
func (Keeper) HandleVoteForMetaNodeRegistration ¶ added in v0.8.0
func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetworkAddr stratos.SdsAddress, candidateOwnerAddr sdk.AccAddress, opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) ( ozoneLimitChange sdkmath.Int, nodeStatus stakingtypes.BondStatus, err error)
func (Keeper) HasMaxUnbondingNodeEntries ¶ added in v0.4.0
HasMaxUnbondingNodeEntries - check if unbonding node has maximum number of entries
func (Keeper) IncreaseOzoneLimitByAddDeposit ¶ added in v0.10.0
func (Keeper) InitGenesis ¶ added in v0.12.0
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
InitGenesis initialize default parameters and the keeper's address to pubkey map
func (Keeper) InsertUnbondingNodeQueue ¶ added in v0.4.0
func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode, completionTime time.Time)
InsertUnbondingNodeQueue inserts an unbonding delegation to the appropriate timeslice in the unbonding queue
func (Keeper) IsUnbondable ¶ added in v0.10.0
func (Keeper) IteratorSlashingInfo ¶ added in v0.7.0
func (k Keeper) IteratorSlashingInfo(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, slashing sdkmath.Int) (stop bool))
IteratorSlashingInfo Iteration for each slashing
func (Keeper) MaxEntries ¶ added in v0.4.0
MaxEntries - Maximum number of simultaneous unbonding delegations or redelegations (per pair/trio)
func (Keeper) OwnActivateMetaNode ¶ added in v0.12.0
func (k Keeper) OwnActivateMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) bool
func (Keeper) OwnMetaNode ¶ added in v0.10.0
func (k Keeper) OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) bool
func (Keeper) RegisterMetaNode ¶ added in v0.8.0
func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, beneficiaryAddress sdk.AccAddress, description types.Description, deposit sdk.Coin) error
func (Keeper) RegisterResourceNode ¶
func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, beneficiaryAddress sdk.AccAddress, description types.Description, nodeType types.NodeType, deposit sdk.Coin, ) (ozoneLimitChange sdkmath.Int, err error)
func (Keeper) ReloadMetaNodeBitMapIdxCache ¶ added in v0.10.0
func (Keeper) RemoveExpiredKickMetaNodeVotePool ¶ added in v0.12.0
delete all expired vote pool data to allow the next round of voting
func (Keeper) RemoveMetaNodeFromBitMapIdxCache ¶ added in v0.10.0
func (k Keeper) RemoveMetaNodeFromBitMapIdxCache(networkAddr stratos.SdsAddress)
func (Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode ¶ added in v0.8.0
func (Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode ¶ added in v0.4.0
func (Keeper) RemoveUnbondingNode ¶ added in v0.4.0
func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress)
RemoveUnbondingNode removes the unbonding node object
func (Keeper) ResourceNodeMinDeposit ¶ added in v0.10.0
func (Keeper) ResourceNodeRegEnabled ¶ added in v0.9.0
func (Keeper) SetBondedMetaNodeCnt ¶ added in v0.8.0
func (Keeper) SetBondedResourceNodeCnt ¶ added in v0.8.0
func (Keeper) SetDepositNozRate ¶ added in v0.10.0
func (Keeper) SetEffectiveTotalDeposit ¶ added in v0.10.0
func (Keeper) SetHooks ¶ added in v0.4.0
func (k Keeper) SetHooks(sh types.RegisterHooks) Keeper
SetHooks Set the register hooks
func (Keeper) SetInitialGenesisDepositTotal ¶ added in v0.10.0
deprecated
func (Keeper) SetKickMetaNodeVotePool ¶ added in v0.12.0
func (k Keeper) SetKickMetaNodeVotePool(ctx sdk.Context, votePool types.KickMetaNodeVotePool)
func (Keeper) SetMetaNode ¶ added in v0.8.0
SetMetaNode sets the main record holding meta node details
func (Keeper) SetMetaNodeRegistrationVotePool ¶ added in v0.8.0
func (k Keeper) SetMetaNodeRegistrationVotePool(ctx sdk.Context, votePool types.MetaNodeRegistrationVotePool)
func (Keeper) SetRemainingOzoneLimit ¶
func (Keeper) SetResourceNode ¶
func (k Keeper) SetResourceNode(ctx sdk.Context, resourceNode types.ResourceNode)
SetResourceNode sets the main record holding resource node details
func (Keeper) SetSlashing ¶ added in v0.7.0
func (Keeper) SetUnbondingNode ¶ added in v0.4.0
func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)
SetUnbondingNode sets the unbonding node
func (Keeper) SetUnbondingNodeEntry ¶ added in v0.4.0
func (k Keeper) SetUnbondingNodeEntry(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool, creationHeight int64, minTime time.Time, balance sdkmath.Int) types.UnbondingNode
SetUnbondingNodeEntry adds an entry to the unbonding MetaNode at the given addresses. It creates the unbonding MetaNode if it does not exist
func (Keeper) SetUnbondingNodeQueueTimeSlice ¶ added in v0.4.0
func (k Keeper) SetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time, networkAddrs []string)
SetUnbondingNodeQueueTimeSlice sets a specific unbonding queue timeslice.
func (Keeper) SubtractMetaNodeDeposit ¶ added in v0.10.0
func (k Keeper) SubtractMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToSub sdk.Coin) error
SubtractMetaNodeDeposit Update the tokens of an existing meta node
func (Keeper) SubtractResourceNodeDeposit ¶ added in v0.10.0
func (k Keeper) SubtractResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error
SubtractResourceNodeDeposit Update the tokens of an existing resource node
func (Keeper) UnbondMetaNode ¶ added in v0.8.0
func (k Keeper) UnbondMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, ) (ozoneLimitChange sdkmath.Int, depositToRemove sdk.Coin, unbondingMatureTime time.Time, err error)
Remove all deposit from meta-node, start unbonding process
func (Keeper) UnbondResourceNode ¶ added in v0.4.0
func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, ) (depositToRemove sdk.Coin, unbondingMatureTime time.Time, err error)
UnbondResourceNode Unbond all tokens of resource node
func (Keeper) UnbondingCompletionTime ¶ added in v0.4.0
func (Keeper) UnbondingNodeQueueIterator ¶ added in v0.4.0
UnbondingNodeQueueIterator returns all the unbonding queue timeslices from time 0 until endTime
func (Keeper) UnbondingThreasholdTime ¶ added in v0.4.0
func (Keeper) UpdateEffectiveDeposit ¶ added in v0.10.0
func (Keeper) UpdateMetaNode ¶ added in v0.8.0
func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, beneficiaryAddr sdk.AccAddress) error
func (Keeper) UpdateMetaNodeBitMapIdxCache ¶ added in v0.10.0
func (Keeper) UpdateMetaNodeDeposit ¶ added in v0.10.0
func (Keeper) UpdateResourceNode ¶ added in v0.4.0
func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Description, nodeType types.NodeType, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, beneficiaryAddr sdk.AccAddress) error
func (Keeper) UpdateResourceNodeDeposit ¶ added in v0.10.0
func (k Keeper) UpdateResourceNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, depositDelta sdk.Coin) ( ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, completionTime time.Time, resourcenode types.ResourceNode, err error)
UpdateResourceNodeDeposit Add deposit only
type Migrator ¶ added in v0.8.0
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶ added in v0.8.0
func NewMigrator(keeper Keeper, legacySubspace types.ParamsSubspace) Migrator
NewMigrator returns a new Migrator.
type Querier ¶ added in v0.8.0
type Querier struct {
Keeper
}
Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper
func (Querier) BondedMetaNodeCount ¶ added in v0.8.0
func (q Querier) BondedMetaNodeCount(c context.Context, _ *types.QueryBondedMetaNodeCountRequest) (*types.QueryBondedMetaNodeCountResponse, error)
func (Querier) BondedResourceNodeCount ¶ added in v0.8.0
func (q Querier) BondedResourceNodeCount(c context.Context, _ *types.QueryBondedResourceNodeCountRequest) (*types.QueryBondedResourceNodeCountResponse, error)
func (Querier) DepositByNode ¶ added in v0.10.0
func (q Querier) DepositByNode(c context.Context, req *types.QueryDepositByNodeRequest) (*types.QueryDepositByNodeResponse, error)
func (Querier) DepositByOwner ¶ added in v0.10.0
func (q Querier) DepositByOwner(c context.Context, req *types.QueryDepositByOwnerRequest) (*types.QueryDepositByOwnerResponse, error)
func (Querier) DepositTotal ¶ added in v0.10.0
func (q Querier) DepositTotal(c context.Context, _ *types.QueryDepositTotalRequest) (*types.QueryDepositTotalResponse, error)
func (Querier) MetaNode ¶ added in v0.8.0
func (q Querier) MetaNode(c context.Context, req *types.QueryMetaNodeRequest) (*types.QueryMetaNodeResponse, error)
func (Querier) Params ¶ added in v0.8.0
func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Querier) RemainingOzoneLimit ¶ added in v0.12.0
func (q Querier) RemainingOzoneLimit(c context.Context, _ *types.QueryRemainingOzoneLimitRequest) (*types.QueryRemainingOzoneLimitResponse, error)
func (Querier) ResourceNode ¶ added in v0.8.0
func (q Querier) ResourceNode(c context.Context, req *types.QueryResourceNodeRequest) (*types.QueryResourceNodeResponse, error)