Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

R4R: v0.29 to v0.30 genesis port script (v2) #261

Merged
merged 10 commits into from
Jan 31, 2019

Conversation

cwgoes
Copy link
Contributor

@cwgoes cwgoes commented Jan 29, 2019

edit: To test this (blocked on cosmos/cosmos-sdk#3428), run:

./v0.29-to-v0.30.py export.json genesis.json
cp genesis.json ~/.gaiad/config/genesis.json
make test_sim_gaia_custom_genesis_fast

Manually performs the following state modifications:

  • Renames "STAKE" to "stake"
  • Changes sdk.Dec to sdk.Int for validator tokens
  • Sets new auth parameters
  • Alters distribution state to port from v0.29.x ("piggy bank") to v0.30.x ("F1").
  • Renames x/stake to x/staking
  • Renames a few other minor fields

Are there any other changes we need to make in genesis? Comment if so.

If you're having trouble exporting, try cosmos/cosmos-sdk#3304.

@cwgoes
Copy link
Contributor Author

cwgoes commented Jan 29, 2019

Yes genesis requirements have changed based on cosmos/cosmos-sdk#3243 (comment)

namely fields are different in UnbondingDelegation and Redelegation objects (x/staking/types/delegation.go), to convert from the old struct to the new struct we will need to populate the fields of one Entry in either parent object

There weren't any unbonding delegations or redelegations in the state export I'm testing with; if there are in the final GoS snapshot we'll have to do this too.

@cwgoes
Copy link
Contributor Author

cwgoes commented Jan 29, 2019

Branch for testing (v0.30.0 with the genesis simulation cherry-picked):
https://github.com/cosmos/cosmos-sdk/tree/cwgoes/gos-genesis-port-working

@cwgoes cwgoes changed the title WIP: v0.29 to v0.30 genesis port script (v2) R4R: v0.29 to v0.30 genesis port script (v2) Jan 29, 2019
@cwgoes
Copy link
Contributor Author

cwgoes commented Jan 29, 2019

@zmanian The simulation is working from my tests now (just pushed a few final fixes).

I still think we might need to sort the coins in each account, will do that shortly.

@cwgoes
Copy link
Contributor Author

cwgoes commented Jan 29, 2019

I still think we might need to sort the coins in each account, will do that shortly.

This is done now too.

@zmanian zmanian merged commit b998b0a into cosmos:master Jan 31, 2019
@cwgoes cwgoes deleted the cwgoes/genesisify branch January 31, 2019 18:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants