Documentation ¶
Index ¶
- Constants
- Variables
- func ChangeRewardDenomsProposalToMsgChangeRewardDenoms(proposal providertypes.ChangeRewardDenomsProposal, authority string) providertypes.MsgChangeRewardDenoms
- func ConsumerAdditionProposalToMsgConsumerAddition(proposal providertypes.ConsumerAdditionProposal) providertypes.MsgConsumerAddition
- func ConsumerModificationProposalToMsgConsumerModification(proposal providertypes.ConsumerModificationProposal) providertypes.MsgConsumerModification
- func ConsumerRemovalProposalToMsgConsumerRemoval(proposal providertypes.ConsumerRemovalProposal) providertypes.MsgConsumerRemoval
- func CreateConsumerInitializationParameters(msgConsumerAddition providertypes.MsgConsumerAddition) (providertypes.ConsumerInitializationParameters, error)
- func CreatePowerShapingParameters(topN uint32, validatorsPowerCap uint32, validatorSetCap uint32, ...) (providertypes.PowerShapingParameters, error)
- func CreateUpgradeHandler(mm *module.Manager, configurator module.Configurator, ...) upgradetypes.UpgradeHandler
- func InitializeConsensusParamVersion(ctx sdk.Context, consensusKeeper consensusparamkeeper.Keeper) error
- func InitializeLastProviderConsensusValidatorSet(ctx sdk.Context, providerKeeper providerkeeper.Keeper, ...) error
- func InitializeMaxProviderConsensusParam(ctx sdk.Context, providerKeeper providerkeeper.Keeper)
- func MigrateICSLegacyProposal(ctx sdk.Context, msgServer providertypes.MsgServer, ...) error
- func MigrateICSProposal(ctx sdk.Context, msgServer providertypes.MsgServer, ...) error
- func MigrateICSProposals(ctx sdk.Context, msgServer providertypes.MsgServer, ...) error
- func MigrateMsgChangeRewardDenoms(ctx sdk.Context, govKeeper govkeeper.Keeper, proposalID uint64, ...) error
- func MigrateMsgConsumerAddition(ctx sdk.Context, msgServer providertypes.MsgServer, ...) error
- func MigrateMsgConsumerModification(ctx sdk.Context, providerKeeper providerkeeper.Keeper, ...) error
- func MigrateMsgConsumerRemoval(ctx sdk.Context, msgServer providertypes.MsgServer, ...) error
- func SetICSConsumerMetadata(ctx sdk.Context, providerKeeper providerkeeper.Keeper) error
- func SetMaxValidators(ctx sdk.Context, stakingKeeper stakingkeeper.Keeper) error
Constants ¶
const ( // NewMaxValidators will be set to 200 (up from 180), // to allow the first 20 inactive validators // to participate on consumer chains. NewMaxValidators = 200 // NewMaxProviderConsensusValidators will be set to 180, // to preserve the behaviour of only the first 180 // validators participating in consensus on the Cosmos Hub. NewMaxProviderConsensusValidators = 180 )
Constants for the new parameters in the v20 upgrade.
const (
// UpgradeName defines the on-chain upgrade name.
UpgradeName = "v20"
)
Variables ¶
var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: CreateUpgradeHandler, }
Functions ¶
func ChangeRewardDenomsProposalToMsgChangeRewardDenoms ¶
func ChangeRewardDenomsProposalToMsgChangeRewardDenoms(proposal providertypes.ChangeRewardDenomsProposal, authority string) providertypes.MsgChangeRewardDenoms
func ConsumerAdditionProposalToMsgConsumerAddition ¶
func ConsumerAdditionProposalToMsgConsumerAddition(proposal providertypes.ConsumerAdditionProposal) providertypes.MsgConsumerAddition
func ConsumerModificationProposalToMsgConsumerModification ¶
func ConsumerModificationProposalToMsgConsumerModification(proposal providertypes.ConsumerModificationProposal) providertypes.MsgConsumerModification
func ConsumerRemovalProposalToMsgConsumerRemoval ¶
func ConsumerRemovalProposalToMsgConsumerRemoval(proposal providertypes.ConsumerRemovalProposal) providertypes.MsgConsumerRemoval
func CreateConsumerInitializationParameters ¶
func CreateConsumerInitializationParameters(msgConsumerAddition providertypes.MsgConsumerAddition) (providertypes.ConsumerInitializationParameters, error)
func CreatePowerShapingParameters ¶
func CreatePowerShapingParameters( topN uint32, validatorsPowerCap uint32, validatorSetCap uint32, allowlist []string, denylist []string, minStake uint64, allowInactiveVals bool, ) (providertypes.PowerShapingParameters, error)
func CreateUpgradeHandler ¶
func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler
CreateUpgradeHandler returns an upgrade handler for Gaia v20. It performs module migrations, as well as the following tasks: - Initializes the MaxProviderConsensusValidators parameter in the provider module to 180. - Increases the MaxValidators parameter in the staking module to 200. - Initializes the last provider consensus validator set in the provider module
func InitializeConsensusParamVersion ¶
func InitializeConsensusParamVersion(ctx sdk.Context, consensusKeeper consensusparamkeeper.Keeper) error
InitializeConsensusParamVersion initializes the consumer params that were missed in a consensus keeper migration. Some fields were set to nil values instead of zero values, which causes a panic during Txs to modify the params. Context: - https://github.com/cosmos/cosmos-sdk/issues/21483 - https://github.com/cosmos/cosmos-sdk/pull/21484
func InitializeLastProviderConsensusValidatorSet ¶
func InitializeLastProviderConsensusValidatorSet( ctx sdk.Context, providerKeeper providerkeeper.Keeper, stakingKeeper stakingkeeper.Keeper, ) error
InitializeLastProviderConsensusValidatorSet initializes the last provider consensus validator set by setting it to the first 180 validators from the current validator set of the staking module.
func InitializeMaxProviderConsensusParam ¶
func InitializeMaxProviderConsensusParam(ctx sdk.Context, providerKeeper providerkeeper.Keeper)
InitializeMaxProviderConsensusParam initializes the MaxProviderConsensusValidators parameter. It is set to 180, which is the current number of validators participating in consensus on the Cosmos Hub. This parameter will be used to govern the number of validators participating in consensus on the Cosmos Hub, and takes over this role from the MaxValidators parameter in the staking module.
func MigrateICSLegacyProposal ¶
func MigrateICSLegacyProposal( ctx sdk.Context, msgServer providertypes.MsgServer, providerKeeper providerkeeper.Keeper, govKeeper govkeeper.Keeper, proposal govtypesv1.Proposal, ) error
func MigrateICSProposal ¶
func MigrateICSProposal( ctx sdk.Context, msgServer providertypes.MsgServer, providerKeeper providerkeeper.Keeper, govKeeper govkeeper.Keeper, proposal govtypesv1.Proposal, ) error
func MigrateICSProposals ¶
func MigrateICSProposals(ctx sdk.Context, msgServer providertypes.MsgServer, providerKeeper providerkeeper.Keeper, govKeeper govkeeper.Keeper) error
MigrateICSProposals migrates ICS legacy proposals
func MigrateMsgChangeRewardDenoms ¶
func MigrateMsgChangeRewardDenoms( ctx sdk.Context, govKeeper govkeeper.Keeper, proposalID uint64, msg providertypes.MsgChangeRewardDenoms, indexOfMessageInProposal int, ) error
func MigrateMsgConsumerAddition ¶
func MigrateMsgConsumerAddition( ctx sdk.Context, msgServer providertypes.MsgServer, providerKeeper providerkeeper.Keeper, govKeeper govkeeper.Keeper, proposalID uint64, msg providertypes.MsgConsumerAddition, indexOfMessageInProposal int, ) error
func MigrateMsgConsumerModification ¶
func MigrateMsgConsumerModification( ctx sdk.Context, providerKeeper providerkeeper.Keeper, govKeeper govkeeper.Keeper, proposalID uint64, msg providertypes.MsgConsumerModification, indexOfMessageInProposal int, ) error
func MigrateMsgConsumerRemoval ¶
func MigrateMsgConsumerRemoval( ctx sdk.Context, msgServer providertypes.MsgServer, providerKeeper providerkeeper.Keeper, govKeeper govkeeper.Keeper, proposalID uint64, msg providertypes.MsgConsumerRemoval, indexOfMessageInProposal int, ) error
func SetICSConsumerMetadata ¶
func SetICSConsumerMetadata(ctx sdk.Context, providerKeeper providerkeeper.Keeper) error
SetICSConsumerMetadata sets the metadata for launched consumer chains
func SetMaxValidators ¶
func SetMaxValidators(ctx sdk.Context, stakingKeeper stakingkeeper.Keeper) error
SetMaxValidators sets the MaxValidators parameter in the staking module to 200, which is the current number of 180 plus 20. This is done in concert with the introduction of the inactive-validators feature in Interchain Security, after which the number of validators participating in consensus on the Cosmos Hub will be governed by the MaxProviderConsensusValidators parameter in the provider module.
Types ¶
This section is empty.