cosmos / gaia

Cosmos Hub
https://hub.cosmos.network
Apache License 2.0
467 stars 683 forks source link

Unable to start Gaia on fresh install #2865

Closed angusscott closed 7 months ago

angusscott commented 9 months ago

Summary of Bug

Unable to start Gaia on new fresh install when following steps outlined https://hub.cosmos.network/main/hub-tutorials/join-mainnet.html

After following the steps in the tutorial, I'm getting the below exception

4:04PM INF starting node with ABCI Tendermint in-process
4:04PM INF service start impl=multiAppConn module=proxy msg={}
4:04PM INF service start connection=query impl=localClient module=abci-client msg={}
4:04PM INF service start connection=snapshot impl=localClient module=abci-client msg={}
4:04PM INF service start connection=mempool impl=localClient module=abci-client msg={}
4:04PM INF service start connection=consensus impl=localClient module=abci-client msg={}
4:04PM INF service start impl=EventBus module=events msg={}
4:04PM INF service start impl=PubSub module=pubsub msg={}
4:04PM INF service start impl=IndexerService module=txindex msg={}
4:04PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version=v14.1.0
4:04PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1224d46]
goroutine 1 [running]:
math/big.(*Int).Sign(...)
        math/big/int.go:41
github.com/cosmos/cosmos-sdk/types.Dec.IsNegative(...)
        github.com/cosmos/cosmos-sdk@v0.45.16/types/decimal.go:211
github.com/cosmos/cosmos-sdk/x/staking/types.validateValidatorBondFactor({0x1d4ba00?, 0x0?})
        github.com/cosmos/cosmos-sdk@v0.45.16/x/staking/types/params.go:260 +0x46
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.SetParamSet({{0x26370d0, 0xc0010c9370}, 0xc000c87150, {0x2614740, 0xc000e9d5f0}, {0x2614790, 0xc000e9d6b0}, {0xc000d01320, 0x7, 0x20}, ...}, ...)
        github.com/cosmos/cosmos-sdk@v0.45.16/x/params/types/subspace.go:245 +0x22d
github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.SetParams(...)
        github.com/cosmos/cosmos-sdk@v0.45.16/x/staking/keeper/params.go:84
github.com/cosmos/cosmos-sdk/x/staking.InitGenesis({{0x2628fd8, 0xc00013c000}, {0x2636cb0, 0xc000c17640}, {{0x0, 0x0}, {0xc0011b4580, 0xb}, 0x0, {0x0, ...}, ...}, ...}, ...)
        github.com/cosmos/cosmos-sdk@v0.45.16/x/staking/genesis.go:35 +0x265
github.com/cosmos/cosmos-sdk/x/staking.AppModule.InitGenesis({{{0x263c938, 0xc0010c9370}}, {{0x2614740, 0xc000e9d5a0}, {0x26370d0, 0xc0010c9370}, {0x262cb00, 0xc0010c4990}, {0x7f9a5c5c5478, 0xc0004b2c60}, ...}, ...}, ...)
        github.com/cosmos/cosmos-sdk@v0.45.16/x/staking/module.go:157 +0x146
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(_, {{0x2628fd8, 0xc00013c000}, {0x2636cb0, 0xc000c17640}, {{0x0, 0x0}, {0xc0011b4580, 0xb}, 0x4f5b97, ...}, ...}, ...)
        github.com/cosmos/cosmos-sdk@v0.45.16/types/module/module.go:327 +0x23d
github.com/cosmos/gaia/v14/app.(*GaiaApp).InitChainer(_, {{0x2628fd8, 0xc00013c000}, {0x2636cb0, 0xc000c17640}, {{0x0, 0x0}, {0xc0011b4580, 0xb}, 0x4f5b97, ...}, ...}, ...)
        github.com/cosmos/gaia/v14/app/app.go:252 +0x20e
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc000e25500, {{0x0, 0xed5830c36, 0x0}, {0xc0011b4580, 0xb}, 0xc00014dbe0, {0xc000d83c00, 0x7d, 0x7d}, ...})
        github.com/cosmos/cosmos-sdk@v0.45.16/baseapp/abci.go:63 +0x455
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc0000c2f60, {{0x0, 0xed5830c36, 0x0}, {0xc0011b4580, 0xb}, 0xc00014dbe0, {0xc000d83c00, 0x7d, 0x7d}, ...})
        github.com/tendermint/tendermint@v0.34.27/abci/client/local_client.go:272 +0x118
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc0004957a0?, {{0x0, 0xed5830c36, 0x0}, {0xc0011b4580, 0xb}, 0xc00014dbe0, {0xc000d83c00, 0x7d, 0x7d}, ...})
        github.com/tendermint/tendermint@v0.34.27/proxy/app_conn.go:77 +0x55
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(_, {{{0xb, 0x0}, {0x1d744d5, 0x7}}, {0xc0011b4580, 0xb}, 0x4f5b97, 0x0, {{0x0, ...}, ...}, ...}, ...)
        github.com/tendermint/tendermint@v0.34.27/consensus/replay.go:319 +0xf18
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc00a3b5be8, {0x2639b00, 0xc0004920d0})
        github.com/tendermint/tendermint@v0.34.27/consensus/replay.go:268 +0x3d4
github.com/tendermint/tendermint/node.doHandshake({_, _}, {{{0xb, 0x0}, {0x1d744d5, 0x7}}, {0xc0011b4580, 0xb}, 0x4f5b97, 0x0, ...}, ...)
        github.com/tendermint/tendermint@v0.34.27/node/node.go:329 +0x1b8
github.com/tendermint/tendermint/node.NewNode(0xc0004dac80, {0x2625c50, 0xc0004ad220}, 0xc000c08070, {0x260f7e0, 0xc00012cc78}, 0x0?, 0x0?, 0xc000c08290, {0x2629e10, ...}, ...)
        github.com/tendermint/tendermint@v0.34.27/node/node.go:779 +0x597
github.com/cosmos/cosmos-sdk/server.startInProcess(_, {{0x0, 0x0, 0x0}, {0x26462e0, 0xc0004d90b0}, {0x0, 0x0}, {0x262e3b8, 0xc0010c9370}, ...}, ...)
        github.com/cosmos/cosmos-sdk@v0.45.16/server/start.go:280 +0x89b
github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc001116c00?, {0xc0011bf290?, 0x0?, 0x3?})
        github.com/cosmos/cosmos-sdk@v0.45.16/server/start.go:128 +0x169
github.com/spf13/cobra.(*Command).execute(0xc001116c00, {0xc0011bf200, 0x3, 0x3})
        github.com/spf13/cobra@v1.8.0/command.go:983 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001aef00)
        github.com/spf13/cobra@v1.8.0/command.go:1115 +0x425
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        github.com/spf13/cobra@v1.8.0/command.go:1032
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x0?, {0xc00107f880, 0x1e})
        github.com/cosmos/cosmos-sdk@v0.45.16/server/cmd/execute.go:36 +0x1eb
main.main()
        github.com/cosmos/gaia/v14/cmd/gaiad/main.go:16 +0x2c
cosmoshub.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

Version

name: gaia
server_name: gaiad
version: v14.1.0
commit: 0d9408e9169488707f1ad423e87d0df84a30431f
build_tags: netgo,ledger
go: go version go1.20.7 linux/amd64
build_deps:
- cosmossdk.io/api@v0.2.6
- cosmossdk.io/core@v0.5.1
- cosmossdk.io/depinject@v1.0.0-alpha.3
- cosmossdk.io/errors@v1.0.0
- filippo.io/edwards25519@v1.0.0-rc.1
- github.com/99designs/keyring@v1.2.1 => github.com/cosmos/keyring@v1.2.0
- github.com/ChainSafe/go-schnorrkel@v1.0.0
- github.com/Workiva/go-datastructures@v1.0.53
- github.com/armon/go-metrics@v0.4.1
- github.com/beorn7/perks@v1.0.1
- github.com/bgentry/speakeasy@v0.1.1-0.20220910012023-760eaf8b6816
- github.com/btcsuite/btcd/btcec/v2@v2.3.2
- github.com/cenkalti/backoff/v4@v4.1.3
- github.com/cespare/xxhash/v2@v2.1.2
- github.com/coinbase/rosetta-sdk-go@v0.7.9
- github.com/cometbft/cometbft-db@v0.7.0
- github.com/confio/ics23/go@v0.9.0
- github.com/cosmos/btcutil@v1.0.4
- github.com/cosmos/cosmos-db@v0.0.0-20221226095112-f3c38ecb5e32
- github.com/cosmos/cosmos-proto@v1.0.0-beta.1
- github.com/cosmos/cosmos-sdk@v0.45.16 => github.com/cosmos/cosmos-sdk@v0.45.16-ics-lsm
- github.com/cosmos/go-bip39@v1.0.0
- github.com/cosmos/iavl@v0.19.5
- github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4@v4.1.1
- github.com/cosmos/ibc-go/v4@v4.4.2
- github.com/cosmos/interchain-security/v2@v2.0.0 => github.com/cosmos/interchain-security/v2@v2.4.0-lsm
- github.com/cosmos/ledger-cosmos-go@v0.12.4
- github.com/creachadair/taskgroup@v0.3.2
- github.com/davecgh/go-spew@v1.1.2-0.20180830191138-d8f796af33cc
- github.com/decred/dcrd/dcrec/secp256k1/v4@v4.0.1
- github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f
- github.com/dvsekhvalnov/jose2go@v1.5.0
- github.com/felixge/httpsnoop@v1.0.2
- github.com/fsnotify/fsnotify@v1.6.0
- github.com/go-kit/kit@v0.12.0
- github.com/go-kit/log@v0.2.1
- github.com/go-logfmt/logfmt@v0.5.1
- github.com/godbus/dbus@v0.0.0-20190726142602-4481cbc300e2
- github.com/gogo/gateway@v1.1.0
- github.com/gogo/protobuf@v1.3.3 => github.com/regen-network/protobuf@v1.3.3-alpha.regen.1
- github.com/golang/protobuf@v1.5.3
- github.com/golang/snappy@v0.0.4
- github.com/google/btree@v1.1.2
- github.com/google/orderedcode@v0.0.1
- github.com/gorilla/handlers@v1.5.1
- github.com/gorilla/mux@v1.8.1
- github.com/gorilla/websocket@v1.5.0
- github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0
- github.com/grpc-ecosystem/grpc-gateway@v1.16.0
- github.com/gsterjov/go-libsecret@v0.0.0-20161001094733-a6f4afe4910c
- github.com/gtank/merlin@v0.1.1
- github.com/gtank/ristretto255@v0.1.2
- github.com/hashicorp/go-immutable-radix@v1.3.1
- github.com/hashicorp/golang-lru@v0.5.5-0.20210104140557-80c98217689d
- github.com/hashicorp/hcl@v1.0.0
- github.com/hdevalence/ed25519consensus@v0.0.0-20220222234857-c00d1f31bab3
- github.com/iancoleman/orderedmap@v0.2.0
- github.com/improbable-eng/grpc-web@v0.15.0
- github.com/klauspost/compress@v1.17.0
- github.com/lib/pq@v1.10.7
- github.com/libp2p/go-buffer-pool@v0.1.0
- github.com/magiconair/properties@v1.8.7
- github.com/mattn/go-colorable@v0.1.13
- github.com/mattn/go-isatty@v0.0.17
- github.com/matttproud/golang_protobuf_extensions@v1.0.2-0.20181231171920-c182affec369
- github.com/mimoo/StrobeGo@v0.0.0-20210601165009-122bf33a46e0
- github.com/minio/highwayhash@v1.0.2
- github.com/mitchellh/mapstructure@v1.5.0
- github.com/mtibben/percent@v0.2.1
- github.com/pelletier/go-toml/v2@v2.1.0
- github.com/pkg/errors@v0.9.1
- github.com/pmezard/go-difflib@v1.0.1-0.20181226105442-5d4384ee4fb2
- github.com/prometheus/client_golang@v1.14.0
- github.com/prometheus/client_model@v0.3.0
- github.com/prometheus/common@v0.37.0
- github.com/prometheus/procfs@v0.8.0
- github.com/rakyll/statik@v0.1.7
- github.com/rcrowley/go-metrics@v0.0.0-20201227073835-cf1acfcdf475
- github.com/regen-network/cosmos-proto@v0.3.1
- github.com/rs/cors@v1.8.2
- github.com/rs/zerolog@v1.27.0
- github.com/sagikazarmark/slog-shim@v0.1.0
- github.com/spf13/afero@v1.10.0
- github.com/spf13/cast@v1.5.1
- github.com/spf13/cobra@v1.8.0
- github.com/spf13/pflag@v1.0.5
- github.com/spf13/viper@v1.17.0
- github.com/stretchr/testify@v1.8.4
- github.com/subosito/gotenv@v1.6.0
- github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7
- github.com/tendermint/go-amino@v0.16.0
- github.com/tendermint/tendermint@v0.34.27 => github.com/cometbft/cometbft@v0.34.29
- github.com/tendermint/tm-db@v0.6.7
- github.com/tidwall/btree@v1.5.0
- github.com/zondax/hid@v0.9.2
- github.com/zondax/ledger-go@v0.14.3
- golang.org/x/crypto@v0.14.0
- golang.org/x/exp@v0.0.0-20230905200255-921286631fa9
- golang.org/x/net@v0.17.0
- golang.org/x/sys@v0.13.0
- golang.org/x/term@v0.13.0
- golang.org/x/text@v0.13.0
- google.golang.org/genproto@v0.0.0-20230913181813-007df8e322eb
- google.golang.org/genproto/googleapis/api@v0.0.0-20230913181813-007df8e322eb
- google.golang.org/genproto/googleapis/rpc@v0.0.0-20230920204549-e6e6cdab5c13
- google.golang.org/grpc@v1.58.2 => google.golang.org/grpc@v1.33.2
- google.golang.org/protobuf@v1.31.0
- gopkg.in/ini.v1@v1.67.0
- gopkg.in/yaml.v2@v2.4.0
- gopkg.in/yaml.v3@v3.0.1
- nhooyr.io/websocket@v1.8.6
cosmos_sdk_version: v0.45.16

Steps to Reproduce

Follow the tutorial as linked, I am simply running the gaiad start command as outlined


For Admin Use

mmulji-ic commented 9 months ago

Thanks @angusscott for the report, we'll take a look at it.

EDIT Can replicate using state-sync and config (seeds, live peers) from Polkachu , @sainoe should check what's happening with cosmos-sdk/x/staking/types.validateValidatorBondFactor, bond factor should be only be set for validator nodes.

sainoe commented 8 months ago

Thanks @angusscott for reporting the issue!

Could you tell us which option you chose to configure your node in the Sync-Option section of the tutorial?

sainoe commented 7 months ago

@angusscott Has the issue been solved?

sainoe commented 7 months ago

Close the issue as it's considered resolved.