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 0.43 CLI JSON migrate command #8880

Merged
merged 8 commits into from
Mar 22, 2021
Merged

Add 0.43 CLI JSON migrate command #8880

merged 8 commits into from
Mar 22, 2021

Conversation

amaury1093
Copy link
Contributor

@amaury1093 amaury1093 commented Mar 15, 2021

Description

closes: #8822

To Test:

  • run a 0.42 node for a couple of blocks
  • stop the node, run simd export > test.json
  • on this branch, run simd migrate v0.43 test.json

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.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@orijbot
Copy link

orijbot commented Mar 15, 2021

@orijbot
Copy link

orijbot commented Mar 15, 2021

@amaury1093 amaury1093 added the C:x/genutil genutil module issues label Mar 15, 2021
@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #8880 (8d9b776) into master (5bd93bf) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 8d9b776 differs from pull request most recent head 2f31b0d. Consider uploading reports for the commit 2f31b0d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8880      +/-   ##
==========================================
- Coverage   59.27%   59.25%   -0.03%     
==========================================
  Files         571      572       +1     
  Lines       31827    31813      -14     
==========================================
- Hits        18867    18850      -17     
- Misses      10757    10761       +4     
+ Partials     2203     2202       -1     
Impacted Files Coverage Δ
x/genutil/client/cli/migrate.go 68.42% <100.00%> (ø)
x/gov/legacy/v043/json.go 100.00% <100.00%> (ø)
x/gov/legacy/v043/store.go 85.71% <100.00%> (+1.09%) ⬆️
x/auth/vesting/module.go 52.17% <0.00%> (-4.35%) ⬇️
x/upgrade/module.go 60.86% <0.00%> (-4.35%) ⬇️
x/mint/module.go 52.77% <0.00%> (-2.78%) ⬇️
x/auth/module.go 51.35% <0.00%> (-2.71%) ⬇️
x/crisis/module.go 56.75% <0.00%> (-2.71%) ⬇️
x/upgrade/keeper/keeper.go 74.22% <0.00%> (-2.50%) ⬇️
x/staking/module.go 59.52% <0.00%> (-2.39%) ⬇️
... and 10 more

@amaury1093 amaury1093 marked this pull request as ready for review March 15, 2021 15:31
@orijbot
Copy link

orijbot commented Mar 15, 2021

@orijbot
Copy link

orijbot commented Mar 16, 2021

@orijbot
Copy link

orijbot commented Mar 16, 2021

@clevinson clevinson self-requested a review March 17, 2021 16:07
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK. Left one question.

x/genutil/client/cli/migrate_test.go Outdated Show resolved Hide resolved
x/genutil/legacy/v043/migrate.go Show resolved Hide resolved
@orijbot
Copy link

orijbot commented Mar 18, 2021

@orijbot
Copy link

orijbot commented Mar 18, 2021

@orijbot
Copy link

orijbot commented Mar 18, 2021

@orijbot
Copy link

orijbot commented Mar 18, 2021

@amaury1093 amaury1093 changed the title Add 0.43 CLI migrate command Add 0.43 CLI JSON migrate command Mar 18, 2021
@clevinson clevinson requested a review from jgimeno March 19, 2021 14:12
Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks go. ACK'd. I couldn't test it, @AmauryM did you or anyone test this manually?

@amaury1093
Copy link
Contributor Author

amaury1093 commented Mar 22, 2021

did you or anyone test this manually?

I ran the following:

  • Take gaia v4, create a local node, run for a couple of blocks
  • stop the node, run gaiad export > test.json
  • run simd migrate v0.43 test.json (simd and gaiad are genesis-compatible)
  • works

It doesn't test all migration paths (it only ran for a few blocks), more thorough testing is desirable, but requires a testnet probably.

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Mar 22, 2021
@mergify mergify bot merged commit 3f52d5a into master Mar 22, 2021
@mergify mergify bot deleted the am/json-migrate branch March 22, 2021 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/genutil genutil module issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add JSON migrations (CLI migrate cmd) for 0.43
6 participants