crypto-org-chain / cronos

Cronos is the first Ethereum-compatible blockchain network built on Cosmos SDK technology. Cronos aims to massively scale the DeFi, GameFi, and overall Web3 user community by providing builders with the ability to instantly port apps and crypto assets from other chains while benefiting from low transaction fees, high throughput, and fast finality.
Other
292 stars 234 forks source link

Unable to start cronos mainnet node #1076

Closed Johnaverse closed 1 year ago

Johnaverse commented 1 year ago

Describe the bug Unable to start cronos mainnet node with v1.0.9 binary

To Reproduce Steps to reproduce the behavior:

wget https://github.com/crypto-org-chain/cronos/releases/download/v1.0.9/cronos_1.0.9_Linux_x86_64.tar.gz
tar -zxvf ./cronos_1.0.9_Linux_x86_64.tar.gz
cd ./bin
./cronosd init pegasus-node --chain-id cronosmainnet_25-1
curl https://raw.githubusercontent.com/crypto-org-chain/cronos-mainnet/master/cronosmainnet_25-1/genesis.json > ~/.cronos/config/genesis.json
 sed -i.bak -E 's#^(seeds[[:space:]]+=[[:space:]]+).*$#\1"0d5cf1394a1cfde28dc8f023567222abc0f47534@cronos-seed-0.crypto.org:26656,3032073adc06d710dd512240281637c1bd0c8a7b@cronos-seed-1.crypto.org:26656,04f43116b4c6c70054d9c2b7485383df5b1ed1da@cronos-seed-2.crypto.org:26656,337377dcda43d79c537d2c4d93ad3b698ce9452e@bd-cronos-mainnet-seed-node-01.bdnodes.net:26656"#' ~/.cronos/config/config.toml
sed -i.bak -E 's#^(create_empty_blocks_interval[[:space:]]+=[[:space:]]+).*$#\1"5s"#' ~/.cronos/config/config.toml
sed -i.bak -E 's#^(timeout_commit[[:space:]]+=[[:space:]]+).*$#\1"5s"#' ~/.cronos/config/config.toml
 sed -i.bak -E 's#^(pruning[[:space:]]+=[[:space:]]+).*$#\1"nothing"#' ~/.cronos/config/app.toml
./cronosd start

Expected behavior Expected to cronosd service start and start sync with other node

Error Logs

10:08PM INF Unlocking keyring
10:08PM INF starting ABCI with Tendermint
10:08PM INF service start impl=multiAppConn module=proxy msg={} server=node
10:08PM INF service start connection=query impl=localClient module=abci-client msg={} server=node
10:08PM INF service start connection=snapshot impl=localClient module=abci-client msg={} server=node
10:08PM INF service start connection=mempool impl=localClient module=abci-client msg={} server=node
10:08PM INF service start connection=consensus impl=localClient module=abci-client msg={} server=node
10:08PM INF service start impl=EventBus module=events msg={} server=node
10:08PM INF service start impl=PubSub module=pubsub msg={} server=node
10:08PM INF service start impl=IndexerService module=txindex msg={} server=node
10:08PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 server=node software-version=v1.0.9
10:08PM INF ABCI Replay Blocks appHeight=0 module=consensus server=node stateHeight=0 storeHeight=0
10:08PM 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=0x14d3258]

goroutine 120 [running]:
math/big.(*Int).Sign(...)
    math/big/int.go:38
github.com/cosmos/cosmos-sdk/types.Dec.IsNegative(...)
    github.com/cosmos/cosmos-sdk/types/decimal.go:211
github.com/cosmos/cosmos-sdk/x/staking/types.validateMinCommissionRate({0x317b340?, 0x0?})
    github.com/cosmos/cosmos-sdk/x/staking/types/params.go:226 +0x58
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.SetParamSet({{0x437f810, 0xc0016d1700}, 0xc00012e728, {0x434f638, 0xc0015825d0}, {0x434f688, 0xc001582690}, {0xc000056600, 0x7, 0x18}, ...}, ...)
    github.com/cosmos/cosmos-sdk/x/params/types/subspace.go:262 +0x185
github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.SetParams(...)
    github.com/cosmos/cosmos-sdk/x/staking/keeper/params.go:71
github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.InitGenesis({{0x434f638, 0xc001582580}, {0x437f810, 0xc0016d1700}, {0x4370920, 0xc001e7b2c0}, {0x7fbf87fef2b0, 0xc0002c3e40}, {0x437e8f0, 0xc00188eff0}, ...}, ...)
    github.com/cosmos/cosmos-sdk/x/staking/keeper/genesis.go:28 +0x1c5
github.com/cosmos/cosmos-sdk/x/staking.AppModule.InitGenesis({{{0x4387bf8, 0xc0016d1700}}, {{0x434f638, 0xc001582580}, {0x437f810, 0xc0016d1700}, {0x4370920, 0xc001e7b2c0}, {0x7fbf87fef2b0, 0xc0002c3e40}, ...}, ...}, ...)
    github.com/cosmos/cosmos-sdk/x/staking/module.go:152 +0x105
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(_, {{0x436b738, 0xc00019e000}, {0x4380290, 0xc001161c40}, {{0x0, 0x0}, {0xc00112a468, 0x12}, 0x0, ...}, ...}, ...)
    github.com/cosmos/cosmos-sdk/types/module/module.go:322 +0x423
github.com/crypto-org-chain/cronos/app.(*App).InitChainer(_, {{0x436b738, 0xc00019e000}, {0x4380290, 0xc001161c40}, {{0x0, 0x0}, {0xc00112a468, 0x12}, 0x0, ...}, ...}, ...)
    github.com/crypto-org-chain/cronos/app/app.go:835 +0x1cf
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc0011a68c0, {{0x0, 0xed91a6d90, 0x0}, {0xc00112a468, 0x12}, 0xc001e403e0, {0x5ceb6b0, 0x0, 0x0}, ...})
    github.com/cosmos/cosmos-sdk/baseapp/abci.go:71 +0x3f5
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc0016e77a0, {{0x0, 0xed91a6d90, 0x0}, {0xc00112a468, 0x12}, 0xc001e403e0, {0x5ceb6b0, 0x0, 0x0}, ...})
    github.com/tendermint/tendermint/abci/client/local_client.go:272 +0x118
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0x0?, {{0x0, 0xed91a6d90, 0x0}, {0xc00112a468, 0x12}, 0xc001e403e0, {0x5ceb6b0, 0x0, 0x0}, ...})
    github.com/tendermint/tendermint/proxy/app_conn.go:77 +0x55
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(_, {{{0xb, 0x0}, {0x31a993a, 0x7}}, {0xc00112a468, 0x12}, 0x1, 0x0, {{0x0, ...}, ...}, ...}, ...)
    github.com/tendermint/tendermint/consensus/replay.go:319 +0xd78
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc000f53990, {0x4383440, 0xc00157c4e0})
    github.com/tendermint/tendermint/consensus/replay.go:268 +0x3d4
github.com/tendermint/tendermint/node.doHandshake({_, _}, {{{0xb, 0x0}, {0x31a993a, 0x7}}, {0xc00112a468, 0x12}, 0x1, 0x0, ...}, ...)
    github.com/tendermint/tendermint/node/node.go:329 +0x1b8
github.com/tendermint/tendermint/node.NewNode(0xc00114b540, {0x4367570, 0xc00116ac80}, 0xc0015f4a40, {0x4346440, 0xc000616198}, 0x1?, 0x5ceb6b0?, 0xc0015f4bd0, {0x436cdf8, ...}, ...)
    github.com/tendermint/tendermint/node/node.go:779 +0x597
github.com/evmos/ethermint/server.startInProcess(_, {{0x0, 0x0, 0x0}, {0x43945e8, 0xc00115a6c0}, 0x0, {0x0, 0x0}, {0x4387bf8, ...}, ...}, ...)
    github.com/evmos/ethermint/server/start.go:330 +0xb67
github.com/evmos/ethermint/server.StartCmd.func2.2()
    github.com/evmos/ethermint/server/start.go:144 +0x5e
github.com/evmos/ethermint/server.wrapCPUProfile.func2()
    github.com/evmos/ethermint/server/start.go:640 +0x29
created by github.com/evmos/ethermint/server.wrapCPUProfile
    github.com/evmos/ethermint/server/start.go:639 +0x37b

Desktop (please complete the following information):

Same situation with docker Following doc in https://github.com/cronos-labs/cronos-mainnet#seed-nodes

yihuang commented 1 year ago

You can't use v1.0.9 to sync from genesis, the most practical way to sync an archive node is quicksync ^1, otherwise you can try state sync ^2