Documentation ¶
Index ¶
- Constants
- func CheckAccAddr(w http.ResponseWriter, r *http.Request, data string) (sdk.AccAddress, bool)
- func CheckSdsAddr(w http.ResponseWriter, r *http.Request, data string) (stratos.SdsAddress, bool)
- func DepositInfosMetaNodes(ctx sdk.Context, k Keeper, metaNodes types.MetaNodes) (types.DepositInfos, error)
- func DepositInfosResourceNodes(ctx sdk.Context, k Keeper, resourceNodes types.ResourceNodes) (types.DepositInfos, error)
- func FilteredPaginate(cdc codec.Codec, prefixStore storetypes.KVStore, queryOwnerAddr sdk.AccAddress, ...) (*pagiquery.PageResponse, error)
- func GetDepositInfoByMetaNode(ctx sdk.Context, k Keeper, node types.MetaNode) (types.DepositInfo, error)
- func GetDepositInfoByResourceNode(ctx sdk.Context, k Keeper, node types.ResourceNode) (types.DepositInfo, error)
- func GetDepositInfosByMetaNodes(ctx sdk.Context, k Keeper, metaNodes types.MetaNodes) ([]*types.DepositInfo, error)
- func GetDepositInfosByResourceNodes(ctx sdk.Context, k Keeper, resourceNodes types.ResourceNodes) ([]*types.DepositInfo, error)
- func GetIterator(prefixStore storetypes.KVStore, start []byte, reverse bool) db.Iterator
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) AddMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToAdd sdk.Coin) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, ...)
- func (k Keeper) AddMetaNodeToBitMapIdxCache(networkAddr stratos.SdsAddress)
- func (k Keeper) AddResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.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) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddrBech32 string) (sdk.Coins, bool, error)
- func (k Keeper) DecreaseOzoneLimitBySubtractDeposit(ctx sdk.Context, deposit sdk.Int) (ozoneLimitChange sdk.Int)
- func (k Keeper) DeductSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, coins sdk.Coins, ...) (remaining, deducted sdk.Coins)
- 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) GetAllMetaNodes(ctx sdk.Context) (metaNodes types.MetaNodes)
- func (k Keeper) GetAllResourceNodes(ctx sdk.Context) (resourceNodes types.ResourceNodes)
- func (k Keeper) GetAllUnbondingNodesTotalBalance(ctx sdk.Context) sdk.Int
- func (k Keeper) GetAllValidMetaNodes(ctx sdk.Context) (metaNodes []types.MetaNode)
- func (k Keeper) GetBankKeeper() types.BankKeeper
- func (k Keeper) GetBondedMetaNodeCnt(ctx sdk.Context) (balance sdk.Int)
- func (k Keeper) GetBondedResourceNodeCnt(ctx sdk.Context) (balance sdk.Int)
- func (k Keeper) GetCurrNozPriceParams(ctx sdk.Context) (St, Pt, Lt sdk.Int)
- func (k Keeper) GetDepositNozRate(ctx sdk.Context) (depositNozRate sdk.Dec)
- func (k Keeper) GetEffectiveTotalDeposit(ctx sdk.Context) (deposit sdk.Int)
- func (k Keeper) GetInitialGenesisDepositTotal(ctx sdk.Context) (deposit sdk.Int)
- 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) GetMetaNodeList(ctx sdk.Context, networkAddr stratos.SdsAddress) (metaNodes []types.MetaNode, err error)
- func (k Keeper) GetMetaNodeListByMoniker(ctx sdk.Context, moniker string) (resourceNodes []types.MetaNode, err error)
- 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) (params types.Params)
- func (k *Keeper) GetPrepayParams(ctx sdk.Context) (St, Pt, Lt sdk.Int)
- func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.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 sdk.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) sdk.Int
- func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []string)
- func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetworkAddr stratos.SdsAddress, ...) (nodeStatus stakingtypes.BondStatus, err error)
- func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr stratos.SdsAddress) bool
- func (k Keeper) IncreaseOzoneLimitByAddDeposit(ctx sdk.Context, deposit sdk.Int) (ozoneLimitChange sdk.Int)
- func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode, completionTime time.Time)
- func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.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) OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) bool
- func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ...) (ozoneLimitChange sdk.Int, err error)
- func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ...) (ozoneLimitChange sdk.Int, err error)
- func (k Keeper) ReloadMetaNodeBitMapIdxCache(ctx sdk.Context)
- func (k Keeper) RemoveMetaNodeFromBitMapIdxCache(networkAddr stratos.SdsAddress)
- func (k Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode(ctx sdk.Context, metaNode types.MetaNode, 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 sdk.Int)
- func (k Keeper) SetBondedResourceNodeCnt(ctx sdk.Context, count sdk.Int)
- func (k Keeper) SetDepositNozRate(ctx sdk.Context, depositNozRate sdk.Dec)
- func (k Keeper) SetEffectiveTotalDeposit(ctx sdk.Context, deposit sdk.Int)
- func (k Keeper) SetHooks(sh types.RegisterHooks) Keeper
- func (k Keeper) SetInitialGenesisDepositTotal(ctx sdk.Context, deposit sdk.Int)
- 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)
- func (k Keeper) SetRemainingOzoneLimit(ctx sdk.Context, value sdk.Int)
- func (k Keeper) SetResourceNode(ctx sdk.Context, resourceNode types.ResourceNode)
- func (k Keeper) SetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, slashing sdk.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, metaNode types.MetaNode, amt sdk.Int) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, ...)
- func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress) (depositToRemove sdk.Int, 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, effectiveDepositAfter sdk.Int) (ozoneLimitChange, effectiveDepositChange sdk.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 sdk.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 sdk.Int, ...)
- func (k Keeper) VotingPeriod(ctx sdk.Context) (res time.Duration)
- func (k Keeper) WithdrawMetaNodeRegistrationDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress) (unbondingMatureTime time.Time, err error)
- 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) ResourceNode(c context.Context, req *types.QueryResourceNodeRequest) (*types.QueryResourceNodeResponse, error)
Constants ¶
const ( QueryResourceNodeByNetworkAddr = "resource-node" QueryMetaNodeByNetworkAddr = "meta_node" QueryNodesDepositTotal = "nodes_deposit_total" QueryNodeDepositByNodeAddr = "node_deposit_by_addr" QueryNodeDepositByOwner = "node_deposit_by_owner" QueryRegisterParams = "register_params" QueryResourceNodesCount = "resource_nodes_count" QueryMetaNodesCount = "meta_nodes_count" )
Variables ¶
This section is empty.
Functions ¶
func CheckAccAddr ¶ added in v0.4.0
func CheckAccAddr(w http.ResponseWriter, r *http.Request, data string) (sdk.AccAddress, bool)
func CheckSdsAddr ¶ added in v0.7.0
func CheckSdsAddr(w http.ResponseWriter, r *http.Request, data string) (stratos.SdsAddress, bool)
func DepositInfosMetaNodes ¶ added in v0.10.0
func DepositInfosMetaNodes( ctx sdk.Context, k Keeper, metaNodes types.MetaNodes, ) (types.DepositInfos, error)
DepositInfosMetaNodes Iteration for querying DepositInfos of meta nodes by owner(cmd and rest)
func DepositInfosResourceNodes ¶ added in v0.10.0
func DepositInfosResourceNodes( ctx sdk.Context, k Keeper, resourceNodes types.ResourceNodes, ) (types.DepositInfos, error)
DepositInfosResourceNodes Iteration for querying DepositInfos of resource nodes by owner(cmd and rest)
func FilteredPaginate ¶ added in v0.8.0
func FilteredPaginate(cdc codec.Codec, prefixStore storetypes.KVStore, queryOwnerAddr sdk.AccAddress, pageRequest *pagiquery.PageRequest, onResult func(key []byte, value []byte, accumulate bool) (bool, error), ) (*pagiquery.PageResponse, error)
func GetDepositInfoByMetaNode ¶ added in v0.10.0
func GetDepositInfoByResourceNode ¶ added in v0.10.0
func GetDepositInfoByResourceNode(ctx sdk.Context, k Keeper, node types.ResourceNode) (types.DepositInfo, error)
func GetDepositInfosByMetaNodes ¶ added in v0.10.0
func GetDepositInfosByMetaNodes( ctx sdk.Context, k Keeper, metaNodes types.MetaNodes, ) ([]*types.DepositInfo, error)
GetDepositInfosByMetaNodes Iteration for querying DepositInfos of meta nodes by owner(grpc)
func GetDepositInfosByResourceNodes ¶ added in v0.10.0
func GetDepositInfosByResourceNodes( ctx sdk.Context, k Keeper, resourceNodes types.ResourceNodes, ) ([]*types.DepositInfo, error)
GetDepositInfosByResourceNodes Iteration for querying DepositInfos of resource nodes by owner(grpc)
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.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a new querier for register clients.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the register store
func NewKeeper ¶
func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper) 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 sdk.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 sdk.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
Called in each EndBlock
func (Keeper) CompleteUnbondingWithAmount ¶ added in v0.4.0
func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddrBech32 string) (sdk.Coins, bool, error)
CompleteUnbondingWithAmount completes the unbonding of all mature entries in the retrieved unbonding delegation object and returns the total unbonding balance or an error upon failure.
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) 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) 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) GetAllUnbondingNodesTotalBalance ¶ added in v0.4.0
GetAllUnbondingNodesTotalBalance Iteration for getting the total balance of all unbonding nodes
func (Keeper) GetAllValidMetaNodes ¶ added in v0.8.0
GetAllValidMetaNodes get the set of all bonded & not suspended meta 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) GetDepositNozRate ¶ added in v0.10.0
func (Keeper) GetEffectiveTotalDeposit ¶ added in v0.10.0
func (Keeper) GetInitialGenesisDepositTotal ¶ added in v0.10.0
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) GetMetaNodeList ¶ added in v0.8.0
func (k Keeper) GetMetaNodeList(ctx sdk.Context, networkAddr stratos.SdsAddress) (metaNodes []types.MetaNode, err error)
getMetaNodeList get all meta nodes by networkAddr
func (Keeper) GetMetaNodeListByMoniker ¶ 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
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) 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) (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) 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 sdk.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) 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, description types.Description, deposit sdk.Coin) (ozoneLimitChange sdk.Int, err error)
func (Keeper) RegisterResourceNode ¶
func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, description types.Description, nodeType types.NodeType, deposit sdk.Coin) (ozoneLimitChange sdk.Int, err error)
func (Keeper) ReloadMetaNodeBitMapIdxCache ¶ added in v0.10.0
func (Keeper) RemoveMetaNodeFromBitMapIdxCache ¶ added in v0.10.0
func (k Keeper) RemoveMetaNodeFromBitMapIdxCache(networkAddr stratos.SdsAddress)
func (Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode ¶ added in v0.8.0
func (k Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode(ctx sdk.Context, metaNode types.MetaNode, tokenToSub sdk.Coin) error
TODO: Unused parameter: metaNode
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
ResourceNodeRegEnabled
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
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 sdk.Int) types.UnbondingNode
SetUnbondingMetaNodeEntry 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 (Keeper) UnbondResourceNode ¶ added in v0.4.0
func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, ) (depositToRemove sdk.Int, unbondingMatureTime time.Time, err error)
Unbond all tokens of resource node
func (Keeper) UnbondingCompletionTime ¶ added in v0.4.0
UnbondingCompletionTime
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
UnbondingThreasholdTime
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) 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) 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 sdk.Int, completionTime time.Time, resourcenode types.ResourceNode, err error)
Add deposit only
func (Keeper) VotingPeriod ¶ added in v0.10.0
VotingPeriod
func (Keeper) WithdrawMetaNodeRegistrationDeposit ¶ added in v0.10.0
func (k Keeper) WithdrawMetaNodeRegistrationDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress) ( unbondingMatureTime time.Time, err error)
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
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) ResourceNode ¶ added in v0.8.0
func (q Querier) ResourceNode(c context.Context, req *types.QueryResourceNodeRequest) (*types.QueryResourceNodeResponse, error)