From e3704ab387237012055fb5986a2465d88d97e246 Mon Sep 17 00:00:00 2001 From: Puneet <59960662+puneet2019@users.noreply.github.com> Date: Fri, 31 May 2024 13:14:53 +0530 Subject: [PATCH] chore: prepare mainnet v11.13.0 (#337) * prepare mainnet v11.13.0 * update mod --- app/app.go | 4 ++-- app/upgrades/v11.13.0/constants.go | 18 ++++++++++++++++++ app/upgrades/v11.13.0/upgrades.go | 16 ++++++++++++++++ go.mod | 2 +- go.sum | 4 ++-- interchaintest/chain_upgrade_test.go | 2 +- 6 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 app/upgrades/v11.13.0/constants.go create mode 100644 app/upgrades/v11.13.0/upgrades.go diff --git a/app/app.go b/app/app.go index 869fea06..d4665a7b 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_13_0_rc0 "github.com/persistenceOne/persistenceCore/v11/app/upgrades/testnet/v11.13.0-rc0" + v11_13_0 "github.com/persistenceOne/persistenceCore/v11/app/upgrades/v11.13.0" "github.com/persistenceOne/persistenceCore/v11/client/docs" ) var ( DefaultNodeHome string - Upgrades = []upgrades.Upgrade{v11_13_0_rc0.Upgrade} + Upgrades = []upgrades.Upgrade{v11_13_0.Upgrade} ModuleBasics = module.NewBasicManager(keepers.AppModuleBasics...) ) diff --git a/app/upgrades/v11.13.0/constants.go b/app/upgrades/v11.13.0/constants.go new file mode 100644 index 00000000..b226549d --- /dev/null +++ b/app/upgrades/v11.13.0/constants.go @@ -0,0 +1,18 @@ +package v11_13_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.13.0" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{}, +} diff --git a/app/upgrades/v11.13.0/upgrades.go b/app/upgrades/v11.13.0/upgrades.go new file mode 100644 index 00000000..9f9f6329 --- /dev/null +++ b/app/upgrades/v11.13.0/upgrades.go @@ -0,0 +1,16 @@ +package v11_13_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/go.mod b/go.mod index 1a5c2aec..57b991e3 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/cosmos/ibc-go/v7 v7.4.0 github.com/gorilla/mux v1.8.1 github.com/persistenceOne/persistence-sdk/v2 v2.2.0 - github.com/persistenceOne/pstake-native/v2 v2.15.0-rc1 + github.com/persistenceOne/pstake-native/v2 v2.15.0 github.com/prometheus/client_golang v1.16.0 github.com/skip-mev/pob v1.0.5 github.com/spf13/cast v1.6.0 diff --git a/go.sum b/go.sum index 04bc0b87..b7c704bc 100644 --- a/go.sum +++ b/go.sum @@ -1034,8 +1034,8 @@ github.com/persistenceOne/cosmos-sdk v0.47.10-lsm-rc0 h1:lbSQZUdaaKIpoSAznVESl0v github.com/persistenceOne/cosmos-sdk v0.47.10-lsm-rc0/go.mod h1:Q/eHvXB0Awenk3NCh77NvjpeKGPigawFHIXlz2ayfos= github.com/persistenceOne/persistence-sdk/v2 v2.2.0 h1:ZsBsy/HElkwjPXoASI7CptMFY9C3C/d27G+8bxFDzQw= github.com/persistenceOne/persistence-sdk/v2 v2.2.0/go.mod h1:8VgozZWTPLMdlzsyiuGI0+vLo2fvGYSj/YKM9kiJwrI= -github.com/persistenceOne/pstake-native/v2 v2.15.0-rc1 h1:kOJ8E/N9QPFbH2JaoDrhlnwP88o9NZ7Mp44KAiBdNN8= -github.com/persistenceOne/pstake-native/v2 v2.15.0-rc1/go.mod h1:FcLbnTasZfKKKQJ6nzgzdkDqb3dUlIyraqcsj7DMTfE= +github.com/persistenceOne/pstake-native/v2 v2.15.0 h1:GmsLLcAhkk71FqV2hwWH555MSLRsdFaR2kEnscUrKOE= +github.com/persistenceOne/pstake-native/v2 v2.15.0/go.mod h1:FcLbnTasZfKKKQJ6nzgzdkDqb3dUlIyraqcsj7DMTfE= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= diff --git a/interchaintest/chain_upgrade_test.go b/interchaintest/chain_upgrade_test.go index c2ce32c7..cb6d5ba2 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.12.0" - upgradeName = "v11.13.0-rc0" + upgradeName = "v11.13.0" upgradeRepo = PersistenceCoreImage.Repository upgradeBranchVersion = PersistenceCoreImage.Version )