Documentation ¶
Index ¶
- func DiffValidators(currentValidators []types.ConsumerValidator, ...) []abci.ValidatorUpdate
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- type Hooks
- func (h Hooks) AfterDelegationModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h Hooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) error
- func (h Hooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64) error
- func (h Hooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64) error
- func (h Hooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) error
- func (h Hooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64) error
- func (h Hooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error
- func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, valConsAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h Hooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h Hooks) BeforeTokenizeShareRecordRemoved(_ sdk.Context, _ uint64) error
- func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error
- func (h Hooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec) error
- func (h Hooks) GetConsumerAdditionLegacyPropFromProp(ctx sdk.Context, proposalID uint64) (providertypes.ConsumerAdditionProposal, bool)
- type Keeper
- func (k Keeper) AppendConsumerAddrsToPrune(ctx sdk.Context, chainID string, vscID uint64, ...)
- func (k Keeper) AppendMaturedUnbondingOps(ctx sdk.Context, ids []uint64)
- func (k Keeper) AppendPendingVSCPackets(ctx sdk.Context, chainID string, ...)
- func (k Keeper) AppendSlashAck(ctx sdk.Context, chainID, ack string)
- func (k Keeper) AssignConsumerKey(ctx sdk.Context, chainID string, validator stakingtypes.Validator, ...) error
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) BeginBlockCCR(ctx sdk.Context)
- func (k Keeper) BeginBlockCIS(ctx sdk.Context)
- func (k Keeper) BeginBlockInit(ctx sdk.Context)
- func (k Keeper) BindPort(ctx sdk.Context, portID string) error
- func (k Keeper) BondDenom(ctx sdk.Context) string
- func (k Keeper) CheckForSlashMeterReplenishment(ctx sdktypes.Context)
- func (k Keeper) CheckMisbehaviour(ctx sdk.Context, misbehaviour ibctmtypes.Misbehaviour) error
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k Keeper) ComputeNextEpochConsumerValSet(ctx sdk.Context, chainID string, bondedValidators []stakingtypes.Validator) []types.ConsumerValidator
- func (k Keeper) ComputePowerToSlash(ctx sdk.Context, validator stakingtypes.Validator, ...) int64
- func (k Keeper) ConsumeMaturedUnbondingOps(ctx sdk.Context) []uint64
- func (k Keeper) ConsumeSlashAcks(ctx sdk.Context, chainID string) (acks []string)
- func (k Keeper) ConsumerRewardDenomExists(ctx sdk.Context, denom string) bool
- func (k Keeper) CreateConsumerClient(ctx sdk.Context, prop *types.ConsumerAdditionProposal) error
- func (k Keeper) CreateConsumerClientInCachedCtx(ctx sdk.Context, p types.ConsumerAdditionProposal) (cc sdk.Context, writeCache func(), err error)
- func (k Keeper) DeleteChainToChannel(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteChannelToChain(ctx sdk.Context, channelID string)
- func (k Keeper) DeleteConsumerAddrsToPrune(ctx sdk.Context, chainID string, vscID uint64)
- func (k Keeper) DeleteConsumerClientId(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteConsumerGenesis(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteConsumerRewardDenom(ctx sdk.Context, denom string)
- func (k Keeper) DeleteConsumerValSet(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteConsumerValidator(ctx sdk.Context, chainID string, providerConsAddr types.ProviderConsAddress)
- func (k Keeper) DeleteEquivocationEvidenceMinHeight(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteInitChainHeight(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteInitTimeoutTimestamp(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteKeyAssignments(ctx sdk.Context, chainID string)
- func (k Keeper) DeletePendingConsumerAdditionProps(ctx sdk.Context, proposals ...types.ConsumerAdditionProposal)
- func (k Keeper) DeletePendingConsumerRemovalProps(ctx sdk.Context, proposals ...types.ConsumerRemovalProposal)
- func (k Keeper) DeletePendingVSCPackets(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteProposedConsumerChainInStore(ctx sdk.Context, proposalID uint64)
- func (k Keeper) DeleteSlashAcks(ctx sdk.Context, chainID string)
- func (k Keeper) DeleteUnbondingOp(ctx sdk.Context, id uint64)
- func (k Keeper) DeleteUnbondingOpIndex(ctx sdk.Context, chainID string, vscID uint64)
- func (k Keeper) DeleteValidatorByConsumerAddr(ctx sdk.Context, chainID string, consumerAddr types.ConsumerConsAddress)
- func (k Keeper) DeleteValidatorConsumerPubKey(ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress)
- func (k Keeper) DeleteValsetUpdateBlockHeight(ctx sdk.Context, valsetUpdateId uint64)
- func (k Keeper) DeleteVscSendTimestamp(ctx sdk.Context, chainID string, vscID uint64)
- func (k Keeper) DeleteVscSendTimestampsForConsumer(ctx sdk.Context, consumerChainID string)
- func (k Keeper) EndBlockCCR(ctx sdk.Context)
- func (k Keeper) EndBlockCIS(ctx sdk.Context)
- func (k Keeper) EndBlockRD(ctx sdk.Context)
- func (k Keeper) EndBlockVSU(ctx sdk.Context)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAllChannelToChains(ctx sdk.Context) (channels []types.ChannelToChain)
- func (k Keeper) GetAllConsumerAddrsToPrune(ctx sdk.Context, chainID string) (consumerAddrsToPrune []types.ConsumerAddrsToPrune)
- func (k Keeper) GetAllConsumerChains(ctx sdk.Context) (chains []types.Chain)
- func (k Keeper) GetAllConsumerRewardDenoms(ctx sdk.Context) (consumerRewardDenoms []string)
- func (k Keeper) GetAllInitTimeoutTimestamps(ctx sdk.Context) (initTimeoutTimestamps []types.InitTimeoutTimestamp)
- func (k Keeper) GetAllPendingConsumerAdditionProps(ctx sdk.Context) (props []types.ConsumerAdditionProposal)
- func (k Keeper) GetAllPendingConsumerChainIDs(ctx sdk.Context) []string
- func (k Keeper) GetAllPendingConsumerRemovalProps(ctx sdk.Context) (props []types.ConsumerRemovalProposal)
- func (k Keeper) GetAllProposedConsumerChainIDs(ctx sdk.Context) []types.ProposedChain
- func (k Keeper) GetAllRegisteredAndProposedChainIDs(ctx sdk.Context) []string
- func (k Keeper) GetAllUnbondingOpIndexes(ctx sdk.Context, chainID string) (indexes []types.VscUnbondingOps)
- func (k Keeper) GetAllUnbondingOps(ctx sdk.Context) (ops []types.UnbondingOp)
- func (k Keeper) GetAllValidatorConsumerPubKeys(ctx sdk.Context, chainID *string) (validatorConsumerPubKeys []types.ValidatorConsumerPubKey)
- func (k Keeper) GetAllValidatorsByConsumerAddr(ctx sdk.Context, chainID *string) (validatorConsumerAddrs []types.ValidatorByConsumerAddr)
- func (k Keeper) GetAllValsetUpdateBlockHeights(ctx sdk.Context) (valsetUpdateBlockHeights []types.ValsetUpdateIdToHeight)
- func (k Keeper) GetAllVscSendTimestamps(ctx sdk.Context, chainID string) (vscSendTimestamps []types.VscSendTimestamp)
- func (k Keeper) GetBlocksPerEpoch(ctx sdk.Context) int64
- func (k Keeper) GetByzantineValidators(ctx sdk.Context, misbehaviour ibctmtypes.Misbehaviour) (validators []*tmtypes.Validator, err error)
- func (k Keeper) GetCCVTimeoutPeriod(ctx sdk.Context) time.Duration
- func (k Keeper) GetChainToChannel(ctx sdk.Context, chainID string) (string, bool)
- func (k Keeper) GetChannelToChain(ctx sdk.Context, channelID string) (string, bool)
- func (k Keeper) GetConsumerAdditionPropsToExecute(ctx sdk.Context) (propsToExecute []types.ConsumerAdditionProposal)
- func (k Keeper) GetConsumerAddrsToPrune(ctx sdk.Context, chainID string, vscID uint64) (consumerAddrsToPrune types.AddressList)
- func (k Keeper) GetConsumerClientId(ctx sdk.Context, chainID string) (string, bool)
- func (k Keeper) GetConsumerGenesis(ctx sdk.Context, chainID string) (ccv.ConsumerGenesisState, bool)
- func (k Keeper) GetConsumerRemovalPropsToExecute(ctx sdk.Context) []types.ConsumerRemovalProposal
- func (k Keeper) GetConsumerRewardDenomRegistrationFee(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetConsumerRewardsPoolAddressStr(ctx sdk.Context) string
- func (k Keeper) GetConsumerValSet(ctx sdk.Context, chainID string) (validators []types.ConsumerValidator)
- func (k Keeper) GetEffectiveValPower(ctx sdktypes.Context, valConsAddr providertypes.ProviderConsAddress) math.Int
- func (k Keeper) GetEquivocationEvidenceMinHeight(ctx sdk.Context, chainID string) uint64
- func (k Keeper) GetFirstVscSendTimestamp(ctx sdk.Context, chainID string) (vscSendTimestamp types.VscSendTimestamp, found bool)
- func (k Keeper) GetInitChainHeight(ctx sdk.Context, chainID string) (uint64, bool)
- func (k Keeper) GetInitTimeoutPeriod(ctx sdk.Context) time.Duration
- func (k Keeper) GetInitTimeoutTimestamp(ctx sdk.Context, chainID string) (uint64, bool)
- func (k Keeper) GetMaturedUnbondingOps(ctx sdk.Context) (ids []uint64)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPendingConsumerAdditionProp(ctx sdk.Context, spawnTime time.Time, chainID string) (prop types.ConsumerAdditionProposal, found bool)
- func (k Keeper) GetPendingVSCPackets(ctx sdk.Context, chainID string) []ccv.ValidatorSetChangePacketData
- func (k Keeper) GetPort(ctx sdk.Context) string
- func (k Keeper) GetProposedConsumerChain(ctx sdk.Context, proposalID uint64) string
- func (k Keeper) GetProviderAddrFromConsumerAddr(ctx sdk.Context, chainID string, consumerAddr types.ConsumerConsAddress) types.ProviderConsAddress
- func (k Keeper) GetSlashAcks(ctx sdk.Context, chainID string) []string
- func (k Keeper) GetSlashLog(ctx sdk.Context, providerAddr types.ProviderConsAddress) (found bool)
- func (k Keeper) GetSlashMeter(ctx sdktypes.Context) math.Int
- func (k Keeper) GetSlashMeterAllowance(ctx sdktypes.Context) math.Int
- func (k Keeper) GetSlashMeterReplenishFraction(ctx sdk.Context) string
- func (k Keeper) GetSlashMeterReplenishPeriod(ctx sdk.Context) time.Duration
- func (k Keeper) GetSlashMeterReplenishTimeCandidate(ctx sdktypes.Context) time.Time
- func (k Keeper) GetTemplateClient(ctx sdk.Context) *ibctmtypes.ClientState
- func (k Keeper) GetTrustingPeriodFraction(ctx sdk.Context) string
- func (k Keeper) GetUnbondingOp(ctx sdk.Context, id uint64) (types.UnbondingOp, bool)
- func (k Keeper) GetUnbondingOpIndex(ctx sdk.Context, chainID string, vscID uint64) ([]uint64, bool)
- func (k Keeper) GetUnbondingOpsFromIndex(ctx sdk.Context, chainID string, valsetUpdateID uint64) (entries []types.UnbondingOp)
- func (k Keeper) GetValidatorByConsumerAddr(ctx sdk.Context, chainID string, consumerAddr types.ConsumerConsAddress) (providerAddr types.ProviderConsAddress, found bool)
- func (k Keeper) GetValidatorConsumerPubKey(ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress) (consumerKey tmprotocrypto.PublicKey, found bool)
- func (k Keeper) GetValidatorSetUpdateId(ctx sdk.Context) (validatorSetUpdateId uint64)
- func (k Keeper) GetValsetUpdateBlockHeight(ctx sdk.Context, valsetUpdateId uint64) (uint64, bool)
- func (k Keeper) GetVscSendTimestamp(ctx sdk.Context, chainID string, vscID uint64) (time.Time, bool)
- func (k Keeper) GetVscTimeoutPeriod(ctx sdk.Context) time.Duration
- func (k Keeper) HandleConsumerAdditionProposal(ctx sdk.Context, p *types.ConsumerAdditionProposal) error
- func (k Keeper) HandleConsumerDoubleVoting(ctx sdk.Context, evidence *tmtypes.DuplicateVoteEvidence, chainID string, ...) error
- func (k Keeper) HandleConsumerMisbehaviour(ctx sdk.Context, misbehaviour ibctmtypes.Misbehaviour) error
- func (k Keeper) HandleConsumerRemovalProposal(ctx sdk.Context, p *types.ConsumerRemovalProposal) error
- func (k Keeper) HandleConsumerRewardDenomProposal(ctx sdk.Context, p *types.ChangeRewardDenomsProposal) error
- func (k Keeper) HandleSlashPacket(ctx sdk.Context, chainID string, data ccv.SlashPacketData)
- func (k Keeper) HandleVSCMaturedPacket(ctx sdk.Context, chainID string, data ccv.VSCMaturedPacketData)
- func (k *Keeper) Hooks() Hooks
- func (k Keeper) IncrementValidatorSetUpdateId(ctx sdk.Context)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
- func (k Keeper) InitializeSlashMeter(ctx sdktypes.Context)
- func (k Keeper) IsBound(ctx sdk.Context, portID string) bool
- func (k Keeper) IsConsumerProposedOrRegistered(ctx sdk.Context, chainID string) bool
- func (k Keeper) IsConsumerValidator(ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress) bool
- func (k Keeper) JailAndTombstoneValidator(ctx sdk.Context, providerAddr types.ProviderConsAddress) error
- func (k Keeper) LegacyDeleteThrottledPacketDataForConsumer(ctx sdktypes.Context, consumerChainID string)deprecated
- func (k Keeper) LegacyGetAllThrottledPacketData(ctx sdktypes.Context, consumerChainID string) (slashData []ccvtypes.SlashPacketData, ...)deprecated
- func (k Keeper) LegacyQueueThrottledPacketData(ctx sdktypes.Context, consumerChainID string, ibcSeqNum uint64, ...) errordeprecated
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MakeConsumerGenesis(ctx sdk.Context, prop *types.ConsumerAdditionProposal) (gen ccv.ConsumerGenesisState, nextValidatorsHash []byte, err error)
- func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, ack channeltypes.Acknowledgement) error
- func (k Keeper) OnRecvSlashPacket(ctx sdk.Context, packet channeltypes.Packet, data ccv.SlashPacketData) (ccv.PacketAckResult, error)
- func (k Keeper) OnRecvVSCMaturedPacket(ctx sdk.Context, packet channeltypes.Packet, data ccv.VSCMaturedPacketData) error
- func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet) error
- func (k Keeper) PendingConsumerRemovalPropExists(ctx sdk.Context, chainID string, timestamp time.Time) bool
- func (k Keeper) PruneKeyAssignments(ctx sdk.Context, chainID string, vscID uint64)
- func (k Keeper) QueryAllPairsValConAddrByConsumerChainID(goCtx context.Context, ...) (*types.QueryAllPairsValConAddrByConsumerChainIDResponse, error)
- func (k Keeper) QueryConsumerChainStarts(goCtx context.Context, req *types.QueryConsumerChainStartProposalsRequest) (*types.QueryConsumerChainStartProposalsResponse, error)
- func (k Keeper) QueryConsumerChainStops(goCtx context.Context, req *types.QueryConsumerChainStopProposalsRequest) (*types.QueryConsumerChainStopProposalsResponse, error)
- func (k Keeper) QueryConsumerChains(goCtx context.Context, req *types.QueryConsumerChainsRequest) (*types.QueryConsumerChainsResponse, error)
- func (k Keeper) QueryConsumerGenesis(c context.Context, req *types.QueryConsumerGenesisRequest) (*types.QueryConsumerGenesisResponse, error)
- func (k Keeper) QueryParams(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) QueryProposedConsumerChainIDs(goCtx context.Context, req *types.QueryProposedChainIDsRequest) (*types.QueryProposedChainIDsResponse, error)
- func (k Keeper) QueryRegisteredConsumerRewardDenoms(goCtx context.Context, req *types.QueryRegisteredConsumerRewardDenomsRequest) (*types.QueryRegisteredConsumerRewardDenomsResponse, error)
- func (k Keeper) QueryThrottleState(goCtx context.Context, req *types.QueryThrottleStateRequest) (*types.QueryThrottleStateResponse, error)
- func (k Keeper) QueryValidatorConsumerAddr(goCtx context.Context, req *types.QueryValidatorConsumerAddrRequest) (*types.QueryValidatorConsumerAddrResponse, error)
- func (k Keeper) QueryValidatorProviderAddr(goCtx context.Context, req *types.QueryValidatorProviderAddrRequest) (*types.QueryValidatorProviderAddrResponse, error)
- func (k Keeper) QueueVSCPackets(ctx sdk.Context)
- func (k Keeper) RemoveConsumerFromUnbondingOp(ctx sdk.Context, id uint64, chainID string) (canComplete bool)
- func (k Keeper) ReplenishSlashMeter(ctx sdktypes.Context)
- func (k Keeper) SendVSCPackets(ctx sdk.Context)
- func (k Keeper) SendVSCPacketsToChain(ctx sdk.Context, chainID, channelID string)
- func (k Keeper) SetChainToChannel(ctx sdk.Context, chainID, channelID string)
- func (k Keeper) SetChannelToChain(ctx sdk.Context, channelID, chainID string)
- func (k Keeper) SetConsumerChain(ctx sdk.Context, channelID string) error
- func (k Keeper) SetConsumerClientId(ctx sdk.Context, chainID, clientID string)
- func (k Keeper) SetConsumerGenesis(ctx sdk.Context, chainID string, gen ccv.ConsumerGenesisState) error
- func (k Keeper) SetConsumerRewardDenom(ctx sdk.Context, denom string)
- func (k Keeper) SetConsumerValSet(ctx sdk.Context, chainID string, nextValidators []types.ConsumerValidator)
- func (k Keeper) SetConsumerValidator(ctx sdk.Context, chainID string, validator types.ConsumerValidator)
- func (k Keeper) SetEquivocationEvidenceMinHeight(ctx sdk.Context, chainID string, height uint64)
- func (k Keeper) SetInitChainHeight(ctx sdk.Context, chainID string, height uint64)
- func (k Keeper) SetInitTimeoutTimestamp(ctx sdk.Context, chainID string, ts uint64)
- func (k *Keeper) SetParamSpace(ctx sdk.Context, ps paramtypes.Subspace)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPendingConsumerAdditionProp(ctx sdk.Context, prop *types.ConsumerAdditionProposal)
- func (k Keeper) SetPendingConsumerRemovalProp(ctx sdk.Context, prop *types.ConsumerRemovalProposal)
- func (k Keeper) SetPort(ctx sdk.Context, portID string)
- func (k Keeper) SetProposedConsumerChain(ctx sdk.Context, chainID string, proposalID uint64)
- func (k Keeper) SetSlashAcks(ctx sdk.Context, chainID string, acks []string)
- func (k Keeper) SetSlashLog(ctx sdk.Context, providerAddr types.ProviderConsAddress)
- func (k Keeper) SetSlashMeter(ctx sdktypes.Context, value math.Int)
- func (k Keeper) SetSlashMeterReplenishTimeCandidate(ctx sdktypes.Context)
- func (k Keeper) SetUnbondingOp(ctx sdk.Context, unbondingOp types.UnbondingOp)
- func (k Keeper) SetUnbondingOpIndex(ctx sdk.Context, chainID string, vscID uint64, ids []uint64)
- func (k Keeper) SetValidatorByConsumerAddr(ctx sdk.Context, chainID string, consumerAddr types.ConsumerConsAddress, ...)
- func (k Keeper) SetValidatorConsumerPubKey(ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress, ...)
- func (k Keeper) SetValidatorSetUpdateId(ctx sdk.Context, valUpdateID uint64)
- func (k Keeper) SetValsetUpdateBlockHeight(ctx sdk.Context, valsetUpdateId, blockHeight uint64)
- func (k Keeper) SetVscSendTimestamp(ctx sdk.Context, chainID string, vscID uint64, timestamp time.Time)
- func (k Keeper) SetVscTimeoutPeriod(ctx sdk.Context, period time.Duration)
- func (k Keeper) SlashValidator(ctx sdk.Context, providerAddr types.ProviderConsAddress) error
- func (k Keeper) StopConsumerChain(ctx sdk.Context, chainID string, closeChan bool) (err error)
- func (k Keeper) StopConsumerChainInCachedCtx(ctx sdk.Context, p types.ConsumerRemovalProposal) (cc sdk.Context, writeCache func(), err error)
- func (k Keeper) TransferRewardsToFeeCollector(ctx sdk.Context)
- func (k Keeper) ValidateSlashPacket(ctx sdk.Context, chainID string, packet channeltypes.Packet, ...) error
- func (k Keeper) ValidatorConsensusKeyInUse(ctx sdk.Context, valAddr sdk.ValAddress) bool
- func (k Keeper) VerifyConsumerChain(ctx sdk.Context, channelID string, connectionHops []string) error
- func (k Keeper) VerifyDoubleVotingEvidence(evidence tmtypes.DuplicateVoteEvidence, chainID string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffValidators ¶ added in v4.1.0
func DiffValidators( currentValidators []types.ConsumerValidator, nextValidators []types.ConsumerValidator) []abci.ValidatorUpdate
DiffValidators compares the current and the next epoch's consumer validators and returns the `ValidatorUpdate` diff needed by CometBFT to update the validator set on a chain.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the bank MsgServer interface for the provided Keeper.
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Wrapper struct
func (Hooks) AfterDelegationModified ¶
func (h Hooks) AfterDelegationModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (Hooks) AfterProposalDeposit ¶
func (Hooks) AfterProposalFailedMinDeposit ¶
func (Hooks) AfterProposalSubmission ¶
AfterProposalSubmission - call hook if registered After a consumerAddition proposal submission, a record is created that maps the proposal ID to the consumer chain ID.
func (Hooks) AfterProposalVote ¶
func (Hooks) AfterProposalVotingPeriodEnded ¶
AfterProposalVotingPeriodEnded - call hook if registered After proposal voting ends, the consumer chainID in store is deleted. When a consumerAddition proposal passes, the consumer chainID is available in providerKeeper.GetAllPendingConsumerAdditionProps or providerKeeper.GetAllConsumerChains(ctx).
func (Hooks) AfterUnbondingInitiated ¶
This stores a record of each unbonding op from staking, allowing us to track which consumer chains have unbonded
func (Hooks) AfterValidatorBeginUnbonding ¶
func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
func (Hooks) AfterValidatorBonded ¶
func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
func (Hooks) AfterValidatorCreated ¶
func (Hooks) AfterValidatorRemoved ¶
func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, valConsAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
func (Hooks) BeforeDelegationCreated ¶
func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) BeforeDelegationRemoved ¶
func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (Hooks) BeforeDelegationSharesModified ¶
func (h Hooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (Hooks) BeforeTokenizeShareRecordRemoved ¶
func (Hooks) BeforeValidatorModified ¶
func (Hooks) BeforeValidatorSlashed ¶
func (Hooks) GetConsumerAdditionLegacyPropFromProp ¶
func (h Hooks) GetConsumerAdditionLegacyPropFromProp( ctx sdk.Context, proposalID uint64, ) (providertypes.ConsumerAdditionProposal, bool)
GetConsumerAdditionLegacyPropFromProp extracts a consumer addition legacy proposal from the proposal with the given ID
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the Cross-Chain Validation Provider Keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, scopedKeeper ccv.ScopedKeeper, channelKeeper ccv.ChannelKeeper, portKeeper ccv.PortKeeper, connectionKeeper ccv.ConnectionKeeper, clientKeeper ccv.ClientKeeper, stakingKeeper ccv.StakingKeeper, slashingKeeper ccv.SlashingKeeper, accountKeeper ccv.AccountKeeper, distributionKeeper ccv.DistributionKeeper, bankKeeper ccv.BankKeeper, govKeeper ccv.GovKeeper, feeCollectorName string, ) Keeper
NewKeeper creates a new provider Keeper instance
func (Keeper) AppendConsumerAddrsToPrune ¶
func (k Keeper) AppendConsumerAddrsToPrune(ctx sdk.Context, chainID string, vscID uint64, consumerAddr types.ConsumerConsAddress)
AppendConsumerAddrsToPrune appends a consumer validator address to the list of consumer addresses that can be pruned once the VSCMaturedPacket with vscID is received.
The following invariant needs to hold: For each consumer address cAddr in ValidatorByConsumerAddr,
- either there exists a provider address pAddr in ValidatorConsumerPubKey, s.t. hash(ValidatorConsumerPubKey(pAddr)) = cAddr
- or there exists a vscID in ConsumerAddrsToPrune s.t. cAddr in ConsumerAddrsToPrune(vscID)
func (Keeper) AppendMaturedUnbondingOps ¶
AppendMaturedUnbondingOps adds a list of ids to the list of matured unbonding operation ids
func (Keeper) AppendPendingVSCPackets ¶
func (k Keeper) AppendPendingVSCPackets(ctx sdk.Context, chainID string, newPackets ...ccv.ValidatorSetChangePacketData)
AppendPendingVSCPackets adds the given ValidatorSetChange packet to the list of pending ValidatorSetChange packets stored under chain ID
func (Keeper) AppendSlashAck ¶
AppendSlashAck appends the given slash ack to the given chain ID slash acks in store
func (Keeper) AssignConsumerKey ¶
func (k Keeper) AssignConsumerKey( ctx sdk.Context, chainID string, validator stakingtypes.Validator, consumerKey tmprotocrypto.PublicKey, ) error
AssignConsumerKey assigns the consumerKey to the validator with providerAddr on the consumer chain with ID chainID, if it is either registered or currently voted on in a ConsumerAddition governance proposal
func (Keeper) AuthenticateCapability ¶
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function
func (Keeper) BeginBlockCCR ¶
BeginBlockCCR iterates over the pending consumer removal proposals in order and stop/removes the chain if the stop time has passed, otherwise it will break out of loop and return. Executed proposals are deleted.
See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-bblock-ccr1 Spec tag: [CCV-PCF-BBLOCK-CCR.1]
func (Keeper) BeginBlockCIS ¶
BeginBlockCIS contains the BeginBlock logic needed for the Consumer Initiated Slashing sub-protocol.
func (Keeper) BeginBlockInit ¶
BeginBlockInit iterates over the pending consumer addition proposals in order, and creates clients for props in which the spawn time has passed. Executed proposals are deleted.
See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-bblock-init1 Spec tag:[CCV-PCF-BBLOCK-INIT.1]
func (Keeper) BindPort ¶
BindPort defines a wrapper function for the port Keeper's function in order to expose it to module's InitGenesis function
func (Keeper) CheckForSlashMeterReplenishment ¶
CheckForSlashMeterReplenishment checks if the slash meter should be replenished, and if so, replenishes it. Note: initial slash meter replenish time candidate is set in InitGenesis.
func (Keeper) CheckMisbehaviour ¶
func (k Keeper) CheckMisbehaviour(ctx sdk.Context, misbehaviour ibctmtypes.Misbehaviour) error
CheckMisbehaviour checks that headers in the given misbehaviour forms a valid light client attack on a light client that tracks an ICS consumer chain
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability allows the transfer module that can claim a capability that IBC module passes to it
func (Keeper) ComputeNextEpochConsumerValSet ¶ added in v4.1.0
func (k Keeper) ComputeNextEpochConsumerValSet( ctx sdk.Context, chainID string, bondedValidators []stakingtypes.Validator, ) []types.ConsumerValidator
ComputeNextEpochConsumerValSet returns the next validator set that is responsible for validating consumer chain `chainID`, based on the bonded validators.
func (Keeper) ComputePowerToSlash ¶
func (k Keeper) ComputePowerToSlash(ctx sdk.Context, validator stakingtypes.Validator, undelegations []stakingtypes.UnbondingDelegation, redelegations []stakingtypes.Redelegation, power int64, powerReduction math.Int, ) int64
ComputePowerToSlash computes the power to be slashed based on the tokens in non-matured `undelegations` and `redelegations`, as well as the current `power` of the validator. Note that this method does not perform any slashing.
func (Keeper) ConsumeMaturedUnbondingOps ¶
ConsumeMaturedUnbondingOps empties and returns list of matured unbonding operation ids (if it exists)
func (Keeper) ConsumeSlashAcks ¶
ConsumeSlashAcks empties and returns the slash acks for a given chain ID
func (Keeper) ConsumerRewardDenomExists ¶
func (Keeper) CreateConsumerClient ¶
CreateConsumerClient will create the CCV client for the given consumer chain. The CCV channel must be built on top of the CCV client to ensure connection with the right consumer chain.
See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-crclient1 Spec tag: [CCV-PCF-CRCLIENT.1]
func (Keeper) CreateConsumerClientInCachedCtx ¶
func (k Keeper) CreateConsumerClientInCachedCtx(ctx sdk.Context, p types.ConsumerAdditionProposal) (cc sdk.Context, writeCache func(), err error)
CreateConsumerClientInCachedCtx creates a consumer client from a given consumer addition proposal in a cached context
func (Keeper) DeleteChainToChannel ¶
DeleteChainToChannel deletes the CCV channel ID for the given consumer chain ID
func (Keeper) DeleteChannelToChain ¶
DeleteChannelToChain deletes the consumer chain ID for a given CCV channelID
func (Keeper) DeleteConsumerAddrsToPrune ¶
DeleteConsumerAddrsToPrune deletes the list of consumer addresses mapped to a given VSC ID
func (Keeper) DeleteConsumerClientId ¶
DeleteConsumerClientId removes from the store the clientID for the given chainID.
func (Keeper) DeleteConsumerGenesis ¶
func (Keeper) DeleteConsumerRewardDenom ¶
func (Keeper) DeleteConsumerValSet ¶ added in v4.1.0
DeleteConsumerValSet deletes all the stored consumer validators for chain `chainID`
func (Keeper) DeleteConsumerValidator ¶ added in v4.1.0
func (k Keeper) DeleteConsumerValidator( ctx sdk.Context, chainID string, providerConsAddr types.ProviderConsAddress, )
DeleteConsumerValidator removes consumer validator with `providerAddr` address
func (Keeper) DeleteEquivocationEvidenceMinHeight ¶
DeleteEquivocationEvidenceMinHeight deletes the the minimum height of a valid consumer equivocation evidence for a given consumer chain ID
func (Keeper) DeleteInitChainHeight ¶
DeleteInitChainHeight deletes the block height value for which the given consumer chain's channel was established
func (Keeper) DeleteInitTimeoutTimestamp ¶
DeleteInitTimeoutTimestamp removes from the store the init timeout timestamp for the given chainID.
func (Keeper) DeleteKeyAssignments ¶
DeleteKeyAssignments deletes all the state needed for key assignments on a consumer chain
func (Keeper) DeletePendingConsumerAdditionProps ¶
func (k Keeper) DeletePendingConsumerAdditionProps(ctx sdk.Context, proposals ...types.ConsumerAdditionProposal)
DeletePendingConsumerAdditionProps deletes the given consumer addition proposals
func (Keeper) DeletePendingConsumerRemovalProps ¶
func (k Keeper) DeletePendingConsumerRemovalProps(ctx sdk.Context, proposals ...types.ConsumerRemovalProposal)
DeletePendingConsumerRemovalProps deletes the given pending consumer removal proposals. This method should be called once the proposal has been acted upon.
func (Keeper) DeletePendingVSCPackets ¶
DeletePendingVSCPackets deletes the list of pending ValidatorSetChange packets for chain ID
func (Keeper) DeleteProposedConsumerChainInStore ¶
DeleteProposedConsumerChainInStore deletes the consumer chainID from store which is in gov consumerAddition proposal
func (Keeper) DeleteSlashAcks ¶
DeleteSlashAcks deletes the slash acks for a given chain ID
func (Keeper) DeleteUnbondingOp ¶
DeleteUnbondingOp deletes a UnbondingOp given its ID
func (Keeper) DeleteUnbondingOpIndex ¶
DeleteUnbondingOpIndex deletes the IDs of unbonding operations that are waiting for a VSCMaturedPacket with vscID from a consumer with chainID
func (Keeper) DeleteValidatorByConsumerAddr ¶
func (k Keeper) DeleteValidatorByConsumerAddr(ctx sdk.Context, chainID string, consumerAddr types.ConsumerConsAddress)
DeleteValidatorByConsumerAddr deletes the mapping from a validator's consensus address on a consumer to the validator's consensus address on the provider
func (Keeper) DeleteValidatorConsumerPubKey ¶
func (k Keeper) DeleteValidatorConsumerPubKey(ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress)
DeleteValidatorConsumerPubKey deletes a validator's public key assigned for a consumer chain
func (Keeper) DeleteValsetUpdateBlockHeight ¶
DeleteValsetUpdateBlockHeight deletes the block height value for a given vaset update id
func (Keeper) DeleteVscSendTimestamp ¶
DeleteVscSendTimestamp removes from the store a specific VSC send timestamp for the given chainID and vscID.
func (Keeper) DeleteVscSendTimestampsForConsumer ¶
DeleteVscSendTimestampsForConsumer deletes all VSC send timestamps for a given consumer chain
func (Keeper) EndBlockCCR ¶
EndBlockCCR contains the EndBlock logic needed for the Consumer Chain Removal sub-protocol
func (Keeper) EndBlockCIS ¶
EndBlockCIS contains the EndBlock logic needed for the Consumer Initiated Slashing sub-protocol
func (Keeper) EndBlockRD ¶
EndBlockRD executes EndBlock logic for the Reward Distribution sub-protocol. Reward Distribution follows a simple model: send tokens to the ConsumerRewardsPool, from where they sent to the fee collector address
func (Keeper) EndBlockVSU ¶
EndBlockVSU contains the EndBlock logic needed for the Validator Set Update sub-protocol
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the CCV provider module's exported genesis
func (Keeper) GetAllChannelToChains ¶
func (k Keeper) GetAllChannelToChains(ctx sdk.Context) (channels []types.ChannelToChain)
GetAllChannelToChains gets all channel to chain mappings. If a mapping exists, then the CCV channel to that consumer chain is established.
Note that mapping from CCV channel IDs to consumer chainIDs is stored under keys with the following format: ChannelToChainBytePrefix | channelID Thus, the returned array is in ascending order of channelIDs.
func (Keeper) GetAllConsumerAddrsToPrune ¶
func (k Keeper) GetAllConsumerAddrsToPrune(ctx sdk.Context, chainID string) (consumerAddrsToPrune []types.ConsumerAddrsToPrune)
GetAllConsumerAddrsToPrune gets all consumer addresses that can be pruned for a given chainID.
Note that the list of all consumer addresses is stored under keys with the following format: ConsumerAddrsToPruneBytePrefix | len(chainID) | chainID | vscID Thus, the returned array is in ascending order of vscIDs.
func (Keeper) GetAllConsumerChains ¶
GetAllConsumerChains gets all of the consumer chains, for which the provider module created IBC clients. Consumer chains with created clients are also referred to as registered.
Note that the registered consumer chains are stored under keys with the following format: ChainToClientBytePrefix | chainID Thus, the returned array is in ascending order of chainIDs.
func (Keeper) GetAllConsumerRewardDenoms ¶
func (Keeper) GetAllInitTimeoutTimestamps ¶
func (k Keeper) GetAllInitTimeoutTimestamps(ctx sdk.Context) (initTimeoutTimestamps []types.InitTimeoutTimestamp)
GetAllInitTimeoutTimestamps gets all init timeout timestamps in the store.
Note that the init timeout timestamps are stored under keys with the following format: InitTimeoutTimestampBytePrefix | chainID Thus, the returned array is in ascending order of chainIDs (NOT in timestamp order).
func (Keeper) GetAllPendingConsumerAdditionProps ¶
func (k Keeper) GetAllPendingConsumerAdditionProps(ctx sdk.Context) (props []types.ConsumerAdditionProposal)
GetAllPendingConsumerAdditionProps gets all pending consumer addition proposals.
Note that the pending consumer addition proposals are stored under keys with the following format: PendingCAPBytePrefix | spawnTime.UnixNano() | chainID Thus, the returned array is in spawnTime order. If two proposals have the same spawnTime, then they are ordered by chainID.
func (Keeper) GetAllPendingConsumerChainIDs ¶
GetAllPendingConsumerChainIDs gets pending consumer chains have not reach spawn time
func (Keeper) GetAllPendingConsumerRemovalProps ¶
func (k Keeper) GetAllPendingConsumerRemovalProps(ctx sdk.Context) (props []types.ConsumerRemovalProposal)
GetAllPendingConsumerRemovalProps iterates through the pending consumer removal proposals.
Note that the pending consumer removal proposals are stored under keys with the following format: PendingCRPBytePrefix | stopTime.UnixNano() | chainID Thus, the returned array is in stopTime order.
func (Keeper) GetAllProposedConsumerChainIDs ¶
func (k Keeper) GetAllProposedConsumerChainIDs(ctx sdk.Context) []types.ProposedChain
GetAllProposedConsumerChainIDs returns the proposed chainID of all gov consumerAddition proposals that are still in the voting period.
func (Keeper) GetAllRegisteredAndProposedChainIDs ¶
func (Keeper) GetAllUnbondingOpIndexes ¶
func (k Keeper) GetAllUnbondingOpIndexes(ctx sdk.Context, chainID string) (indexes []types.VscUnbondingOps)
GetAllUnbondingOpIndexes gets all unbonding indexes for a given chain id, i.e., all the IDs of unbonding operations that are waiting for VSCMaturedPackets from a consumer with chainID.
Note that the unbonding indexes for a given chainID are stored under keys with the following format: UnbondingOpIndexBytePrefix | len(chainID) | chainID | vscID Thus, the returned array is in ascending order of vscIDs.
func (Keeper) GetAllUnbondingOps ¶
func (k Keeper) GetAllUnbondingOps(ctx sdk.Context) (ops []types.UnbondingOp)
GetAllUnbondingOps gets all UnbondingOps, where each UnbondingOp consists of its unique ID and a list of consumer chainIDs that the unbonding operation is waiting on.
Note that UnbondingOps are stored under keys with the following format: UnbondingOpBytePrefix | ID Thus, the iteration is in ascending order of IDs.
func (Keeper) GetAllValidatorConsumerPubKeys ¶
func (k Keeper) GetAllValidatorConsumerPubKeys(ctx sdk.Context, chainID *string) (validatorConsumerPubKeys []types.ValidatorConsumerPubKey)
GetAllValidatorConsumerPubKeys gets all the validators public keys assigned for a consumer chain If chainID is nil, it returns all the validators public keys assigned for all consumer chains
Note that the validators public keys assigned for a consumer chain are stored under keys with the following format: UnbondingOpIndexBytePrefix | len(chainID) | chainID | providerAddress Thus, the returned array is
- in ascending order of providerAddresses, if chainID is not nil;
- in undetermined order, if chainID is nil.
func (Keeper) GetAllValidatorsByConsumerAddr ¶
func (k Keeper) GetAllValidatorsByConsumerAddr(ctx sdk.Context, chainID *string) (validatorConsumerAddrs []types.ValidatorByConsumerAddr)
GetValidatorsByConsumerAddrs gets all the mappings from consensus addresses on a given consumer chain to consensus addresses on the provider chain. If chainID is nil, it returns all the mappings from consensus addresses on all consumer chains.
Note that the mappings for a consumer chain are stored under keys with the following format: ValidatorsByConsumerAddrBytePrefix | len(chainID) | chainID | consumerAddress Thus, the returned array is
- in ascending order of consumerAddresses, if chainID is not nil;
- in undetermined order, if chainID is nil.
func (Keeper) GetAllValsetUpdateBlockHeights ¶
func (k Keeper) GetAllValsetUpdateBlockHeights(ctx sdk.Context) (valsetUpdateBlockHeights []types.ValsetUpdateIdToHeight)
GetAllValsetUpdateBlockHeights gets all the block heights for all valset updates
Note that the mapping from vscIDs to block heights is stored under keys with the following format: ValsetUpdateBlockHeightBytePrefix | vscID Thus, the returned array is in ascending order of vscIDs.
func (Keeper) GetAllVscSendTimestamps ¶
func (k Keeper) GetAllVscSendTimestamps(ctx sdk.Context, chainID string) (vscSendTimestamps []types.VscSendTimestamp)
GetAllVscSendTimestamps gets an array of all the vsc send timestamps of the given chainID.
Note that the vsc send timestamps of a given chainID are stored under keys with the following format: VscSendTimestampBytePrefix | len(chainID) | chainID | vscID Thus, the iteration is in ascending order of vscIDs, and as a result in send timestamp order.
func (Keeper) GetBlocksPerEpoch ¶ added in v4.1.0
GetBlocksPerEpoch returns the number of blocks that constitute an epoch
func (Keeper) GetByzantineValidators ¶
func (k Keeper) GetByzantineValidators(ctx sdk.Context, misbehaviour ibctmtypes.Misbehaviour) (validators []*tmtypes.Validator, err error)
GetByzantineValidators returns the validators that signed both headers. If the misbehavior is an equivocation light client attack, then these validators are the Byzantine validators.
func (Keeper) GetCCVTimeoutPeriod ¶
GetCCVTimeoutPeriod returns the timeout period for sent ibc packets
func (Keeper) GetChainToChannel ¶
GetChainToChannel gets the CCV channelID for the given consumer chainID
func (Keeper) GetChannelToChain ¶
GetChannelToChain gets the consumer chainID for a given CCV channelID
func (Keeper) GetConsumerAdditionPropsToExecute ¶
func (k Keeper) GetConsumerAdditionPropsToExecute(ctx sdk.Context) (propsToExecute []types.ConsumerAdditionProposal)
GetConsumerAdditionPropsToExecute returns the pending consumer addition proposals that are ready to be executed, i.e., consumer clients to be created. A prop is included in the returned list if its proposed spawn time has passed.
Note: this method is split out from BeginBlockInit to be easily unit tested.
func (Keeper) GetConsumerAddrsToPrune ¶
func (k Keeper) GetConsumerAddrsToPrune( ctx sdk.Context, chainID string, vscID uint64, ) (consumerAddrsToPrune types.AddressList)
GetConsumerAddrsToPrune returns the list of consumer addresses that can be pruned once the VSCMaturedPacket with vscID is received
func (Keeper) GetConsumerClientId ¶
GetConsumerClientId returns the client ID for the given chain ID.
func (Keeper) GetConsumerGenesis ¶
func (Keeper) GetConsumerRemovalPropsToExecute ¶
func (k Keeper) GetConsumerRemovalPropsToExecute(ctx sdk.Context) []types.ConsumerRemovalProposal
GetConsumerRemovalPropsToExecute iterates over the pending consumer removal proposals and returns an ordered list of consumer removal proposals to be executed, ie. consumer chains to be stopped and removed from the provider chain. A prop is included in the returned list if its proposed stop time has passed.
Note: this method is split out from BeginBlockCCR to be easily unit tested.
func (Keeper) GetConsumerRewardDenomRegistrationFee ¶
func (Keeper) GetConsumerRewardsPoolAddressStr ¶
func (Keeper) GetConsumerValSet ¶ added in v4.1.0
func (k Keeper) GetConsumerValSet( ctx sdk.Context, chainID string) (validators []types.ConsumerValidator)
GetConsumerValSet returns all the consumer validators for chain `chainID`
func (Keeper) GetEffectiveValPower ¶
func (k Keeper) GetEffectiveValPower(ctx sdktypes.Context, valConsAddr providertypes.ProviderConsAddress, ) math.Int
Obtains the effective validator power relevant to a validator consensus address.
func (Keeper) GetEquivocationEvidenceMinHeight ¶
GetEquivocationEvidenceMinHeight returns the the minimum height of a valid consumer equivocation evidence for a given consumer chain ID
func (Keeper) GetFirstVscSendTimestamp ¶
func (k Keeper) GetFirstVscSendTimestamp(ctx sdk.Context, chainID string) (vscSendTimestamp types.VscSendTimestamp, found bool)
GetFirstVscSendTimestamp gets the vsc send timestamp with the lowest vscID for the given chainID.
func (Keeper) GetInitChainHeight ¶
GetInitChainHeight returns the provider block height when the given consumer chain was initiated
func (Keeper) GetInitTimeoutPeriod ¶
GetInitTimeoutPeriod returns the init timeout period
func (Keeper) GetInitTimeoutTimestamp ¶
GetInitTimeoutTimestamp returns the init timeout timestamp for the given chain ID. This method is used only in testing.
func (Keeper) GetMaturedUnbondingOps ¶
GetMaturedUnbondingOps returns the list of matured unbonding operation ids
func (Keeper) GetPendingConsumerAdditionProp ¶
func (k Keeper) GetPendingConsumerAdditionProp(ctx sdk.Context, spawnTime time.Time, chainID string, ) (prop types.ConsumerAdditionProposal, found bool)
GetPendingConsumerAdditionProp retrieves a pending consumer addition proposal by spawn time and chain id.
Note: this method is only used in testing
func (Keeper) GetPendingVSCPackets ¶
func (k Keeper) GetPendingVSCPackets(ctx sdk.Context, chainID string) []ccv.ValidatorSetChangePacketData
GetPendingVSCPackets returns the list of pending ValidatorSetChange packets stored under chain ID
func (Keeper) GetProposedConsumerChain ¶
GetProposedConsumerChain returns the proposed chainID for the given consumerAddition proposal ID.
func (Keeper) GetProviderAddrFromConsumerAddr ¶
func (k Keeper) GetProviderAddrFromConsumerAddr( ctx sdk.Context, chainID string, consumerAddr types.ConsumerConsAddress, ) types.ProviderConsAddress
GetProviderAddrFromConsumerAddr returns the consensus address of a validator with consAddr set as the consensus address on a consumer chain
func (Keeper) GetSlashAcks ¶
GetSlashAcks returns the slash acks stored under the given chain ID
TODO: SlashAcks should be persisted as a list of ConsumerConsAddr types, not strings. See https://github.com/cosmos/interchain-security/issues/728
func (Keeper) GetSlashLog ¶
func (k Keeper) GetSlashLog( ctx sdk.Context, providerAddr types.ProviderConsAddress, ) (found bool)
GetSlashLog returns a validator's slash log status True will be returned if an entry exists for a given validator address
func (Keeper) GetSlashMeter ¶
GetSlashMeter returns a meter (persisted as a signed int) which stores an amount of voting power, corresponding to an allowance of validators that can be jailed/tombstoned over time.
Note: the value of this int should always be in the range of tendermint's [-MaxVotingPower, MaxVotingPower]
func (Keeper) GetSlashMeterAllowance ¶
GetSlashMeterAllowance returns the amount of voting power units (int) that would be added to the slash meter for a replenishment that would happen this block, this allowance value also serves as the max value for the meter for this block.
Note: allowance can change between blocks, since it is directly correlated to total voting power. The slash meter must be less than or equal to the allowance for this block, before any slash packet handling logic can be executed.
func (Keeper) GetSlashMeterReplenishFraction ¶
GetSlashMeterReplenishFraction returns the string fraction of total voting power that is replenished to the slash meter every replenish period. This param also serves as a maximum fraction of total voting power that the slash meter can hold.
func (Keeper) GetSlashMeterReplenishPeriod ¶
GetSlashMeterReplenishPeriod returns the period in which: Once the slash meter becomes not-full, the slash meter is replenished after this period.
func (Keeper) GetSlashMeterReplenishTimeCandidate ¶
GetSlashMeterReplenishTimeCandidate returns the next UTC time the slash meter could potentially be replenished.
Note: this value is the next time the slash meter will be replenished IFF the slash meter is NOT full. Otherwise this value will be updated in every future block until the slash meter becomes NOT full.
func (Keeper) GetTemplateClient ¶
func (k Keeper) GetTemplateClient(ctx sdk.Context) *ibctmtypes.ClientState
GetTemplateClient returns the template client for provider proposals
func (Keeper) GetTrustingPeriodFraction ¶
GetTrustingPeriodFraction returns a TrustingPeriodFraction used to compute the provider IBC client's TrustingPeriod as UnbondingPeriod / TrustingPeriodFraction
func (Keeper) GetUnbondingOp ¶
GetUnbondingOp gets a UnbondingOp by its unique ID
func (Keeper) GetUnbondingOpIndex ¶
GetUnbondingOpIndex gets the IDs of unbonding operations that are waiting for a VSCMaturedPacket with vscID from a consumer with chainID
func (Keeper) GetUnbondingOpsFromIndex ¶
func (k Keeper) GetUnbondingOpsFromIndex(ctx sdk.Context, chainID string, valsetUpdateID uint64) (entries []types.UnbondingOp)
GetUnbondingOpsFromIndex gets the unbonding ops waiting for a given chainID and vscID
func (Keeper) GetValidatorByConsumerAddr ¶
func (k Keeper) GetValidatorByConsumerAddr( ctx sdk.Context, chainID string, consumerAddr types.ConsumerConsAddress, ) (providerAddr types.ProviderConsAddress, found bool)
GetValidatorByConsumerAddr returns a validator's consensus address on the provider given the validator's consensus address on a consumer
func (Keeper) GetValidatorConsumerPubKey ¶
func (k Keeper) GetValidatorConsumerPubKey( ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress, ) (consumerKey tmprotocrypto.PublicKey, found bool)
GetValidatorConsumerPubKey returns a validator's public key assigned for a consumer chain
func (Keeper) GetValidatorSetUpdateId ¶
func (Keeper) GetValsetUpdateBlockHeight ¶
GetValsetUpdateBlockHeight gets the block height for a given valset update id
func (Keeper) GetVscSendTimestamp ¶
func (k Keeper) GetVscSendTimestamp(ctx sdk.Context, chainID string, vscID uint64) (time.Time, bool)
GetVscSendTimestamp returns a VSC send timestamp by chainID and vscID
Note: This method is used only for testing.
func (Keeper) GetVscTimeoutPeriod ¶
GetVscTimeoutPeriod returns the vsc timeout period
func (Keeper) HandleConsumerAdditionProposal ¶
func (k Keeper) HandleConsumerAdditionProposal(ctx sdk.Context, p *types.ConsumerAdditionProposal) error
HandleConsumerAdditionProposal will receive the consumer chain's client state from the proposal. If the client can be successfully created in a cached context, it stores the proposal as a pending proposal.
Note: This method implements SpawnConsumerChainProposalHandler in spec. See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-hcaprop1 Spec tag: [CCV-PCF-HCAPROP.1]
func (Keeper) HandleConsumerDoubleVoting ¶
func (k Keeper) HandleConsumerDoubleVoting( ctx sdk.Context, evidence *tmtypes.DuplicateVoteEvidence, chainID string, pubkey cryptotypes.PubKey, ) error
HandleConsumerDoubleVoting verifies a double voting evidence for a given a consumer chain ID and a public key and, if successful, executes the slashing, jailing, and tombstoning of the malicious validator.
func (Keeper) HandleConsumerMisbehaviour ¶
func (k Keeper) HandleConsumerMisbehaviour(ctx sdk.Context, misbehaviour ibctmtypes.Misbehaviour) error
HandleConsumerMisbehaviour checks if the given IBC misbehaviour corresponds to an equivocation light client attack, and in this case, slashes, jails, and tombstones
func (Keeper) HandleConsumerRemovalProposal ¶
func (k Keeper) HandleConsumerRemovalProposal(ctx sdk.Context, p *types.ConsumerRemovalProposal) error
HandleConsumerRemovalProposal stops a consumer chain and released the outstanding unbonding operations. If the consumer can be successfully stopped in a cached context, it stores the proposal as a pending proposal.
This method implements StopConsumerChainProposalHandler from spec. See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-hcrprop1 Spec tag: [CCV-PCF-HCRPROP.1]
func (Keeper) HandleConsumerRewardDenomProposal ¶
func (Keeper) HandleSlashPacket ¶
HandleSlashPacket potentially jails a misbehaving validator for a downtime infraction. This method should NEVER be called with a double-sign infraction.
func (Keeper) HandleVSCMaturedPacket ¶
func (k Keeper) HandleVSCMaturedPacket(ctx sdk.Context, chainID string, data ccv.VSCMaturedPacketData)
HandleVSCMaturedPacket handles a VSCMatured packet.
Note: This method should only panic for a system critical error like a failed marshal/unmarshal, or persistence of critical data.
func (Keeper) IncrementValidatorSetUpdateId ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
InitGenesis initializes the CCV provider state and binds to PortID.
func (Keeper) InitializeSlashMeter ¶
InitializeSlashMeter initializes the slash meter to it's max value (also its allowance), and sets the replenish time candidate to one replenish period from current block time.
func (Keeper) IsConsumerProposedOrRegistered ¶
IsConsumerProposedOrRegistered checks if a consumer chain is either registered, meaning either already running or will run soon, or proposed its ConsumerAdditionProposal was submitted but the chain was not yet added to ICS yet.
func (Keeper) IsConsumerValidator ¶ added in v4.1.0
func (k Keeper) IsConsumerValidator( ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress, ) bool
IsConsumerValidator returns `true` if the consumer validator with `providerAddr` exists for chain `chainID` and `false` otherwise
func (Keeper) JailAndTombstoneValidator ¶
func (k Keeper) JailAndTombstoneValidator(ctx sdk.Context, providerAddr types.ProviderConsAddress) error
JailAndTombstoneValidator jails and tombstones the validator with the given provider consensus address
func (Keeper) LegacyDeleteThrottledPacketDataForConsumer
deprecated
func (k Keeper) LegacyDeleteThrottledPacketDataForConsumer(ctx sdktypes.Context, consumerChainID string)
Deprecated: LegacyDeleteThrottledPacketDataForConsumer is deprecated for ICS >= v4.0.0. LegacyDeleteThrottledPacketDataForConsumer removes all throttled packet data that was queued on the provider for a given consumer chain.
func (Keeper) LegacyGetAllThrottledPacketData
deprecated
func (k Keeper) LegacyGetAllThrottledPacketData(ctx sdktypes.Context, consumerChainID string) ( slashData []ccvtypes.SlashPacketData, vscMaturedData []ccvtypes.VSCMaturedPacketData, )
Deprecated: LegacyGetAllThrottledPacketData is deprecated for ICS >= v4.0.0. LegacyGetAllThrottledPacketData returns all throttled packet data that was queued on the provider for a given consumer chain.
func (Keeper) LegacyQueueThrottledPacketData
deprecated
func (k Keeper) LegacyQueueThrottledPacketData( ctx sdktypes.Context, consumerChainID string, ibcSeqNum uint64, packetData interface{}, ) error
Deprecated: LegacyQueueThrottledPacketData is deprecated for ICS >= v4.0.0. LegacyQueueThrottledPacketData queues throttled packet data for a given consumer chain on the provider. The method should not be used because the provider does not process throttled packet data anymore.
func (Keeper) MakeConsumerGenesis ¶
func (k Keeper) MakeConsumerGenesis( ctx sdk.Context, prop *types.ConsumerAdditionProposal, ) (gen ccv.ConsumerGenesisState, nextValidatorsHash []byte, err error)
MakeConsumerGenesis constructs the consumer CCV module part of the genesis state.
func (Keeper) OnAcknowledgementPacket ¶
func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, ack channeltypes.Acknowledgement) error
OnAcknowledgementPacket handles acknowledgments for sent VSC packets
func (Keeper) OnRecvSlashPacket ¶
func (k Keeper) OnRecvSlashPacket( ctx sdk.Context, packet channeltypes.Packet, data ccv.SlashPacketData, ) (ccv.PacketAckResult, error)
OnRecvSlashPacket delivers a received slash packet, validates it and then queues the slash packet as pending if valid.
func (Keeper) OnRecvVSCMaturedPacket ¶
func (k Keeper) OnRecvVSCMaturedPacket( ctx sdk.Context, packet channeltypes.Packet, data ccv.VSCMaturedPacketData, ) error
OnRecvVSCMaturedPacket handles a VSCMatured packet and returns a no-op result ack.
func (Keeper) OnTimeoutPacket ¶
OnTimeoutPacket aborts the transaction if no chain exists for the destination channel, otherwise it stops the chain
func (Keeper) PendingConsumerRemovalPropExists ¶
func (k Keeper) PendingConsumerRemovalPropExists(ctx sdk.Context, chainID string, timestamp time.Time) bool
PendingConsumerRemovalPropExists checks whether a pending consumer removal proposal exists for the given consumer chain ID and stopTime
Note: this method is only used in testing
func (Keeper) PruneKeyAssignments ¶
PruneKeyAssignments prunes the consumer addresses no longer needed as they cannot be referenced in slash requests (by a correct consumer)
func (Keeper) QueryAllPairsValConAddrByConsumerChainID ¶
func (k Keeper) QueryAllPairsValConAddrByConsumerChainID(goCtx context.Context, req *types.QueryAllPairsValConAddrByConsumerChainIDRequest) (*types.QueryAllPairsValConAddrByConsumerChainIDResponse, error)
func (Keeper) QueryConsumerChainStarts ¶
func (k Keeper) QueryConsumerChainStarts(goCtx context.Context, req *types.QueryConsumerChainStartProposalsRequest) (*types.QueryConsumerChainStartProposalsResponse, error)
func (Keeper) QueryConsumerChainStops ¶
func (k Keeper) QueryConsumerChainStops(goCtx context.Context, req *types.QueryConsumerChainStopProposalsRequest) (*types.QueryConsumerChainStopProposalsResponse, error)
func (Keeper) QueryConsumerChains ¶
func (k Keeper) QueryConsumerChains(goCtx context.Context, req *types.QueryConsumerChainsRequest) (*types.QueryConsumerChainsResponse, error)
func (Keeper) QueryConsumerGenesis ¶
func (k Keeper) QueryConsumerGenesis(c context.Context, req *types.QueryConsumerGenesisRequest) (*types.QueryConsumerGenesisResponse, error)
func (Keeper) QueryParams ¶ added in v4.1.0
func (k Keeper) QueryParams(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
QueryParams returns all parameters and current values of provider
func (Keeper) QueryProposedConsumerChainIDs ¶
func (k Keeper) QueryProposedConsumerChainIDs(goCtx context.Context, req *types.QueryProposedChainIDsRequest) (*types.QueryProposedChainIDsResponse, error)
func (Keeper) QueryRegisteredConsumerRewardDenoms ¶
func (k Keeper) QueryRegisteredConsumerRewardDenoms(goCtx context.Context, req *types.QueryRegisteredConsumerRewardDenomsRequest) (*types.QueryRegisteredConsumerRewardDenomsResponse, error)
func (Keeper) QueryThrottleState ¶
func (k Keeper) QueryThrottleState(goCtx context.Context, req *types.QueryThrottleStateRequest) (*types.QueryThrottleStateResponse, error)
func (Keeper) QueryValidatorConsumerAddr ¶
func (k Keeper) QueryValidatorConsumerAddr(goCtx context.Context, req *types.QueryValidatorConsumerAddrRequest) (*types.QueryValidatorConsumerAddrResponse, error)
func (Keeper) QueryValidatorProviderAddr ¶
func (k Keeper) QueryValidatorProviderAddr(goCtx context.Context, req *types.QueryValidatorProviderAddrRequest) (*types.QueryValidatorProviderAddrResponse, error)
func (Keeper) QueueVSCPackets ¶
QueueVSCPackets queues latest validator updates for every registered consumer chain
func (Keeper) RemoveConsumerFromUnbondingOp ¶
func (k Keeper) RemoveConsumerFromUnbondingOp(ctx sdk.Context, id uint64, chainID string) (canComplete bool)
RemoveConsumerFromUnbondingOp removes a consumer chain ID that the unbonding op with 'id' is waiting on. The method returns true if the unbonding op can complete. In this case the record is removed from store. The method panics if the unbonding op with 'id' is not found.
func (Keeper) ReplenishSlashMeter ¶
func (Keeper) SendVSCPackets ¶
SendVSCPackets iterates over all registered consumers and sends pending VSC packets to the chains with established CCV channels. If the CCV channel is not established for a consumer chain, the updates will remain queued until the channel is established
func (Keeper) SendVSCPacketsToChain ¶
SendVSCPacketsToChain sends all queued VSC packets to the specified chain
func (Keeper) SetChainToChannel ¶
SetChainToChannel sets the mapping from a consumer chainID to the CCV channel ID for that consumer chain.
func (Keeper) SetChannelToChain ¶
SetChannelToChain sets the mapping from the CCV channel ID to the consumer chainID.
func (Keeper) SetConsumerChain ¶
SetConsumerChain ensures that the consumer chain has not already been set by a different channel, and then sets the consumer chain mappings in keeper, and set the channel status to validating. If there is already a CCV channel between the provider and consumer chain then close the channel, so that another channel can be made.
SetConsumerChain is called by OnChanOpenConfirm.
func (Keeper) SetConsumerClientId ¶
SetConsumerClientId sets the client ID for the given chain ID
func (Keeper) SetConsumerGenesis ¶
func (Keeper) SetConsumerRewardDenom ¶
func (Keeper) SetConsumerValSet ¶ added in v4.1.0
func (k Keeper) SetConsumerValSet(ctx sdk.Context, chainID string, nextValidators []types.ConsumerValidator)
SetConsumerValSet resets the current consumer validators with the `nextValidators` computed by `ComputeNextEpochConsumerValSet` and hence this method should only be called after `ComputeNextEpochConsumerValSet` has completed.
func (Keeper) SetConsumerValidator ¶ added in v4.1.0
func (k Keeper) SetConsumerValidator( ctx sdk.Context, chainID string, validator types.ConsumerValidator, )
SetConsumerValidator sets provided consumer `validator` on the consumer chain with `chainID`
func (Keeper) SetEquivocationEvidenceMinHeight ¶
SetEquivocationEvidenceMinHeight sets the the minimum height of a valid consumer equivocation evidence for a given consumer chain ID
func (Keeper) SetInitChainHeight ¶
SetInitChainHeight sets the provider block height when the given consumer chain was initiated
func (Keeper) SetInitTimeoutTimestamp ¶
SetInitTimeoutTimestamp sets the init timeout timestamp for the given chain ID
func (*Keeper) SetParamSpace ¶
func (k *Keeper) SetParamSpace(ctx sdk.Context, ps paramtypes.Subspace)
SetParamSpace sets the param space for the provider keeper. Note: this is only used for testing!
func (Keeper) SetPendingConsumerAdditionProp ¶
func (k Keeper) SetPendingConsumerAdditionProp(ctx sdk.Context, prop *types.ConsumerAdditionProposal)
SetPendingConsumerAdditionProp stores a pending consumer addition proposal.
Note that the pending consumer addition proposals are stored under keys with the following format: PendingCAPBytePrefix | spawnTime | chainID Thus, if multiple consumer addition proposal for the same chain will pass at the same time, then only the last one will be stored.
func (Keeper) SetPendingConsumerRemovalProp ¶
func (k Keeper) SetPendingConsumerRemovalProp(ctx sdk.Context, prop *types.ConsumerRemovalProposal)
SetPendingConsumerRemovalProp stores a pending consumer removal proposal.
Note that the pending removal addition proposals are stored under keys with the following format: PendingCRPBytePrefix | stopTime | chainID Thus, if multiple removal addition proposal for the same chain will pass at the same time, then only the last one will be stored.
func (Keeper) SetProposedConsumerChain ¶
SetProposedConsumerChain stores a consumer chainId corresponding to a submitted consumer addition proposal This consumer chainId is deleted once the voting period for the proposal ends.
func (Keeper) SetSlashAcks ¶
SetSlashAcks sets the slash acks under the given chain ID
TODO: SlashAcks should be persisted as a list of ConsumerConsAddr types, not strings. See https://github.com/cosmos/interchain-security/issues/728
func (Keeper) SetSlashLog ¶
func (k Keeper) SetSlashLog( ctx sdk.Context, providerAddr types.ProviderConsAddress, )
SetSlashLog updates validator's slash log for a consumer chain If an entry exists for a given validator address, at least one double signing slash packet was received by the provider from at least one consumer chain
func (Keeper) SetSlashMeter ¶
SetSlashMeter sets the slash meter to the given signed int value
Note: the value of this int should always be in the range of tendermint's [-MaxTotalVotingPower, MaxTotalVotingPower]
func (Keeper) SetSlashMeterReplenishTimeCandidate ¶
SetSlashMeterReplenishTimeCandidate sets the next time the slash meter may be replenished to the current block time + the configured slash meter replenish period.
Note: this value is the next time the slash meter will be replenished IFF the slash meter is NOT full. Otherwise this value will be updated in every future block until the slash meter becomes NOT full.
func (Keeper) SetUnbondingOp ¶
func (k Keeper) SetUnbondingOp(ctx sdk.Context, unbondingOp types.UnbondingOp)
SetUnbondingOp sets the UnbondingOp by its unique ID
func (Keeper) SetUnbondingOpIndex ¶
SetUnbondingOpIndex sets the IDs of unbonding operations that are waiting for a VSCMaturedPacket with vscID from a consumer with chainID
func (Keeper) SetValidatorByConsumerAddr ¶
func (k Keeper) SetValidatorByConsumerAddr( ctx sdk.Context, chainID string, consumerAddr types.ConsumerConsAddress, providerAddr types.ProviderConsAddress, )
SetValidatorByConsumerAddr sets the mapping from a validator's consensus address on a consumer to the validator's consensus address on the provider
func (Keeper) SetValidatorConsumerPubKey ¶
func (k Keeper) SetValidatorConsumerPubKey( ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress, consumerKey tmprotocrypto.PublicKey, )
SetValidatorConsumerPubKey sets a validator's public key assigned for a consumer chain
func (Keeper) SetValidatorSetUpdateId ¶
func (Keeper) SetValsetUpdateBlockHeight ¶
SetValsetUpdateBlockHeight sets the block height for a given valset update id
func (Keeper) SetVscSendTimestamp ¶
func (k Keeper) SetVscSendTimestamp( ctx sdk.Context, chainID string, vscID uint64, timestamp time.Time, )
SetVscSendTimestamp sets the VSC send timestamp for a VSCPacket with ID vscID sent to a chain with ID chainID
func (Keeper) SetVscTimeoutPeriod ¶
SetVscTimeoutPeriod sets the vsc timeout period
func (Keeper) SlashValidator ¶
SlashValidator slashes validator with given provider Address
func (Keeper) StopConsumerChain ¶
StopConsumerChain cleans up the states for the given consumer chain ID and completes the outstanding unbonding operations on the consumer chain.
This method implements StopConsumerChain from spec. See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-stcc1 Spec tag: [CCV-PCF-STCC.1]
func (Keeper) StopConsumerChainInCachedCtx ¶
func (k Keeper) StopConsumerChainInCachedCtx(ctx sdk.Context, p types.ConsumerRemovalProposal) (cc sdk.Context, writeCache func(), err error)
StopConsumerChainInCachedCtx stop a consumer chain from a given consumer removal proposal in a cached context
func (Keeper) TransferRewardsToFeeCollector ¶
TransferRewardsToFeeCollector transfers all consumer rewards to the fee collector address
func (Keeper) ValidateSlashPacket ¶
func (k Keeper) ValidateSlashPacket(ctx sdk.Context, chainID string, packet channeltypes.Packet, data ccv.SlashPacketData, ) error
ValidateSlashPacket validates a recv slash packet before it is handled or persisted in store. An error is returned if the packet is invalid, and an error ack should be relayed to the sender.
func (Keeper) ValidatorConsensusKeyInUse ¶
ValidatorConsensusKeyInUse checks if the given consensus key is already used by validator in a consumer chain. Note that this method is called when a new validator is created in the x/staking module of cosmos-sdk. In case it panics, the TX aborts and thus, the validator is not created. See AfterValidatorCreated hook.
func (Keeper) VerifyConsumerChain ¶
func (k Keeper) VerifyConsumerChain(ctx sdk.Context, channelID string, connectionHops []string) error
VerifyConsumerChain verifies that the chain trying to connect on the channel handshake is the expected consumer chain.
func (Keeper) VerifyDoubleVotingEvidence ¶
func (k Keeper) VerifyDoubleVotingEvidence( evidence tmtypes.DuplicateVoteEvidence, chainID string, pubkey cryptotypes.PubKey, ) error
VerifyDoubleVotingEvidence verifies a double voting evidence for a given chain id and a validator public key