ethereum-optimism / op-geth

GNU Lesser General Public License v3.0
281 stars 735 forks source link

Crash deploying new mainnet node without --syncmode=full #213

Open heartache4 opened 8 months ago

heartache4 commented 8 months ago

System information

Geth version: Geth/v0.1.0-unstable-c6b416da/linux-amd64/go1.20.12 CL client & version: any OS & Version: Linux Commit hash : c6b416da

Expected behaviour

Starting op-geth from the provided Bedrock snapshot doesn't crash when syncmode is default (= snap). You can't sync via snap until after you run syncmode=full for a little bit first because of this bug.

Actual behaviour

op-geth crashes near the beginning after launching without syncmode=full:

INFO [01-04|05:13:45.380] Loaded most recent local block           number=105,235,063 hash=dbf6a8..c2afd3 td=0 age=6mo3w1d
INFO [01-04|05:13:45.380] Loaded most recent local finalized block number=105,235,063 hash=dbf6a8..c2afd3 td=0 age=6mo3w1d
INFO [01-04|05:13:45.715] Initialising Ethereum protocol           network=10         dbversion=8
INFO [01-04|05:13:45.715] Initialized transaction indexer          limit=2,350,000
INFO [01-04|05:13:45.715] Regenerated local transaction journal    transactions=0 accounts=0
INFO [01-04|05:13:45.718] Enabled snap sync                        head=105,235,063 hash=dbf6a8..c2afd3
INFO [01-04|05:13:45.719] Chain post-merge, sync via beacon client 
INFO [01-04|05:13:45.719] Gasprice oracle is ignoring threshold set threshold=2
WARN [01-04|05:13:45.721] Engine API enabled                       protocol=eth
INFO [01-04|05:13:45.721] Starting peer-to-peer node               instance=Geth/v0.1.0-unstable-c6b416da/linux-amd64/go1.20.12
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,360 error=EOF
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,369 error=EOF
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,358 error=EOF
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,357 error=EOF
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,350 error=EOF
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,339 error=EOF
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,349 error=EOF
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,359 error=EOF
...
WARN [01-04|05:13:47.383] Failed to decode block body              block=105,234,368 error=EOF
CRIT [01-04|05:13:47.383] Failed writing batch to db               error="leveldb: closed"

Steps to reproduce the behaviour

Try following the mainnet OP node setup tutorial, but omit --syncmode=full (enabling snap).

Backtrace

None

Note

If this can't easily be fixed, please at least update the documentation/tutorial so others know about this.