From 4388895a1ba0a109eae8c1888b4c48d3d3ec4c6b Mon Sep 17 00:00:00 2001 From: puneetmahajan Date: Fri, 19 Apr 2024 12:34:25 +0530 Subject: [PATCH] prepare mainnet v11.10.0 --- app/app.go | 4 ++-- app/upgrades/v11.10.0/constants.go | 18 ++++++++++++++++++ app/upgrades/v11.10.0/upgrades.go | 17 +++++++++++++++++ interchaintest/chain_upgrade_test.go | 2 +- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 app/upgrades/v11.10.0/constants.go create mode 100644 app/upgrades/v11.10.0/upgrades.go diff --git a/app/app.go b/app/app.go index 631630f3..3de5c739 100644 --- a/app/app.go +++ b/app/app.go @@ -56,13 +56,13 @@ import ( "github.com/persistenceOne/persistenceCore/v11/app/keepers" "github.com/persistenceOne/persistenceCore/v11/app/upgrades" - v11_10_0_rc0 "github.com/persistenceOne/persistenceCore/v11/app/upgrades/testnet/v11.10.0-rc0" + v11_10_0 "github.com/persistenceOne/persistenceCore/v11/app/upgrades/v11.10.0" "github.com/persistenceOne/persistenceCore/v11/client/docs" ) var ( DefaultNodeHome string - Upgrades = []upgrades.Upgrade{v11_10_0_rc0.Upgrade} + Upgrades = []upgrades.Upgrade{v11_10_0.Upgrade} ModuleBasics = module.NewBasicManager(keepers.AppModuleBasics...) ) diff --git a/app/upgrades/v11.10.0/constants.go b/app/upgrades/v11.10.0/constants.go new file mode 100644 index 00000000..6f33357b --- /dev/null +++ b/app/upgrades/v11.10.0/constants.go @@ -0,0 +1,18 @@ +package v11_10_0 + +import ( + store "github.com/cosmos/cosmos-sdk/store/types" + + "github.com/persistenceOne/persistenceCore/v11/app/upgrades" +) + +const ( + // UpgradeName defines the on-chain upgrade name. + UpgradeName = "v11.10.0" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{}, +} diff --git a/app/upgrades/v11.10.0/upgrades.go b/app/upgrades/v11.10.0/upgrades.go new file mode 100644 index 00000000..22b25636 --- /dev/null +++ b/app/upgrades/v11.10.0/upgrades.go @@ -0,0 +1,17 @@ +package v11_10_0 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/persistenceOne/persistenceCore/v11/app/upgrades" +) + +func CreateUpgradeHandler(args upgrades.UpgradeHandlerArgs) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("running module migrations...") + + return args.ModuleManager.RunMigrations(ctx, args.Configurator, vm) + } +} diff --git a/interchaintest/chain_upgrade_test.go b/interchaintest/chain_upgrade_test.go index b7094ddf..e3ad0ba5 100644 --- a/interchaintest/chain_upgrade_test.go +++ b/interchaintest/chain_upgrade_test.go @@ -30,7 +30,7 @@ func TestPersistenceUpgradeBasic(t *testing.T) { var ( chainName = "persistence" initialVersion = "v11.9.0" - upgradeName = "v11.10.0-rc0" + upgradeName = "v11.10.0" upgradeRepo = PersistenceCoreImage.Repository upgradeBranchVersion = PersistenceCoreImage.Version )