Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddEpochPayment(ctx sdk.Context, chainID string, epoch uint64, userAddress sdk.AccAddress, ...) (uint64, error)
- func (k Keeper) AddProviderPaymentInEpoch(ctx sdk.Context, chainID string, epoch uint64, userAddress sdk.AccAddress, ...) (userPayment *types.ProviderPaymentStorage, usedCUConsumerTotal uint64, ...)
- func (k Keeper) AddUniquePaymentStorageClientProvider(ctx sdk.Context, chainID string, block uint64, userAddress sdk.AccAddress, ...) (isUnique bool, entryAddr *types.UniquePaymentStorageClientProvider)
- func (k Keeper) BailEntry(ctx sdk.Context, account sdk.AccAddress, isProvider bool, chainID string, ...) error
- func (k Keeper) BurnClientStake(ctx sdk.Context, chainID string, clientAddressToBurn sdk.AccAddress, ...) (bool, error)
- func (k Keeper) BurnCoinsPerCU(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) CheckUnstakingForCommit(ctx sdk.Context) error
- func (k Keeper) ClientMaxCUProviderForBlock(ctx sdk.Context, blockHeight uint64, clientEntry *epochstoragetypes.StakeEntry) (uint64, error)
- func (k Keeper) Clients(goCtx context.Context, req *types.QueryClientsRequest) (*types.QueryClientsResponse, error)
- func (k Keeper) CreditStakeEntry(ctx sdk.Context, chainID string, lookUpAddress sdk.AccAddress, ...) (bool, error)
- func (k Keeper) DataReliabilityReward(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) EncodeUniquePaymentKey(ctx sdk.Context, userAddress sdk.AccAddress, providerAddress sdk.AccAddress, ...) string
- func (k Keeper) EnforceClientCUsUsageInEpoch(ctx sdk.Context, chainID string, cuSum uint64, blockHeight int64, ...) (ammountToPay uint64, err error)
- func (k Keeper) EpochBlocksOverlap(ctx sdk.Context) (res uint64)
- func (k Keeper) EpochPayments(c context.Context, req *types.QueryGetEpochPaymentsRequest) (*types.QueryGetEpochPaymentsResponse, error)
- func (k Keeper) EpochPaymentsAll(c context.Context, req *types.QueryAllEpochPaymentsRequest) (*types.QueryAllEpochPaymentsResponse, error)
- func (k Keeper) FraudSlashingAmount(ctx sdk.Context) (res uint64)
- func (k Keeper) FraudStakeSlashingFactor(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) GetAllEpochPayments(ctx sdk.Context) (list []types.EpochPayments)
- func (k Keeper) GetAllProviderPaymentStorage(ctx sdk.Context) (list []types.ProviderPaymentStorage)
- func (k Keeper) GetAllUniquePaymentStorageClientProvider(ctx sdk.Context) (list []types.UniquePaymentStorageClientProvider)
- func (k Keeper) GetAllowedCUForBlock(ctx sdk.Context, blockHeight uint64, entry *epochstoragetypes.StakeEntry) (uint64, error)
- func (k Keeper) GetConsumerFromUniquePayment(uniquePaymentStorageClientProvider *types.UniquePaymentStorageClientProvider) string
- func (k Keeper) GetEpochPayments(ctx sdk.Context, index string) (val types.EpochPayments, found bool)
- func (k Keeper) GetEpochPaymentsFromBlock(ctx sdk.Context, epoch uint64) (epochPayment types.EpochPayments, found bool, key string)
- 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) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetProviderPaymentStorage(ctx sdk.Context, index string) (val types.ProviderPaymentStorage, found bool)
- func (k Keeper) GetProviderPaymentStorageKey(ctx sdk.Context, chainID string, epoch uint64, providerAddress sdk.AccAddress) string
- func (k Keeper) GetTotalUsedCUForConsumerPerEpoch(ctx sdk.Context, consumerAddress string, ...) (usedCUProviderTotal uint64, failed error)
- func (k Keeper) GetUniquePaymentStorageClientProvider(ctx sdk.Context, index string) (val types.UniquePaymentStorageClientProvider, found bool)
- func (k Keeper) IsEpochStart(ctx sdk.Context) (res bool)
- func (k Keeper) JailEntry(ctx sdk.Context, account sdk.AccAddress, isProvider bool, chainID string, ...) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MinStakeClient(ctx sdk.Context) (res sdk.Coin)
- func (k Keeper) MinStakeProvider(ctx sdk.Context) (res sdk.Coin)
- func (k Keeper) MintCoinsPerCU(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ProviderPaymentStorage(c context.Context, req *types.QueryGetProviderPaymentStorageRequest) (*types.QueryGetProviderPaymentStorageResponse, error)
- func (k Keeper) ProviderPaymentStorageAll(c context.Context, req *types.QueryAllProviderPaymentStorageRequest) (*types.QueryAllProviderPaymentStorageResponse, error)
- func (k Keeper) Providers(goCtx context.Context, req *types.QueryProvidersRequest) (*types.QueryProvidersResponse, error)
- func (k Keeper) QoSWeight(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) RemoveAllEpochPaymentsForBlock(ctx sdk.Context, blockForDelete uint64) error
- func (k Keeper) RemoveEpochPayments(ctx sdk.Context, index string)
- func (k Keeper) RemoveOldEpochPayment(ctx sdk.Context) (err error)
- func (k Keeper) RemoveProviderPaymentStorage(ctx sdk.Context, index string)
- func (k Keeper) RemoveUniquePaymentStorageClientProvider(ctx sdk.Context, index string)
- func (k Keeper) ServicersToPairCount(ctx sdk.Context, block uint64) (res uint64, err error)
- func (k Keeper) ServicersToPairCountRaw(ctx sdk.Context) (res uint64)
- func (k Keeper) SetEpochPayments(ctx sdk.Context, epochPayments types.EpochPayments)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetProviderPaymentStorage(ctx sdk.Context, providerPaymentStorage types.ProviderPaymentStorage)
- func (k Keeper) SetUniquePaymentStorageClientProvider(ctx sdk.Context, ...)
- func (k Keeper) SlashEntry(ctx sdk.Context, account sdk.AccAddress, isProvider bool, chainID string, ...) (sdk.Coin, error)
- func (k Keeper) SlashLimit(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) StakeNewEntry(ctx sdk.Context, provider bool, creator string, chainID string, ...) error
- func (k Keeper) StakeToMaxCUList(ctx sdk.Context, block uint64) (res types.StakeToMaxCUList, err error)
- func (k Keeper) StakeToMaxCUListRaw(ctx sdk.Context) (res types.StakeToMaxCUList)
- func (k Keeper) UniquePaymentStorageClientProvider(c context.Context, ...) (*types.QueryGetUniquePaymentStorageClientProviderResponse, error)
- func (k Keeper) UniquePaymentStorageClientProviderAll(c context.Context, ...) (*types.QueryAllUniquePaymentStorageClientProviderResponse, error)
- func (k Keeper) UnpayLimit(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) UnstakeEntry(ctx sdk.Context, provider bool, chainID string, creator string) error
- func (k Keeper) UserEntry(goCtx context.Context, req *types.QueryUserEntryRequest) (*types.QueryUserEntryResponse, error)
- func (k Keeper) ValidatePairingForClient(ctx sdk.Context, chainID string, clientAddress sdk.AccAddress, ...) (isValidPairing bool, userStake *epochstoragetypes.StakeEntry, foundIndex int, ...)
- func (k Keeper) VerifyPairing(goCtx context.Context, req *types.QueryVerifyPairingRequest) (*types.QueryVerifyPairingResponse, error)
- func (k Keeper) VerifyPairingData(ctx sdk.Context, chainID string, clientAddress sdk.AccAddress, block uint64) (clientStakeEntryRet *epochstoragetypes.StakeEntry, errorRet error)
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 INVALID_INDEX = -2
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, storeKey, memKey sdk.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, specKeeper types.SpecKeeper, epochStorageKeeper types.EpochstorageKeeper, ) *Keeper
func (Keeper) AddEpochPayment ¶ added in v0.4.3
func (Keeper) AddProviderPaymentInEpoch ¶ added in v0.4.3
func (k Keeper) AddProviderPaymentInEpoch(ctx sdk.Context, chainID string, epoch uint64, userAddress sdk.AccAddress, providerAddress sdk.AccAddress, usedCU uint64, uniqueIdentifier string) (userPayment *types.ProviderPaymentStorage, usedCUConsumerTotal uint64, err error)
func (Keeper) AddUniquePaymentStorageClientProvider ¶ added in v0.4.3
func (k Keeper) AddUniquePaymentStorageClientProvider(ctx sdk.Context, chainID string, block uint64, userAddress sdk.AccAddress, providerAddress sdk.AccAddress, uniqueIdentifier string, usedCU uint64) (isUnique bool, entryAddr *types.UniquePaymentStorageClientProvider)
func (Keeper) BurnClientStake ¶ added in v0.4.3
func (Keeper) BurnCoinsPerCU ¶ added in v0.4.3
BurnCoinsPerCU returns the BurnCoinsPerCU param
func (Keeper) CheckUnstakingForCommit ¶
func (Keeper) ClientMaxCUProviderForBlock ¶ added in v0.4.3
func (k Keeper) ClientMaxCUProviderForBlock(ctx sdk.Context, blockHeight uint64, clientEntry *epochstoragetypes.StakeEntry) (uint64, error)
func (Keeper) Clients ¶ added in v0.4.3
func (k Keeper) Clients(goCtx context.Context, req *types.QueryClientsRequest) (*types.QueryClientsResponse, error)
func (Keeper) CreditStakeEntry ¶
func (Keeper) DataReliabilityReward ¶ added in v0.4.3
func (Keeper) EncodeUniquePaymentKey ¶
func (k Keeper) EncodeUniquePaymentKey(ctx sdk.Context, userAddress sdk.AccAddress, providerAddress sdk.AccAddress, uniqueIdentifier string, chainID string) string
func (Keeper) EnforceClientCUsUsageInEpoch ¶
func (Keeper) EpochPayments ¶
func (k Keeper) EpochPayments(c context.Context, req *types.QueryGetEpochPaymentsRequest) (*types.QueryGetEpochPaymentsResponse, error)
func (Keeper) EpochPaymentsAll ¶
func (k Keeper) EpochPaymentsAll(c context.Context, req *types.QueryAllEpochPaymentsRequest) (*types.QueryAllEpochPaymentsResponse, error)
func (Keeper) FraudSlashingAmount ¶ added in v0.4.3
FraudSlashingAmount returns the FraudSlashingAmount param
func (Keeper) FraudStakeSlashingFactor ¶ added in v0.4.3
FraudStakeSlashingFactor returns the FraudStakeSlashingFactor param
func (Keeper) GetAllEpochPayments ¶
func (k Keeper) GetAllEpochPayments(ctx sdk.Context) (list []types.EpochPayments)
GetAllEpochPayments returns all epochPayments
func (Keeper) GetAllProviderPaymentStorage ¶
func (k Keeper) GetAllProviderPaymentStorage(ctx sdk.Context) (list []types.ProviderPaymentStorage)
GetAllProviderPaymentStorage returns all providerPaymentStorage
func (Keeper) GetAllUniquePaymentStorageClientProvider ¶
func (k Keeper) GetAllUniquePaymentStorageClientProvider(ctx sdk.Context) (list []types.UniquePaymentStorageClientProvider)
GetAllUniquePaymentStorageClientProvider returns all uniquePaymentStorageClientProvider
func (Keeper) GetAllowedCUForBlock ¶ added in v0.4.3
func (k Keeper) GetAllowedCUForBlock(ctx sdk.Context, blockHeight uint64, entry *epochstoragetypes.StakeEntry) (uint64, error)
func (Keeper) GetConsumerFromUniquePayment ¶
func (k Keeper) GetConsumerFromUniquePayment(uniquePaymentStorageClientProvider *types.UniquePaymentStorageClientProvider) string
func (Keeper) GetEpochPayments ¶
func (k Keeper) GetEpochPayments( ctx sdk.Context, index string, ) (val types.EpochPayments, found bool)
GetEpochPayments returns a epochPayments from its index
func (Keeper) GetEpochPaymentsFromBlock ¶
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)
function used to get a new pairing from relayer and client first argument has all metadata, second argument is only the addresses
func (Keeper) GetProviderPaymentStorage ¶
func (k Keeper) GetProviderPaymentStorage( ctx sdk.Context, index string, ) (val types.ProviderPaymentStorage, found bool)
GetProviderPaymentStorage returns a providerPaymentStorage from its index
func (Keeper) GetProviderPaymentStorageKey ¶
func (Keeper) GetTotalUsedCUForConsumerPerEpoch ¶ added in v0.4.3
func (Keeper) GetUniquePaymentStorageClientProvider ¶
func (k Keeper) GetUniquePaymentStorageClientProvider( ctx sdk.Context, index string, ) (val types.UniquePaymentStorageClientProvider, found bool)
GetUniquePaymentStorageClientProvider returns a uniquePaymentStorageClientProvider from its index
func (Keeper) IsEpochStart ¶ added in v0.4.3
we dont want to do the calculation here too, epochStorage keeper did it
func (Keeper) MinStakeClient ¶ added in v0.4.3
MinStakeClient returns the MinStakeClient param
func (Keeper) MinStakeProvider ¶ added in v0.4.3
MinStakeProvider returns the MinStakeProvider param
func (Keeper) MintCoinsPerCU ¶ added in v0.4.3
MintCoinsPerCU returns the MintCoinsPerCU param
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ProviderPaymentStorage ¶
func (k Keeper) ProviderPaymentStorage(c context.Context, req *types.QueryGetProviderPaymentStorageRequest) (*types.QueryGetProviderPaymentStorageResponse, error)
func (Keeper) ProviderPaymentStorageAll ¶
func (k Keeper) ProviderPaymentStorageAll(c context.Context, req *types.QueryAllProviderPaymentStorageRequest) (*types.QueryAllProviderPaymentStorageResponse, error)
func (Keeper) Providers ¶
func (k Keeper) Providers(goCtx context.Context, req *types.QueryProvidersRequest) (*types.QueryProvidersResponse, error)
func (Keeper) RemoveAllEpochPaymentsForBlock ¶ added in v0.4.3
func (Keeper) RemoveEpochPayments ¶
RemoveEpochPayments removes a epochPayments from the store
func (Keeper) RemoveOldEpochPayment ¶
func (Keeper) RemoveProviderPaymentStorage ¶
RemoveProviderPaymentStorage removes a providerPaymentStorage from the store
func (Keeper) RemoveUniquePaymentStorageClientProvider ¶
RemoveUniquePaymentStorageClientProvider removes a uniquePaymentStorageClientProvider from the store
func (Keeper) ServicersToPairCount ¶ added in v0.4.3
func (Keeper) ServicersToPairCountRaw ¶ added in v0.4.3
ServicersToPairCount returns the ServicersToPairCount param
func (Keeper) SetEpochPayments ¶
func (k Keeper) SetEpochPayments(ctx sdk.Context, epochPayments types.EpochPayments)
SetEpochPayments set a specific epochPayments in the store from its index
func (Keeper) SetProviderPaymentStorage ¶
func (k Keeper) SetProviderPaymentStorage(ctx sdk.Context, providerPaymentStorage types.ProviderPaymentStorage)
SetProviderPaymentStorage set a specific providerPaymentStorage in the store from its index
func (Keeper) SetUniquePaymentStorageClientProvider ¶
func (k Keeper) SetUniquePaymentStorageClientProvider(ctx sdk.Context, uniquePaymentStorageClientProvider types.UniquePaymentStorageClientProvider)
SetUniquePaymentStorageClientProvider set a specific uniquePaymentStorageClientProvider in the store from its index
func (Keeper) SlashEntry ¶
func (Keeper) SlashLimit ¶ added in v0.4.3
func (Keeper) StakeNewEntry ¶
func (Keeper) StakeToMaxCUList ¶ added in v0.4.3
func (Keeper) StakeToMaxCUListRaw ¶ added in v0.4.3
func (k Keeper) StakeToMaxCUListRaw(ctx sdk.Context) (res types.StakeToMaxCUList)
func (Keeper) UniquePaymentStorageClientProvider ¶
func (k Keeper) UniquePaymentStorageClientProvider(c context.Context, req *types.QueryGetUniquePaymentStorageClientProviderRequest) (*types.QueryGetUniquePaymentStorageClientProviderResponse, error)
func (Keeper) UniquePaymentStorageClientProviderAll ¶
func (k Keeper) UniquePaymentStorageClientProviderAll(c context.Context, req *types.QueryAllUniquePaymentStorageClientProviderRequest) (*types.QueryAllUniquePaymentStorageClientProviderResponse, error)
func (Keeper) UnpayLimit ¶ added in v0.4.3
func (Keeper) UnstakeEntry ¶
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, clientAddress sdk.AccAddress, providerAddress sdk.AccAddress, block uint64) (isValidPairing bool, userStake *epochstoragetypes.StakeEntry, foundIndex int, errorRet error)
func (Keeper) VerifyPairing ¶
func (k Keeper) VerifyPairing(goCtx context.Context, req *types.QueryVerifyPairingRequest) (*types.QueryVerifyPairingResponse, error)
func (Keeper) VerifyPairingData ¶
func (k Keeper) VerifyPairingData(ctx sdk.Context, chainID string, clientAddress sdk.AccAddress, block uint64) (clientStakeEntryRet *epochstoragetypes.StakeEntry, errorRet error)
Source Files ¶
- discipline.go
- epoch_payments.go
- grpc_query.go
- grpc_query_clients.go
- grpc_query_epoch_payments.go
- grpc_query_get_pairing.go
- grpc_query_params.go
- grpc_query_provider_payment_storage.go
- grpc_query_providers.go
- grpc_query_unique_payment_storage_client_provider.go
- grpc_query_user_entry.go
- grpc_query_verify_pairing.go
- keeper.go
- limitConsumer.go
- msg_server.go
- msg_server_relay_payment.go
- msg_server_stake_client.go
- msg_server_stake_provider.go
- msg_server_unstake_client.go
- msg_server_unstake_provider.go
- pairing.go
- params.go
- provider_payment_storage.go
- stakeModify.go
- staking.go
- unique_payment_storage_client_provider.go
- unstaking.go