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

0.39->0.40 CLI migrate command #6839

Merged
merged 234 commits into from
Oct 5, 2020
Merged

0.39->0.40 CLI migrate command #6839

merged 234 commits into from
Oct 5, 2020

Conversation

amaury1093
Copy link
Contributor

@amaury1093 amaury1093 commented Jul 24, 2020

Description

closes: #6751

What I did: checked out tag v0.39.0, looked into all x/**/types/genesis.go structs , and compared them to latest master's genesis structs (defined in proto files).

Also:

  • The module-specific Migrate functions now take a client.Context. It's only use in 0.40, to decide which JSON (amino or proto) to output.

Update needed for:

  • auth: BaseAccount has an Any pubkey field
  • evidence: remove a Params field
  • supply: merged into bank
  • slashing: SigningInfos & ValidatorMissedBlocks move from map to array

If you can think of other genesis state's that I might have forgot, please shout.

depends on:


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

@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #6839 into master will increase coverage by 0.11%.
The diff coverage is 88.46%.

@@            Coverage Diff             @@
##           master    #6839      +/-   ##
==========================================
+ Coverage   55.11%   55.23%   +0.11%     
==========================================
  Files         588      590       +2     
  Lines       36800    36914     +114     
==========================================
+ Hits        20284    20390     +106     
- Misses      14415    14420       +5     
- Partials     2101     2104       +3     

@@ -116,10 +116,10 @@ message ValidatorSlashEventRecord {
];
uint64 height = 2;
uint64 period = 3;
ValidatorSlashEvent event = 4 [
ValidatorSlashEvent validator_slash_event = 4 [
Copy link
Contributor Author

@amaury1093 amaury1093 Jul 30, 2020

Choose a reason for hiding this comment

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

This was validator_slash_event in v0.39

Event ValidatorSlashEvent `json:"validator_slash_event" yaml:"validator_slash_event"`

don't want to create a migrate script for this

@amaury1093 amaury1093 marked this pull request as ready for review August 4, 2020 14:28
@amaury1093 amaury1093 marked this pull request as ready for review September 25, 2020 13:17
@amaury1093
Copy link
Contributor Author

I tried updating a genesis.json from the hub3 (from ~2 months ago), and here are its successive migrated genesises: https://drive.google.com/drive/folders/1OQPJnx7PgyDtVi8A3z1ED4QThTnoPr2M

@anilcse anilcse self-requested a review September 25, 2020 22:57
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.

LGTM, but I don't know if we cover everything.

x/auth/legacy/v0_40/migrate.go Outdated Show resolved Hide resolved
x/auth/legacy/v0_40/migrate.go Outdated Show resolved Hide resolved
@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Oct 1, 2020
@alessio alessio self-assigned this Oct 2, 2020
x/genutil/types/types.go Outdated Show resolved Hide resolved
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.

utACK

@mergify mergify bot merged commit d9ede65 into master Oct 5, 2020
@mergify mergify bot deleted the am-6751-migrate branch October 5, 2020 21:28
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Launchpad (0.39) to Stargate (0.40) migrate command
10 participants