From d5cc9d559e3434840160581040d8df2b23b0be7c Mon Sep 17 00:00:00 2001 From: Riccardo Date: Tue, 17 Oct 2023 16:21:32 -0500 Subject: [PATCH] chore: release v6.2.0 (#1255) ## Description This PR prepares the code to release `v6.2.0` of the software. Closes: DCD-412 --- ### 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 - [x] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html) - [x] 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 - [x] 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) --- ...bea03457bd6e5783f18db4c5371a47cedc8b5.yaml | 6 - ...0e18f52fd5dd1cb48b322a99111c242f098d0.yaml | 6 - ...97af52e3a4b03293f4c1890bc602dc7fad90f.yaml | 6 - ...e57c0a1752f6ee4b6cf234229f640b8b26134.yaml | 6 - ...7063fab25f8576b551025eaa9c8fc78aea5c2.yaml | 6 - ...ec2a375e4b30c4ee12d8dbf03bf2bba25bfa5.yaml | 6 - ...c0507887ccb450098ab22e709dedbece75296.yaml | 6 - .github/workflows/on-chain-upgrade.yml | 6 +- CHANGELOG.md | 13 ++ app/upgrades.go | 8 +- app/upgrades/v500/upgrade.go | 155 ------------------ app/upgrades/v6/upgrade.go | 90 ---------- app/upgrades/{v520 => v620}/upgrade.go | 20 +-- 13 files changed, 25 insertions(+), 309 deletions(-) delete mode 100644 .changeset/entries/07ab91f8449a64fa528b3063301bea03457bd6e5783f18db4c5371a47cedc8b5.yaml delete mode 100644 .changeset/entries/19bae7e92792d2244363efdeffc0e18f52fd5dd1cb48b322a99111c242f098d0.yaml delete mode 100644 .changeset/entries/6903edfe80282ff8891b1e6838697af52e3a4b03293f4c1890bc602dc7fad90f.yaml delete mode 100644 .changeset/entries/7abfad6cf351c8e8f5f63d0fa55e57c0a1752f6ee4b6cf234229f640b8b26134.yaml delete mode 100644 .changeset/entries/a11fd18cbf1a62ef72f896652407063fab25f8576b551025eaa9c8fc78aea5c2.yaml delete mode 100644 .changeset/entries/c11d327fbc88921861fa668675bec2a375e4b30c4ee12d8dbf03bf2bba25bfa5.yaml delete mode 100644 .changeset/entries/d0cfb9e3882e9866034690fe86bc0507887ccb450098ab22e709dedbece75296.yaml delete mode 100644 app/upgrades/v500/upgrade.go delete mode 100644 app/upgrades/v6/upgrade.go rename app/upgrades/{v520 => v620}/upgrade.go (65%) diff --git a/.changeset/entries/07ab91f8449a64fa528b3063301bea03457bd6e5783f18db4c5371a47cedc8b5.yaml b/.changeset/entries/07ab91f8449a64fa528b3063301bea03457bd6e5783f18db4c5371a47cedc8b5.yaml deleted file mode 100644 index 63fcc7db2f..0000000000 --- a/.changeset/entries/07ab91f8449a64fa528b3063301bea03457bd6e5783f18db4c5371a47cedc8b5.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: refactor -module: x/profiles -pull_request: 1227 -description: Improve `x/profiles` tests by mutation test -backward_compatible: true -date: 2023-09-07T08:33:19.593791638Z diff --git a/.changeset/entries/19bae7e92792d2244363efdeffc0e18f52fd5dd1cb48b322a99111c242f098d0.yaml b/.changeset/entries/19bae7e92792d2244363efdeffc0e18f52fd5dd1cb48b322a99111c242f098d0.yaml deleted file mode 100644 index 7c7f3bc6cd..0000000000 --- a/.changeset/entries/19bae7e92792d2244363efdeffc0e18f52fd5dd1cb48b322a99111c242f098d0.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: refactor -module: x/subspaces -pull_request: 1224 -description: Improve subspaces keeper input and output consistency -backward_compatible: true -date: 2023-08-31T06:54:47.847251201Z diff --git a/.changeset/entries/6903edfe80282ff8891b1e6838697af52e3a4b03293f4c1890bc602dc7fad90f.yaml b/.changeset/entries/6903edfe80282ff8891b1e6838697af52e3a4b03293f4c1890bc602dc7fad90f.yaml deleted file mode 100644 index 847a26159c..0000000000 --- a/.changeset/entries/6903edfe80282ff8891b1e6838697af52e3a4b03293f4c1890bc602dc7fad90f.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: fix -module: x/posts -pull_request: 1226 -description: Fix query incoming post owner transfer requests wasm config -backward_compatible: true -date: 2023-08-31T13:48:14.642644523Z diff --git a/.changeset/entries/7abfad6cf351c8e8f5f63d0fa55e57c0a1752f6ee4b6cf234229f640b8b26134.yaml b/.changeset/entries/7abfad6cf351c8e8f5f63d0fa55e57c0a1752f6ee4b6cf234229f640b8b26134.yaml deleted file mode 100644 index 06c4eed666..0000000000 --- a/.changeset/entries/7abfad6cf351c8e8f5f63d0fa55e57c0a1752f6ee4b6cf234229f640b8b26134.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: refactor -module: x/posts -pull_request: 1225 -description: Improve posts keeper input and output consistency -backward_compatible: true -date: 2023-08-31T07:26:01.660422652Z diff --git a/.changeset/entries/a11fd18cbf1a62ef72f896652407063fab25f8576b551025eaa9c8fc78aea5c2.yaml b/.changeset/entries/a11fd18cbf1a62ef72f896652407063fab25f8576b551025eaa9c8fc78aea5c2.yaml deleted file mode 100644 index 9d9fbfb925..0000000000 --- a/.changeset/entries/a11fd18cbf1a62ef72f896652407063fab25f8576b551025eaa9c8fc78aea5c2.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: fix -module: x/profiles -pull_request: 1250 -description: Fix missing account number of account creation -backward_compatible: true -date: 2023-09-28T08:12:05.365508338Z diff --git a/.changeset/entries/c11d327fbc88921861fa668675bec2a375e4b30c4ee12d8dbf03bf2bba25bfa5.yaml b/.changeset/entries/c11d327fbc88921861fa668675bec2a375e4b30c4ee12d8dbf03bf2bba25bfa5.yaml deleted file mode 100644 index ff76ef6e72..0000000000 --- a/.changeset/entries/c11d327fbc88921861fa668675bec2a375e4b30c4ee12d8dbf03bf2bba25bfa5.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: deps -module: other -pull_request: 1245 -description: Bump cosmos-sdk to 0.47.5 -backward_compatible: true -date: 2023-09-22T07:47:04.001240328Z diff --git a/.changeset/entries/d0cfb9e3882e9866034690fe86bc0507887ccb450098ab22e709dedbece75296.yaml b/.changeset/entries/d0cfb9e3882e9866034690fe86bc0507887ccb450098ab22e709dedbece75296.yaml deleted file mode 100644 index f5499d6411..0000000000 --- a/.changeset/entries/d0cfb9e3882e9866034690fe86bc0507887ccb450098ab22e709dedbece75296.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: deps -module: other -pull_request: 1245 -description: Bump wasmd to 0.42.0 -backward_compatible: true -date: 2023-09-22T07:45:49.007490175Z diff --git a/.github/workflows/on-chain-upgrade.yml b/.github/workflows/on-chain-upgrade.yml index e890d3a2d1..d4bc1b6e41 100644 --- a/.github/workflows/on-chain-upgrade.yml +++ b/.github/workflows/on-chain-upgrade.yml @@ -22,9 +22,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 env: - GENESIS_DESMOS_VERSION: "v5.2.0" - GENESIS_URL: "https://github.com/desmos-labs/states/raw/main/morpheus-apollo-3-12526100.json" - UPGRADE_NAME: "v6" + GENESIS_DESMOS_VERSION: "v6.0.0" + GENESIS_URL: "https://github.com/desmos-labs/states/raw/main/morpheus-apollo-3-13462545.json" + UPGRADE_NAME: "v6.2.0" steps: - name: Checkout 🛎️ uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index a5f95edc9b..ebe4c1df71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). --> +## Version 6.2.0 +### Bug Fixes +#### Profiles +- ([\#1250](https://github.com/desmos-labs/desmos/pull/1250)) Fixed missing account number when creating an account due to an incoming DTag transfer request + +#### Posts +- ([\#1226](https://github.com/desmos-labs/desmos/pull/1226)) Fixed Wasm configuration for incoming post owner transfer requests query + +### Dependencies +#### Other +- ([\#1245](https://github.com/desmos-labs/desmos/pull/1245)) Updated `cosmos-sdk` to `v0.47.5` +- ([\#1245](https://github.com/desmos-labs/desmos/pull/1245)) Updated `wasmd` to `v0.43.0` + ## Version 6.1.1 ### Bug Fixes #### Other diff --git a/app/upgrades.go b/app/upgrades.go index 49a5a04d41..d2295c7599 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -1,14 +1,10 @@ package app import ( - v500 "github.com/desmos-labs/desmos/v6/app/upgrades/v500" - v520 "github.com/desmos-labs/desmos/v6/app/upgrades/v520" - v6 "github.com/desmos-labs/desmos/v6/app/upgrades/v6" + v620 "github.com/desmos-labs/desmos/v6/app/upgrades/v620" ) // registerUpgradeHandlers registers all the upgrade handlers that are supported by the app func (app *DesmosApp) registerUpgradeHandlers() { - app.registerUpgrade(v500.NewUpgrade(app.ModuleManager, app.Configurator(), app.ParamsKeeper, app.ConsensusParamsKeeper)) - app.registerUpgrade(v520.NewUpgrade(app.ModuleManager, app.Configurator(), app.ParamsKeeper, app.ConsensusParamsKeeper)) - app.registerUpgrade(v6.NewUpgrade(app.ModuleManager, app.Configurator(), app.StakingKeeper, app.IBCKeeper.ClientKeeper)) + app.registerUpgrade(v620.NewUpgrade(app.ModuleManager, app.Configurator())) } diff --git a/app/upgrades/v500/upgrade.go b/app/upgrades/v500/upgrade.go deleted file mode 100644 index 09bc821028..0000000000 --- a/app/upgrades/v500/upgrade.go +++ /dev/null @@ -1,155 +0,0 @@ -package v500 - -import ( - "github.com/cosmos/cosmos-sdk/baseapp" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - consensusparamskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" - - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - - poststypes "github.com/desmos-labs/desmos/v6/x/posts/types" - profilestypes "github.com/desmos-labs/desmos/v6/x/profiles/types" - reportstypes "github.com/desmos-labs/desmos/v6/x/reports/types" - - "github.com/desmos-labs/desmos/v6/app/upgrades" -) - -var ( - _ upgrades.Upgrade = &Upgrade{} -) - -// Upgrade represents the v5.0.0 upgrade -type Upgrade struct { - mm *module.Manager - configurator module.Configurator - - paramsKeeper paramskeeper.Keeper - consensusParamsKeeper consensusparamskeeper.Keeper -} - -// NewUpgrade returns a new Upgrade instance -func NewUpgrade(mm *module.Manager, configurator module.Configurator, pk paramskeeper.Keeper, consensusParamsKeeper consensusparamskeeper.Keeper) *Upgrade { - return &Upgrade{ - mm: mm, - configurator: configurator, - paramsKeeper: pk, - consensusParamsKeeper: consensusParamsKeeper, - } -} - -// Name implements upgrades.Upgrade -func (u *Upgrade) Name() string { - return "v5.0.0" -} - -// Handler implements upgrades.Upgrade -func (u *Upgrade) Handler() upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - - // Set param key table for params module migration - for _, subspace := range u.paramsKeeper.GetSubspaces() { - subspace := subspace - - var keyTable paramstypes.KeyTable - switch subspace.Name() { - case authtypes.ModuleName: - //nolint:staticcheck - keyTable = authtypes.ParamKeyTable() - case banktypes.ModuleName: - //nolint:staticcheck - keyTable = banktypes.ParamKeyTable() - case stakingtypes.ModuleName: - keyTable = stakingtypes.ParamKeyTable() - case minttypes.ModuleName: - //nolint:staticcheck - keyTable = minttypes.ParamKeyTable() - case distrtypes.ModuleName: - //nolint:staticcheck - keyTable = distrtypes.ParamKeyTable() - case slashingtypes.ModuleName: - //nolint:staticcheck - keyTable = slashingtypes.ParamKeyTable() - case govtypes.ModuleName: - //nolint:staticcheck - keyTable = govv1.ParamKeyTable() - case crisistypes.ModuleName: - //nolint:staticcheck - keyTable = crisistypes.ParamKeyTable() - - // ibc - case ibctransfertypes.ModuleName: - keyTable = ibctransfertypes.ParamKeyTable() - case icahosttypes.SubModuleName: - keyTable = icahosttypes.ParamKeyTable() - case icacontrollertypes.SubModuleName: - keyTable = icacontrollertypes.ParamKeyTable() - - // custom - case poststypes.ModuleName: - keyTable = poststypes.ParamKeyTable() - case profilestypes.ModuleName: - keyTable = profilestypes.ParamKeyTable() - case reportstypes.ModuleName: - keyTable = reportstypes.ParamKeyTable() - - // wasm - case wasmtypes.ModuleName: - //nolint:staticcheck - keyTable = wasmtypes.ParamKeyTable() - - // Skip if module is not migration target - default: - continue - } - - if !subspace.HasKeyTable() { - subspace.WithKeyTable(keyTable) - } - } - - // Migrate Tendermint consensus parameters from x/params module to a dedicated x/consensus module. - baseAppLegacySS := u.paramsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()) - baseapp.MigrateParams(ctx, baseAppLegacySS, &u.consensusParamsKeeper) - - return u.mm.RunMigrations(ctx, u.configurator, fromVM) - } -} - -// StoreUpgrades implements upgrades.Upgrade -func (u *Upgrade) StoreUpgrades() *storetypes.StoreUpgrades { - return &storetypes.StoreUpgrades{ - Added: []string{ - // New IBC features integration upgrades - ibcfeetypes.StoreKey, - icacontrollertypes.StoreKey, - icahosttypes.StoreKey, - - // Cosmos SDK v0.47.x upgrades - consensustypes.ModuleName, - crisistypes.ModuleName, - }, - Deleted: []string{ - "fees", - }, - } -} diff --git a/app/upgrades/v6/upgrade.go b/app/upgrades/v6/upgrade.go deleted file mode 100644 index 53f76688a3..0000000000 --- a/app/upgrades/v6/upgrade.go +++ /dev/null @@ -1,90 +0,0 @@ -package v6 - -import ( - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" - "github.com/cosmos/ibc-go/v7/modules/core/exported" - - "github.com/desmos-labs/desmos/v6/app/upgrades" - tokenfactorytypes "github.com/desmos-labs/desmos/v6/x/tokenfactory/types" -) - -var ( - _ upgrades.Upgrade = &Upgrade{} -) - -// Upgrade represents the v6 upgrade -type Upgrade struct { - mm *module.Manager - configurator module.Configurator - - sk *stakingkeeper.Keeper - clientKeeper clientkeeper.Keeper -} - -// NewUpgrade returns a new Upgrade instance -func NewUpgrade(mm *module.Manager, configurator module.Configurator, sk *stakingkeeper.Keeper, clientKeeper clientkeeper.Keeper) *Upgrade { - return &Upgrade{ - mm: mm, - configurator: configurator, - sk: sk, - clientKeeper: clientKeeper, - } -} - -// Name implements upgrades.Upgrade -func (u *Upgrade) Name() string { - return "v6" -} - -// Handler implements upgrades.Upgrade -func (u *Upgrade) Handler() upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // Inside Desmos v5 we added the support for on-chain minimum validator commission. - // However, even if a proposal was submitted on-chain for this upgrade, the validators have not updated properly. - // This is due to this issue: https://github.com/cosmos/cosmos-sdk/issues/10540#issuecomment-1155390615. - // - // To fix this, we are going to run through all validators and make sure that they have their on-chain - // commission properly set based on the current on-chain minimum value that might have been set by the - // governance through a param change proposal. - - minCommission := u.sk.GetParams(ctx).MinCommissionRate - u.sk.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - validator, ok := val.(stakingtypes.Validator) - if !ok { - return false - } - - // Make sure the commission rate is at least minCommission. - // Otherwise, set it to be that minimum - if validator.Commission.Rate.LT(minCommission) { - validator.Commission.Rate = minCommission - u.sk.SetValidator(ctx, validator) - } - - return false - }) - - // explicitly update the IBC 02-client params, adding the localhost client type - params := u.clientKeeper.GetParams(ctx) - params.AllowedClients = append(params.AllowedClients, exported.Localhost) - u.clientKeeper.SetParams(ctx, params) - - // After properly setting all the validator commissions, we can proceed with the normal migration - return u.mm.RunMigrations(ctx, u.configurator, fromVM) - } -} - -// StoreUpgrades implements upgrades.Upgrade -func (u *Upgrade) StoreUpgrades() *storetypes.StoreUpgrades { - return &storetypes.StoreUpgrades{ - Added: []string{ - tokenfactorytypes.StoreKey, - }, - } -} diff --git a/app/upgrades/v520/upgrade.go b/app/upgrades/v620/upgrade.go similarity index 65% rename from app/upgrades/v520/upgrade.go rename to app/upgrades/v620/upgrade.go index c6429e6218..2d25226215 100644 --- a/app/upgrades/v520/upgrade.go +++ b/app/upgrades/v620/upgrade.go @@ -1,11 +1,9 @@ -package v500 +package v620 import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - consensusparamskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/desmos-labs/desmos/v6/app/upgrades" @@ -15,33 +13,29 @@ var ( _ upgrades.Upgrade = &Upgrade{} ) -// Upgrade represents the v5.2.0 upgrade +// Upgrade represents the v6.2.0 upgrade type Upgrade struct { mm *module.Manager configurator module.Configurator - - paramsKeeper paramskeeper.Keeper - consensusParamsKeeper consensusparamskeeper.Keeper } // NewUpgrade returns a new Upgrade instance -func NewUpgrade(mm *module.Manager, configurator module.Configurator, pk paramskeeper.Keeper, consensusParamsKeeper consensusparamskeeper.Keeper) *Upgrade { +func NewUpgrade(mm *module.Manager, configurator module.Configurator) *Upgrade { return &Upgrade{ - mm: mm, - configurator: configurator, - paramsKeeper: pk, - consensusParamsKeeper: consensusParamsKeeper, + mm: mm, + configurator: configurator, } } // Name implements upgrades.Upgrade func (u *Upgrade) Name() string { - return "v5.2.0" + return "v6.2.0" } // Handler implements upgrades.Upgrade func (u *Upgrade) Handler() upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // This upgrade does not require any migration, so we can simply return the current version map return u.mm.RunMigrations(ctx, u.configurator, fromVM) } }