Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

PANICS when I export genesis file at a specific height #617

Closed
RevelationOfTuring opened this issue Nov 25, 2020 · 1 comment · Fixed by #619
Closed

PANICS when I export genesis file at a specific height #617

RevelationOfTuring opened this issue Nov 25, 2020 · 1 comment · Fixed by #619
Assignees

Comments

@RevelationOfTuring
Copy link

RevelationOfTuring commented Nov 25, 2020

System info: [Include Ethermint commit, operating system name, and other relevant details]

commit:4dfe396b (v0.3.1)
operating system:macOS Catalina 10.15.6
go version:go1.15.2 darwin/amd64

Steps to reproduce:

  1. start a single node blockchain
  2. start a rest-server with ethermintcli rest-server --laddr tcp://localhost:8545 --unlock-key xxx --chain-id ethermint-8 --trace
  3. deploy an erc20 contract with Remix and Metamask
  4. stop the node and export genesis file with ethermintd export --for-zero-height --height=70 (node was stopped at height 71)
  5. panics with the log output:
panic: app.baseKey expected to be nil; duplicate init?

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).initFromMainStore(0xc000e23400, 0xc000f7c0f0, 0x0, 0x0)
	/Users/oker/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.2/baseapp/baseapp.go:318 +0x2a0
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).LoadVersion(0xc000e23400, 0x46, 0xc000f7c0f0, 0x4, 0xc000ddee58)
	/Users/oker/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.2/baseapp/baseapp.go:296 +0x80
github.com/cosmos/ethermint/app.(*EthermintApp).LoadHeight(...)
	/Users/oker/go/src/github.com/cosmos/ethermint/app/ethermint.go:350
main.exportAppStateAndTMValidators(0x54f6b60, 0xc0001af380, 0x550eea0, 0xc000010238, 0x0, 0x0, 0x46, 0xc0001af301, 0x5fa0030, 0x0, ...)
	/Users/oker/go/src/github.com/cosmos/ethermint/cmd/ethermintd/main.go:118 +0x1bc
github.com/cosmos/cosmos-sdk/server.ExportCmd.func1(0xc001310b00, 0xc000705500, 0x0, 0x2, 0x0, 0x0)
	/Users/oker/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.2/server/export.go:65 +0x53d
github.com/spf13/cobra.(*Command).execute(0xc001310b00, 0xc0007054e0, 0x2, 0x2, 0xc001310b00, 0xc0007054e0)
	/Users/oker/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001ce2c0, 0x5102837, 0xc000e2fe60, 0x4185662)
	/Users/oker/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/oker/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc0001ce2c0, 0x5292470, 0x50e2a3c, 0x10)
	/Users/oker/go/pkg/mod/github.com/tendermint/tendermint@v0.33.9/libs/cli/setup.go:89 +0x3c
main.main()
	/Users/oker/go/src/github.com/cosmos/ethermint/cmd/ethermintd/main.go:91 +0x5b3

Expected behavior: [What you expected to happen]

Genesis file output with contract bytecode that deployed successfully

Actual behavior: [What actually happened]

Additional info: [Include gist of relevant config, logs, etc.]

@zhongqiuwood
Copy link

It hit panic even if no contract deployed

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

Successfully merging a pull request may close this issue.

3 participants