Reth is an execution client. After Ethereum's transition to Proof of Stake (aka the Merge) it became required to run a consensus client along your execution client in order to sync into any "post-Merge" network. This is because the Ethereum execution layer now outsources consensus to a separate component, known as the consensus client.
Consensus clients decide what blocks are part of the chain, while execution clients only validate that transactions and blocks are valid in themselves and with respect to the world state. In other words, execution clients execute blocks and transactions and check their validity, while consensus clients determine which valid blocks should be part of the chain. Therefore, running a consensus client in parallel with the execution client is necessary to ensure synchronization and participation in the network.
By running both an execution client like Reth and a consensus client, such as Lighthouse 🦀 (which we will assume for this guide), you can effectively contribute to the Ethereum network and participate in the consensus process, even if you don't intend to run validators.
|Execution||Validates transactions and blocks|
|(checks their validity and global state)|
|Consensus||Determines which blocks are part of the chain|
|(makes consensus decisions)|
First, ensure that you have Reth installed by following the installation instructions.
Now, to start the archive node, run:
RUST_LOG=info reth node
And to start the full node, run:
RUST_LOG=info reth node --full
On differences between archive and full nodes, see Pruning & Full Node section.
Note that these commands will not open any HTTP/WS ports by default. You can change this by adding the
--wsflags, respectively and using the
--ws.apiflags to enable various JSON-RPC APIs. For more commands, see the
reth nodeCLI reference.
The EL <> CL communication happens over the Engine API, which is by default exposed at
http://localhost:8551. The connection is authenticated over JWT using a JWT secret which is auto-generated by Reth and placed in a file called
jwt.hex in the data directory, which on Linux by default is
/Users/<NAME>/Library/Application Support/reth/mainnet/jwt.hex in Mac).
You can override this path using the
--authrpc.jwtsecret option. You MUST use the same JWT secret in BOTH Reth and the chosen Consensus Layer. If you want to override the address or port, you can use the
--authrpc.port options, respectively.
So one might do:
RUST_LOG=info reth node \ --authrpc.jwtsecret /path/to/secret \ --authrpc.addr 127.0.0.1 \ --authrpc.port 8551
At this point, our Reth node has started discovery, and even discovered some new peers. But it will not start syncing until you spin up the consensus layer!
Assuming you have done that, run:
RUST_LOG=info lighthouse bn \ --checkpoint-sync-url https://mainnet.checkpoint.sigp.io \ --execution-endpoint http://localhost:8551 \ --execution-jwt /path/to/secret
If you don't intend on running validators on your node you can add:
--checkpoint-sync-url argument value can be replaced with any checkpoint sync endpoint from a community maintained list.
Your Reth node should start receiving "fork choice updated" messages, and begin syncing the chain.
You can easily verify that by inspecting the logs, and seeing that headers are arriving in Reth. Sit back now and wait for the stages to run! In the meantime, consider setting up observability to monitor your node's health or test the JSON RPC API.
We provide a method for running Reth without a Consensus Layer via the
--debug.tip <HASH> parameter. If you provide that to your node, it will simulate sending a
engine_forkChoiceUpdated message once and will trigger syncing to the provided block hash. This is useful for testing and debugging purposes, but in order to have a node that can keep up with the tip you'll need to run a CL alongside it. At the moment we have no plans of including a Consensus Layer implementation in Reth, and we are open to including light clients other methods of syncing like importing Lighthouse as a library.