diff --git a/.github/workflows/on-chain-upgrade.yml b/.github/workflows/on-chain-upgrade.yml index b23ab35f80..c846928c3b 100644 --- a/.github/workflows/on-chain-upgrade.yml +++ b/.github/workflows/on-chain-upgrade.yml @@ -22,8 +22,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 env: - GENESIS_DESMOS_VERSION: "v2.2.1-testnet" - GENESIS_URL: "https://raw.githubusercontent.com/RiccardoM/desmos-states/master/morpheus-apollo-2-2721215.json" + GENESIS_DESMOS_VERSION: "v1.0.1" + GENESIS_URL: "https://raw.githubusercontent.com/RiccardoM/desmos-states/master/desmos-mainnet-780000.json" UPGRADE_NAME: "v2.3.0" steps: - name: Checkout 🛎️ diff --git a/app/app.go b/app/app.go index df1685cd34..24855f00ca 100644 --- a/app/app.go +++ b/app/app.go @@ -70,6 +70,7 @@ import ( ibc "github.com/cosmos/ibc-go/modules/core" ibcclientclient "github.com/cosmos/ibc-go/modules/core/02-client/client" ibcclienttypes "github.com/cosmos/ibc-go/modules/core/02-client/types" + ibcconnectiontypes "github.com/cosmos/ibc-go/modules/core/03-connection/types" porttypes "github.com/cosmos/ibc-go/modules/core/05-port/types" ibchost "github.com/cosmos/ibc-go/modules/core/24-host" ibckeeper "github.com/cosmos/ibc-go/modules/core/keeper" @@ -99,6 +100,7 @@ import ( upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" storetypes "github.com/cosmos/cosmos-sdk/store/types" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -689,8 +691,30 @@ func (app *DesmosApp) RegisterTendermintService(clientCtx client.Context) { } func (app *DesmosApp) registerUpgradeHandlers() { - app.upgradeKeeper.SetUpgradeHandler("v2.3.0", func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - return app.mm.RunMigrations(ctx, app.configurator, vm) + app.upgradeKeeper.SetUpgradeHandler("v2.3.0", func(ctx sdk.Context, plan upgradetypes.Plan, _ module.VersionMap) (module.VersionMap, error) { + app.IBCKeeper.ConnectionKeeper.SetParams(ctx, ibcconnectiontypes.DefaultParams()) + fromVM := map[string]uint64{ + authtypes.ModuleName: 1, + banktypes.ModuleName: 1, + capabilitytypes.ModuleName: 1, + crisistypes.ModuleName: 1, + distrtypes.ModuleName: 1, + evidencetypes.ModuleName: 1, + govtypes.ModuleName: 1, + minttypes.ModuleName: 1, + paramstypes.ModuleName: 1, + slashingtypes.ModuleName: 1, + stakingtypes.ModuleName: 1, + upgradetypes.ModuleName: 1, + vestingtypes.ModuleName: 1, + ibchost.ModuleName: 1, + genutiltypes.ModuleName: 1, + ibctransfertypes.ModuleName: 1, + + profilestypes.ModuleName: 1, + } + + return app.mm.RunMigrations(ctx, app.configurator, fromVM) }) upgradeInfo, err := app.upgradeKeeper.ReadUpgradeInfoFromDisk() @@ -699,7 +723,9 @@ func (app *DesmosApp) registerUpgradeHandlers() { } if upgradeInfo.Name == "v2.3.0" && !app.upgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - storeUpgrades := storetypes.StoreUpgrades{} + storeUpgrades := storetypes.StoreUpgrades{ + Added: []string{authz.ModuleName, feegrant.ModuleName}, + } // configure store loader that checks if version == upgradeHeight and applies store upgrades app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) diff --git a/contrib/upgrade_testnet/docker-compose.yml b/contrib/upgrade_testnet/docker-compose.yml index 05640abf50..1eb9524870 100644 --- a/contrib/upgrade_testnet/docker-compose.yml +++ b/contrib/upgrade_testnet/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: desmosnode0: container_name: desmosnode0 - image: "desmoslabs/desmos-cosmovisor:v2.0.0" + image: "desmoslabs/desmos-cosmovisor:v1.0.1" command: "start" ports: - "26656-26657:26656-26657" @@ -19,7 +19,7 @@ services: desmosnode1: container_name: desmosnode1 - image: "desmoslabs/desmos-cosmovisor:v2.0.0" + image: "desmoslabs/desmos-cosmovisor:v1.0.1" command: "start" ports: - "26666-26667:26656-26657" @@ -35,7 +35,7 @@ services: desmosnode2: container_name: desmosnode2 - image: "desmoslabs/desmos-cosmovisor:v2.0.0" + image: "desmoslabs/desmos-cosmovisor:v1.0.1" command: "start" ports: - "26676-26677:26656-26657" @@ -51,7 +51,7 @@ services: desmosnode3: container_name: desmosnode3 - image: "desmoslabs/desmos-cosmovisor:v2.0.0" + image: "desmoslabs/desmos-cosmovisor:v1.0.1" command: "start" ports: - "26686-26687:26656-26657" diff --git a/contrib/upgrade_testnet/submit_upgrade_proposal.sh b/contrib/upgrade_testnet/submit_upgrade_proposal.sh index 75dc63c8a1..266cee32a0 100755 --- a/contrib/upgrade_testnet/submit_upgrade_proposal.sh +++ b/contrib/upgrade_testnet/submit_upgrade_proposal.sh @@ -63,7 +63,7 @@ sleep 6s echo "" echo "===> Getting proposal id" -PROPOSAL_ID=$(desmos q tx $TX_HASH --output json 2>&1 | jq .logs[0].events[4].attributes[0].value -r) +PROPOSAL_ID=$(desmos q tx $TX_HASH --output json 2>&1 | jq .logs[0].events[2].attributes[0].value -r) echo "Proposal ID: $PROPOSAL_ID" echo ""