l2geth) is the old pre-Bedrock OVM client running against a preconfigured data directory.
It is required only for upgraded networks like OP Mainnet to serve historical execution traces from before the Bedrock upgrade.
If you’re running a node that had a chain genesis after the Bedrock upgrade, you do not need Legacy Geth.
Legacy Geth (
l2geth) is the pre-Bedrock OVM client and is unrelated to op-geth’s deprecation. l2geth is required on OP Mainnet archive nodes regardless of which post-Bedrock execution client you run (op-reth or op-geth).If you need state proofs for post-Bedrock blocks (for example, for withdrawal proving), see the historical proofs config — that’s a different feature.
Do you need Legacy Geth?
Only requests for historical execution — RPC methods that need to execute pre-Bedrock transactions rather than just read data from the database, such aseth_call and the debug_trace* methods — are routed to Legacy Geth.
Your execution client serves everything else directly.
If you do not need these RPC methods for pre-Bedrock blocks, then you do not need to run Legacy Geth at all.
For the exact lists of which RPC methods are routed to Legacy Geth and which are served by your execution client, see the Legacy Geth configuration reference.
Setup
1. Download the preconfigured data directory
Download and extract the Legacy Geth data directory, which is available at datadirs.optimism.io.2. Configure Legacy Geth
Run Legacy Geth with the minimum required configuration:3. Configure your execution client to route to Legacy Geth
Point your execution client at Legacy Geth with the--rollup.historicalrpc flag; op-reth and op-geth accept the same flag (see the routing-flag reference).
- op-reth
- op-geth
Troubleshooting
Legacy Geth won’t start
Problem:l2geth panics or returns errors on startup
Solution: Ensure USING_OVM=true is set in your environment variables
Invalid execution traces
Problem: Legacy Geth returns invalid or incorrect trace data Solution: Verify thatUSING_OVM=true is set and the data directory is complete and uncorrupted
Execution client not routing to Legacy Geth
Problem: Historical execution requests are not being routed to Legacy Geth Solution: Check that--rollup.historicalrpc is set on your execution client (op-reth or op-geth) with the correct URL to Legacy Geth