evmos / ethermint

Ethermint is a Cosmos SDK library for running scalable and interoperable EVM chains
https://docs.evmos.org/
GNU Lesser General Public License v3.0
1.82k stars 560 forks source link

Problem: panic: UnmarshalJSON cannot decode empty bytes #492

Closed leejw51crypto closed 3 years ago

leejw51crypto commented 3 years ago

when the program killed frequently.

panic: UnmarshalJSON cannot decode empty bytes

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.Get(0x25a1bf8, 0xc0013328e0, 0xc000011b28, 0x256c4c0, 0xc0012b9730, 0x256c510, 0xc0012b98b0, 0xc000e9e9a8, 0x3, 0x12, ...)
    github.com/cosmos/cosmos-sdk@v0.43.0/x/params/types/subspace.go:109 +0x31c
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.GetParamSet(0x25a1bf8, 0xc0013328e0, 0xc000011b28, 0x256c4c0, 0xc0012b9730, 0x256c510, 0xc0012b98b0, 0xc000e9e9a8, 0x3, 0x12, ...)
    github.com/cosmos/cosmos-sdk@v0.43.0/x/params/types/subspace.go:222 +0x185
github.com/tharsis/ethermint/x/evm/keeper.Keeper.GetParams(...)
    github.com/tharsis/ethermint/x/evm/keeper/params.go:11
github.com/tharsis/ethermint/x/evm/keeper.Keeper.CalculateBaseFee(0x25a1bf8, 0xc0013328e0, 0x256c4c0, 0xc0012b98a0, 0x256c510, 0xc0012b98d0, 0x25a1bf8, 0xc0013328e0, 0xc000011b28, 0x256c4c0, ...)
    github.com/tharsis/ethermint/x/evm/keeper/eip1559.go:22 +0x1cf
github.com/tharsis/ethermint/x/evm/keeper.(*Keeper).EndBlock(0xc001346700, 0x258a768, 0xc000054180, 0x25a4f20, 0xc0018417c0, 0xb, 0x0, 0xc002d5bcf0, 0xf, 0x25d6, ...)
    github.com/tharsis/ethermint/x/evm/keeper/abci.go:33 +0x338
github.com/tharsis/ethermint/x/evm.AppModule.EndBlock(...)
    github.com/tharsis/ethermint/x/evm/module.go:148
github.com/cosmos/cosmos-sdk/types/module.(*Manager).EndBlock(0xc0012fc460, 0x258a768, 0xc000054180, 0x25a4f20, 0xc0018417c0, 0xb, 0x0, 0xc002d5bcf0, 0xf, 0x25d6, ...)
    github.com/cosmos/cosmos-sdk@v0.43.0/types/module/module.go:454 +0x20d
github.com/tharsis/ethermint/app.(*EthermintApp).EndBlocker(...)
    github.com/tharsis/ethermint/app/app.go:535
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).EndBlock(0xc0003ec000, 0x25d6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    github.com/cosmos/cosmos-sdk@v0.43.0/baseapp/abci.go:210 +0x325
github.com/tendermint/tendermint/abci/client.(*localClient).EndBlockSync(0xc0012f3c20, 0x25d6, 0x0, 0x0, 0x0)
    github.com/tendermint/tendermint@v0.34.12/abci/client/local_client.go:282 +0xdb
github.com/tendermint/tendermint/proxy.(*appConnConsensus).EndBlockSync(0xc000dc5340, 0x25d6, 0x20, 0x20, 0xb)
    github.com/tendermint/tendermint@v0.34.12/proxy/app_conn.go:89 +0x42
github.com/tendermint/tendermint/state.execBlockOnProxyApp(0x258b648, 0xc0006199e0, 0x25982b8, 0xc000dc5340, 0xc00000c5a0, 0x25a1738, 0xc000dc4610, 0x1, 0xc002d821e0, 0x20, ...)
    github.com/tendermint/tendermint@v0.34.12/state/execution.go:327 +0x662
github.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(0xc002ce0fc0, 0xb, 0x0, 0xc002d5a4d8, 0x8, 0xc002d5a4f0, 0xf, 0x1, 0x25d5, 0xc002d821e0, ...)
    github.com/tendermint/tendermint@v0.34.12/state/execution.go:140 +0x168
github.com/tendermint/tendermint/consensus.(*Handshaker).replayBlock(0xc00121f420, 0xb, 0x0, 0xc002d5a4d8, 0x8, 0xc002d5a4f0, 0xf, 0x1, 0x25d5, 0xc002d821e0, ...)
    github.com/tendermint/tendermint@v0.34.12/consensus/replay.go:503 +0x292
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(0xc00059b420, 0xb, 0x0, 0xc002d5a4d8, 0x8, 0xc002d5a4f0, 0xf, 0x1, 0x25d5, 0xc002d821e0, ...)
    github.com/tendermint/tendermint@v0.34.12/consensus/replay.go:416 +0xd79
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc00121f420, 0x25a6440, 0xc00002ba00, 0x1f4, 0xc00111e270)
    github.com/tendermint/tendermint@v0.34.12/consensus/replay.go:268 +0x458
github.com/tendermint/tendermint/node.doHandshake(0x25a1738, 0xc000dc4610, 0xb, 0x0, 0xc002d5a4d8, 0x8, 0xc002d5a4f0, 0xf, 0x1, 0x25d5, ...)
    github.com/tendermint/tendermint@v0.34.12/node/node.go:308 +0x1d8
github.com/tendermint/tendermint/node.NewNode(0xc00028c280, 0x25803c0, 0xc000ecf0e0, 0xc000dc4600, 0x2548440, 0xc002d887b0, 0xc000dc4670, 0x2318d00, 0xc000dc47b0, 0x258b648, ...)
    github.com/tendermint/tendermint@v0.34.12/node/node.go:715 +0x20e5
github.com/tharsis/ethermint/server.startInProcess(0xc0005296a0, 0x0, 0x0, 0x0, 0x25b0c18, 0xc0012c23c0, 0xc00011ea00, 0xf, 0x2594cf0, 0xc0013328e0, ...)
    github.com/tharsis/ethermint/server/start.go:259 +0x997
github.com/tharsis/ethermint/server.StartCmd.func2(0xc000020a00, 0xc00116a750, 0x0, 0x9, 0x0, 0x0)
    github.com/tharsis/ethermint/server/start.go:107 +0x209
fedekunze commented 3 years ago

@leejw51crypto let me know if this is fixed with the latest changes

fedekunze commented 3 years ago

closing this for now, please reopen if error still persists