diff --git a/Makefile b/Makefile index 260fe82f560..d82e893a2aa 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ LEDGER_ENABLED ?= true SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') BUILDDIR ?= $(CURDIR)/build DOCKER := $(shell which docker) -E2E_UPGRADE_VERSION := "v19" +E2E_UPGRADE_VERSION := "v20" #SHELL := /bin/bash # Go version to be used in docker images diff --git a/app/app.go b/app/app.go index 39049932423..2c3ee874fc1 100644 --- a/app/app.go +++ b/app/app.go @@ -60,6 +60,7 @@ import ( v17 "github.com/osmosis-labs/osmosis/v19/app/upgrades/v17" v18 "github.com/osmosis-labs/osmosis/v19/app/upgrades/v18" v19 "github.com/osmosis-labs/osmosis/v19/app/upgrades/v19" + v20 "github.com/osmosis-labs/osmosis/v19/app/upgrades/v20" v3 "github.com/osmosis-labs/osmosis/v19/app/upgrades/v3" v4 "github.com/osmosis-labs/osmosis/v19/app/upgrades/v4" v5 "github.com/osmosis-labs/osmosis/v19/app/upgrades/v5" @@ -105,7 +106,7 @@ var ( // _ sdksimapp.App = (*OsmosisApp)(nil) - Upgrades = []upgrades.Upgrade{v4.Upgrade, v5.Upgrade, v7.Upgrade, v9.Upgrade, v11.Upgrade, v12.Upgrade, v13.Upgrade, v14.Upgrade, v15.Upgrade, v16.Upgrade, v17.Upgrade, v18.Upgrade, v19.Upgrade} + Upgrades = []upgrades.Upgrade{v4.Upgrade, v5.Upgrade, v7.Upgrade, v9.Upgrade, v11.Upgrade, v12.Upgrade, v13.Upgrade, v14.Upgrade, v15.Upgrade, v16.Upgrade, v17.Upgrade, v18.Upgrade, v19.Upgrade, v20.Upgrade} Forks = []upgrades.Fork{v3.Fork, v6.Fork, v8.Fork, v10.Fork} ) diff --git a/app/upgrades/v20/constants.go b/app/upgrades/v20/constants.go new file mode 100644 index 00000000000..a6574b6bd2c --- /dev/null +++ b/app/upgrades/v20/constants.go @@ -0,0 +1,19 @@ +package v20 + +import ( + "github.com/osmosis-labs/osmosis/v19/app/upgrades" + + store "github.com/cosmos/cosmos-sdk/store/types" +) + +// UpgradeName defines the on-chain upgrade name for the Osmosis v20 upgrade. +const UpgradeName = "v20" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{ + Added: []string{}, + Deleted: []string{}, + }, +} diff --git a/app/upgrades/v20/upgrades.go b/app/upgrades/v20/upgrades.go new file mode 100644 index 00000000000..c0d95c5b0e7 --- /dev/null +++ b/app/upgrades/v20/upgrades.go @@ -0,0 +1,28 @@ +package v20 + +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/osmosis-labs/osmosis/v19/app/keepers" + "github.com/osmosis-labs/osmosis/v19/app/upgrades" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + bpm upgrades.BaseAppParamManager, + keepers *keepers.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // Run migrations before applying any other state changes. + // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations(). + migrations, err := mm.RunMigrations(ctx, configurator, fromVM) + if err != nil { + return nil, err + } + + return migrations, nil + } +} diff --git a/tests/e2e/containers/config.go b/tests/e2e/containers/config.go index 440db06f741..b6676066fa7 100644 --- a/tests/e2e/containers/config.go +++ b/tests/e2e/containers/config.go @@ -24,10 +24,10 @@ const ( // It should be uploaded to Docker Hub. OSMOSIS_E2E_SKIP_UPGRADE should be unset // for this functionality to be used. previousVersionOsmoRepository = "osmolabs/osmosis" - previousVersionOsmoTag = "18.0.0-alpine" + previousVersionOsmoTag = "19.0" // Pre-upgrade repo/tag for osmosis initialization (this should be one version below upgradeVersion) previousVersionInitRepository = "osmolabs/osmosis-e2e-init-chain" - previousVersionInitTag = "v18-faster-blocks" + previousVersionInitTag = "19.0.0" // Hermes repo/version for relayer relayerRepository = "informalsystems/hermes" relayerTag = "1.5.1"