Ethereum Merge Guide - Lighthouse/Geth

Introduction

This guide is intended for anyone currently running mainnet for validators using Lighthouse/Geth. These updates are current as of Sep 4, 2022, installing Lighthouse-V3.1.0 and Geth -V.1.10.25.

After completing these updates, your validator will be ready for the Bellatrix hard fork ~Sep 6 and the mainnet merge ~Sep 15!

This guide is for informational purposes only. Always practice on testnet first.

Feel free to reach out to the EthStaker Discord if you have any questions.

Summary

  1. Update Geth installation, username, and directory

  2. Create JWT Token

  3. Geth

    1. Update Geth

    2. Add --authrpc.jwtsecret to geth.service file

  4. Lighthouse

    1. Update Lighthouse

    2. Add --execution-jwt and --execution-endpoint to lighthousebeacon.service file

    3. Add --suggested-fee-recipient to lighthousevalidator.service

New Guides and Improvements

There have been a few changes to Somer Esat's Guides over time, and we need to make a few updates to keep in line with best practice. The changes include:

1) Username changed from Goeth to Geth

2) Rename Geth directory from /var/lib/goethereum to /var/lib/geth

3) Remove Personal Package Archive (PPA) installation and switch to using curl

While PPA is convenient, You may not want Geth to update every time you run sudo apt update, especially if the latest version has a bug.

By usingcurl , you can choose which version to install and run.

Geth Changes

These changes won't affect the chain data, and geth will not need to re-sync.

1) Stop Geth:

2) Remove Geth:

3) Remove Geth PPA:

4) Check latest version of Geth:

Find the most current update here.

This code in this guide is updated for v1.10.25 and current as of Sep 5, 2022.

5) Change to Home directory:

6) Use curl to download latest version (be sure to update version):

7) Extract, Copy, and Clean up (update version):

8) Rename geth username and group (goeth -> geth):

9) Rename geth directory to /var/lib/geth

10) Set permissions for data directory:

11) Update other programs:

Modify geth.service file

Note on Code Readability

This blob is simply informational, no need to copy any code from here.

This guide uses line breaks "\" to list each flag on it's own line and make the code easier to understand.

The two code examples below are identical, just with different layouts.

Single line layout:

Same code with line breaks:

As you can see, the line breaks make the code more readable and clearly identifies each flag. This guide will use line breaks to make the service files more readable.

1) Open geth.service for editing:

2) Modify geth.service:

It's easiest to delete everything already in the file, then copy/paste the updated code

You can't highlight/delete in the terminal, so just tap delete or backspace.

3) Copy/Paste the following text into the empty geth.service file:

Geth service file should look like this:

Once finished, use <CTRL+X> to Exit, <Y> to save, and <ENTER> to confirm

Your geth.service file should match this image

4) Reload Daemon:

5) Start Geth:

6) Check Geth logs:

Geth logs will show an error until you create the JWT token in the next step.

Create JWT Token

The JWT token is used by Execution Engine (Geth) and Consensus Client (Lighthouse) to securely communicate back and forth.

These steps will generated a random 32 byte hex that will be referenced by both clients.

1) Create directory to store the JWT file:

2) Generate the JWT hex file using openssl:

3) Use ls (list) to confirm the hex file exists at /var/lib/jwtsecret:

Update Lighthouse

Check the most current Lighthouse release here.

This guide demonstrates updating to v3.1.0. If a newer version is available, you will need to update the code to the current version on the release page

1) Change directory to the Home folder:

2) Remove any old lighthouse file that may exist:

Note: You might get an error if the files don't exist. No worries, just continue.

Download Lighthouse software (update version):

3) Stop Lighthouse services:

4) Extract binary from archive (update version):

5) Copy binary into /usr/local/bin:

6) Start Lighthouse services:

7) Remove old files (update version):

Update Beacon config file

1) Stop Beacon:

2) Open the beacon service file for editing:

Copy/paste the following into the terminal:

Delete everything in the file and copy the text below

Beacon file should look like this:

Once finished, use <CTRL+X> to Exit, <Y> to save, and <ENTER> to confirm

Your beacon file should match this image

2) Reload the daemon:

3) Restart Beacon:

Update Validator config file

1) Open the lighthousevalidator.service file for editing:

2) Copy/Paste the information below into the terminal

Delete everything in the file and copy the text below.

Don't forget to update the --suggested-fee-recipient

Once finished, use <CTRL+X> to Exit, <Y> to save, and <ENTER> to confirm

Merge-ready lighthousebeacon.service file:

The following screenshot shows the fee address set as 0x8fCF8DB7Afaa8C865B693bEeD5858712ABBE4DDb

Your validator file should match this image (with different fee address)

3) Reload daemon:

4) Restart Lighthouse Validator:

Check Logs & Status

You can open multiple terminal windows if you'd like to view all 3 logs at once.

Sometimes it helps to maximize the terminal window so you can read the logs more clearly. All services should be running without errors and appear "ready for merge"

1) Check Geth output:

2) Check Beacon output:

3) Check Validator output:

Ready For Merge

Last updated