Use this file to discover all available pages before exploring further.
This document provides a full guide for upgrading a Cosmos SDK chain from v0.50.x to v0.53.x.This guide includes one required change and three optional features.After completing this guide, applications will have:
Using an external community pool such as x/protocolpool will cause the following x/distribution handlers to return an error:QueryService
CommunityPool
MsgService
CommunityPoolSpend
FundCommunityPool
If your services depend on this functionality from x/distribution, please update them to use either x/protocolpool or your custom external community pool alternatives.
Note: as long as an external community pool keeper (here, x/protocolpool) is wired in DI configs, x/distribution will automatically use it for its external pool.First, set up the keeper for the application.Import the protocolpool keeper:
To enable unordered transaction support on an application, the x/auth keeper must be supplied with the WithUnorderedTransactions option.Note that unordered transactions require sequence values to be zero, and will FAIL if a non-zero sequence value is set.
Please ensure no sequence value is set when submitting an unordered transaction.
Services that rely on prior assumptions about sequence values should be updated to handle unordered transactions.
Services should be aware that when the transaction is unordered, the transaction sequence will always be zero.
If using dependency injection, update the auth module config.
{ Name: authtypes.ModuleName, Config: appconfig.WrapAny(&authmodulev1.Module{ Bech32Prefix: "cosmos", ModuleAccountPermissions: moduleAccPerms, EnableUnorderedTransactions: true, // remove this line if you do not want unordered transactions.}),},
By default, unordered transactions use a transaction timeout duration of 10 minutes and a default gas charge of 2240 gas units.
To modify these default values, pass in the corresponding options to the new SigVerifyOptions field in x/auth'sante.HandlerOptions.
The upgrade handler only requires adding the store upgrades for the modules added above.
If your application is not adding x/protocolpool or x/epochs, you do not need to add the store upgrade.
// UpgradeName defines the on-chain upgrade name for the sample SimApp upgrade// from v050 to v053.//// NOTE: This upgrade defines a reference implementation of what an upgrade// could look like when an application is migrating from Cosmos SDK version// v0.50.x to v0.53.x.const UpgradeName = "v050-to-v053"func (app SimApp)RegisterUpgradeHandlers() { app.UpgradeKeeper.SetUpgradeHandler( UpgradeName, func(ctx context.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM)}, )upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() if err != nil { panic(err)} if upgradeInfo.Name == UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { storeUpgrades := storetypes.StoreUpgrades{ Added: []string{ epochstypes.ModuleName, // if not adding x/epochs to your chain, remove this line. protocolpooltypes.ModuleName, // if not adding x/protocolpool to your chain, remove this line.},} // configure store loader that checks if version == upgradeHeight and applies store upgrades app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))}}