Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type BadgeData
- type EpochCuCache
- func (k EpochCuCache) AddEpochPayment(ctx sdk.Context, chainID string, epoch uint64, project string, provider string, ...) uint64
- func (k EpochCuCache) Flush()
- func (k EpochCuCache) GetProviderConsumerEpochCuCached(ctx sdk.Context, epoch uint64, provider string, project string, chainID string) (val types.ProviderConsumerEpochCu, found bool)
- func (k EpochCuCache) GetProviderEpochComplainerCuCached(ctx sdk.Context, epoch uint64, provider string, chainID string) (val types.ProviderEpochComplainerCu, found bool)
- func (k EpochCuCache) GetProviderEpochCuCached(ctx sdk.Context, epoch uint64, provider string, chainID string) (val types.ProviderEpochCu, found bool)
- func (k EpochCuCache) SetProviderConsumerEpochCuCached(ctx sdk.Context, epoch uint64, provider string, project string, chainID string, ...)
- func (k EpochCuCache) SetProviderEpochComplainerCuCached(ctx sdk.Context, epoch uint64, provider string, chainID string, ...)
- func (k EpochCuCache) SetProviderEpochCuCached(ctx sdk.Context, epoch uint64, provider string, chainID string, ...)
- type Keeper
- func (k Keeper) BadgeUsedCuExpiry(ctx sdk.Context, badge types.Badge) uint64
- func (k Keeper) BailEntry(ctx sdk.Context, address string, chainID string, bail sdk.Coin) error
- func (k Keeper) BeginBlock(ctx sdk.Context)
- func (k Keeper) CalculateEffectiveAllowedCuPerEpochFromPolicies(policies []*planstypes.Policy, cuUsedInProject, cuLeftInSubscription uint64) (allowedCUThisEpoch, allowedCUTotal uint64)
- func (k Keeper) CalculateEffectiveGeolocationFromPolicies(policies []*planstypes.Policy) (int32, error)
- func (k Keeper) CalculateEffectiveProvidersToPairFromPolicies(policies []*planstypes.Policy) (uint64, error)
- func (k Keeper) CalculateEffectiveSelectedProviders(policies []*planstypes.Policy) (planstypes.SELECTED_PROVIDERS_MODE, []string)
- func (k Keeper) CalculatePairingChance(ctx sdk.Context, provider string, chainID string, policy *planstypes.Policy, ...) (cosmosmath.LegacyDec, error)
- func (k Keeper) CreditStakeEntry(ctx sdk.Context, chainID string, lookUpAddress sdk.AccAddress, ...) (bool, error)
- func (k Keeper) EffectivePolicy(goCtx context.Context, req *types.QueryEffectivePolicyRequest) (*types.QueryEffectivePolicyResponse, error)
- func (k Keeper) EndBlock(ctx sdk.Context)
- func (k Keeper) EnforceClientCUsUsageInEpoch(ctx sdk.Context, relayCU, epochAllowedCU, totalCUInEpochForUserProvider uint64, ...) (uint64, error)
- func (k Keeper) EpochBlocksOverlap(ctx sdk.Context) uint64
- func (k Keeper) ExportBadgesTimers(ctx sdk.Context) timertypes.GenesisState
- func (k Keeper) ExportProviderQoS(ctx sdk.Context) fixationtypes.GenesisState
- func (k Keeper) FreezeProvider(ctx sdk.Context, provider string, chainIDs []string, reason string) error
- func (k Keeper) GetAllBadgeUsedCu(ctx sdk.Context) (list []types.BadgeUsedCu)
- func (k Keeper) GetAllChainIDs(ctx sdk.Context) []string
- func (k Keeper) GetAllProviderConsumerEpochCu(ctx sdk.Context, epoch uint64) []types.ProviderConsumerEpochCuGenesis
- func (k Keeper) GetAllProviderConsumerEpochCuStore(ctx sdk.Context) []types.ProviderConsumerEpochCuGenesis
- func (k Keeper) GetAllProviderEpochComplainerCuStore(ctx sdk.Context) []types.ProviderEpochComplainerCuGenesis
- func (k Keeper) GetAllProviderEpochCuStore(ctx sdk.Context) []types.ProviderEpochCuGenesis
- func (k Keeper) GetAllUniqueEpochSessionForEpoch(ctx sdk.Context, epoch uint64) []string
- func (k Keeper) GetAllUniqueEpochSessionStore(ctx sdk.Context) []types.UniqueEpochSessionGenesis
- func (k Keeper) GetBadgeUsedCu(ctx sdk.Context, badgeUsedCuKey []byte) (val types.BadgeUsedCu, found bool)
- func (k Keeper) GetPairing(goCtx context.Context, req *types.QueryGetPairingRequest) (*types.QueryGetPairingResponse, error)
- func (k Keeper) GetPairingForClient(ctx sdk.Context, chainID string, clientAddress sdk.AccAddress) (providers []epochstoragetypes.StakeEntry, errorRet error)
- func (k Keeper) GetPairingQueryCache(project string, chainID string, epoch uint64) ([]epochstoragetypes.StakeEntry, bool)
- func (k Keeper) GetPairingRelayCache(ctx sdk.Context, project string, chainID string, epoch uint64) ([]epochstoragetypes.StakeEntry, uint64, bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetProjectData(ctx sdk.Context, developerKey sdk.AccAddress, chainID string, ...) (proj projectstypes.Project, errRet error)
- func (k Keeper) GetProjectStrictestPolicy(ctx sdk.Context, project projectstypes.Project, chainID string, block uint64) (*planstypes.Policy, string, error)
- func (k Keeper) GetProviderConsumerEpochCu(ctx sdk.Context, epoch uint64, provider string, project string, chainID string) (val types.ProviderConsumerEpochCu, found bool)
- func (k Keeper) GetProviderEpochComplainerCu(ctx sdk.Context, epoch uint64, provider string, chainID string) (val types.ProviderEpochComplainerCu, found bool)
- func (k Keeper) GetProviderEpochCu(ctx sdk.Context, epoch uint64, provider string, chainID string) (val types.ProviderEpochCu, found bool)
- func (k Keeper) GetQos(ctx sdk.Context, chainID string, cluster string, provider string) (pairingtypes.QualityOfServiceReport, error)
- func (k Keeper) GetStakeEntry(ctx sdk.Context, chainID string, provider string) (epochstoragetypes.StakeEntry, error)
- func (k Keeper) InitBadgeTimers(ctx sdk.Context, gs timertypes.GenesisState)
- func (k Keeper) InitProviderQoS(ctx sdk.Context, gs fixationtypes.GenesisState)
- func (k Keeper) IsUniqueEpochSessionExists(ctx sdk.Context, epoch uint64, provider string, project string, chainID string, ...) bool
- func (k Keeper) JailEntry(ctx sdk.Context, address string, chainID string, ...) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) NewEpochCuCacheHandler(ctx sdk.Context) EpochCuCache
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Provider(goCtx context.Context, req *types.QueryProviderRequest) (*types.QueryProviderResponse, error)
- func (k Keeper) ProviderMonthlyPayout(goCtx context.Context, req *types.QueryProviderMonthlyPayoutRequest) (*types.QueryProviderMonthlyPayoutResponse, error)
- func (k Keeper) ProviderPairingChance(goCtx context.Context, req *types.QueryProviderPairingChanceRequest) (*types.QueryProviderPairingChanceResponse, error)
- func (k Keeper) Providers(goCtx context.Context, req *types.QueryProvidersRequest) (*types.QueryProvidersResponse, error)
- func (k Keeper) ProvidersEpochCu(goCtx context.Context, req *types.QueryProvidersEpochCuRequest) (*types.QueryProvidersEpochCuResponse, error)
- func (k Keeper) PunishUnresponsiveProviders(ctx sdk.Context, ...)
- func (k Keeper) QoSWeight(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) RecommendedEpochNumToCollectPayment(ctx sdk.Context) (res uint64)
- func (k Keeper) RemoveAllEpochPaymentsForBlockAppendAdjustments(ctx sdk.Context, epochToDelete uint64)
- func (k Keeper) RemoveAllProviderEpochComplainerCu(ctx sdk.Context, epoch uint64)
- func (k Keeper) RemoveAllProviderEpochCu(ctx sdk.Context, epoch uint64)
- func (k Keeper) RemoveAllUniqueEpochSession(ctx sdk.Context, epoch uint64)
- func (k Keeper) RemoveBadgeUsedCu(ctx sdk.Context, badgeUsedCuKey []byte)
- func (k Keeper) RemoveOldEpochPayments(ctx sdk.Context)
- func (k Keeper) RemoveProviderConsumerEpochCu(ctx sdk.Context, epoch uint64, provider string, project string, chainID string)
- func (k Keeper) RemoveProviderEpochComplainerCu(ctx sdk.Context, epoch uint64, provider string, chainID string)
- func (k Keeper) ResetPairingRelayCache(ctx sdk.Context)
- func (k Keeper) SdkPairing(goCtx context.Context, req *types.QueryGetPairingRequest) (*types.QuerySdkPairingResponse, error)
- func (k Keeper) SetBadgeUsedCu(ctx sdk.Context, badgeUsedCu types.BadgeUsedCu)
- func (k Keeper) SetPairingQueryCache(project string, chainID string, epoch uint64, ...)
- func (k Keeper) SetPairingRelayCache(ctx sdk.Context, project string, chainID string, epoch uint64, ...)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetProviderConsumerEpochCu(ctx sdk.Context, epoch uint64, provider string, project string, chainID string, ...)
- func (k Keeper) SetProviderEpochComplainerCu(ctx sdk.Context, epoch uint64, provider string, chainID string, ...)
- func (k Keeper) SetProviderEpochCu(ctx sdk.Context, epoch uint64, provider string, chainID string, ...)
- func (k Keeper) SetRecommendedEpochNumToCollectPayment(ctx sdk.Context, val uint64)
- func (k Keeper) SetUniqueEpochSession(ctx sdk.Context, epoch uint64, provider string, project string, chainID string, ...)
- func (k Keeper) SlashDelegator(ctx sdk.Context, slashingInfo types.DelegatorSlashing) error
- func (k Keeper) SlashEntry(ctx sdk.Context, address string, chainID string, percentage sdk.Dec) (sdk.Coin, error)
- func (k Keeper) StakeNewEntry(ctx sdk.Context, validator, creator, chainID string, amount sdk.Coin, ...) error
- func (k Keeper) StaticProvidersList(goCtx context.Context, req *types.QueryStaticProvidersListRequest) (*types.QueryStaticProvidersListResponse, error)
- func (k Keeper) SubscriptionMonthlyPayout(goCtx context.Context, req *types.QuerySubscriptionMonthlyPayoutRequest) (*types.QuerySubscriptionMonthlyPayoutResponse, error)
- func (k Keeper) UnstakeEntry(ctx sdk.Context, validator, chainID, creator, unstakeDescription string) error
- func (k Keeper) UnstakeEntryForce(ctx sdk.Context, chainID, provider, unstakeDescription string) error
- func (k Keeper) UserEntry(goCtx context.Context, req *types.QueryUserEntryRequest) (*types.QueryUserEntryResponse, error)
- func (k Keeper) ValidatePairingForClient(ctx sdk.Context, chainID string, providerAddress sdk.AccAddress, ...) (isValidPairing bool, allowedCU uint64, ...)
- func (k Keeper) VerifyPairing(goCtx context.Context, req *types.QueryVerifyPairingRequest) (*types.QueryVerifyPairingResponse, error)
- func (k Keeper) VerifyPairingData(ctx sdk.Context, chainID string, block uint64) (epoch uint64, providersType spectypes.Spec_ProvidersTypes, errorRet error)
- type Migrator
Constants ¶
const ( EPOCH_BLOCK_DIVIDER uint64 = 5 // determines how many blocks from the previous epoch will be included in the average block time calculation MIN_SAMPLE_STEP uint64 = 1 // the minimal sample step when calculating the average block time )
const ( MAX_CHANGE_RATE = 1 CHANGE_WINDOW = time.Hour * 24 )
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type EpochCuCache ¶
type EpochCuCache struct { Keeper ProviderEpochCuCache *cachekv.Store ProviderEpochComplainerCuCache *cachekv.Store ProviderConsumerEpochCuCache *cachekv.Store }
########## EpochCuCache ############
func (EpochCuCache) AddEpochPayment ¶
func (k EpochCuCache) AddEpochPayment(ctx sdk.Context, chainID string, epoch uint64, project string, provider string, cu uint64, sessionID uint64) uint64
AddEpochPayment adds a new epoch payment and returns the updated CU used between provider and project
func (EpochCuCache) Flush ¶
func (k EpochCuCache) Flush()
func (EpochCuCache) GetProviderConsumerEpochCuCached ¶
func (k EpochCuCache) GetProviderConsumerEpochCuCached(ctx sdk.Context, epoch uint64, provider string, project string, chainID string) (val types.ProviderConsumerEpochCu, found bool)
func (EpochCuCache) GetProviderEpochComplainerCuCached ¶
func (k EpochCuCache) GetProviderEpochComplainerCuCached(ctx sdk.Context, epoch uint64, provider string, chainID string) (val types.ProviderEpochComplainerCu, found bool)
func (EpochCuCache) GetProviderEpochCuCached ¶
func (k EpochCuCache) GetProviderEpochCuCached(ctx sdk.Context, epoch uint64, provider string, chainID string) (val types.ProviderEpochCu, found bool)
func (EpochCuCache) SetProviderConsumerEpochCuCached ¶
func (k EpochCuCache) SetProviderConsumerEpochCuCached(ctx sdk.Context, epoch uint64, provider string, project string, chainID string, providerConsumerEpochCu types.ProviderConsumerEpochCu)
func (EpochCuCache) SetProviderEpochComplainerCuCached ¶
func (k EpochCuCache) SetProviderEpochComplainerCuCached(ctx sdk.Context, epoch uint64, provider string, chainID string, providerEpochCu types.ProviderEpochComplainerCu)
func (EpochCuCache) SetProviderEpochCuCached ¶
func (k EpochCuCache) SetProviderEpochCuCached(ctx sdk.Context, epoch uint64, provider string, chainID string, providerEpochCu types.ProviderEpochCu)
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, specKeeper types.SpecKeeper, epochStorageKeeper types.EpochstorageKeeper, projectsKeeper types.ProjectsKeeper, subscriptionKeeper types.SubscriptionKeeper, planKeeper types.PlanKeeper, downtimeKeeper types.DowntimeKeeper, dualstakingKeeper types.DualstakingKeeper, stakingKeeper types.StakingKeeper, fixationStoreKeeper types.FixationStoreKeeper, timerStoreKeeper types.TimerStoreKeeper, ) *Keeper
func (Keeper) BadgeUsedCuExpiry ¶
func (Keeper) BeginBlock ¶
func (Keeper) CalculateEffectiveAllowedCuPerEpochFromPolicies ¶
func (k Keeper) CalculateEffectiveAllowedCuPerEpochFromPolicies(policies []*planstypes.Policy, cuUsedInProject, cuLeftInSubscription uint64) (allowedCUThisEpoch, allowedCUTotal uint64)
func (Keeper) CalculateEffectiveGeolocationFromPolicies ¶
func (k Keeper) CalculateEffectiveGeolocationFromPolicies(policies []*planstypes.Policy) (int32, error)
func (Keeper) CalculateEffectiveProvidersToPairFromPolicies ¶
func (k Keeper) CalculateEffectiveProvidersToPairFromPolicies(policies []*planstypes.Policy) (uint64, error)
func (Keeper) CalculateEffectiveSelectedProviders ¶
func (k Keeper) CalculateEffectiveSelectedProviders(policies []*planstypes.Policy) (planstypes.SELECTED_PROVIDERS_MODE, []string)
func (Keeper) CalculatePairingChance ¶
func (k Keeper) CalculatePairingChance(ctx sdk.Context, provider string, chainID string, policy *planstypes.Policy, cluster string) (cosmosmath.LegacyDec, error)
CalculatePairingChance calculates the chance of a provider to be picked in the pairing process for the first pairing slot
func (Keeper) CreditStakeEntry ¶
func (Keeper) EffectivePolicy ¶
func (k Keeper) EffectivePolicy(goCtx context.Context, req *types.QueryEffectivePolicyRequest) (*types.QueryEffectivePolicyResponse, error)
func (Keeper) EnforceClientCUsUsageInEpoch ¶
func (Keeper) ExportBadgesTimers ¶
func (k Keeper) ExportBadgesTimers(ctx sdk.Context) timertypes.GenesisState
ExportBadgesTimers exports badges timers data (for genesis)
func (Keeper) ExportProviderQoS ¶
func (k Keeper) ExportProviderQoS(ctx sdk.Context) fixationtypes.GenesisState
func (Keeper) FreezeProvider ¶
func (Keeper) GetAllBadgeUsedCu ¶
func (k Keeper) GetAllBadgeUsedCu(ctx sdk.Context) (list []types.BadgeUsedCu)
GetAllBadgeUsedCu returns all badgeUsedCu
func (Keeper) GetAllProviderConsumerEpochCu ¶
func (k Keeper) GetAllProviderConsumerEpochCu(ctx sdk.Context, epoch uint64) []types.ProviderConsumerEpochCuGenesis
GetAllProviderConsumerEpochCuStore returns all the ProviderConsumerEpochCu from the store (used for genesis)
func (Keeper) GetAllProviderConsumerEpochCuStore ¶
func (k Keeper) GetAllProviderConsumerEpochCuStore(ctx sdk.Context) []types.ProviderConsumerEpochCuGenesis
GetAllProviderConsumerEpochCuStore returns all the ProviderConsumerEpochCu from the store (used for genesis)
func (Keeper) GetAllProviderEpochComplainerCuStore ¶
func (k Keeper) GetAllProviderEpochComplainerCuStore(ctx sdk.Context) []types.ProviderEpochComplainerCuGenesis
GetAllProviderEpochComplainerCuStore returns all the ProviderEpochCu from the store (used for genesis)
func (Keeper) GetAllProviderEpochCuStore ¶
func (k Keeper) GetAllProviderEpochCuStore(ctx sdk.Context) []types.ProviderEpochCuGenesis
GetAllProviderEpochCuStore returns all the ProviderEpochCu from the store (used for genesis)
func (Keeper) GetAllUniqueEpochSessionForEpoch ¶
GetAllUniqueEpochSessionForEpoch gets all the UniqueEpochSession objects from the store for a specific epoch
func (Keeper) GetAllUniqueEpochSessionStore ¶
func (k Keeper) GetAllUniqueEpochSessionStore(ctx sdk.Context) []types.UniqueEpochSessionGenesis
GetAllUniqueEpochSessionStore gets all the UniqueEpochSession objects from the store (used for genesis)
func (Keeper) GetBadgeUsedCu ¶
func (k Keeper) GetBadgeUsedCu( ctx sdk.Context, badgeUsedCuKey []byte, ) (val types.BadgeUsedCu, found bool)
GetBadgeUsedCu returns a badgeUsedCu from its index
func (Keeper) GetPairing ¶
func (k Keeper) GetPairing(goCtx context.Context, req *types.QueryGetPairingRequest) (*types.QueryGetPairingResponse, error)
Gets a client's provider list in a specific chain. Also returns the start block of the current epoch, time (in seconds) until there's a new pairing, the block that the chain in the request's spec was changed
func (Keeper) GetPairingForClient ¶
func (k Keeper) GetPairingForClient(ctx sdk.Context, chainID string, clientAddress sdk.AccAddress) (providers []epochstoragetypes.StakeEntry, errorRet error)
func (Keeper) GetPairingQueryCache ¶ added in v2.4.0
func (k Keeper) GetPairingQueryCache(project string, chainID string, epoch uint64) ([]epochstoragetypes.StakeEntry, bool)
func (Keeper) GetPairingRelayCache ¶ added in v2.4.0
func (k Keeper) GetPairingRelayCache(ctx sdk.Context, project string, chainID string, epoch uint64) ([]epochstoragetypes.StakeEntry, uint64, bool)
func (Keeper) GetProjectData ¶
func (k Keeper) GetProjectData(ctx sdk.Context, developerKey sdk.AccAddress, chainID string, blockHeight uint64) (proj projectstypes.Project, errRet error)
func (Keeper) GetProjectStrictestPolicy ¶
func (Keeper) GetProviderConsumerEpochCu ¶
func (k Keeper) GetProviderConsumerEpochCu(ctx sdk.Context, epoch uint64, provider string, project string, chainID string) (val types.ProviderConsumerEpochCu, found bool)
GetProviderConsumerEpochCu returns a ProviderConsumerEpochCu for a specific epoch, provider and project
func (Keeper) GetProviderEpochComplainerCu ¶
func (k Keeper) GetProviderEpochComplainerCu(ctx sdk.Context, epoch uint64, provider string, chainID string) (val types.ProviderEpochComplainerCu, found bool)
GetProviderEpochComplainerCu returns a ProviderEpochCu for a specific epoch and provider
func (Keeper) GetProviderEpochCu ¶
func (k Keeper) GetProviderEpochCu(ctx sdk.Context, epoch uint64, provider string, chainID string) (val types.ProviderEpochCu, found bool)
GetProviderEpochCu returns a ProviderEpochCu for a specific epoch and provider
func (Keeper) GetQos ¶
func (k Keeper) GetQos(ctx sdk.Context, chainID string, cluster string, provider string) (pairingtypes.QualityOfServiceReport, error)
GetQos gets a provider's QoS excellence report from the providerQosFS
func (Keeper) GetStakeEntry ¶
func (k Keeper) GetStakeEntry(ctx sdk.Context, chainID string, provider string) (epochstoragetypes.StakeEntry, error)
func (Keeper) InitBadgeTimers ¶
func (k Keeper) InitBadgeTimers(ctx sdk.Context, gs timertypes.GenesisState)
InitBadgeTimers imports badges timers data (from genesis)
func (Keeper) InitProviderQoS ¶
func (k Keeper) InitProviderQoS(ctx sdk.Context, gs fixationtypes.GenesisState)
func (Keeper) IsUniqueEpochSessionExists ¶
func (k Keeper) IsUniqueEpochSessionExists(ctx sdk.Context, epoch uint64, provider string, project string, chainID string, sessionID uint64) bool
IsUniqueEpochSessionExists checks if a UniqueEpochSession exists
func (Keeper) NewEpochCuCacheHandler ¶
func (k Keeper) NewEpochCuCacheHandler(ctx sdk.Context) EpochCuCache
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) Provider ¶
func (k Keeper) Provider(goCtx context.Context, req *types.QueryProviderRequest) (*types.QueryProviderResponse, error)
func (Keeper) ProviderMonthlyPayout ¶
func (k Keeper) ProviderMonthlyPayout(goCtx context.Context, req *types.QueryProviderMonthlyPayoutRequest) (*types.QueryProviderMonthlyPayoutResponse, error)
func (Keeper) ProviderPairingChance ¶
func (k Keeper) ProviderPairingChance(goCtx context.Context, req *types.QueryProviderPairingChanceRequest) (*types.QueryProviderPairingChanceResponse, error)
Gets a client's provider list in a specific chain. Also returns the start block of the current epoch, time (in seconds) until there's a new pairing, the block that the chain in the request's spec was changed
func (Keeper) Providers ¶
func (k Keeper) Providers(goCtx context.Context, req *types.QueryProvidersRequest) (*types.QueryProvidersResponse, error)
func (Keeper) ProvidersEpochCu ¶
func (k Keeper) ProvidersEpochCu(goCtx context.Context, req *types.QueryProvidersEpochCuRequest) (*types.QueryProvidersEpochCuResponse, error)
func (Keeper) PunishUnresponsiveProviders ¶
func (k Keeper) PunishUnresponsiveProviders(ctx sdk.Context, epochsNumToCheckCUForUnresponsiveProvider, epochsNumToCheckCUForComplainers uint64)
PunishUnresponsiveProviders punished unresponsive providers (current punishment: freeze)
func (Keeper) RecommendedEpochNumToCollectPayment ¶
RecommendedEpochNumToCollectPayment returns the RecommendedEpochNumToCollectPayment param
func (Keeper) RemoveAllEpochPaymentsForBlockAppendAdjustments ¶
func (k Keeper) RemoveAllEpochPaymentsForBlockAppendAdjustments(ctx sdk.Context, epochToDelete uint64)
Function to remove all epoch payments objects from a specific epoch
func (Keeper) RemoveAllProviderEpochComplainerCu ¶
RemoveProviderEpochComplainerCu removes a ProviderEpochCu from the store
func (Keeper) RemoveAllProviderEpochCu ¶
RemoveProviderEpochCu removes a ProviderEpochCu from the store
func (Keeper) RemoveAllUniqueEpochSession ¶
RemoveAllUniqueEpochSession removes all the UniqueEpochSession objects from the store for a specific epoch
func (Keeper) RemoveBadgeUsedCu ¶
RemoveBadgeUsedCu removes a badgeUsedCu from the store
func (Keeper) RemoveOldEpochPayments ¶
Function to remove epoch payment objects from deleted epochs (older than the chain's memory)
func (Keeper) RemoveProviderConsumerEpochCu ¶
func (k Keeper) RemoveProviderConsumerEpochCu(ctx sdk.Context, epoch uint64, provider string, project string, chainID string)
RemoveProviderConsumerEpochCu removes a ProviderConsumerEpochCu from the store
func (Keeper) RemoveProviderEpochComplainerCu ¶
func (k Keeper) RemoveProviderEpochComplainerCu(ctx sdk.Context, epoch uint64, provider string, chainID string)
RemoveProviderEpochComplainerCu deletes a ProviderEpochComplainerCu in the store
func (Keeper) ResetPairingRelayCache ¶ added in v2.4.0
ResetPairingRelayCache is used to remove all entries from the PairingRelayCache KV store this function is called in the module's EndBlock so the data written in the KV store will be deleted before it's written to the state
func (Keeper) SdkPairing ¶
func (k Keeper) SdkPairing(goCtx context.Context, req *types.QueryGetPairingRequest) (*types.QuerySdkPairingResponse, error)
func (Keeper) SetBadgeUsedCu ¶
func (k Keeper) SetBadgeUsedCu(ctx sdk.Context, badgeUsedCu types.BadgeUsedCu)
SetBadgeUsedCu set a specific badgeUsedCu in the store from its index
func (Keeper) SetPairingQueryCache ¶ added in v2.4.0
func (k Keeper) SetPairingQueryCache(project string, chainID string, epoch uint64, pairedProviders []epochstoragetypes.StakeEntry)
the cache used for the query, does not write into state
func (Keeper) SetPairingRelayCache ¶ added in v2.4.0
func (k Keeper) SetPairingRelayCache(ctx sdk.Context, project string, chainID string, epoch uint64, pairedProviders []epochstoragetypes.StakeEntry, allowedCu uint64)
func (Keeper) SetProviderConsumerEpochCu ¶
func (k Keeper) SetProviderConsumerEpochCu(ctx sdk.Context, epoch uint64, provider string, project string, chainID string, providerConsumerEpochCu types.ProviderConsumerEpochCu)
SetProviderConsumerEpochCu sets a ProviderConsumerEpochCu in the store
func (Keeper) SetProviderEpochComplainerCu ¶
func (k Keeper) SetProviderEpochComplainerCu(ctx sdk.Context, epoch uint64, provider string, chainID string, providerEpochCu types.ProviderEpochComplainerCu)
SetProviderEpochComplainerCu sets a ProviderEpochComplainerCu in the store
func (Keeper) SetProviderEpochCu ¶
func (k Keeper) SetProviderEpochCu(ctx sdk.Context, epoch uint64, provider string, chainID string, providerEpochCu types.ProviderEpochCu)
SetProviderEpochCu sets a ProviderEpochCu in the store
func (Keeper) SetRecommendedEpochNumToCollectPayment ¶
func (Keeper) SetUniqueEpochSession ¶
func (k Keeper) SetUniqueEpochSession(ctx sdk.Context, epoch uint64, provider string, project string, chainID string, sessionID uint64)
SetUniqueEpochSession sets a UniqueEpochSession in the store
func (Keeper) SlashDelegator ¶
func (Keeper) SlashEntry ¶
func (Keeper) StakeNewEntry ¶
func (Keeper) StaticProvidersList ¶
func (k Keeper) StaticProvidersList(goCtx context.Context, req *types.QueryStaticProvidersListRequest) (*types.QueryStaticProvidersListResponse, error)
func (Keeper) SubscriptionMonthlyPayout ¶
func (k Keeper) SubscriptionMonthlyPayout(goCtx context.Context, req *types.QuerySubscriptionMonthlyPayoutRequest) (*types.QuerySubscriptionMonthlyPayoutResponse, error)
func (Keeper) UnstakeEntry ¶
func (Keeper) UnstakeEntryForce ¶
func (Keeper) UserEntry ¶
func (k Keeper) UserEntry(goCtx context.Context, req *types.QueryUserEntryRequest) (*types.QueryUserEntryResponse, error)
func (Keeper) ValidatePairingForClient ¶
func (k Keeper) ValidatePairingForClient(ctx sdk.Context, chainID string, providerAddress sdk.AccAddress, reqEpoch uint64, project projectstypes.Project) (isValidPairing bool, allowedCU uint64, pairedProviders []epochstoragetypes.StakeEntry, errorRet error)
func (Keeper) VerifyPairing ¶
func (k Keeper) VerifyPairing(goCtx context.Context, req *types.QueryVerifyPairingRequest) (*types.QueryVerifyPairingResponse, error)
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
Source Files ¶
- badge_used_cu.go
- discipline.go
- epoch_cu.go
- epoch_payment.go
- grpc_query.go
- grpc_query_effective_policy.go
- grpc_query_get_pairing.go
- grpc_query_params.go
- grpc_query_provider.go
- grpc_query_provider_monthly_payout.go
- grpc_query_provider_pairing_chance.go
- grpc_query_providers.go
- grpc_query_providers_epoch_cu.go
- grpc_query_static_providers_list.go
- grpc_query_subscription_monthly_payout.go
- grpc_query_user_entry.go
- grpc_query_verify_pairing.go
- keeper.go
- limitConsumer.go
- migrations.go
- msg_server.go
- msg_server_freeze.go
- msg_server_relay_payment.go
- msg_server_stake_provider.go
- msg_server_unfreeze.go
- msg_server_unstake_provider.go
- pairing.go
- pairing_cache.go
- pairing_next_epoch_time_block.go
- params.go
- qos_excellence.go
- query_sdk_pairing.go
- stakeModify.go
- staking.go
- unresponsive_provider.go
- unstaking.go