PundiAI / fx-core

https://functionx.gitbook.io
Apache License 2.0
21 stars 14 forks source link

panic: UnmarshalJSON cannot decode empty bytes #53

Closed kenorb closed 2 years ago

kenorb commented 2 years ago

This happened at random after upgrade:

+ /usr/bin/fxcored start
4:09PM INF Unlocking keyring
4:09PM INF starting ABCI with Tendermint
4:09PM INF Starting multiAppConn service impl=multiAppConn module=proxy server=node
4:09PM INF Starting localClient service connection=query impl=localClient module=abci-client server=node
4:09PM INF Starting localClient service connection=snapshot impl=localClient module=abci-client server=node
4:09PM INF Starting localClient service connection=mempool impl=localClient module=abci-client server=node
4:09PM INF Starting localClient service connection=consensus impl=localClient module=abci-client server=node
4:09PM INF Starting EventBus service impl=EventBus module=events server=node
4:09PM INF Starting PubSub service impl=PubSub module=pubsub server=node
4:09PM INF Starting IndexerService service impl=IndexerService module=txindex server=node
4:09PM INF ABCI Handshake App Info hash="�|x�ҥV�J�@{�2\t�0���m+\ff,-����0�" height=5433666 module=consensus protocol-version=0 server=node software-version=HEAD-8f2f0f7bf917eac2b405db497a21a0b3c5073f86
4:09PM INF ABCI Replay Blocks appHeight=5433666 module=consensus server=node stateHeight=5433666 storeHeight=5433667
4:09PM INF Replay last block using real app module=consensus server=node
panic: UnmarshalJSON cannot decode empty bytes

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.Get({{0x2b918e8, 0xc00018f190}, 0xc000166fb8, {0x2b6c958, 0xc003378510}, {0x2b6c9a8, 0xc003378610}, {0xc00171e720, 0x9, 0x21}, ...}, ...)
    github.com/cosmos/cosmos-sdk@v0.45.5/x/params/types/subspace.go:109 +0x307
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.GetParamSet({{0x2b918e8, 0xc00018f190}, 0xc000166fb8, {0x2b6c958, 0xc003378510}, {0x2b6c9a8, 0xc003378610}, {0xc00171e720, 0x9, 0x21}, ...}, ...)
    github.com/cosmos/cosmos-sdk@v0.45.5/x/params/types/subspace.go:222 +0x145
github.com/evmos/ethermint/x/feemarket/keeper.Keeper.GetParams(...)
    github.com/evmos/ethermint@v0.16.0/x/feemarket/keeper/params.go:12
github.com/evmos/ethermint/x/feemarket/keeper.Keeper.CalculateBaseFee({{0x2b918e8, 0xc00018f190}, {0x2b6c958, 0xc0033785e0}, {0x2b6c9a8, 0xc003378630}, {{0x2b918e8, 0xc00018f190}, 0xc000166fb8, {0x2b6c958, ...}, ...}}, ...)
    github.com/evmos/ethermint@v0.16.0/x/feemarket/keeper/eip1559.go:17 +0x125
github.com/evmos/ethermint/x/feemarket/keeper.(*Keeper).BeginBlock(_, {{0x2b849e8, 0xc0000ec140}, {0x2b935e0, 0xc004e272c0}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, ...}, ...}, ...)
    github.com/evmos/ethermint@v0.16.0/x/feemarket/keeper/abci.go:15 +0xf8
github.com/evmos/ethermint/x/feemarket.AppModule.BeginBlock(...)
    github.com/evmos/ethermint@v0.16.0/x/feemarket/module.go:148
github.com/cosmos/cosmos-sdk/types/module.(*Manager).BeginBlock(_, {{0x2b849e8, 0xc0000ec140}, {0x2b935e0, 0xc004e272c0}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, ...}, ...}, ...)
    github.com/cosmos/cosmos-sdk@v0.45.5/types/module/module.go:479 +0x3a2
github.com/functionx/fx-core/app.(*App).BeginBlocker(_, {{0x2b849e8, 0xc0000ec140}, {0x2b935e0, 0xc004e272c0}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, ...}, ...}, ...)
    github.com/functionx/fx-core/app/app.go:755 +0x85
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).BeginBlock(_, {{0xc00b4c5720, 0x20, 0x20}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, {0x25584361, ...}, ...}, ...})
    github.com/cosmos/cosmos-sdk@v0.45.5/baseapp/abci.go:194 +0x97c
github.com/tendermint/tendermint/abci/client.(*localClient).BeginBlockSync(_, {{0xc00b4c5720, 0x20, 0x20}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, {0x25584361, ...}, ...}, ...})
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/abci/client/local_client.go:280 +0x118
github.com/tendermint/tendermint/proxy.(*appConnConsensus).BeginBlockSync(_, {{0xc00b4c5720, 0x20, 0x20}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, {0x25584361, ...}, ...}, ...})
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/proxy/app_conn.go:81 +0x55
github.com/tendermint/tendermint/state.execBlockOnProxyApp({0x2b85970?, 0xc0010a41e0}, {0x2b8bb10, 0xc004abe680}, 0xc00b4ae000, {0x2b922f8, 0xc004a81a00}, 0x52e942?)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/state/execution.go:307 +0x3dd
github.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(_, {{{0xb, 0x0}, {0xc004a83708, 0x7}}, {0xc004a83720, 0x6}, 0x1, 0x52e942, {{0xc0043d00e0, ...}, ...}, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/state/execution.go:140 +0x171
github.com/tendermint/tendermint/consensus.(*Handshaker).replayBlock(_, {{{0xb, 0x0}, {0xc004a83708, 0x7}}, {0xc004a83720, 0x6}, 0x1, 0x52e942, {{0xc0043d00e0, ...}, ...}, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/consensus/replay.go:503 +0x23c
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(_, {{{0xb, 0x0}, {0xc004a83708, 0x7}}, {0xc004a83720, 0x6}, 0x1, 0x52e942, {{0xc0043d00e0, ...}, ...}, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/consensus/replay.go:416 +0x7ae
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc00b4df898, {0x2b94518, 0xc0084e2410})
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/consensus/replay.go:268 +0x3c8
github.com/tendermint/tendermint/node.doHandshake({_, _}, {{{0xb, 0x0}, {0xc004a83708, 0x7}}, {0xc004a83720, 0x6}, 0x1, 0x52e942, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/node/node.go:325 +0x1b8
github.com/tendermint/tendermint/node.NewNode(0xc000119e00, {0x2b81520, 0xc0013b7540}, 0xc0013bb6d0, {0x2b67960, 0xc0081d94a0}, 0x0?, 0x0?, 0xc0013bb910, {0x2b85970, ...}, ...)
    github.com/ten+ /usr/bin/fxcored start
4:09PM INF Unlocking keyring
4:09PM INF starting ABCI with Tendermint
4:09PM INF Starting multiAppConn service impl=multiAppConn module=proxy server=node
4:09PM INF Starting localClient service connection=query impl=localClient module=abci-client server=node
4:09PM INF Starting localClient service connection=snapshot impl=localClient module=abci-client server=node
4:09PM INF Starting localClient service connection=mempool impl=localClient module=abci-client server=node
4:09PM INF Starting localClient service connection=consensus impl=localClient module=abci-client server=node
4:09PM INF Starting EventBus service impl=EventBus module=events server=node
4:09PM INF Starting PubSub service impl=PubSub module=pubsub server=node
4:09PM INF Starting IndexerService service impl=IndexerService module=txindex server=node
4:09PM INF ABCI Handshake App Info hash="�|x�ҥV�J�@{�2\t�0���m+\ff,-����0�" height=5433666 module=consensus protocol-version=0 server=node software-version=HEAD-8f2f0f7bf917eac2b405db497a21a0b3c5073f86
4:09PM INF ABCI Replay Blocks appHeight=5433666 module=consensus server=node stateHeight=5433666 storeHeight=5433667
4:09PM INF Replay last block using real app module=consensus server=node
panic: UnmarshalJSON cannot decode empty bytes

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.Get({{0x2b918e8, 0xc00018f190}, 0xc000166fb8, {0x2b6c958, 0xc003378510}, {0x2b6c9a8, 0xc003378610}, {0xc00171e720, 0x9, 0x21}, ...}, ...)
    github.com/cosmos/cosmos-sdk@v0.45.5/x/params/types/subspace.go:109 +0x307
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.GetParamSet({{0x2b918e8, 0xc00018f190}, 0xc000166fb8, {0x2b6c958, 0xc003378510}, {0x2b6c9a8, 0xc003378610}, {0xc00171e720, 0x9, 0x21}, ...}, ...)
    github.com/cosmos/cosmos-sdk@v0.45.5/x/params/types/subspace.go:222 +0x145
github.com/evmos/ethermint/x/feemarket/keeper.Keeper.GetParams(...)
    github.com/evmos/ethermint@v0.16.0/x/feemarket/keeper/params.go:12
github.com/evmos/ethermint/x/feemarket/keeper.Keeper.CalculateBaseFee({{0x2b918e8, 0xc00018f190}, {0x2b6c958, 0xc0033785e0}, {0x2b6c9a8, 0xc003378630}, {{0x2b918e8, 0xc00018f190}, 0xc000166fb8, {0x2b6c958, ...}, ...}}, ...)
    github.com/evmos/ethermint@v0.16.0/x/feemarket/keeper/eip1559.go:17 +0x125
github.com/evmos/ethermint/x/feemarket/keeper.(*Keeper).BeginBlock(_, {{0x2b849e8, 0xc0000ec140}, {0x2b935e0, 0xc004e272c0}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, ...}, ...}, ...)
    github.com/evmos/ethermint@v0.16.0/x/feemarket/keeper/abci.go:15 +0xf8
github.com/evmos/ethermint/x/feemarket.AppModule.BeginBlock(...)
    github.com/evmos/ethermint@v0.16.0/x/feemarket/module.go:148
github.com/cosmos/cosmos-sdk/types/module.(*Manager).BeginBlock(_, {{0x2b849e8, 0xc0000ec140}, {0x2b935e0, 0xc004e272c0}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, ...}, ...}, ...)
    github.com/cosmos/cosmos-sdk@v0.45.5/types/module/module.go:479 +0x3a2
github.com/functionx/fx-core/app.(*App).BeginBlocker(_, {{0x2b849e8, 0xc0000ec140}, {0x2b935e0, 0xc004e272c0}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, ...}, ...}, ...)
    github.com/functionx/fx-core/app/app.go:755 +0x85
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).BeginBlock(_, {{0xc00b4c5720, 0x20, 0x20}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, {0x25584361, ...}, ...}, ...})
    github.com/cosmos/cosmos-sdk@v0.45.5/baseapp/abci.go:194 +0x97c
github.com/tendermint/tendermint/abci/client.(*localClient).BeginBlockSync(_, {{0xc00b4c5720, 0x20, 0x20}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, {0x25584361, ...}, ...}, ...})
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/abci/client/local_client.go:280 +0x118
github.com/tendermint/tendermint/proxy.(*appConnConsensus).BeginBlockSync(_, {{0xc00b4c5720, 0x20, 0x20}, {{0xb, 0x0}, {0xc00b453110, 0x6}, 0x52e943, {0x25584361, ...}, ...}, ...})
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/proxy/app_conn.go:81 +0x55
github.com/tendermint/tendermint/state.execBlockOnProxyApp({0x2b85970?, 0xc0010a41e0}, {0x2b8bb10, 0xc004abe680}, 0xc00b4ae000, {0x2b922f8, 0xc004a81a00}, 0x52e942?)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/state/execution.go:307 +0x3dd
github.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(_, {{{0xb, 0x0}, {0xc004a83708, 0x7}}, {0xc004a83720, 0x6}, 0x1, 0x52e942, {{0xc0043d00e0, ...}, ...}, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/state/execution.go:140 +0x171
github.com/tendermint/tendermint/consensus.(*Handshaker).replayBlock(_, {{{0xb, 0x0}, {0xc004a83708, 0x7}}, {0xc004a83720, 0x6}, 0x1, 0x52e942, {{0xc0043d00e0, ...}, ...}, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/consensus/replay.go:503 +0x23c
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(_, {{{0xb, 0x0}, {0xc004a83708, 0x7}}, {0xc004a83720, 0x6}, 0x1, 0x52e942, {{0xc0043d00e0, ...}, ...}, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/consensus/replay.go:416 +0x7ae
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc00b4df898, {0x2b94518, 0xc0084e2410})
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/consensus/replay.go:268 +0x3c8
github.com/tendermint/tendermint/node.doHandshake({_, _}, {{{0xb, 0x0}, {0xc004a83708, 0x7}}, {0xc004a83720, 0x6}, 0x1, 0x52e942, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/node/node.go:325 +0x1b8
github.com/tendermint/tendermint/node.NewNode(0xc000119e00, {0x2b81520, 0xc0013b7540}, 0xc0013bb6d0, {0x2b67960, 0xc0081d94a0}, 0x0?, 0x0?, 0xc0013bb910, {0x2b85970, ...}, ...)
    github.com/tendermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/node/node.go:733 +0x577
github.com/evmos/ethermint/server.startInProcess(_, {{0x0, 0x0, 0x0}, {0x2b9c6a8, 0xc0013b2ab0}, {0x0, 0x0}, {0x2b891a8, 0xc00018f190}, ...}, ...)
    github.com/evmos/ethermint@v0.16.0/server/start.go:303 +0xc33
github.com/evmos/ethermint/server.StartCmd.func2(0xc0010d5180?, {0x3cc31a0?, 0x0?, 0x0?})
    github.com/evmos/ethermint@v0.16.0/server/start.go:117 +0x228
github.com/spf13/cobra.(*Command).execute(0xc0010d5180, {0x3cc31a0, 0x0, 0x0})
    github.com/spf13/cobra@v1.5.0/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc000151680)
    github.com/spf13/cobra@v1.5.0/command.go:990 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.5.0/command.go:918
github.com/spf13/cobra.(*Command).ExecuteContext(...)
    github.com/spf13/cobra@v1.5.0/command.go:911
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x0?, {0xc00051a1b0, 0x14})
    github.com/cosmos/cosmos-sdk@v0.45.5/server/cmd/execute.go:36 +0x1eb
main.main()
    github.com/functionx/fx-core/cmd/main.go:12 +0x2c
ERROR: 2
dermint/tendermint@v0.34.20-0.20220517115723-e6f071164839/node/node.go:733 +0x577
github.com/evmos/ethermint/server.startInProcess(_, {{0x0, 0x0, 0x0}, {0x2b9c6a8, 0xc0013b2ab0}, {0x0, 0x0}, {0x2b891a8, 0xc00018f190}, ...}, ...)
    github.com/evmos/ethermint@v0.16.0/server/start.go:303 +0xc33
github.com/evmos/ethermint/server.StartCmd.func2(0xc0010d5180?, {0x3cc31a0?, 0x0?, 0x0?})
    github.com/evmos/ethermint@v0.16.0/server/start.go:117 +0x228
github.com/spf13/cobra.(*Command).execute(0xc0010d5180, {0x3cc31a0, 0x0, 0x0})
    github.com/spf13/cobra@v1.5.0/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc000151680)
    github.com/spf13/cobra@v1.5.0/command.go:990 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.5.0/command.go:918
github.com/spf13/cobra.(*Command).ExecuteContext(...)
    github.com/spf13/cobra@v1.5.0/command.go:911
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x0?, {0xc00051a1b0, 0x14})
    github.com/cosmos/cosmos-sdk@v0.45.5/server/cmd/execute.go:36 +0x1eb
main.main()
    github.com/functionx/fx-core/cmd/main.go:12 +0x2c
ERROR: 2

I had to re-sync validator from scratch.

zakir-code commented 2 years ago

The fxcored v2 version is incompatible with the v1 version. If you need to synchronize blocks before the v2.1.1 upgrade height (5,713,000), you need to use the v1 version for synchronization.