-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
CLI migrate
command follow-up: decode & re-encode
#7464
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7464 +/- ##
==========================================
+ Coverage 56.02% 56.03% +0.01%
==========================================
Files 591 592 +1
Lines 37177 37253 +76
==========================================
+ Hits 20827 20875 +48
- Misses 14232 14261 +29
+ Partials 2118 2117 -1 |
@@ -0,0 +1,116 @@ | |||
package v040 |
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'll pay a beer to anyone who tells me if there's a way to make this boilerplate code shorter (esp the 5 for loops and some inner loops...)
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.
You may be able to just amino JSON encode and decode from one version to the next. If there were no other changes, the amino JSON should be the same.
@@ -56,8 +56,16 @@ type ( | |||
|
|||
Validators []Validator | |||
|
|||
Params struct { |
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.
Fixing a 0.36->0.38 migration here
I would need some help here, maybe @alexanderbez or @alessio ? We ran a small devnet inside Regen: using gaia, with 4 validators, around 100k blocks. Here's the exported genesis after 100k blocks: After running the CLI migrate command from this branch, here's the 0.40 genesis state: ReproYou can download the 0.40 genesis json, and run: simd init --chain-id devnet-40 <your_name>
rm ~/.simapp/config/genesis.json
cp v040_genesis.json ~/.simapp/config/genesis.json
simd start Expectedno error Actual
|
what version of Gaia did you export from? Did you go from 0.37 -> 0.39 -> 0.40? Also, did you export for zero-height? |
No, we didn't have a gaia updated to latest 0.40 yet. So we actually went from
yes |
How did you do this? Maybe there is a user error somewhere? |
lmk if it's a user error (might be possible since we're running simapp on a gaia-exported genesis), not 100% sure, might also be an error in the CLI |
Hmmm I think it'd be best to run the entire thing either against Gaia or Simapp and not switch tbh. That being said, it might be an error in migration. The bonded and non-bonded pools are wayyy off. |
Putting R4R, it'll be good to get a 1st round of review. We'll be testing internally at regen a bit more to find out why it panics (which might or might not be related to the migrate command). |
Just an FYI, we will be attempt non-zero height snapshot off the hub for a Stargate testnet next week. Would love to know more about the panic |
…sdk into am-migrate-followup
The panic is fixed in 5d608ac, this PR is R4R now. |
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.
Pre-approving, this needs clarification #7464 (comment)
Co-authored-by: Marie Gauthier <[email protected]>
…sdk into am-migrate-followup
Approving, but i'd like to see the int32 > enum piece still happen within v0.40.0 if possible. Should be a pretty small lift? |
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.
ACK 🎉
@@ -0,0 +1,116 @@ | |||
package v040 |
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.
You may be able to just amino JSON encode and decode from one version to the next. If there were no other changes, the amino JSON should be the same.
@clevinson sounds good! I started #7499, can finish it Monday, and we can release an RC after. |
Description
Follow-up of #6839. In that PR, I only migrated the modules with breaking changes.
In this PR, all modules are migrated. For those without any breaking change, "migrating" just means decoding using amino, and re-encoding using JSONMarshaler.
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.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes