Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.
This repository was 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

@banishee

Description

@banishee

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.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions