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

[Migration] Location for genesis.json patches in documentation ? #5657

Closed
4 tasks
gagbo opened this issue Feb 17, 2020 · 6 comments
Closed
4 tasks

[Migration] Location for genesis.json patches in documentation ? #5657

gagbo opened this issue Feb 17, 2020 · 6 comments

Comments

@gagbo
Copy link
Contributor

gagbo commented Feb 17, 2020

Foreword : I'm still not sure if this should go in cosmos-sdk or gaia repo.

Summary

Have a single location to obtain a correct genesis.json file from the validated one on cosmos/launch repo

Problem Definition

I'm trying to run a node with code from a recent PR I made #5648 and my genesis.json file is again not passing the validation step.

Before testing this change, I had to change the genesis.json file because of a gentxs issue I found out after digging a little bit : #5518 (comment)

Now it looks like this tendermint commit will break again the current genesis.json file when trying to run a client from a recent enough commit (pulling tendermint 0.33.1 instead of 0.33.0)
tendermint/tendermint@6d91c1f#diff-5761519dc31df9e1fe23c78a6d4167f2R52-R53

And apparently the format for the evidence module initialization in the genesis.json file changed too (outside of slashing and into its own module)

Proposal

Have a section in the documentation specifying the breaking changes regarding genesis.json file so that any version of gaia/cosmos-sdk is able to run gaiad validate-genesis and gaiad start to join mainnet.

Or a few genesis.json files coming from a gaiad migrate command to see how it should be done if we want to run it locally, and with potentially hashes for the expected values to allow sharing of those files.

PS : I currently get a panic when I try to start a node with very recent version of cosmos-sdk and gaia. Is that expected because no other node runs tendermint 0.33.1 on the network ?
Full backtrace :

I[2020-02-17|16:37:56.589] starting ABCI with Tendermint                module=main
panic: invalid validator status

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/staking.InitGenesis(0x16f39c0, 0xc00003a0e8, 0x1708660, 0xc000bf6d00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	github.com/cosmos/[email protected]/x/staking/genesis.go:60 +0x1e49
github.com/cosmos/cosmos-sdk/x/staking.AppModule.InitGenesis(0x16e24c0, 0xc000c58d30, 0x170a560, 0xc000c48000, 0x7f7d3562c608, 0xc000b8d560, 0x1704800, 0xc0000413c0, 0x17087e0, 0xc000c48e20, ...)
	github.com/cosmos/[email protected]/x/staking/module.go:160 +0x18b
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc00033aa80, 0x16f39c0, 0xc00003a0e8, 0x1708660, 0xc000bf6d00, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	github.com/cosmos/[email protected]/types/module/module.go:265 +0x278
github.com/cosmos/gaia/app.(*GaiaApp).InitChainer(0xc0000d4100, 0x16f39c0, 0xc00003a0e8, 0x1708660, 0xc000bf6d00, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	github.com/cosmos/gaia@/app/app.go:300 +0x11d
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc000c56f00, 0x0, 0xed5830c36, 0x0, 0xc000e780e0, 0xb, 0xc000bf6c40, 0xc000caf000, 0x64, 0x64, ...)
	github.com/cosmos/[email protected]/baseapp/abci.go:39 +0x2cd
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc0002d7860, 0x0, 0xed5830c36, 0x0, 0xc000e780e0, 0xb, 0xc000bf6c40, 0xc000caf000, 0x64, 0x64, ...)
	github.com/tendermint/[email protected]/abci/client/local_client.go:223 +0x101
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc000ebc800, 0x0, 0xed5830c36, 0x0, 0xc000e780e0, 0xb, 0xc000bf6c40, 0xc000caf000, 0x64, 0x64, ...)
	github.com/tendermint/[email protected]/proxy/app_conn.go:65 +0x6b
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(0xc03891f0b0, 0xa, 0x0, 0x134eac9, 0x6, 0xc000e780e0, 0xb, 0x0, 0x0, 0x0, ...)
	github.com/tendermint/[email protected]/consensus/replay.go:318 +0x66e
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc03891f0b0, 0x170b260, 0xc000100cb0, 0x80, 0x1199dc0)
	github.com/tendermint/[email protected]/consensus/replay.go:269 +0x485
github.com/tendermint/tendermint/node.doHandshake(0x170a760, 0xc0004de4d8, 0xa, 0x0, 0x134eac9, 0x6, 0xc000e780e0, 0xb, 0x0, 0x0, ...)
	github.com/tendermint/[email protected]/node/node.go:281 +0x19a
github.com/tendermint/tendermint/node.NewNode(0xc0000e57c0, 0x16edd40, 0xc000e2a820, 0xc000c59230, 0x16d0320, 0xc000c8a580, 0xc000c59440, 0x14de050, 0xc000c59450, 0x16f4440, ...)
	github.com/tendermint/[email protected]/node/node.go:597 +0x343
github.com/cosmos/cosmos-sdk/server.startInProcess(0xc000df92a0, 0x14de870, 0x1d, 0x0, 0x0)
	github.com/cosmos/[email protected]/server/start.go:157 +0x4c1
github.com/cosmos/cosmos-sdk/server.StartCmd.func1(0xc000e29680, 0x2243c20, 0x0, 0x0, 0x0, 0x0)
	github.com/cosmos/[email protected]/server/start.go:67 +0xb4
github.com/spf13/cobra.(*Command).execute(0xc000e29680, 0x2243c20, 0x0, 0x0, 0xc000e29680, 0x2243c20)
	github.com/spf13/[email protected]/command.go:826 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0xc000438280, 0x1376926, 0xc000b0fe90, 0x58c132)
	github.com/spf13/[email protected]/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:864
github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc000438280, 0x14dec90, 0x1359831, 0x10)
	github.com/tendermint/[email protected]/libs/cli/setup.go:89 +0x3c
main.main()
	github.com/cosmos/gaia@/cmd/gaiad/main.go:72 +0x8e3

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@gagbo gagbo changed the title [Migration] Location for genesis.json patches ? [Migration] Location for genesis.json patches in documentation ? Feb 17, 2020
@alexanderbez
Copy link
Contributor

@gagbo
Copy link
Contributor Author

gagbo commented Feb 17, 2020

That's weird then, I can't migrate the current genesis.json file for cosmoshub-3 with those changes for v0.37

gaiad migrate v0.38 genesis.json > genesis_037-8.json
panic: invalid account found in genesis state; address: cosmos1qs8tnw2t8l6amtzvdemnnsq9dzk0ag0z37gh3h, error: vesting amount cannot be greater than total amount

@alexanderbez
Copy link
Contributor

alexanderbez commented Feb 17, 2020

did you export for zero height prior to migrating?

@gagbo
Copy link
Contributor Author

gagbo commented Feb 17, 2020

I just used the genesis.json from cosmos/launch (with changes to evidence and genutil[gentxs] as stated before), without any prior export command. I thought it'd be a valid file when starting a new node using more recent code

@alexanderbez
Copy link
Contributor

{binary} migrate ... has to be done on an exported genesis state (for zero height).

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

2 participants