Documentation
¶
Index ¶
- func CloseReputerNonce(k *keeper.Keeper, ctx sdk.Context, topic types.Topic, nonce types.Nonce) (err error)
- func CloseWorkerNonce(k *keeper.Keeper, ctx sdk.Context, topic types.Topic, nonce types.Nonce) (err error)
- func FilterUnacceptedWorkersFromReputerValueBundle(k *keeper.Keeper, ctx context.Context, topicId uint64, ...) (*types.ReputerValueBundle, error)
- func FindTopNByScoreDesc(ctx sdk.Context, n uint64, scores []emissionstypes.Score, randSeed int64) (topNActorsSorted []emissionstypes.Score, ...)
- func ProcessAndStoreNetworkInferences(k *keeper.Keeper, ctx sdk.Context, topicId uint64, blockHeight int64, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseReputerNonce ¶
func CloseReputerNonce( k *keeper.Keeper, ctx sdk.Context, topic types.Topic, nonce types.Nonce, ) (err error)
Closes an open reputer nonce.
func CloseWorkerNonce ¶
func CloseWorkerNonce(k *keeper.Keeper, ctx sdk.Context, topic types.Topic, nonce types.Nonce) (err error)
Closes an open worker nonce.
func FilterUnacceptedWorkersFromReputerValueBundle ¶
func FilterUnacceptedWorkersFromReputerValueBundle( k *keeper.Keeper, ctx context.Context, topicId uint64, reputerRequestNonce types.ReputerRequestNonce, reputerValueBundle *types.ReputerValueBundle, ) (*types.ReputerValueBundle, error)
Filter out values of unaccepted workers. It is assumed that the work of inferers and forecasters stored at the nonce is already filtered for acceptance. This also removes duplicate values of the same worker.
func FindTopNByScoreDesc ¶
func FindTopNByScoreDesc( ctx sdk.Context, n uint64, scores []emissionstypes.Score, randSeed int64, ) (topNActorsSorted []emissionstypes.Score, allActorsSorted []emissionstypes.Score, actorIsTop map[string]struct{})
Sorts the given actors by score, desc, breaking ties randomly Returns the top N actors as a map with the actor as the key and a boolean (True) as the value
func ProcessAndStoreNetworkInferences ¶ added in v0.10.0
func ProcessAndStoreNetworkInferences( k *keeper.Keeper, ctx sdk.Context, topicId uint64, blockHeight int64, activeInferences *types.Inferences, activeForecasts *types.Forecasts, ) error
ProcessAndStoreNetworkInferences calculates and stores both regular and outlier-resistant network inferences for a given topic and block height.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.