Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ComputeUnitsToTokensMultiplier(ctx context.Context) uint64
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetParams(ctx context.Context) (params types.Params)
- func (k Keeper) Logger() log.Logger
- func (k Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k Keeper) SettlePendingClaims(ctx sdk.Context) (numClaimsSettled, numClaimsExpired uint64, err error)
- func (k Keeper) SettleSessionAccounting(ctx context.Context, claim *prooftypes.Claim) error
Constants ¶
const ( // TODO_BLOCKER/TODO_UPNEXT(@Olshansk): Implement this properly. Using a constant // for "probabilistic proofs" is just a simple placeholder mechanism to get // #359 over the finish line. ProofRequiredComputeUnits = 100 )
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, logger log.Logger, authority string, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, applicationKeeper types.ApplicationKeeper, proofKeeper types.ProofKeeper, ) Keeper
func (Keeper) ComputeUnitsToTokensMultiplier ¶
ComputeUnitsToTokensMultiplier returns the ComputeUnitsToTokensMultiplier param
func (Keeper) GetAuthority ¶
GetAuthority returns the x/tokenomics module's authority.
func (Keeper) Params ¶
func (k Keeper) Params( ctx context.Context, req *types.QueryParamsRequest, ) (*types.QueryParamsResponse, error)
func (Keeper) SettlePendingClaims ¶
func (k Keeper) SettlePendingClaims(ctx sdk.Context) (numClaimsSettled, numClaimsExpired uint64, err error)
SettlePendingClaims settles all pending (i.e. expiring) claims. If a claim is expired and requires a proof and a proof IS available -> it's settled. If a claim is expired and requires a proof and a proof IS NOT available -> it's deleted. If a claim is expired and does NOT require a proof -> it's settled. Events are emitted for each claim that is settled or removed. On-chain Claims & Proofs are deleted after they're settled or expired to free up space.
func (Keeper) SettleSessionAccounting ¶
SettleSessionAccounting is responsible for all of the post-session accounting necessary to burn, mint or transfer tokens depending on the amount of work done. The amount of "work done" complete is dictated by `sum` of `root`.
ASSUMPTION: It is assumed the caller of this function validated the claim against a proof BEFORE calling this function.
TODO_BLOCKER(@Olshansk): Is there a way to limit who can call this function?