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]: sdk50 state export fails with panic: collections: not found: key 'no_key' of type string #21887

Open
1 task done
clemensgg opened this issue Sep 24, 2024 · 2 comments
Labels

Comments

@clemensgg
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

We're currently seeing the following error on many production networks that use cosmos-sdk v0.50.x when running simd export:

panic: collections: not found: key 'no_key' of type string

Full stack trace:

panic: collections: not found: key 'no_key' of type string

goroutine 456 [running]:
github.com/cosmos/cosmos-sdk/x/gov.AppModule.ExportGenesis({{{0x507e4a8, 0xc00679e530}, {0x0, 0x0, 0x0}, {0x50057a8, 0xc00679ebe0}}, 0xc00173e008, {0x5038660, 0xc008404a00}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.50.9/x/gov/module.go:310 +0xbf
github.com/cosmos/cosmos-sdk/types/module.(*Manager).ExportGenesisForModules.func2({0x7f4388133d18, 0xc0083f88c0}, 0xc002026c00)
	github.com/cosmos/cosmos-sdk@v0.50.9/types/module/module.go:578 +0x12d
created by github.com/cosmos/cosmos-sdk/types/module.(*Manager).ExportGenesisForModules in goroutine 1
	github.com/cosmos/cosmos-sdk@v0.50.9/types/module/module.go:576 +0x770

Cosmos SDK Version

0.50.x

How to reproduce?

run e.g. gaiad export --height 0

@julienrbrt
Copy link
Member

Looks like they haven't set their gov constitution: https://rest.cosmos.directory/cosmoshub/cosmos/gov/v1/constitution.
Which is weird, as it is set in a migration: https://github.com/cosmos/cosmos-sdk/blob/v0.50.10/x/gov/migrations/v5/store.go#L55-L60

@MSalopek
Copy link
Contributor

Gaia has been using expedited proposals since v47.

Our gov/v5 migration was created from a collection of PRs. I'm guessing the PRs we used came some time before the constitution changes were added to v50.

PR adding expedited props to cosmos-sdk-lsm:

Expedited proposal governance proposal:

I think it should be safe (from code perspective) to initialize the key to its default value through a migration in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants