Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(keeper Keeper) types.QueryServer
- type Keeper
- func (k Keeper) ClearBallots(ctx sdk.Context, votePeriod uint64)
- func (k Keeper) DeleteAddressFromWhitelist(ctx sdk.Context, address string)
- func (k Keeper) DeleteAggregateValidatorPrevote(ctx sdk.Context, voter sdk.ValAddress)
- func (k Keeper) DeleteAggregateValidatorVote(ctx sdk.Context, voter sdk.ValAddress)
- func (k Keeper) DeleteMissCounter(ctx sdk.Context, operator sdk.ValAddress)
- func (k Keeper) GetAddressWhitelist(ctx sdk.Context, address string) (bool, error)
- func (k Keeper) GetAggregateValidatorPrevote(ctx sdk.Context, voter sdk.ValAddress) (aggregatePrevote types.AggregateValidatorPrevote, err error)
- func (k Keeper) GetAggregateValidatorVote(ctx sdk.Context, voter sdk.ValAddress) (aggregateVote types.AggregateValidatorVote, err error)
- func (k Keeper) GetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress) sdk.AccAddress
- func (k Keeper) GetMissCounter(ctx sdk.Context, operator sdk.ValAddress) sdk.Dec
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) IterateAddressWhitelist(ctx sdk.Context) (validators []string)
- func (k Keeper) IterateAggregateValidatorPrevotes(ctx sdk.Context, ...)
- func (k Keeper) IterateAggregateValidatorVotes(ctx sdk.Context, ...)
- func (k Keeper) IterateFeederDelegations(ctx sdk.Context, ...)
- func (k Keeper) IterateMissCounters(ctx sdk.Context, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MinValidPerWindow(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) OrganizeBallotByAddress(ctx sdk.Context, validatorClaimMap map[string]types.Claim) (votes map[string][]string, countVotes map[string]int)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetAddressWhitelist(ctx sdk.Context, address string)
- func (k Keeper) SetAddressWhitelistWithEvent(ctx sdk.Context, address string)
- func (k Keeper) SetAggregateValidatorPrevote(ctx sdk.Context, voter sdk.ValAddress, prevote types.AggregateValidatorPrevote)
- func (k Keeper) SetAggregateValidatorVote(ctx sdk.Context, voter sdk.ValAddress, vote types.AggregateValidatorVote)
- func (k Keeper) SetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress, delegatedFeeder sdk.AccAddress)
- func (k Keeper) SetMissCounter(ctx sdk.Context, operator sdk.ValAddress, missCounter sdk.Dec)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context)
- func (k Keeper) SlashFraction(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) SlashWindow(ctx sdk.Context) (res uint64)
- func (k Keeper) ValidateFeeder(ctx sdk.Context, feederAddr sdk.AccAddress, validatorAddr sdk.ValAddress) error
- func (k Keeper) VotePeriod(ctx sdk.Context) (res uint64)
- func (k Keeper) VoteThreshold(ctx sdk.Context) (res sdk.Dec)
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.
func NewQuerier ¶
func NewQuerier(keeper Keeper) types.QueryServer
NewQuerier returns an implementation of the oracle QueryServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct { StakingKeeper types.StakingKeeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, paramspace paramstypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistributionKeeper, stakingKeeper types.StakingKeeper, distrName string, ) *Keeper
func (Keeper) ClearBallots ¶
ClearBallots clears all tallied prevotes and votes from the store
func (Keeper) DeleteAddressFromWhitelist ¶
DeleteAddress deletes address form whitelist.
func (Keeper) DeleteAggregateValidatorPrevote ¶
func (k Keeper) DeleteAggregateValidatorPrevote(ctx sdk.Context, voter sdk.ValAddress)
DeleteAggregateValidatorPrevote deletes an oracle prevote from the store
func (Keeper) DeleteAggregateValidatorVote ¶
func (k Keeper) DeleteAggregateValidatorVote(ctx sdk.Context, voter sdk.ValAddress)
DeleteAggregateValdiatorVote deletes an oracle prevote from the store
func (Keeper) DeleteMissCounter ¶
func (k Keeper) DeleteMissCounter(ctx sdk.Context, operator sdk.ValAddress)
DeleteMissCounter removes miss counter for the validator
func (Keeper) GetAddressWhitelist ¶
GetLunaExchangeRate gets the consensus exchange rate of Luna denominated in the denom asset from the store.
func (Keeper) GetAggregateValidatorPrevote ¶
func (k Keeper) GetAggregateValidatorPrevote(ctx sdk.Context, voter sdk.ValAddress) (aggregatePrevote types.AggregateValidatorPrevote, err error)
GetAggregateValidatorPrevote retrieves an oraclevaldiator prevote from the store
func (Keeper) GetAggregateValidatorVote ¶
func (k Keeper) GetAggregateValidatorVote(ctx sdk.Context, voter sdk.ValAddress) (aggregateVote types.AggregateValidatorVote, err error)
GetAggregateValidatorVote retrieves an validatororacle prevote from the store
func (Keeper) GetFeederDelegation ¶
func (k Keeper) GetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress) sdk.AccAddress
GetFeederDelegation gets the account address that the validator operator delegated oracle vote rights to
func (Keeper) GetMissCounter ¶
GetMissCounter retrieves the # of vote periods missed in this oracle slash window
func (Keeper) IterateAddressWhitelist ¶
IterateAddress iterates over validator address in the whitelist
func (Keeper) IterateAggregateValidatorPrevotes ¶
func (k Keeper) IterateAggregateValidatorPrevotes(ctx sdk.Context, handler func(voterAddr sdk.ValAddress, aggregatePrevote types.AggregateValidatorPrevote) (stop bool))
IterateAggregateValidatorPrevotes iterates rate over prevotes in the store
func (Keeper) IterateAggregateValidatorVotes ¶
func (k Keeper) IterateAggregateValidatorVotes(ctx sdk.Context, handler func(voterAddr sdk.ValAddress, aggregateVote types.AggregateValidatorVote) (stop bool))
IterateAggregateValidatorVotes iterates rate over prevotes in the store
func (Keeper) IterateFeederDelegations ¶
func (k Keeper) IterateFeederDelegations(ctx sdk.Context, handler func(delegator sdk.ValAddress, delegate sdk.AccAddress) (stop bool))
IterateFeederDelegations iterates over the feed delegates and performs a callback function.
func (Keeper) IterateMissCounters ¶
func (k Keeper) IterateMissCounters(ctx sdk.Context, handler func(operator sdk.ValAddress, missCounter sdk.Dec) (stop bool))
IterateMissCounters iterates over the miss counters and performs a callback function.
func (Keeper) MinValidPerWindow ¶
MinValidPerWindow returns oracle slashing threshold
func (Keeper) OrganizeBallotByAddress ¶
func (k Keeper) OrganizeBallotByAddress(ctx sdk.Context, validatorClaimMap map[string]types.Claim) (votes map[string][]string, countVotes map[string]int)
OrganizeBallotByDenom collects all oracle votes for the period, categorized by the votes' denom parameter
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetAddressWhitelist ¶
SetLunaExchangeRate sets the consensus exchange rate of Luna denominated in the denom asset to the store.
func (Keeper) SetAddressWhitelistWithEvent ¶
SetLunaExchangeRateWithEvent sets the consensus exchange rate of Luna denominated in the denom asset to the store with ABCI event
func (Keeper) SetAggregateValidatorPrevote ¶
func (k Keeper) SetAggregateValidatorPrevote(ctx sdk.Context, voter sdk.ValAddress, prevote types.AggregateValidatorPrevote)
SetAggregateValidatorPrevote set an oracle validator aggregate prevote to the store
func (Keeper) SetAggregateValidatorVote ¶
func (k Keeper) SetAggregateValidatorVote(ctx sdk.Context, voter sdk.ValAddress, vote types.AggregateValidatorVote)
SetAggregateValidatorVote adds an oracle aggregate prevote to the store
func (Keeper) SetFeederDelegation ¶
func (k Keeper) SetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress, delegatedFeeder sdk.AccAddress)
SetFeederDelegation sets the account address that the validator operator delegated oracle vote rights to
func (Keeper) SetMissCounter ¶
SetMissCounter updates the # of vote periods missed in this oracle slash window
func (Keeper) SlashAndResetMissCounters ¶
func (Keeper) SlashFraction ¶
SlashFraction returns oracle voting penalty rate
func (Keeper) SlashWindow ¶
SlashWindow returns # of vote period for oracle slashing
func (Keeper) ValidateFeeder ¶
func (k Keeper) ValidateFeeder(ctx sdk.Context, feederAddr sdk.AccAddress, validatorAddr sdk.ValAddress) error
ValidateFeeder return the given feeder is allowed to feed the message or not
func (Keeper) VotePeriod ¶
VotePeriod returns the number of blocks during which voting takes place.