smartcontracts/simple-optimism-node

L2Geth container constantly crashing

Opened this issue · 3 comments

Issue: I manually downloaded the snapshot for op-l2geth and copy it the respect path /geth/ but container keeps crashing.

.env config

###############################################################################
#                                ↓ REQUIRED ↓                                 #
###############################################################################

# Network to run the node on ("mainnet" or "goerli")
NETWORK_NAME=mainnet

# Type of node to run ("full" or "archive"), note that "archive" is 10x bigger
NODE_TYPE=archive

###############################################################################
#                            ↓ REQUIRED (LEGACY) ↓                            #
###############################################################################

# L1 node to get chain data from (L2 sync no longer supported)
DATA_TRANSPORT_LAYER__RPC_ENDPOINT=https://rpc.ankr.com/eth/<api key>

###############################################################################
#                            ↓ REQUIRED (BEDROCK) ↓                           #
###############################################################################

# Where to get the Bedrock database ("download" or "migration"), see README
BEDROCK_SOURCE=download

# L1 node that the op-node (Bedrock) will get chain data from
OP_NODE__RPC_ENDPOINT=https://rpc.ankr.com/eth/<api key>

# Type of RPC that op-node is connected to, see README
OP_NODE__RPC_TYPE=quicknode

# Reference L2 node to run healthcheck against
HEALTHCHECK__REFERENCE_RPC_PROVIDER=https://mainnet.optimism.io

# L1 node to run fault detection against
FAULT_DETECTOR__L1_RPC_PROVIDER=https://rpc.ankr.com/eth/<api key>

###############################################################################
#                            ↓ OPTIONAL (BEDROCK) ↓                           #
###############################################################################

# Optional provider to serve legacy RPC requests, see README
OP_GETH__HISTORICAL_RPC=

###############################################################################
#                                ↓ OPTIONAL ↓                                 #
###############################################################################

# Feel free to customize your image tag if you want, uses "latest" by default
# See here for all available images: https://hub.docker.com/u/ethereumoptimism
IMAGE_TAG__L2GETH=
IMAGE_TAG__DTL=
IMAGE_TAG__HEALTCHECK=
IMAGE_TAG__FAULT_DETECTOR=
IMAGE_TAG__PROMETHEUS=
IMAGE_TAG__GRAFANA=
IMAGE_TAG__INFLUXDB=
IMAGE_TAG__OP_GETH=
IMAGE_TAG__OP_NODE=

# Exposed server ports (must be unique)
# See docker-compose.yml for default values
PORT__L2GETH_HTTP=
PORT__L2GETH_WS=
PORT__DTL=
PORT__HEALTHCHECK_METRICS=
PORT__FAULT_DETECTOR_METRICS=
PORT__PROMETHEUS=
PORT__GRAFANA=
PORT__INFLUXDB=
PORT__TORRENT_UI=
PORT__TORRENT=
PORT__OP_GETH_HTTP=
PORT__OP_GETH_WS=
PORT__OP_NODE_P2P=

Log

op-l2geth-1  | INFO [12-15|05:28:37.350] Connected to upstream service 
op-l2geth-1  | panic: runtime error: invalid memory address or nil pointer dereference
op-l2geth-1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xbe9800]
op-l2geth-1  | 
op-l2geth-1  | goroutine 1 [running]:
op-l2geth-1  | github.com/ethereum-optimism/optimism/l2geth/rollup.(*SyncService).initializeLatestL1(0xc0006836c0, 0xc000149b80)
op-l2geth-1  |  /app/l2geth/rollup/sync_service.go:291 +0x100
op-l2geth-1  | github.com/ethereum-optimism/optimism/l2geth/rollup.NewSyncService({0x12d1470?, 0xc00013c000?}, {0x9c40, 0x1, 0x1, 0xe4e1c0, {0xc000042043, 0xf}, {0x0, 0x0, ...}, ...}, ...)
op-l2geth-1  |  /app/l2geth/rollup/sync_service.go:196 +0xce5
op-l2geth-1  | github.com/ethereum-optimism/optimism/l2geth/eth.New(0xc000149ea0, 0xc00037ac00)
op-l2geth-1  |  /app/l2geth/eth/backend.go:209 +0x1007
op-l2geth-1  | github.com/ethereum-optimism/optimism/l2geth/cmd/utils.RegisterEthService.func2(0xc0003a2510?)
op-l2geth-1  |  /app/l2geth/cmd/utils/flags.go:1727 +0x26
op-l2geth-1  | github.com/ethereum-optimism/optimism/l2geth/node.(*Node).Start(0xc000452000)
op-l2geth-1  |  /app/l2geth/node/node.go:206 +0x5c9
op-l2geth-1  | github.com/ethereum-optimism/optimism/l2geth/cmd/utils.StartNode(0xc000452000)
op-l2geth-1  |  /app/l2geth/cmd/utils/cmd.go:67 +0x25
op-l2geth-1  | main.startNode(0xc0001b5600?, 0xc000452000)
op-l2geth-1  |  /app/l2geth/cmd/geth/main.go:341 +0x65
op-l2geth-1  | main.geth(0xc0001b5600)
op-l2geth-1  |  /app/l2geth/cmd/geth/main.go:329 +0xf3
op-l2geth-1  | gopkg.in/urfave/cli%2ev1.HandleAction({0xefc760?, 0x11704c0?}, 0xc00038b000?)
op-l2geth-1  |  /go/pkg/mod/gopkg.in/urfave/cli.v1@v1.20.0/app.go:490 +0x5a
op-l2geth-1  | gopkg.in/urfave/cli%2ev1.(*App).Run(0xc0000f1040, {0xc0001248f0, 0xd, 0xd})
op-l2geth-1  |  /go/pkg/mod/gopkg.in/urfave/cli.v1@v1.20.0/app.go:264 +0x71c
op-l2geth-1  | main.main()
op-l2geth-1  |  /app/l2geth/cmd/geth/main.go:269 +0x35
op-l2geth-1  | errexit         on
op-l2geth-1  | noglob          off
op-l2geth-1  | ignoreeof       off
op-l2geth-1  | monitor         off
op-l2geth-1  | noexec          off
op-l2geth-1  | xtrace          off
op-l2geth-1  | verbose         off
op-l2geth-1  | noclobber       off
op-l2geth-1  | allexport       off
op-l2geth-1  | notify          off
op-l2geth-1  | nounset         off
op-l2geth-1  | vi              off
op-l2geth-1  | pipefail        off
op-l2geth-1  | errexit         on
op-l2geth-1  | noglob          off
op-l2geth-1  | ignoreeof       off
op-l2geth-1  | monitor         off
op-l2geth-1  | noexec          off
op-l2geth-1  | xtrace          off
op-l2geth-1  | verbose         off
op-l2geth-1  | noclobber       off
op-l2geth-1  | allexport       off
op-l2geth-1  | notify          off
op-l2geth-1  | nounset         off
op-l2geth-1  | vi              off
op-l2geth-1  | pipefail        off
op-l2geth-1  | INFO [12-15|05:28:38.395] Enabling metrics collection 
op-l2geth-1  | INFO [12-15|05:28:38.395] Enabling metrics export to InfluxDB 
op-l2geth-1  | INFO [12-15|05:28:38.396] Maximum peer count                       ETH=50 LES=0 total=50
op-l2geth-1  | INFO [12-15|05:28:38.396] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
op-l2geth-1  | INFO [12-15|05:28:38.396] Starting peer-to-peer node               instance=Geth/v1.9.10-stable/linux-amd64/go1.18
op-l2geth-1  | INFO [12-15|05:28:38.396] Allocated trie memory caches             clean=512.00MiB dirty=0.00B
op-l2geth-1  | INFO [12-15|05:28:38.396] Allocated cache and file handles         database=/geth/geth/chaindata cache=512.00MiB handles=524288```

Can you try using https://github.com/Chomtana/simple-optimism-node fork instead of this one as it has been patched with soyboy's pull request to fix compatibility with OP canyon

Can you try using https://github.com/Chomtana/simple-optimism-node fork instead of this one as it has been patched with soyboy's pull request to fix compatibility with OP canyon

I think after two sleepless nights I may have found the root cause. Too early to tell for sure but it ain't crashing.

ETH1_SYNC_SERVICE_ENABLE - The Optimism documentation says it should be false but it is set to true in /envs/mainnet/l2geth.env

Will adjust to using the up-to-date one in the docs