keeper

package
v6.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const ProposalExpiry = 5 * time.Minute

The expiry is set high to prevent expiration of lfs object update proposals When a repo with lfs objects is pushed, first lfs object update proposals are submitted by the provider after that, repository update proposal is submitted by the provider after processing the git push request But git client approves them together

Variables

View Source
var UpgradeTime = time.Date(2025, time.September, 5, 14, 0, 0, 0, time.UTC)

Approximate upgrade time of the v6 upgrade which adds storage module

Functions

func CalculateChallengeReward

func CalculateChallengeReward(params types.Params, numProviders int64) sdk.DecCoin

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) *types.GenesisState

ExportGenesis returns the module's exported genesis

func GetChallengeIDBytes

func GetChallengeIDBytes(id uint64) []byte

GetChallengeIDBytes returns the byte representation of the ID

func GetLFSObjectIdBytes

func GetLFSObjectIdBytes(id uint64) []byte

GetLFSObjectIdBytes returns the byte representation of the ID

func GetPackfileIdBytes

func GetPackfileIdBytes(id uint64) []byte

GetPackfileIdBytes returns the byte representation of the ID

func GetProposalIdBytes

func GetProposalIdBytes(id uint64) []byte

GetProposalIdBytes returns the byte representation of the proposal ID

func GetProposalIdFromBytes

func GetProposalIdFromBytes(bz []byte) uint64

GetProposalIdFromBytes returns proposal ID in uint64 format from a byte array

func GetProviderIDBytes

func GetProviderIDBytes(id uint64) []byte

GetProviderIDBytes returns the byte representation of the ID

func GetProviderIDFromBytes

func GetProviderIDFromBytes(bz []byte) uint64

GetProviderIDFromBytes returns ID in uint64 format from a byte array

func GetReleaseAssetIdBytes

func GetReleaseAssetIdBytes(id uint64) []byte

GetReleaseAssetIdBytes returns the byte representation of the ID

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, genState types.GenesisState)

InitGenesis initializes the module's state from a provided genesis state.

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func ProviderLivenessInfoKey

func ProviderLivenessInfoKey(providerAddr string) []byte

ProviderLivenessInfoKey creates the key for a provider's liveness info.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	bankKeeper bankkeeper.Keeper,
	gitopiaKeeper *gitopiakeeper.Keeper,
	authority string,
) Keeper

func (Keeper) ActiveProviders

ActiveProviders returns all active storage providers

func (Keeper) AppendChallenge

func (k Keeper) AppendChallenge(
	ctx sdk.Context,
	challenge types.Challenge,
) uint64

AppendChallenge appends a challenge in the store with a new id and update the count

func (Keeper) AppendLFSObject

func (k Keeper) AppendLFSObject(
	ctx sdk.Context,
	lfsObj types.LFSObject,
) uint64

AppendLFSObject appends an LFS object in the store with a new id and update the count

func (Keeper) AppendPackfile

func (k Keeper) AppendPackfile(
	ctx sdk.Context,
	packfile types.Packfile,
) uint64

AppendPackfile appends a packfile in the store with a new id and update the count

func (Keeper) AppendProposedLFSObjectUpdate

func (k Keeper) AppendProposedLFSObjectUpdate(
	ctx sdk.Context,
	proposal types.ProposedLFSObjectUpdate,
) uint64

AppendProposedLFSObjectUpdate creates a new LFS object proposal and returns its ID

func (Keeper) AppendProposedPackfileUpdate

func (k Keeper) AppendProposedPackfileUpdate(
	ctx sdk.Context,
	proposal types.ProposedPackfileUpdate,
) uint64

AppendProposedPackfileUpdate creates a new proposal and returns its ID

func (Keeper) AppendProposedReleaseAssetsUpdate

func (k Keeper) AppendProposedReleaseAssetsUpdate(
	ctx sdk.Context,
	proposal types.ProposedReleaseAssetsUpdate,
) uint64

AppendProposedReleaseAssetsUpdate creates a new release asset proposal and returns its ID

func (Keeper) AppendProposedRepositoryDelete

func (k Keeper) AppendProposedRepositoryDelete(
	ctx sdk.Context,
	proposal types.ProposedRepositoryDelete,
) uint64

AppendProposedRepositoryDelete creates a new repository delete proposal and returns its ID

func (Keeper) AppendProvider

func (k Keeper) AppendProvider(ctx sdk.Context, provider types.Provider) uint64

AppendProvider appends a provider in the store with a new id and update the count

func (Keeper) AppendReleaseAsset

func (k Keeper) AppendReleaseAsset(
	ctx sdk.Context,
	releaseAsset types.ReleaseAsset,
) uint64

AppendReleaseAsset appends a release asset in the store with a new id and update the count

func (Keeper) Challenge

Challenge returns a challenge by ID

func (Keeper) Challenges

Challenges returns all challenges

func (Keeper) CheckProviderLivenessViolation

func (k Keeper) CheckProviderLivenessViolation(ctx sdk.Context, providerAddr string) (bool, error)

CheckProviderLivenessViolation checks if a provider has violated liveness requirements

func (Keeper) CidReferenceCount

CidReferenceCount returns the reference count for a CID

func (Keeper) CidReferenceCounts

CidReferenceCounts returns all cid reference counts

func (Keeper) CreateLFSObjectUpdateProposal

func (k Keeper) CreateLFSObjectUpdateProposal(
	ctx sdk.Context,
	provider string,
	repositoryId uint64,
	user string,
	oid string,
	size uint64,
	cid string,
	rootHash []byte,
	deleteFlag bool,
) uint64

CreateLFSObjectUpdateProposal creates a new LFS object update proposal

func (Keeper) CreatePackfileUpdateProposal

func (k Keeper) CreatePackfileUpdateProposal(
	ctx sdk.Context,
	provider string,
	repositoryId uint64,
	user string,
	name string,
	cid string,
	rootHash []byte,
	size uint64,
	oldCid string,
	mergeCommitSha string,
	deleteFlag bool,
) uint64

CreatePackfileUpdateProposal creates a new packfile update proposal

func (Keeper) CreateReleaseAssetsUpdateProposal

func (k Keeper) CreateReleaseAssetsUpdateProposal(
	ctx sdk.Context,
	provider string,
	repositoryId uint64,
	user string,
	tag string,
	assets []*types.ReleaseAssetUpdate,
) uint64

CreateReleaseAssetsUpdateProposal creates a new release asset update proposal

func (Keeper) CreateRepositoryDeleteProposal

func (k Keeper) CreateRepositoryDeleteProposal(
	ctx sdk.Context,
	provider string,
	repositoryId uint64,
	user string,
) uint64

CreateRepositoryDeleteProposal creates a new repository delete proposal

func (Keeper) DecreaseCidReferenceCount

func (k Keeper) DecreaseCidReferenceCount(ctx sdk.Context, cid string)

DecreaseCidReferenceCount decrease the total number of cid reference count

func (Keeper) DeleteProviderRewards

func (k Keeper) DeleteProviderRewards(ctx sdk.Context, provider sdk.AccAddress)

delete rewards for a provider

func (Keeper) DeleteProviderStake

func (k Keeper) DeleteProviderStake(ctx sdk.Context, provider sdk.AccAddress)

DeleteProviderStake deletes the stake for a provider

func (Keeper) ExpireOldLFSObjectProposals

func (k Keeper) ExpireOldLFSObjectProposals(ctx sdk.Context)

ExpireOldLFSObjectProposals removes expired LFS object proposals

func (Keeper) ExpireOldProposals

func (k Keeper) ExpireOldProposals(ctx sdk.Context)

ExpireOldProposals removes expired proposals

func (Keeper) ExpireOldReleaseAssetsProposals

func (k Keeper) ExpireOldReleaseAssetsProposals(ctx sdk.Context)

ExpireOldReleaseAssetsProposals removes expired release asset proposals

func (Keeper) ExpireOldRepositoryDeleteProposals

func (k Keeper) ExpireOldRepositoryDeleteProposals(ctx sdk.Context)

ExpireOldRepositoryDeleteProposals removes expired proposals

func (Keeper) GenerateChallenge

func (k Keeper) GenerateChallenge(ctx sdk.Context) (*types.Challenge, error)

GenerateChallenge creates a new random challenge

func (Keeper) GetActiveProviders

func (k Keeper) GetActiveProviders(ctx sdk.Context) (list []types.Provider)

GetActiveProviders returns all active providers

func (Keeper) GetAllChallenge

func (k Keeper) GetAllChallenge(ctx sdk.Context) (list []types.Challenge)

GetAllChallenge returns all challenges

func (Keeper) GetAllPackfile

func (k Keeper) GetAllPackfile(ctx sdk.Context) (list []types.Packfile)

GetAllPackfile returns all packfiles

func (Keeper) GetAllProposedLFSObjectUpdates

func (k Keeper) GetAllProposedLFSObjectUpdates(ctx sdk.Context) (list []types.ProposedLFSObjectUpdate)

GetAllProposedLFSObjectUpdates returns all LFS object proposals

func (Keeper) GetAllProposedPackfileUpdates

func (k Keeper) GetAllProposedPackfileUpdates(ctx sdk.Context) (list []types.ProposedPackfileUpdate)

GetAllProposedPackfileUpdates returns all proposals

func (Keeper) GetAllProposedReleaseAssetsUpdates

func (k Keeper) GetAllProposedReleaseAssetsUpdates(ctx sdk.Context) (list []types.ProposedReleaseAssetsUpdate)

GetAllProposedReleaseAssetsUpdates returns all release asset proposals

func (Keeper) GetAllProposedRepositoryDeletes

func (k Keeper) GetAllProposedRepositoryDeletes(ctx sdk.Context) (list []types.ProposedRepositoryDelete)

GetAllProposedRepositoryDeletes returns all repository delete proposals

func (Keeper) GetAllProvider

func (k Keeper) GetAllProvider(ctx sdk.Context) (list []types.Provider)

GetAllProvider returns all provider

func (Keeper) GetAllReleaseAsset

func (k Keeper) GetAllReleaseAsset(ctx sdk.Context) (list []types.ReleaseAsset)

GetAllReleaseAsset returns all release assets

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/storage module's authority.

func (Keeper) GetBondedPool

func (k Keeper) GetBondedPool(ctx sdk.Context) (bondedPool authtypes.ModuleAccountI)

GetBondedPool returns the bonded tokens pool's module account

func (Keeper) GetChallenge

func (k Keeper) GetChallenge(ctx sdk.Context, id uint64) (val types.Challenge, found bool)

GetChallenge returns a challenge from its id

func (Keeper) GetChallengeCount

func (k Keeper) GetChallengeCount(ctx sdk.Context) uint64

GetChallengeCount get the total number of challenges

func (Keeper) GetChallengeSlashPool

func (k Keeper) GetChallengeSlashPool(ctx sdk.Context) (challengeSlashPool authtypes.ModuleAccountI)

GetChallengeSlashPool returns the challenge slash pool's module account

func (Keeper) GetCidReferenceCount

func (k Keeper) GetCidReferenceCount(ctx sdk.Context, cid string) (val types.CidReferenceCount, found bool)

GetCidReferenceCount get the total number of cid reference count

func (Keeper) GetFeePool

func (k Keeper) GetFeePool(ctx sdk.Context) (feePool authtypes.ModuleAccountI)

GetFeePool returns the fee pool's module account

func (Keeper) GetLFSObject

func (k Keeper) GetLFSObject(ctx sdk.Context, repositoryId uint64, oid string) (lfsObj types.LFSObject, found bool)

GetLFSObject retrieves an LFS object by repository_id and oid

func (Keeper) GetLFSObjectById

func (k Keeper) GetLFSObjectById(ctx sdk.Context, id uint64) (lfsObj types.LFSObject, found bool)

GetLFSObjectById returns an LFS object by id

func (Keeper) GetLFSObjectByRepositoryIdAndOid

func (k Keeper) GetLFSObjectByRepositoryIdAndOid(ctx sdk.Context, repositoryId uint64, oid string) (lfsObj types.LFSObject, found bool)

GetLFSObjectByRepositoryIdAndOid returns an LFS object by repository id and oid

func (Keeper) GetLFSObjectCount

func (k Keeper) GetLFSObjectCount(ctx sdk.Context) uint64

GetLFSObjectCount get the total number of LFS objects

func (Keeper) GetLFSObjectProposalCount

func (k Keeper) GetLFSObjectProposalCount(ctx sdk.Context) uint64

GetLFSObjectProposalCount get the total number of LFS object proposals

func (Keeper) GetLFSObjectRepositoryMapping

func (k Keeper) GetLFSObjectRepositoryMapping(ctx sdk.Context, lfsObjectId uint64) (val types.LFSObjectRepositoryMapping, found bool)

GetLFSObjectRepositoryMapping returns the mapping between LFS object id and repository id

func (Keeper) GetLFSObjects

func (k Keeper) GetLFSObjects(ctx sdk.Context) (objs []types.LFSObject)

GetLFSObjects returns all LFS objects

func (Keeper) GetLFSObjectsByRepositoryId

func (k Keeper) GetLFSObjectsByRepositoryId(ctx sdk.Context, repositoryId uint64) (objs []types.LFSObject)

GetLFSObjectsByRepositoryId returns all LFS objects for a repository

func (Keeper) GetNextChallengeID

func (k Keeper) GetNextChallengeID(ctx sdk.Context) uint64

GetNextChallengeID gets the next challenge ID to be processed.

func (Keeper) GetPackfile

func (k Keeper) GetPackfile(ctx sdk.Context, repositoryId uint64) (val types.Packfile, found bool)

GetPackfile returns a packfile from its repository id

func (Keeper) GetPackfileById

func (k Keeper) GetPackfileById(ctx sdk.Context, packfileId uint64) (val types.Packfile, found bool)

GetPackfileById returns a packfile from its packfile id

func (Keeper) GetPackfileCount

func (k Keeper) GetPackfileCount(ctx sdk.Context) uint64

GetPackfileCount get the total number of packfile

func (Keeper) GetPackfileRepositoryMapping

func (k Keeper) GetPackfileRepositoryMapping(ctx sdk.Context, packfileId uint64) (val types.PackfileRepositoryMapping, found bool)

GetPackfileRepositoryMapping returns the mapping between packfile id and repository id

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetParamsOfType

func (k Keeper) GetParamsOfType(ctx sdk.Context, p interface{})

func (Keeper) GetPendingLFSObjectProposalsForRepository

func (k Keeper) GetPendingLFSObjectProposalsForRepository(ctx sdk.Context, repositoryId uint64) []types.ProposedLFSObjectUpdate

GetPendingLFSObjectProposalsForRepository returns all pending LFS object proposals for a repository

func (Keeper) GetPendingLFSObjectProposalsForRepositoryOid

func (k Keeper) GetPendingLFSObjectProposalsForRepositoryOid(ctx sdk.Context, repositoryId uint64, oid string, userAddress string) (types.ProposedLFSObjectUpdate, bool)

GetPendingLFSObjectProposalsForRepositoryOid returns all pending LFS object proposals for a repository

func (Keeper) GetPendingLFSObjectProposalsForRepositoryUser

func (k Keeper) GetPendingLFSObjectProposalsForRepositoryUser(ctx sdk.Context, repositoryId uint64, userAddress string) []types.ProposedLFSObjectUpdate

GetPendingLFSObjectProposalsForRepositoryUser returns all pending LFS object proposal where the repository id and user address match

func (Keeper) GetPendingLFSObjectProposalsForUser

func (k Keeper) GetPendingLFSObjectProposalsForUser(ctx sdk.Context, userAddress string) []types.ProposedLFSObjectUpdate

GetPendingLFSObjectProposalsForUser returns all pending LFS object proposals where the user is the repository owner

func (Keeper) GetPendingPackfileUpdateProposalForRepositoryUser

func (k Keeper) GetPendingPackfileUpdateProposalForRepositoryUser(ctx sdk.Context, repositoryId uint64, userAddress string) (types.ProposedPackfileUpdate, bool)

GetPendingPackfileUpdateProposalForRepository returns all pending packfile update proposals where the repository id and user address match

func (Keeper) GetPendingProposalsForRepository

func (k Keeper) GetPendingProposalsForRepository(ctx sdk.Context, repositoryId uint64) []types.ProposedPackfileUpdate

GetPendingProposalsForRepository returns all pending proposals for a repository

func (Keeper) GetPendingProposalsForUser

func (k Keeper) GetPendingProposalsForUser(ctx sdk.Context, userAddress string) []types.ProposedPackfileUpdate

GetPendingProposalsForUser returns all pending proposals where the user is the repository owner

func (Keeper) GetPendingReleaseAssetsProposalsForRepository

func (k Keeper) GetPendingReleaseAssetsProposalsForRepository(ctx sdk.Context, repositoryId uint64) []types.ProposedReleaseAssetsUpdate

GetPendingReleaseAssetsProposalsForRepository returns all pending release asset proposals for a repository

func (Keeper) GetPendingReleaseAssetsProposalsForUser

func (k Keeper) GetPendingReleaseAssetsProposalsForUser(ctx sdk.Context, userAddress string) []types.ProposedReleaseAssetsUpdate

GetPendingReleaseAssetsProposalsForUser returns all pending release asset proposals where the user is the repository owner

func (Keeper) GetPendingReleaseAssetsUpdateProposalForRepositoryTagUser

func (k Keeper) GetPendingReleaseAssetsUpdateProposalForRepositoryTagUser(ctx sdk.Context, repositoryId uint64, tag string, userAddress string) (types.ProposedReleaseAssetsUpdate, bool)

GetPendingReleaseAssetsUpdateProposalForRepositoryTagUser returns all pending release asset proposals where the repository id, tag and user address match

func (Keeper) GetPendingRepositoryDeleteProposalByRepositoryIdUser

func (k Keeper) GetPendingRepositoryDeleteProposalByRepositoryIdUser(ctx sdk.Context, repositoryId uint64, user string) (val types.ProposedRepositoryDelete, found bool)

GetPendingRepositoryDeleteProposalByRepositoryIdUser returns a pending repository delete proposal by repository ID and user

func (Keeper) GetPreviousBlockInfo

func (k Keeper) GetPreviousBlockInfo(ctx sdk.Context) types.BlockInfo

func (Keeper) GetProposalCount

func (k Keeper) GetProposalCount(ctx sdk.Context) uint64

GetProposalCount get the total number of proposals

func (Keeper) GetProposedLFSObjectUpdate

func (k Keeper) GetProposedLFSObjectUpdate(ctx sdk.Context, id uint64) (val types.ProposedLFSObjectUpdate, found bool)

GetProposedLFSObjectUpdate returns an LFS object proposal by ID

func (Keeper) GetProposedPackfileUpdate

func (k Keeper) GetProposedPackfileUpdate(ctx sdk.Context, id uint64) (val types.ProposedPackfileUpdate, found bool)

GetProposedPackfileUpdate returns a proposal by ID

func (Keeper) GetProposedReleaseAssetsUpdate

func (k Keeper) GetProposedReleaseAssetsUpdate(ctx sdk.Context, id uint64) (val types.ProposedReleaseAssetsUpdate, found bool)

GetProposedReleaseAssetsUpdate returns a release asset proposal by ID

func (Keeper) GetProposedRepositoryDelete

func (k Keeper) GetProposedRepositoryDelete(ctx sdk.Context, id uint64) (val types.ProposedRepositoryDelete, found bool)

GetProposedRepositoryDelete returns a repository delete proposal by ID

func (Keeper) GetProvider

func (k Keeper) GetProvider(ctx sdk.Context, creator string) (val types.Provider, found bool)

GetProvider returns a provider from its id

func (Keeper) GetProviderCount

func (k Keeper) GetProviderCount(ctx sdk.Context) uint64

GetProviderCount get the total number of provider

func (Keeper) GetProviderLivenessInfo

func (k Keeper) GetProviderLivenessInfo(ctx sdk.Context, providerAddr string) *types.ProviderLivenessInfo

GetProviderLivenessInfo retrieves liveness tracking info for a provider

func (Keeper) GetProviderRewards

func (k Keeper) GetProviderRewards(ctx sdk.Context, provider sdk.AccAddress) (rewards types.ProviderRewards)

get rewards for a provider

func (Keeper) GetProviderStake

func (k Keeper) GetProviderStake(ctx sdk.Context, provider sdk.AccAddress) (stake types.ProviderStake)

GetProviderStake gets the stake for a provider

func (*Keeper) GetPseudoRand

func (k *Keeper) GetPseudoRand(ctx sdk.Context) *rand.Rand

GetPseudoRand returns a random number generator seeded with a pseudorandom seed. The seed is based on the previous block timestamp.

func (Keeper) GetReleaseAsset

func (k Keeper) GetReleaseAsset(ctx sdk.Context, repositoryId uint64, tag string, name string) (val types.ReleaseAsset, found bool)

GetReleaseAsset returns a release asset from its repository id, tag and name

func (Keeper) GetReleaseAssetById

func (k Keeper) GetReleaseAssetById(ctx sdk.Context, releaseAssetId uint64) (val types.ReleaseAsset, found bool)

GetReleaseAssetById returns a release asset from its release asset id

func (Keeper) GetReleaseAssetCount

func (k Keeper) GetReleaseAssetCount(ctx sdk.Context) uint64

GetReleaseAssetCount get the total number of release assets

func (Keeper) GetReleaseAssetRepositoryMapping

func (k Keeper) GetReleaseAssetRepositoryMapping(ctx sdk.Context, releaseAssetId uint64) (val types.ReleaseAssetRepositoryMapping, found bool)

GetReleaseAssetRepositoryMapping returns the mapping between release asset id and repository id

func (Keeper) GetReleaseAssets

func (k Keeper) GetReleaseAssets(ctx sdk.Context, repositoryId uint64, tag string) (list []types.ReleaseAsset)

GetReleaseAssets returns all release assets

func (Keeper) GetReleaseAssetsByRepositoryId

func (k Keeper) GetReleaseAssetsByRepositoryId(ctx sdk.Context, repositoryId uint64) (list []types.ReleaseAsset)

GetReleaseAssetsByRepositoryId returns all release assets by repository id

func (Keeper) GetReleaseAssetsProposalCount

func (k Keeper) GetReleaseAssetsProposalCount(ctx sdk.Context) uint64

GetReleaseAssetsProposalCount get the total number of release asset proposals

func (Keeper) GetRepositoryDeleteProposalCount

func (k Keeper) GetRepositoryDeleteProposalCount(ctx sdk.Context) uint64

GetRepositoryDeleteProposalCount get the total number of repository delete proposals

func (Keeper) GetStorageStats

func (k Keeper) GetStorageStats(ctx sdk.Context) types.StorageStats

GetStorageStats returns the total storage size

func (Keeper) HasProviderSubmittedChallenge

func (k Keeper) HasProviderSubmittedChallenge(ctx sdk.Context, challengeId uint64, providerAddr string) bool

HasProviderSubmittedChallenge checks if a provider has submitted a response to a specific challenge

func (Keeper) IncreaseCidReferenceCount

func (k Keeper) IncreaseCidReferenceCount(ctx sdk.Context, cid string)

IncreaseCidReferenceCount increase the total number of cid reference count

func (Keeper) IterateProviderRewards

func (k Keeper) IterateProviderRewards(ctx sdk.Context, handler func(provider sdk.AccAddress, rewards types.ProviderRewards) (stop bool))

iterate over rewards

func (Keeper) IterateProviderStakes

func (k Keeper) IterateProviderStakes(ctx sdk.Context, handler func(provider sdk.AccAddress, stake types.ProviderStake) (stop bool))

IterateProviderStakes iterates over all provider stakes

func (Keeper) LFSObject

LFSObject returns an LFS object by id

func (Keeper) LFSObjectByRepositoryIdAndOid

LFSObjectByRepositoryIdAndOid returns an LFS object by repository id and oid

func (Keeper) LFSObjects

LFSObjects returns all LFS objects

func (Keeper) LFSObjectsByRepositoryId

LFSObjectsByRepositoryId returns all LFS objects for a repository by repository id

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Packfile

Packfile returns a packfile by ID

func (Keeper) Packfiles

Packfiles returns all packfiles

func (Keeper) Params

Params returns the module parameters

func (Keeper) ProcessChallengeResponseForLiveness

func (k Keeper) ProcessChallengeResponseForLiveness(ctx sdk.Context, challenge *types.Challenge, responderAddress string, validProof bool) error

ProcessChallengeResponseForLiveness handles liveness tracking when a provider submits a challenge response

func (Keeper) ProcessChallengeTimeout

func (k Keeper) ProcessChallengeTimeout(ctx sdk.Context, challenge *types.Challenge) error

ProcessChallengeTimeout handles liveness violations when a challenge times out

func (Keeper) Provider

Provider returns a storage provider by address

func (Keeper) ProviderLiveness

ProviderLiveness returns liveness info for a specific provider

func (Keeper) ProviderRewards

ProviderRewards returns a provider rewards by address

func (Keeper) ProviderRewardsAll

ProviderRewardsAll returns all provider rewards

func (Keeper) ProviderStake

ProviderStake returns a provider stake by address

func (Keeper) ProviderStakes

ProviderStakes returns all provider stakes

func (Keeper) Providers

Providers returns all storage providers

func (Keeper) ProvidersLiveness

ProvidersLiveness returns liveness info for all providers

func (Keeper) ReleaseAsset

ReleaseAsset returns a release asset by ID

func (Keeper) ReleaseAssets

ReleaseAssets returns all release assets

func (Keeper) RemoveChallenge

func (k Keeper) RemoveChallenge(ctx sdk.Context, id uint64)

RemoveChallenge removes a challenge from the store

func (Keeper) RemoveCidReferenceCount

func (k Keeper) RemoveCidReferenceCount(ctx sdk.Context, cid string)

RemoveCidReferenceCount remove the cid reference count

func (Keeper) RemoveLFSObject

func (k Keeper) RemoveLFSObject(ctx sdk.Context, repositoryId uint64, oid string)

RemoveLFSObject removes an LFS object by repository_id and oid

func (Keeper) RemoveLFSObjectRepositoryMapping

func (k Keeper) RemoveLFSObjectRepositoryMapping(ctx sdk.Context, lfsObjectId uint64)

RemoveLFSObjectRepositoryMapping removes the mapping between LFS object id and repository id

func (Keeper) RemovePackfile

func (k Keeper) RemovePackfile(ctx sdk.Context, repositoryId uint64)

RemovePackfile removes a packfile from the store

func (Keeper) RemoveProposedLFSObjectUpdate

func (k Keeper) RemoveProposedLFSObjectUpdate(ctx sdk.Context, id uint64)

RemoveProposedLFSObjectUpdate removes an LFS object proposal from the store

func (Keeper) RemoveProposedPackfileUpdate

func (k Keeper) RemoveProposedPackfileUpdate(ctx sdk.Context, id uint64)

RemoveProposedPackfileUpdate removes a proposal from the store

func (Keeper) RemoveProposedReleaseAssetsUpdate

func (k Keeper) RemoveProposedReleaseAssetsUpdate(ctx sdk.Context, id uint64)

RemoveProposedReleaseAssetsUpdate removes a release asset proposal from the store

func (Keeper) RemoveProposedRepositoryDelete

func (k Keeper) RemoveProposedRepositoryDelete(ctx sdk.Context, id uint64)

RemoveProposedRepositoryDelete removes a repository delete proposal from the store

func (Keeper) RemoveProvider

func (k Keeper) RemoveProvider(ctx sdk.Context, creator string)

RemoveProvider removes a provider from the store

func (Keeper) RemoveReleaseAsset

func (k Keeper) RemoveReleaseAsset(ctx sdk.Context, repositoryId uint64, tag string, name string)

RemoveReleaseAsset removes a release asset from the store

func (Keeper) RemoveReleaseAssetRepositoryMapping

func (k Keeper) RemoveReleaseAssetRepositoryMapping(ctx sdk.Context, releaseAssetId uint64)

RemoveReleaseAssetRepositoryMapping removes the mapping between release asset id and repository id

func (Keeper) RepositoryPackfile

RepositoryPackfile returns a packfile for a repository

func (Keeper) RepositoryReleaseAsset

RepositoryReleaseAsset returns a release asset for a repository

func (Keeper) RepositoryReleaseAssets

RepositoryReleaseAssets returns all release assets for a repository by repository id and tag

func (Keeper) RepositoryReleaseAssetsByRepositoryId

RepositoryReleaseAssetsByRepositoryId returns all release assets for a repository by repository id

func (Keeper) SetChallenge

func (k Keeper) SetChallenge(ctx sdk.Context, challenge types.Challenge)

SetChallenge set a specific challenge in the store

func (Keeper) SetChallengeCount

func (k Keeper) SetChallengeCount(ctx sdk.Context, count uint64)

SetChallengeCount set the total number of challenges

func (Keeper) SetCidReferenceCount

func (k Keeper) SetCidReferenceCount(ctx sdk.Context, cidReferenceCount types.CidReferenceCount)

SetCidReferenceCount set the total number of cid reference count

func (Keeper) SetLFSObject

func (k Keeper) SetLFSObject(ctx sdk.Context, lfsObj types.LFSObject)

SetLFSObject stores an LFS object

func (Keeper) SetLFSObjectCount

func (k Keeper) SetLFSObjectCount(ctx sdk.Context, count uint64)

SetLFSObjectCount set the total number of LFS objects

func (Keeper) SetLFSObjectProposalCount

func (k Keeper) SetLFSObjectProposalCount(ctx sdk.Context, count uint64)

SetLFSObjectProposalCount set the total number of LFS object proposals

func (Keeper) SetLFSObjectRepositoryMapping

func (k Keeper) SetLFSObjectRepositoryMapping(ctx sdk.Context, lfsObjectId uint64, repositoryId uint64, oid string)

SetLFSObjectRepositoryMapping set the mapping between LFS object id and repository id

func (Keeper) SetNextChallengeID

func (k Keeper) SetNextChallengeID(ctx sdk.Context, id uint64)

SetNextChallengeID sets the next challenge ID to be processed.

func (Keeper) SetPackfile

func (k Keeper) SetPackfile(ctx sdk.Context, packfile types.Packfile)

SetPackfile sets a packfile in the store

func (Keeper) SetPackfileCount

func (k Keeper) SetPackfileCount(ctx sdk.Context, count uint64)

SetPackfileCount set the total number of packfile

func (Keeper) SetPackfileRepositoryMapping

func (k Keeper) SetPackfileRepositoryMapping(ctx sdk.Context, packfileId uint64, repositoryId uint64)

SetPackfileRepositoryMapping set the mapping between packfile id and repository id

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error

SetParams set the params

func (Keeper) SetPreviousBlockInfo

func (k Keeper) SetPreviousBlockInfo(ctx sdk.Context, info *types.BlockInfo)

func (Keeper) SetProposalCount

func (k Keeper) SetProposalCount(ctx sdk.Context, count uint64)

SetProposalCount set the total number of proposals

func (Keeper) SetProposedLFSObjectUpdate

func (k Keeper) SetProposedLFSObjectUpdate(ctx sdk.Context, proposal types.ProposedLFSObjectUpdate)

SetProposedLFSObjectUpdate sets an LFS object proposal

func (Keeper) SetProposedPackfileUpdate

func (k Keeper) SetProposedPackfileUpdate(ctx sdk.Context, proposal types.ProposedPackfileUpdate)

SetProposedPackfileUpdate sets a proposal

func (Keeper) SetProposedReleaseAssetsUpdate

func (k Keeper) SetProposedReleaseAssetsUpdate(ctx sdk.Context, proposal types.ProposedReleaseAssetsUpdate)

SetProposedReleaseAssetsUpdate sets a release asset proposal

func (Keeper) SetProposedRepositoryDelete

func (k Keeper) SetProposedRepositoryDelete(ctx sdk.Context, proposal types.ProposedRepositoryDelete)

SetProposedRepositoryDelete sets a repository delete proposal

func (Keeper) SetProvider

func (k Keeper) SetProvider(ctx sdk.Context, provider types.Provider)

SetProvider set a specific provider in the store

func (Keeper) SetProviderCount

func (k Keeper) SetProviderCount(ctx sdk.Context, count uint64)

SetProviderCount set the total number of provider

func (Keeper) SetProviderLivenessInfo

func (k Keeper) SetProviderLivenessInfo(ctx sdk.Context, livenessInfo *types.ProviderLivenessInfo)

SetProviderLivenessInfo stores liveness tracking info for a provider

func (Keeper) SetProviderRewards

func (k Keeper) SetProviderRewards(ctx sdk.Context, provider sdk.AccAddress, rewards types.ProviderRewards)

set rewards for a provider

func (Keeper) SetProviderStake

func (k Keeper) SetProviderStake(ctx sdk.Context, provider sdk.AccAddress, stake types.ProviderStake)

SetProviderStake sets the stake for a provider

func (Keeper) SetReleaseAsset

func (k Keeper) SetReleaseAsset(ctx sdk.Context, releaseAsset types.ReleaseAsset)

SetReleaseAsset sets a release asset in the store

func (Keeper) SetReleaseAssetCount

func (k Keeper) SetReleaseAssetCount(ctx sdk.Context, count uint64)

SetReleaseAssetCount set the total number of release assets

func (Keeper) SetReleaseAssetRepositoryMapping

func (k Keeper) SetReleaseAssetRepositoryMapping(ctx sdk.Context, releaseAssetId uint64, repositoryId uint64, tag string, name string)

SetReleaseAssetRepositoryMapping set the mapping between release asset id and repository id

func (Keeper) SetReleaseAssetsProposalCount

func (k Keeper) SetReleaseAssetsProposalCount(ctx sdk.Context, count uint64)

SetReleaseAssetsProposalCount set the total number of release asset proposals

func (Keeper) SetRepositoryDeleteProposalCount

func (k Keeper) SetRepositoryDeleteProposalCount(ctx sdk.Context, count uint64)

SetRepositoryDeleteProposalCount set the total number of repository delete proposals

func (Keeper) SetStorageStats

func (k Keeper) SetStorageStats(ctx sdk.Context, storageStats types.StorageStats)

SetStorageStats set the total storage size

func (Keeper) SlashProviderForLivenessFault

func (k Keeper) SlashProviderForLivenessFault(ctx sdk.Context, providerAddr string) error

SlashProviderForLivenessFault applies liveness-based slashing (lighter penalty)

func (Keeper) SlashProviderForProofFault

func (k Keeper) SlashProviderForProofFault(ctx sdk.Context, providerAddr string) error

SlashProviderForProofFault applies proof-based slashing (heavier penalty for assigned provider)

func (Keeper) StorageStats

StorageStats returns the total storage size

func (Keeper) UpdateProviderLiveness

func (k Keeper) UpdateProviderLiveness(ctx sdk.Context, providerAddr string, challengeId uint64, submitted bool) error

UpdateProviderLiveness updates the liveness tracking for a provider based on a true sliding window.

func (Keeper) WithdrawProviderRewards

func (k Keeper) WithdrawProviderRewards(ctx sdk.Context, provider sdk.AccAddress) (sdk.Coins, error)

withdraw provider rewards

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL