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

Add JSON migrations (CLI migrate cmd) for 0.43 #8822

Closed
4 tasks
amaury1093 opened this issue Mar 9, 2021 · 3 comments · Fixed by #8880
Closed
4 tasks

Add JSON migrations (CLI migrate cmd) for 0.43 #8822

amaury1093 opened this issue Mar 9, 2021 · 3 comments · Fixed by #8880
Assignees
Labels
C:x/genutil genutil module issues
Milestone

Comments

@amaury1093
Copy link
Contributor

Summary

ADR-041 introduces in-place store migrations, but we still maintain JSON dump migrations. Add them to v.043.

Problem Definition

JSON migrations stop at 0.40. There's no migration needed between 0.40-0.42 though. Next one is 0.43.

Proposal

Add JSON migration in the CLI migrate command for v0.43. On the top of my mind, these need to be migrated:

  • index supply by denom
  • split votes

Note that ADR-028 addresses don't need any JSON migration.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@amaury1093 amaury1093 added the C:x/genutil genutil module issues label Mar 9, 2021
@amaury1093 amaury1093 added this to the v0.43 milestone Mar 9, 2021
@amaury1093 amaury1093 self-assigned this Mar 9, 2021
@aaronc
Copy link
Member

aaronc commented Mar 9, 2021

Is there any way we can reuse any of the code for in place migrations? Maybe importing old state, migrating in place and exporting? Or is that too complicated?

@aaronc aaronc added the backlog label Mar 9, 2021
@amaury1093
Copy link
Contributor Author

That's probably a bit complicated. The easiest way would be just to extract shared logic into functions. An example: the split votes migration logic is basically this. Put this in a function, and then MigrateStore and MigrateJSON both call it.

@amaury1093
Copy link
Contributor Author

Turns out index supply by denom doesn't need a JSON migration, since its genesis state didn't change. I added the split votes migration in #8880

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/genutil genutil module issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants