op-reth with the historical proofs ExEx (Execution Extension), which allows for saving and serving trie nodes to provide proofs faster.
This tutorial assumes you are using the op-rs fork which contains the historical proof ExEx functionality.
Prerequisites
- Rust toolchain installed.
- Basic understanding of execution client configuration.
Installation
First, clone and build theop-reth binary from the op-rs fork.
./target/release/op-reth.
Initialization Steps
Runningop-reth with historical proofs requires a two-step initialization process:
- Initialize the standard
op-rethdatabase. - Initialize the specific
proofsstorage.
1. Initialize op-reth
Initialize the core database with the genesis file for your chosen chain (e.g.,optimism).
Option: Start from a Snapshot
If you prefer to start from a pre-synchronized database snapshot instead of syncing from genesis:- Download and extract the
op-rethsnapshot into yourdatadir. - Skip the
op-reth initcommand (step 1 above). - Proceed to Initialize Proofs Storage (step 2 below). The
proofs initcommand will initialize the proofs storage based on the state present in the snapshot.
2. Initialize Proofs Storage
Initialize the separate storage used by the ExEx to store historical proofs.Running op-reth
Once initialized, you can start the execution client with the--proofs-history flag enabled.
Make sure to include all other standard flags required for your network (e.g., specific bootnodes). See the configuration reference for details.
Running Consensus Node
Start the consensus client to drive the execution client. You can use eitherop-node or kona-node.
- op-node
- kona-node
op-node is the reference implementation of the OP Stack consensus client, written in Go.Verification
After starting both clients, verify that the historical proofs ExEx is active by checking the logs.- Check op-reth logs: Look for valid initialization messages indicating the ExEx is running.
- Check syncing status: Ensure
op-nodeandop-rethare connected and syncing.op-rethshould start importing blocks and theproofsstorage should begin populating.