Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genesis.json: failed to unmarshal feeibc genesis state: EOF #17198

Closed
alpha-omega-labs opened this issue Jul 30, 2023 · 7 comments
Closed

genesis.json: failed to unmarshal feeibc genesis state: EOF #17198

alpha-omega-labs opened this issue Jul 30, 2023 · 7 comments
Labels

Comments

@alpha-omega-labs
Copy link

Hello,
We exported out big genesis.json state via state export command and trying to validate it using cronos fork, got this error while validation:
genesis.json: failed to unmarshal feeibc genesis state: EOF

There is no fee field within IBC module exported and native cronos genesis.json examples (testnet) also no have mention of fee whithin IBC.

Can you please point on how to resolve that issue in genesis.json

Thank you

@julienrbrt
Copy link
Member

Possibly this is more an issue for the cronos repo?
Could you give a bit more info (sdk version, binary, command ran, genesis link, etc..)

@julienrbrt julienrbrt added the S:needs more info This bug can't be addressed until more information is provided by the reporter. label Jul 30, 2023
@alpha-omega-labs
Copy link
Author

Yes!
Trying to radical upgrade by exporting state to/via genesis.json from this version: https://github.com/alpha-omega-labs/genesisd SDK v0.44.5-patch to this version: https://github.com/alpha-omega-labs/genesisL1 SDK v0.46.11
This is an exported genesis.json (its very large due to data stored there and snappy compression disabled as suggested here: #16915):
135.181.5.216/genesis.json

During exact same rounds of cronosd validate-genesis --trace 2 different errors appear (idk why its different time to time):

  1. failed to unmarshal feeibc genesis state: EOF
  2. and recently more often just: genesis.json: failed to unmarshal cronos genesis state: EOF

Using release version 1.0.9 of cronosd with disabled snappy compression due to genesis.json size.

Thank you!

@julienrbrt
Copy link
Member

Have you made use of the migrate genesis command to make the genesis compatible with the targeted SDK version?

If it’s a v0.44 genesis you probably need to migrate it to v0.46. (appd genesis migrate v0.46)

@alpha-omega-labs
Copy link
Author

Have you made use of the migrate genesis command to make the genesis compatible with the targeted SDK version?

If it’s a v0.44 genesis you probably need to migrate it to v0.46. (appd genesis migrate v0.46)

Yes, migration successfully done with cronosd migrate v0.46 genesis.json > genesis46.json command

After, migrated genesis46.json validation still throw same error while validation:

failed to unmarshal feeibc genesis state: EOF

@alpha-omega-labs
Copy link
Author

Here is IBC state exported from our large genesis.json separately (and also cronos mainnet genesis.json ibc section), there is nothing about fee there.
Maybe its in other part to look for it?

142.44.143.79/ibc_state_genesisd.txt
142.44.143.79/cronos_ibc.txt

@julienrbrt julienrbrt removed the S:needs more info This bug can't be addressed until more information is provided by the reporter. label Aug 1, 2023
@alpha-omega-labs
Copy link
Author

Starting node with this failed to validate genesis.json throw following error:

12:28PM INF Unlocking keyring
12:28PM INF starting ABCI with Tendermint
12:29PM INF service start impl=multiAppConn module=proxy msg={} server=node
12:29PM INF service start connection=query impl=localClient module=abci-client msg={} server=node
12:29PM INF service start connection=snapshot impl=localClient module=abci-client msg={} server=node
12:29PM INF service start connection=mempool impl=localClient module=abci-client msg={} server=node
12:29PM INF service start connection=consensus impl=localClient module=abci-client msg={} server=node
12:29PM INF service start impl=EventBus module=events msg={} server=node
12:29PM INF service start impl=PubSub module=pubsub msg={} server=node
12:29PM INF service start impl=IndexerService module=txindex msg={} server=node
12:29PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 server=node software-version=1.0.9-3-g23e20bf
12:29PM INF ABCI Replay Blocks appHeight=0 module=consensus server=node stateHeight=0 storeHeight=0
12:30PM INF initializing blockchain state from genesis.json
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x14137d8]

goroutine 83 [running]:
math/big.(*Int).Sign(...)
	math/big/int.go:41
github.com/cosmos/cosmos-sdk/types.Dec.IsNegative(...)
	github.com/cosmos/[email protected]/types/decimal.go:211
github.com/cosmos/cosmos-sdk/x/staking/types.validateMinCommissionRate({0x2a4d6a0?, 0x0?})
	github.com/cosmos/[email protected]/x/staking/types/params.go:226 +0x58
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.SetParamSet({{0x3bceb10, 0xc0016f8960}, 0xc00060c028, {0x3ba0120, 0xc001e18b70}, {0x3ba0170, 0xc001e18c30}, {0xc001dd6270, 0x7, 0x18}, ...}, ...)
	github.com/cosmos/[email protected]/x/params/types/subspace.go:262 +0x20d
github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.SetParams(...)
	github.com/cosmos/[email protected]/x/staking/keeper/params.go:71
github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.InitGenesis({{0x3ba0120, 0xc001e18b20}, {0x3bceb10, 0xc0016f8960}, {0x3bc0e20, 0xc001736a00}, {0x7f31d444b040, 0xc0016ffce0}, {0x3bcdff0, 0xc001175020}, ...}, ...)
	github.com/cosmos/[email protected]/x/staking/keeper/genesis.go:28 +0x1c5
github.com/cosmos/cosmos-sdk/x/staking.AppModule.InitGenesis({{{0x3bd6998, 0xc0016f8960}}, {{0x3ba0120, 0xc001e18b20}, {0x3bceb10, 0xc0016f8960}, {0x3bc0e20, 0xc001736a00}, {0x7f31d444b040, 0xc0016ffce0}, ...}, ...}, ...)
	github.com/cosmos/[email protected]/x/staking/module.go:152 +0x105
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(_, {{0x3bbbd80, 0xc000054090}, {0x3bcf520, 0xc000e1c700}, {{0x0, 0x0}, {0xc001750000, 0xc}, 0x67049f, ...}, ...}, ...)
	github.com/cosmos/[email protected]/types/module/module.go:322 +0x363
github.com/crypto-org-chain/cronos/app.(*App).InitChainer(_, {{0x3bbbd80, 0xc000054090}, {0x3bcf520, 0xc000e1c700}, {{0x0, 0x0}, {0xc001750000, 0xc}, 0x67049f, ...}, ...}, ...)
	github.com/crypto-org-chain/cronos/app/app.go:835 +0x1cf
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc001ea4380, {{0x1, 0xed9ed0804, 0x0}, {0xc001750000, 0xc}, 0xc0001e7580, {0xc001b2b680, 0x2c, 0x2c}, ...})
	github.com/cosmos/[email protected]/baseapp/abci.go:71 +0x3f5
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc00129cd20, {{0x1, 0xed9ed0804, 0x0}, {0xc001750000, 0xc}, 0xc0001e7580, {0xc001b2b680, 0x2c, 0x2c}, ...})
	github.com/tendermint/[email protected]/abci/client/local_client.go:272 +0x118
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc0011daba0?, {{0x1, 0xed9ed0804, 0x0}, {0xc001750000, 0xc}, 0xc0001e7580, {0xc001b2b680, 0x2c, 0x2c}, ...})
	github.com/tendermint/[email protected]/proxy/app_conn.go:77 +0x55
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(_, {{{0xb, 0x0}, {0x2a7b274, 0x7}}, {0xc001750000, 0xc}, 0x67049f, 0x0, {{0x0, ...}, ...}, ...}, ...)
	github.com/tendermint/[email protected]/consensus/replay.go:319 +0xf18
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc0006a3690, {0x3bd21e8, 0xc00052a000})
	github.com/tendermint/[email protected]/consensus/replay.go:268 +0x3d4
github.com/tendermint/tendermint/node.doHandshake({_, _}, {{{0xb, 0x0}, {0x2a7b274, 0x7}}, {0xc001750000, 0xc}, 0x67049f, 0x0, ...}, ...)
	github.com/tendermint/[email protected]/node/node.go:329 +0x1b8
github.com/tendermint/tendermint/node.NewNode(0xc001218dc0, {0x3bb8000, 0xc001ea61e0}, 0xc001715510, {0x3b974c0, 0xc001ac9ce0}, 0x1?, 0x537e968?, 0xc0017156a0, {0x3bbd408, ...}, ...)
	github.com/tendermint/[email protected]/node/node.go:779 +0x597
github.com/evmos/ethermint/server.startInProcess(_, {{0x0, 0x0, 0x0}, {0x3be37a8, 0xc001a56570}, 0x0, {0x0, 0x0}, {0x3bd6998, ...}, ...}, ...)
	github.com/evmos/[email protected]/server/start.go:330 +0xba7
github.com/evmos/ethermint/server.StartCmd.func2.2()
	github.com/evmos/[email protected]/server/start.go:144 +0x5e
github.com/evmos/ethermint/server.wrapCPUProfile.func2()
	github.com/evmos/[email protected]/server/start.go:640 +0x29
created by github.com/evmos/ethermint/server.wrapCPUProfile
	github.com/evmos/[email protected]/server/start.go:639 +0x36a

@julienrbrt
Copy link
Member

Given that Cronos is resolving this in their chain, I'm going to close this.

@julienrbrt julienrbrt closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants