Ethereum's long-awaited shift from proof-of-work (PoW) to proof-of-stake (PoS) known as The Merge happened on September 15, 2022, and came with fundamental changes to the network. The most notable change is the addition of the consensus layer (aka Beacon Chain) which replaced the PoW mining. It is coordinating and pseudorandomly selecting block producers from the pool of stakers/validators in a way that makes it extremely difficult for validators to coordinate attacks on the network. The Merge changed how operators run nodes on the Ethereum blockchain. A node now needs two clients that work together as a pair. In addition to the execution client (e.g., Nethermind), you need a consensus client that connects to the consensus layer and runs the PoS algorithm. This guide shows how to run an Ethereum node with Nethermind and a consensus client of your choice.
An easy way to run both consensus and execution clients is with Sedge. Sedge is a setup tool for PoS validators and nodes that runs on Linux and macOS.
Choosing a consensus client
On the consensus layer, there are 5 client implementations to choose from. Though all consensus clients are great, check them out yourself to find the one best suited to your needs.
We urge you to take client diversity into consideration when choosing your consensus client and avoid the majority clients.
Configuring JSON-RPC interface
Execution and consensus clients communicate via an authenticated endpoint specified in Engine JSON-RPC API. In order to connect to a consensus client, the execution client must generate a JWT secret at a known path. Although the secret is generated automatically by Nethermind on startup at
keystore/jwt-secret path in its root directory, in some cases, you might need to do it yourself. You can generate one using OpenSSL:
openssl rand -hex 32 > path/to/jwt.hex
Since the JWT secret is simply a 64-character hex value, there are many other ways of generating it, including online resources. However, for security reasons, we recommend using OpenSSL.
The generated JWT secret can be specified with the
--JsonRpc.JwtSecretFile path/to/jwt.hex command line option. For more configuration options, see Engine API.
Running the consensus client
As syncing from the scratch can take a very long time on some networks (up to several days), the commands below optionally use checkpoint sync to speed up the process.
lighthouse bn \
--network mainnet \
--execution-endpoint http://localhost:8551 \
--execution-jwt path/to/jwt.hex \
--checkpoint-sync-url https://mainnet.checkpoint.sigp.io \
The command above runs Lighthouse on Mainnet. For other networks, set the
--checkpoint-sync-url options accordingly. See the Lighthouse documentation and public checkpoint sync endpoints.
lodestar beacon \
--network mainnet \
--jwt-secret path/to/jwt.hex \
./prysm.sh beacon-chain \
The command above runs Prysm on Mainnet. For other networks, replace the
--mainnet and set
--genesis-beacon-api-url options accordingly. See the Prysm documentation and public checkpoint sync endpoints.
The consensus client must be running before you start Nethermind.
-c mainnet \
The command above runs Nethermind on Mainnet. For other networks, set the
-c option accordingly. For more info, see Running Nethermind.