From 90aa668a25d7858cde094fb8518ca124bc28a76f Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Wed, 10 Nov 2021 19:27:18 +0100 Subject: [PATCH] chore: release v2.3.0-mainnet (#660) ## Description This PR implements the changes needed in order to tag `v2.1.0-mainnet` of Desmos. Refer to #657 for major details. --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html) - [ ] included the necessary unit and integration [tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- .github/workflows/on-chain-upgrade.yml | 4 +-- app/app.go | 32 +++++++++++++++++-- contrib/upgrade_testnet/docker-compose.yml | 8 ++--- .../submit_upgrade_proposal.sh | 2 +- 4 files changed, 36 insertions(+), 10 deletions(-) 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 ""