v20

package
v20.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
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.

View Source
const (
	// UpgradeName defines the on-chain upgrade name.
	UpgradeName = "v20"
)

Variables

View Source
var Upgrade = upgrades.Upgrade{
	UpgradeName:          UpgradeName,
	CreateUpgradeHandler: CreateUpgradeHandler,
}

Functions

func ChangeRewardDenomsProposalToMsgChangeRewardDenoms

func ChangeRewardDenomsProposalToMsgChangeRewardDenoms(proposal providertypes.ChangeRewardDenomsProposal, authority string) providertypes.MsgChangeRewardDenoms

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.

Jump to

Keyboard shortcuts

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