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

[BUG] The absence of a check for the correctness of genesis-file caused the node to panic at runtime. #2011

Closed
sdjasj opened this issue Dec 29, 2024 · 1 comment
Labels
bug Something isn't working linear Created by Linear-GitHub Sync

Comments

@sdjasj
Copy link

sdjasj commented Dec 29, 2024

Seid version
name: sei
server_name:
version: v4.1.7-evm-devnet
commit: 6e0c934
build_tags: netgo ledger,
go: go version go1.22.4 linux/amd64
build_deps:

  • cosmossdk.io/errors@v1.0.0
  • filippo.io/edwards25519@v1.0.0-rc.1
  • github.com/99designs/keyring@v1.2.1

Chain ID
Local 4-docker-node chain

Describe the bug
I changed the value of genesis-file in the config.toml file to a nonexistent path. After restarting the node, it panicked during runtime with the error: panic: runtime error: invalid memory address or nil pointer dereference because the existence of genesisFile was not checked beforehand.

To Reproduce
Steps to reproduce the behavior:

  1. Change the value of genesis-file in the config.toml file to a nonexistent path
  2. Restart the node
  3. panic: runtime error: invalid memory address or nil pointer dereference occurs

Expected behavior
SEI should properly handle abnormal values for genesis-file and provide users with a friendly error message, rather than panicking at runtime.

Screenshots
Here is the code snippet with the bug:
d2ffcaf4406bd56f5b18978c05c270b

Additional context
Here is the panic log.
seid-3.log

Here is the config file

proxy-app = "tcp://127.0.0.1:26658"
moniker = "sei-node-0"
mode = "validator"
db-backend = "goleveldb"
db-dir = "data"
log-level = ""
log-format = "plain"
genesis-file = "priority"
node-key-file = "config/node_key.json"
abci = "socket"
filter-peers = false

[priv-validator]
key-file = "config/priv_validator_key.json"
state-file = "data/priv_validator_state.json"
laddr = ""
client-certificate-file = ""
client-key-file = ""
root-ca-file = ""

[rpc]
laddr = "tcp://0.0.0.0:26657"
cors-allowed-origins = []
cors-allowed-methods = [ "HEAD", "GET", "POST",]
cors-allowed-headers = [ "Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time",]
unsafe = false
max-open-connections = 900
max-subscription-clients = 100
max-subscriptions-per-client = 5
experimental-disable-websocket = false
event-log-window-size = "30s"
event-log-max-items = 0
timeout-broadcast-tx-commit = "10s"
max-body-bytes = 1000000
max-header-bytes = 1048576
tls-cert-file = ""
tls-key-file = ""
pprof-laddr = "localhost:6060"

[p2p]
queue-type = "priority"
laddr = "tcp://0.0.0.0:26656"
external-address = ""
bootstrap-peers = ""
persistent-peers = "bc6492eb3874b3ba9de6f31c69debafc16712751@192.168.10.10:26656,0410b4c2854451c3570413fa85ee50a074b9d807@192.168.10.12:26656,8b3fdd73de6cd9a0b05863a9946101f6a77e4ce4@192.168.10.11:26656"
upnp = false
max-connections = 200
max-incoming-connection-attempts = 100
pex = true
private-peer-ids = ""
dial-timeout = "3s"
flush-throttle-timeout = "10ms"
max-packet-msg-payload-size = 102400
send-rate = 204800000
recv-rate = 204800000

[mempool]
broadcast = true
size = 5000
cache-size = 50000
keep-invalid-txs-in-cache = false
max-tx-bytes = 20485760
max-batch-bytes = 0
ttl-duration = "0s"

[statesync]
enable = false
rpc-servers = ""
trust-height = 0
trust-hash = ""
trust-period = "168h0m0s"
discovery-time = "15s"
chunk-request-timeout = "15s"
fetchers = "4"

[consensus]
wal-file = "data/cs.wal/wal"
unsafe-propose-timeout-override = "3s"
unsafe-propose-timeout-delta-override = "500ms"
unsafe-vote-timeout-override = "50ms"
unsafe-vote-timeout-delta-override = "500ms"
unsafe-commit-timeout-override = "50ms"
unsafe-bypass-commit-timeout-override = false
create-empty-blocks = true
create-empty-blocks-interval = "0s"
peer-gossip-sleep-duration = "100ms"
peer-query-maj23-sleep-duration = "2s"
gossip-tx-key-only = true

[tx-index]
indexer = [ "kv",]
psql-conn = ""

[instrumentation]
prometheus = true
prometheus-listen-addr = ":26660"
max-open-connections = 3
namespace = "tendermint"

@sdjasj sdjasj added bug Something isn't working linear Created by Linear-GitHub Sync labels Dec 29, 2024
@cordt-sei
Copy link
Contributor

This is not a bug. Please stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

2 participants