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

[Bug]: genesis migration to v0.50 fails #18021

Closed
1 task done
alpe opened this issue Oct 9, 2023 · 3 comments
Closed
1 task done

[Bug]: genesis migration to v0.50 fails #18021

alpe opened this issue Oct 9, 2023 · 3 comments
Labels

Comments

@alpe
Copy link
Contributor

alpe commented Oct 9, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

There is no genesis migration for v0.50 [registered](see https://github.com/cosmos/cosmos-sdk/blob/release/v0.50.x/x/genutil/client/cli/migrate.go#L25-L28).

Cosmos SDK Version

v0.50

How to reproduce?

simd genesis migrate v0.50 <filename> (I have tested with wasmd but should be the same with simd)

@alpe alpe added the T:Bug label Oct 9, 2023
@julienrbrt
Copy link
Member

There is no genesis breaking change in v0.50, this is why this isn't added there.

@julienrbrt julienrbrt closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2023
@alpe
Copy link
Contributor Author

alpe commented Oct 10, 2023

Not sure about the solution but a genesis export/import fails with:
panic: failed to load latest version: version of store circuit mismatch root store's version; expected 3 got 0; new stores should be added using StoreUpgrades

These are the steps to reproduce the issue:

# setup with 47
./simd_v0.47.5 init --chain-id=my-chain val1 --home=$(pwd)/tmp_18021
./simd_v0.47.5 keys add validator --home=$(pwd)/tmp_18021
./simd_v0.47.5 genesis add-genesis-account validator "1000000000stake" --home=$(pwd)/tmp_18021
./simd_v0.47.5 genesis gentx validator "250000000stake" --chain-id=my-chain --amount="250000000stake" --home=$(pwd)/tmp_18021
./simd_v0.47.5 genesis collect-gentxs --home=$(pwd)/tmp_18021

# start and produce some blocks
./simd_v0.47.5 start --halt-height=3 --home=$(pwd)/tmp_18021

# export
./simd_v0.47.5 export --output-document=$(pwd)/genesis_exp47.json --home=$(pwd)/tmp_18021

# start from genesis import state
./simd_v0.50_95c0083 comet reset-state --home=$(pwd)/tmp_18021
cp $(pwd)/genesis_exp47.json $(pwd)/tmp_18021/config/genesis.json

./simd_v0.50_95c0083 start --trace --home=$(pwd)/tmp_18021

@julienrbrt
Copy link
Member

Not sure about the solution but a genesis export/import fails with: panic: failed to load latest version: version of store circuit mismatch root store's version; expected 3 got 0; new stores should be added using StoreUpgrades

These are the steps to reproduce the issue:

# setup with 47
./simd_v0.47.5 init --chain-id=my-chain val1 --home=$(pwd)/tmp_18021
./simd_v0.47.5 keys add validator --home=$(pwd)/tmp_18021
./simd_v0.47.5 genesis add-genesis-account validator "1000000000stake" --home=$(pwd)/tmp_18021
./simd_v0.47.5 genesis gentx validator "250000000stake" --chain-id=my-chain --amount="250000000stake" --home=$(pwd)/tmp_18021
./simd_v0.47.5 genesis collect-gentxs --home=$(pwd)/tmp_18021

# start and produce some blocks
./simd_v0.47.5 start --halt-height=3 --home=$(pwd)/tmp_18021

# export
./simd_v0.47.5 export --output-document=$(pwd)/genesis_exp47.json --home=$(pwd)/tmp_18021

# start from genesis import state
./simd_v0.50_95c0083 comet reset-state --home=$(pwd)/tmp_18021
cp $(pwd)/genesis_exp47.json $(pwd)/tmp_18021/config/genesis.json

./simd_v0.50_95c0083 start --trace --home=$(pwd)/tmp_18021

Have your v0.50 chain the same modules as your v0.47.5 chain? Our simapp in v0.50 added the circuit module, so in this case, this makes sense it fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants