Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AssertCanPropose(ctx sdk.Context, poolId uint64, staker string, proposer string, ...) error
- func (k Keeper) AssertCanVote(ctx sdk.Context, poolId uint64, staker string, voter string, storageId string) error
- func (k Keeper) AssertPoolCanRun(ctx sdk.Context, poolId uint64) error
- func (k Keeper) GetAllBundleProposals(ctx sdk.Context) (list []types.BundleProposal)
- func (k Keeper) GetAllFinalizedBundles(ctx sdk.Context) (list []types.FinalizedBundle)
- func (k Keeper) GetBundleProposal(ctx sdk.Context, poolId uint64) (val types.BundleProposal, found bool)
- func (k Keeper) GetFinalizedBundle(ctx sdk.Context, poolId, id uint64) (val types.FinalizedBundle, found bool)
- func (k Keeper) GetFinalizedBundleByHeight(ctx sdk.Context, poolId, height uint64) (val types.FinalizedBundle, found bool)
- func (k Keeper) GetFinalizedBundlesByPool(ctx sdk.Context, poolId uint64) (list []types.FinalizedBundle)
- func (k Keeper) GetMaxPoints(ctx sdk.Context) (res uint64)
- func (k Keeper) GetNetworkFee(ctx sdk.Context) (res string)
- func (k Keeper) GetPaginatedFinalizedBundleQuery(ctx sdk.Context, pagination *query.PageRequest, poolId uint64) ([]types.FinalizedBundle, *query.PageResponse, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetStorageCost(ctx sdk.Context) (res uint64)
- func (k Keeper) GetUploadTimeout(ctx sdk.Context) (res uint64)
- func (k Keeper) GetVoteDistribution(ctx sdk.Context, poolId uint64) (voteDistribution types.VoteDistribution)
- func (k Keeper) HandleUploadTimeout(goCtx context.Context)
- func (k Keeper) InitMemStore(gasCtx sdk.Context)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetBundleProposal(ctx sdk.Context, bundleProposal types.BundleProposal)
- func (k Keeper) SetFinalizedBundle(ctx sdk.Context, finalizedBundle types.FinalizedBundle)
- func (k Keeper) SetFinalizedBundleIndexes(ctx sdk.Context, finalizedBundle types.FinalizedBundle)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- type RandomChoiceCandidate
Constants ¶
This section is empty.
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 storetypes.StoreKey, memKey storetypes.StoreKey, authority string, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrkeeper types.DistrKeeper, poolKeeper types.PoolKeeper, stakerKeeper types.StakerKeeper, delegationKeeper types.DelegationKeeper, upgradeKeeper types.UpgradeKeeper, ) *Keeper
func (Keeper) AssertCanPropose ¶
func (k Keeper) AssertCanPropose(ctx sdk.Context, poolId uint64, staker string, proposer string, fromIndex uint64) error
AssertCanPropose checks whether a participant can submit the next bundle proposal in a storage pool
func (Keeper) AssertCanVote ¶
func (k Keeper) AssertCanVote(ctx sdk.Context, poolId uint64, staker string, voter string, storageId string) error
AssertCanVote checks whether a participant in the network can vote on a bundle proposal in a storage pool
func (Keeper) AssertPoolCanRun ¶
AssertPoolCanRun checks whether the given pool fulfils all technical/formal requirements to produce bundles
func (Keeper) GetAllBundleProposals ¶
func (k Keeper) GetAllBundleProposals(ctx sdk.Context) (list []types.BundleProposal)
GetAllBundleProposals returns all bundle proposals of all pools
func (Keeper) GetAllFinalizedBundles ¶
func (k Keeper) GetAllFinalizedBundles(ctx sdk.Context) (list []types.FinalizedBundle)
func (Keeper) GetBundleProposal ¶
func (k Keeper) GetBundleProposal(ctx sdk.Context, poolId uint64) (val types.BundleProposal, found bool)
GetBundleProposal returns the bundle proposal for the given pool with id `poolId`
func (Keeper) GetFinalizedBundle ¶
func (k Keeper) GetFinalizedBundle(ctx sdk.Context, poolId, id uint64) (val types.FinalizedBundle, found bool)
GetFinalizedBundle returns a finalized bundle by its identifier
func (Keeper) GetFinalizedBundleByHeight ¶
func (Keeper) GetFinalizedBundlesByPool ¶
func (Keeper) GetMaxPoints ¶
GetMaxPoints returns the MaxPoints param
func (Keeper) GetNetworkFee ¶
GetNetworkFee returns the NetworkFee param
func (Keeper) GetPaginatedFinalizedBundleQuery ¶
func (k Keeper) GetPaginatedFinalizedBundleQuery(ctx sdk.Context, pagination *query.PageRequest, poolId uint64) ([]types.FinalizedBundle, *query.PageResponse, error)
TODO(postAudit,@max) consider performance improvement
func (Keeper) GetStorageCost ¶
GetStorageCost returns the StorageCost param
func (Keeper) GetUploadTimeout ¶
GetUploadTimeout returns the UploadTimeout param
func (Keeper) GetVoteDistribution ¶
func (k Keeper) GetVoteDistribution(ctx sdk.Context, poolId uint64) (voteDistribution types.VoteDistribution)
GetVoteDistribution is an internal function evaluates the quorum status based on the voting power of the current bundle proposal.
func (Keeper) HandleUploadTimeout ¶
HandleUploadTimeout is an end block hook that triggers an upload timeout for every pool (if applicable).
func (Keeper) InitMemStore ¶
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetBundleProposal ¶
func (k Keeper) SetBundleProposal(ctx sdk.Context, bundleProposal types.BundleProposal)
SetBundleProposal stores a current bundle proposal in the KV-Store. There is only one bundle proposal per pool
func (Keeper) SetFinalizedBundle ¶
func (k Keeper) SetFinalizedBundle(ctx sdk.Context, finalizedBundle types.FinalizedBundle)
SetFinalizedBundle stores a finalized bundle identified by its `poolId` and `id`.
func (Keeper) SetFinalizedBundleIndexes ¶
func (k Keeper) SetFinalizedBundleIndexes(ctx sdk.Context, finalizedBundle types.FinalizedBundle)
SetFinalizedBundleIndexes sets an in-memory reference for every bundle sorted by pool/fromIndex to allow querying for specific bundle ranges.
type RandomChoiceCandidate ¶
RandomChoiceCandidate holds the voting power of a candidate for the next uploader selection
Source Files
¶
- getters_bundles.go
- getters_params.go
- grpc_query.go
- grpc_query_params.go
- keeper.go
- logic_bundles.go
- logic_end_block_handle_upload_timeout.go
- msg_server.go
- msg_server_claim_uploader_role.go
- msg_server_skip_uploader_role.go
- msg_server_submit_bundle_proposal.go
- msg_server_update_params.go
- msg_server_vote_bundle_proposal.go