From cd3767613182cd2bb66436ca9e6f416588ad4812 Mon Sep 17 00:00:00 2001 From: chatton Date: Tue, 12 Sep 2023 11:28:38 +0100 Subject: [PATCH 1/6] docs: adding docs for gov v1 migration --- docs/migrations/v7-to-v8.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/migrations/v7-to-v8.md b/docs/migrations/v7-to-v8.md index ec89e987124..821b50177ad 100644 --- a/docs/migrations/v7-to-v8.md +++ b/docs/migrations/v7-to-v8.md @@ -88,6 +88,37 @@ Each module has a corresponding `MsgUpdateParams` message with a `Params` which Legacy params subspaces must still be initialised in app.go in order to successfully migrate from x/params to the new self-contained approach. See reference: https://github.com/cosmos/ibc-go/blob/main/testing/simapp/app.go#L1001-L1006 +### Governance V1 migration + +Proposals have been migrated to [gov v1 messages](https://docs.cosmos.network/v0.50/modules/gov#messages) ref: [#4620](https://github.com/cosmos/ibc-go/pull/4620). + +Remove legacy proposal registration from app.go ref: [#4602](https://github.com/cosmos/ibc-go/pull/4602). + +Remove the ibcclient ProposalHandler from the govRouter. + +```diff + govRouter := govv1beta1.NewRouter() + govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). +- AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) +``` + +Remove the UpgradeProposalHandler from the BasicModuleManager + +```diff + app.BasicModuleManager = module.NewBasicManagerFromManager( + app.ModuleManager, + map[string]module.AppModuleBasic{ + genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + govtypes.ModuleName: gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, +- ibcclientclient.UpgradeProposalHandler, + }, + ), + }) +``` + ### Transfer migration An automatic migration handler (TODO: add link after https://github.com/cosmos/ibc-go/pull/3104 is merged) is configured in the transfer module to set the [denomination metadata](https://github.com/cosmos/cosmos-sdk/blob/95178ce036741ae6aa7af131fa9fccf3e13fff7a/proto/cosmos/bank/v1beta1/bank.proto#L96-L125) for the IBC denominations of all vouchers minted by the transfer module. From a8d1d7171034d91e1c81c30377044861146a5fd1 Mon Sep 17 00:00:00 2001 From: chatton Date: Tue, 12 Sep 2023 13:40:48 +0100 Subject: [PATCH 2/6] chore: adding note about authority --- docs/migrations/v7-to-v8.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/migrations/v7-to-v8.md b/docs/migrations/v7-to-v8.md index 821b50177ad..791efd16ec4 100644 --- a/docs/migrations/v7-to-v8.md +++ b/docs/migrations/v7-to-v8.md @@ -92,6 +92,8 @@ Legacy params subspaces must still be initialised in app.go in order to successf Proposals have been migrated to [gov v1 messages](https://docs.cosmos.network/v0.50/modules/gov#messages) ref: [#4620](https://github.com/cosmos/ibc-go/pull/4620). +Ensure that the correct authority field is provided to the ibc keeper. The default authority will be `gov` if not specified. + Remove legacy proposal registration from app.go ref: [#4602](https://github.com/cosmos/ibc-go/pull/4602). Remove the ibcclient ProposalHandler from the govRouter. From a0c8b8d7474798d98456f023e825aca11ebff4ea Mon Sep 17 00:00:00 2001 From: chatton Date: Tue, 12 Sep 2023 13:44:01 +0100 Subject: [PATCH 3/6] chore: run upgrade tests when upgrade_test.go changes --- .github/workflows/e2e-upgrade.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-upgrade.yaml b/.github/workflows/e2e-upgrade.yaml index f478e72dd92..982cd681dc0 100644 --- a/.github/workflows/e2e-upgrade.yaml +++ b/.github/workflows/e2e-upgrade.yaml @@ -1,7 +1,12 @@ name: Tests / E2E Upgrade on: workflow_dispatch: - + pull_request: + branches: + - main + paths: + # upgrade tests will run on any changes to the upgrade_test.go file. + - 'e2e/tests/upgrades/upgrade_test.go' schedule: - cron: '0 0 * * *' From 4cfca8b2a7a5bab18f04524a53b44c0d46b65640 Mon Sep 17 00:00:00 2001 From: chatton Date: Tue, 12 Sep 2023 13:46:04 +0100 Subject: [PATCH 4/6] Revert "chore: run upgrade tests when upgrade_test.go changes" This reverts commit a0c8b8d7474798d98456f023e825aca11ebff4ea. --- .github/workflows/e2e-upgrade.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/e2e-upgrade.yaml b/.github/workflows/e2e-upgrade.yaml index 982cd681dc0..f478e72dd92 100644 --- a/.github/workflows/e2e-upgrade.yaml +++ b/.github/workflows/e2e-upgrade.yaml @@ -1,12 +1,7 @@ name: Tests / E2E Upgrade on: workflow_dispatch: - pull_request: - branches: - - main - paths: - # upgrade tests will run on any changes to the upgrade_test.go file. - - 'e2e/tests/upgrades/upgrade_test.go' + schedule: - cron: '0 0 * * *' From 43d9ae6cdcdf50ce7380c1ae19f38f7145c7adf3 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Tue, 12 Sep 2023 19:47:45 +0200 Subject: [PATCH 5/6] formatting of code --- docs/migrations/v7-to-v8.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/migrations/v7-to-v8.md b/docs/migrations/v7-to-v8.md index 791efd16ec4..8c76973a436 100644 --- a/docs/migrations/v7-to-v8.md +++ b/docs/migrations/v7-to-v8.md @@ -99,26 +99,26 @@ Remove legacy proposal registration from app.go ref: [#4602](https://github.com/ Remove the ibcclient ProposalHandler from the govRouter. ```diff - govRouter := govv1beta1.NewRouter() - govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). -- AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) +govRouter := govv1beta1.NewRouter() +govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). +- AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) ``` Remove the UpgradeProposalHandler from the BasicModuleManager ```diff - app.BasicModuleManager = module.NewBasicManagerFromManager( - app.ModuleManager, - map[string]module.AppModuleBasic{ - genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), - govtypes.ModuleName: gov.NewAppModuleBasic( - []govclient.ProposalHandler{ - paramsclient.ProposalHandler, -- ibcclientclient.UpgradeProposalHandler, - }, - ), - }) +app.BasicModuleManager = module.NewBasicManagerFromManager( + app.ModuleManager, + map[string]module.AppModuleBasic{ + genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + govtypes.ModuleName: gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, +- ibcclientclient.UpgradeProposalHandler, + }, + ), +}) ``` ### Transfer migration From 3fde33eb9120d269f13034adfd5cddf1f9d1c504 Mon Sep 17 00:00:00 2001 From: chatton Date: Thu, 14 Sep 2023 11:48:14 +0100 Subject: [PATCH 6/6] chore: addressing PR feedback --- docs/migrations/v7-to-v8.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/migrations/v7-to-v8.md b/docs/migrations/v7-to-v8.md index 8c76973a436..2c7235a3085 100644 --- a/docs/migrations/v7-to-v8.md +++ b/docs/migrations/v7-to-v8.md @@ -90,13 +90,13 @@ Legacy params subspaces must still be initialised in app.go in order to successf ### Governance V1 migration -Proposals have been migrated to [gov v1 messages](https://docs.cosmos.network/v0.50/modules/gov#messages) ref: [#4620](https://github.com/cosmos/ibc-go/pull/4620). +Proposals have been migrated to [gov v1 messages](https://docs.cosmos.network/v0.50/modules/gov#messages) ref: [#4620](https://github.com/cosmos/ibc-go/pull/4620). The proposal `ClientUpdateProposal` has been removed and replaced with `MsgRecoverClient` and the proposal `UpgradeProposal` has been removed and replaced with `MsgIBCSoftwareUpgrade`. -Ensure that the correct authority field is provided to the ibc keeper. The default authority will be `gov` if not specified. +Ensure that the correct authority field is provided to the ibc keeper. Remove legacy proposal registration from app.go ref: [#4602](https://github.com/cosmos/ibc-go/pull/4602). -Remove the ibcclient ProposalHandler from the govRouter. +Remove the 02-client proposal handler from the `govRouter`. ```diff govRouter := govv1beta1.NewRouter()