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

When use the genesis.json from the ethermintd export operation to restart a new chain, the node will panic #684

Closed
banishee opened this issue Jan 4, 2021 · 1 comment · Fixed by #685

Comments

@banishee
Copy link

banishee commented Jan 4, 2021

System info: [Include Ethermint commit, operating system name, and other relevant details]
branch: https://github.com/cosmos/ethermint/commits/development

Steps to reproduce:

  1. [First Step]
  • excute ./init.sh
  • make the node commit several blocks, and do some transfering transactions to new accounts
  • kill the node
  • excute ethermintd export > genesis.json
  • use this genesis.json to start a new chain
  • then, the node will shows up panic information
I[2021-01-04|15:49:37.671] starting ABCI with Tendermint                module=main 
panic: UnmarshalJSON cannot decode empty bytes

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/params/subspace.Subspace.Get(0xc000184230, 0x54eb7c0, 0xc000023330, 0x54eb800, 0xc0000233c0, 0xc0006b4520, 0x3, 0x12, 0xc0000e2c30, 0x54fe3c0, ...)
        /Users/green/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.2/x/params/subspace/subspace.go:106 +0x2b8
github.com/cosmos/cosmos-sdk/x/params/subspace.Subspace.GetParamSet(0xc000184230, 0x54eb7c0, 0xc000023330, 0x54eb800, 0xc0000233c0, 0xc0006b4520, 0x3, 0x12, 0xc0000e2c30, 0x54fe3c0, ...)
        /Users/green/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.2/x/params/subspace/subspace.go:217 +0x195
github.com/cosmos/ethermint/x/evm/types.(*CommitStateDB).GetParams(...)
        /Users/green/project/ethermint/x/evm/types/statedb.go:310
github.com/cosmos/ethermint/x/evm/types.(*stateObject).SetBalance(0xc000d859e0, 0xc00024fb80)
        /Users/green/project/ethermint/x/evm/types/state_object.go:201 +0x189
github.com/cosmos/ethermint/x/evm/types.(*CommitStateDB).SetBalance(0xc000501c00, 0x28c5e222c3180c0d, 0xb91a0de2fdafa168, 0xc0a497d964, 0xc00024fb80)
        /Users/green/project/ethermint/x/evm/types/statedb.go:136 +0x6c
github.com/cosmos/ethermint/x/evm/keeper.(*Keeper).SetBalance(...)
        /Users/green/project/ethermint/x/evm/keeper/statedb.go:22
github.com/cosmos/ethermint/x/evm.InitGenesis(0x54fe3c0, 0xc000134008, 0x55145c0, 0xc0000b4680, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /Users/green/project/ethermint/x/evm/genesis.go:42 +0x41d
github.com/cosmos/ethermint/x/evm.AppModule.InitGenesis(0xc000184230, 0x54eb7c0, 0xc000023360, 0x5509800, 0xc000184850, 0xc000501c00, 0x0, 0xc00000fec0, 0x5509800, 0xc000184e70, ...)
        /Users/green/project/ethermint/x/evm/module.go:129 +0x192
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc000184fc0, 0x54fe3c0, 0xc000134008, 0x55145c0, 0xc0000b4680, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /Users/green/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.2/types/module/module.go:265 +0x278
github.com/cosmos/ethermint/app.(*EthermintApp).InitChainer(0xc000151b80, 0x54fe3c0, 0xc000134008, 0x55145c0, 0xc0000b4680, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /Users/green/project/ethermint/app/ethermint.go:345 +0x11d
....

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

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

@fedekunze
Copy link
Contributor

good catch!

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

Successfully merging a pull request may close this issue.

2 participants