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

app state export with simd export panics #12227

Closed
4 tasks
crodriguezvega opened this issue Jun 10, 2022 · 5 comments
Closed
4 tasks

app state export with simd export panics #12227

crodriguezvega opened this issue Jun 10, 2022 · 5 comments
Labels
S:needs more info This bug can't be addressed until more information is provided by the reporter. T:question

Comments

@crodriguezvega
Copy link

Summary of Bug

App state export CLI command panics. Executing simd export results in the following error:

panic: UnmarshalJSON cannot decode empty bytes

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.Get({{0x102b2968, 0xc000527820}, 0xc00039b5c8, {0x66873f8, 0xc00080e110}, {0x6687448, 0xc00080e410}, {0xc000297340, 0x4, 0x1a}, ...}, ...)
	github.com/cosmos/cosmos-sdk/x/params/types/subspace.go:110 +0x307
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.GetParamSet({{0x102b2968, 0xc000527820}, 0xc00039b5c8, {0x66873f8, 0xc00080e110}, {0x6687448, 0xc00080e410}, {0xc000297340, 0x4, 0x1a}, ...}, ...)
	github.com/cosmos/cosmos-sdk/x/params/types/subspace.go:239 +0x12a
github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper.GetParams(...)
	github.com/cosmos/cosmos-sdk/x/auth/keeper/params.go:15
github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper.ExportGenesis({{0x66873f8, 0xc00080f1b0}, {0x102b2968, 0xc000527820}, {{0x102b2968, 0xc000527820}, 0xc00039b5c8, {0x66873f8, 0xc00080e110}, {0x6687448, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk/x/auth/keeper/genesis.go:31 +0xee
github.com/cosmos/cosmos-sdk/x/auth.AppModule.ExportGenesis({{}, {{0x66873f8, 0xc00080f1b0}, {0x102b2968, 0xc000527820}, {{0x102b2968, 0xc000527820}, 0xc00039b5c8, {0x66873f8, 0xc00080e110}, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk/x/auth/module.go:154 +0x9b
github.com/cosmos/cosmos-sdk/types/module.(*Manager).ExportGenesis(_, {{0x669c870, 0xc000058078}, {0x66ab440, 0xc0009f3580}, {{0x0, 0x0}, {0x0, 0x0}, 0x0, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk/types/module/module.go:340 +0x10d
github.com/cosmos/cosmos-sdk/simapp.(*SimApp).ExportAppStateAndValidators(0xc0004a5100, 0x0, {0x7707668, 0x0, 0x0})
	github.com/cosmos/cosmos-sdk/simapp/export.go:33 +0x1eb
github.com/cosmos/cosmos-sdk/simapp/simd/cmd.appCreator.appExport({{{0x66a0c08, 0xc00000ec30}, {0x66b40f8, 0xc000127c30}, {0x66a8088, 0xc00019bcc0}, 0xc00039a7c0}}, {0x669d718, 0xc000412cc0}, {0x66aa9e0, ...}, ...)
	github.com/cosmos/cosmos-sdk/simapp/simd/cmd/root.go:318 +0x36a
github.com/cosmos/cosmos-sdk/server.ExportCmd.func1(0xc0002e8000, {0x7707668?, 0x0?, 0x0?})
	github.com/cosmos/cosmos-sdk/server/export.go:69 +0x35c
github.com/spf13/cobra.(*Command).execute(0xc0002e8000, {0x7707668, 0x0, 0x0})
	github.com/spf13/cobra@v1.4.0/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000c0000)
	github.com/spf13/cobra@v1.4.0/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.4.0/command.go:902
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	github.com/spf13/cobra@v1.4.0/command.go:895
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x5805340?, {0x0, 0x0}, {0xc0001cfe00, 0x1e})
	github.com/cosmos/cosmos-sdk/server/cmd/execute.go:36 +0x20f
main.main()
	github.com/cosmos/cosmos-sdk/simapp/simd/main.go:15 +0x30

Version

0.45.4, main

Steps to Reproduce

  • Build simd
  • setup a local chain and run it with simd start
  • stop it
  • Execute simd export

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

Please post your genesis file :)

@crodriguezvega
Copy link
Author

Thanks, @alexanderbez. Here it is: genesis.json.zip

@Jagadeeshkumar748
Copy link

Jagadeeshkumar748 commented Jul 5, 2022

I followed the above steps in main version .
If you have used ./simd start to start, then block height will not catch up, so ./simd export will give the above error.
Note: The current main branch needs to start with mode validator.
use:
./simd start --mode validator to start the chain then ./simd export will give the intended output.

@colin-axner
Copy link
Contributor

Using ibc-go binaries with SDK v0.45.4 and v0.45.6, I was able to export without issue.

@crodriguezvega did you verify that the chain had successfully started? I think the param stores don't get properly set until after init genesis. I think this issue needs more information to determine why you received a panic

@julienrbrt julienrbrt added the S:needs more info This bug can't be addressed until more information is provided by the reporter. label Sep 24, 2022
@github-project-automation github-project-automation bot moved this to 📝 Todo in Cosmos-SDK Jan 16, 2023
@tac0turtle
Copy link
Member

closing this issue since we were unable to reproduce

@github-project-automation github-project-automation bot moved this from 📝 Todo to 👏 Done in Cosmos-SDK Mar 1, 2023
@tac0turtle tac0turtle removed this from Cosmos-SDK May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S:needs more info This bug can't be addressed until more information is provided by the reporter. T:question
Projects
None yet
Development

No branches or pull requests

6 participants