-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding docs for gov v1 migration #4628
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @chatton
docs/migrations/v7-to-v8.md
Outdated
```diff | ||
govRouter := govv1beta1.NewRouter() | ||
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). | ||
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we also able to remove this from app.go now? for param change proposals?
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we say something about making sure the correct authority is set in the ibc module keeper on app.go, and that it will default to gov if not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @chatton!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @chatton. I left some comments and one question about something that, if needed, can be addressed in a separate PR.
docs/migrations/v7-to-v8.md
Outdated
@@ -88,6 +88,39 @@ 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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`. |
docs/migrations/v7-to-v8.md
Outdated
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be wrong, but I think we don't default to the gov module address in our keepers? We just accept whatever is passed as argument, which now makes me think if we should validate the authority
to make sure is a valid SDK address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes good call, we don't actually default to the gov, address. (maybe we should 🤔 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, also valid solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do explicit checking of GetAuthority() != msg.Signer
and msg.Signer
should be validated in ValidateBasic
of all the messages. So it is already indirectly validated.
However you are correct that we don't default to gov! I can remove that section.
docs/migrations/v7-to-v8.md
Outdated
|
||
Remove legacy proposal registration from app.go ref: [#4602](https://github.com/cosmos/ibc-go/pull/4602). | ||
|
||
Remove the ibcclient ProposalHandler from the govRouter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the ibcclient ProposalHandler from the govRouter. | |
Remove the 02-client proposal handler from the `govRouter`. |
govtypes.ModuleName: gov.NewAppModuleBasic( | ||
[]govclient.ProposalHandler{ | ||
paramsclient.ProposalHandler, | ||
- ibcclientclient.UpgradeProposalHandler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the line with ibcclientclient.UpdateClientProposalHandler,
should be removed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there was one handler that handled both cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @chatton!
Description
closes: #4544
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.