Skip to content
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

feat: expose gov Migrate_V046_6_To_V046_7 through migrator #14335

Closed

Conversation

robert-zaremba
Copy link
Collaborator

Description

The voting migration for v0.46.7 requires gov store as an argument, which is normally not easily exposed outside of the module keeper (store key is private member of the keeper).
This update adds helper function to the migrator to help with the migration.


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...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • 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 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)

@robert-zaremba
Copy link
Collaborator Author

In fact, after thinking more and analyzing @dwedul-figure comment from Discord, we should remove Migrate_V046_6_To_V046_7, and only keep the migration for chains migrating from < 0.46

@alexanderbez alexanderbez enabled auto-merge (squash) December 16, 2022 20:23
@robert-zaremba
Copy link
Collaborator Author

Still loudly thinking... how about removing the the exposed Migrate_V046_6_To_V046_7 function at all? @alexanderbez , @julienrbrt ?

@julienrbrt
Copy link
Member

Still loudly thinking... how about removing the the exposed Migrate_V046_6_To_V046_7 function at all? @alexanderbez , @julienrbrt ?

I still personally don't entirely grasp what is the issue with it. I see that because votes are deleted this is ok not to use it. But why is it unsafe to use it?

@robert-zaremba
Copy link
Collaborator Author

If you are already on 0.46 and you have ongoing proposal with voting during the 0.46.7 migration then the following line will fail:
https://github.com/cosmos/cosmos-sdk/blob/release%2Fv0.46.x/x/gov/migrations/v046/store.go#L54

@alexanderbez
Copy link
Contributor

If you are already on 0.46 and you have ongoing proposal with voting during the 0.46.7 migration then the following line will fail: https://github.com/cosmos/cosmos-sdk/blob/release%2Fv0.46.x/x/gov/migrations/v046/store.go#L54

So what is your proposal @robert-zaremba?

@robert-zaremba
Copy link
Collaborator Author

@alexanderbez , to remove Migrate_V046_6_To_V046_7.
-> #14335 (comment)

@alexanderbez
Copy link
Contributor

I'm not following. So then why not just close this PR?

@robert-zaremba
Copy link
Collaborator Author

I'm not following. So then why not just close this PR?

Because the reflection came later. If we agree to remove the Migrate_V046_6_To_V046_7, then I will either update this PR or we can close this one and I create a new one.

@julienrbrt
Copy link
Member

Closing this then. I have updated the release notes on GH.

@julienrbrt julienrbrt closed this Dec 23, 2022
@julienrbrt julienrbrt deleted the robert/expose-go-migration-functions branch December 23, 2022 22:47
@robert-zaremba
Copy link
Collaborator Author

I would prefer to delete that function (and only keep the the private function which is a part of the module update).
So, if we agree on that, then happy to remove the function.
I can create a new PR to discuss it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants