keeper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const BlockTimestampMargin = 60 * time.Second

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

type Keeper struct {
	AccountKeeper      types.AccountKeeper
	BankKeeper         types.BankKeeper
	DistributionKeeper types.DistributionKeeper
	StakingKeeper      types.StakingKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	ps paramtypes.Subspace,

	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	distributionKeeper types.DistributionKeeper,
	stakingKeeper types.StakingKeeper,

	distributionName string,
) *Keeper

func (Keeper) AggregatePrevote

AggregatePrevote queries aggregate prevote of a given validator

func (Keeper) AggregatePrevotes

AggregatePrevotes queries aggregate prevotes of all validators

func (Keeper) AggregateVote

AggregateVote queries aggregate vote of a given validator

func (Keeper) AggregateVotes

AggregateVotes queries aggregate votes of all validators

func (Keeper) AllBlockData

AllBlockData queries all block data of oracle module

func (Keeper) BlockData

BlockData queries block data of oracle module

func (Keeper) ClearBallots

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

func (Keeper) CurrentRoundInfo added in v0.0.6

CurrentRoundInfo queries the current round info

func (Keeper) DeleteAggregatePrevote

func (k Keeper) DeleteAggregatePrevote(ctx sdk.Context, validatorAddress string)

DeleteAggregatePrevote deletes aggregate prevote of a validator

func (Keeper) DeleteAggregateVote

func (k Keeper) DeleteAggregateVote(ctx sdk.Context, validator string)

DeleteAggregateVote deletes aggregate vote of a validator

func (Keeper) DeleteMissCount

func (k Keeper) DeleteMissCount(ctx sdk.Context, validatorAddr string)

func (Keeper) FeederDelegation

FeederDelegation queries feeder delegation of a given validator

func (Keeper) GetAggregatePrevote

func (k Keeper) GetAggregatePrevote(ctx sdk.Context, validatorAddr string) *types.AggregatePrevote

GetAggregatePrevote returns aggregate prevote of a validator

func (Keeper) GetAggregatePrevoteStore

func (k Keeper) GetAggregatePrevoteStore(ctx sdk.Context) sdk.KVStore

GetAggregatePrevoteStore returns a new KV store from aggregate prevote prefix

func (Keeper) GetAggregatePrevotes

func (k Keeper) GetAggregatePrevotes(ctx sdk.Context) []types.AggregatePrevote

GetAggregatePrevotes returns aggregate prevotes of all validators

func (Keeper) GetAggregateVote

func (k Keeper) GetAggregateVote(ctx sdk.Context, validatorAddr string) *types.AggregateVote

GetAggregateVote returns aggregate vote of a validator

func (Keeper) GetAggregateVoteStore

func (k Keeper) GetAggregateVoteStore(ctx sdk.Context) sdk.KVStore

GetAggregateVoteStore returns a new KV store from aggregate vote prefix

func (Keeper) GetAggregateVotes

func (k Keeper) GetAggregateVotes(ctx sdk.Context) []types.AggregateVote

GetAggregateVotes returns aggregate votes of all validators

func (Keeper) GetAllBlockData

func (k Keeper) GetAllBlockData(ctx sdk.Context) []types.BlockData

GetAllBlockData returns block data of all chains

func (Keeper) GetBlockData

func (k Keeper) GetBlockData(ctx sdk.Context, chainId string) (*types.BlockData, error)

GetBlockData returns block data of a chain

func (Keeper) GetChain

func (k Keeper) GetChain(ctx sdk.Context, chainId string) (*types.Chain, error)

GetChain returns the chain with the given chain id

func (Keeper) GetChains

func (k Keeper) GetChains(ctx sdk.Context) []*types.Chain

GetChains returns the list of whitelist chains in params

func (Keeper) GetCurrentRoundInfo added in v0.0.6

func (k Keeper) GetCurrentRoundInfo(ctx sdk.Context) *types.RoundInfo

func (Keeper) GetFeederDelegation

func (k Keeper) GetFeederDelegation(ctx sdk.Context, validatorAddr string) sdk.AccAddress

GetFeederDelegation returns feeder delegation of a validator

func (Keeper) GetFeederDelegations

func (k Keeper) GetFeederDelegations(ctx sdk.Context) []types.FeederDelegation

GetFeederDelegations returns feeder delegations of all validators

func (Keeper) GetMissCount

func (k Keeper) GetMissCount(ctx sdk.Context, validatorAddr string) uint64

GetMissCount returns miss count of a validator

func (Keeper) GetMissCounts

func (k Keeper) GetMissCounts(ctx sdk.Context) []types.MissCount

GetMissCounts returns miss counts of all validators

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetRewardPool

func (k Keeper) GetRewardPool(ctx sdk.Context) sdk.Coins

GetRewardPool returns the current reward pool balance

func (Keeper) GroupVotesByChainId

func (k Keeper) GroupVotesByChainId(ctx sdk.Context) map[string][]*types.BlockDataAndVoter

GroupVotesByChainId groups votes by chain ID

func (Keeper) IterateAggregatePrevotes

func (k Keeper) IterateAggregatePrevotes(ctx sdk.Context, handler func(voterAddr string, aggregatePrevote types.AggregatePrevote) (stop bool))

IterateAggregatePrevotes iterates over prevotes in the store

func (Keeper) IterateAggregateVotes

func (k Keeper) IterateAggregateVotes(ctx sdk.Context, handler func(voterAddr string, aggregateVote types.AggregateVote) (stop bool))

IterateAggregateVotes iterates rate over votes in the store

func (Keeper) IterateMissCount

func (k Keeper) IterateMissCount(ctx sdk.Context, handler func(validatorAddr string, missCount uint64) (stop bool))

func (Keeper) Logger

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

func (Keeper) MissCount

MissCount queries miss count of a given validator

func (Keeper) Params

Params queries params of oracle module

func (Keeper) RewardBallotWinners

func (k Keeper) RewardBallotWinners(ctx sdk.Context, validatorClaimMap *map[string]types.Claim) error

RewardBallotWinners distributes rewards to validators who voted for the winning block data

func (Keeper) RewardPool

RewardPool queries the reward pool balance

func (Keeper) SetAggregatePrevote

func (k Keeper) SetAggregatePrevote(ctx sdk.Context, aggregatePrevote types.AggregatePrevote)

SetAggregatePrevote sets aggregate prevote of a validator

func (Keeper) SetAggregateVote

func (k Keeper) SetAggregateVote(ctx sdk.Context, aggregateVote types.AggregateVote)

SetAggregateVote sets aggregate vote of a validator

func (Keeper) SetBlockData

func (k Keeper) SetBlockData(ctx sdk.Context, blockData types.BlockData)

SetBlockData sets block data of a chain

func (Keeper) SetFeederDelegation

func (k Keeper) SetFeederDelegation(ctx sdk.Context, validatorAddr string, feederAddr string) error

SetFeederDelegation sets feeder delegation of a validator

func (Keeper) SetMissCount

func (k Keeper) SetMissCount(ctx sdk.Context, validatorAddr string, missCount uint64)

SetMissCount sets miss count of a validator

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SlashValidatorsAndResetMissCount

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

SlashValidatorsAndResetMissCount slashes validators who missed the vote more than MaxMissCountPerSlashWindow and resets miss count of all validators

func (Keeper) ValidateFeeder

func (k Keeper) ValidateFeeder(ctx sdk.Context, feederAddr string, validatorAddr string) (bool, error)

ValidateFeeder validates if the feeder has permission to vote for the validator

Jump to

Keyboard shortcuts

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