Reth Node Archival Guide

June 2024
Alex Slobodnik

Intro

This is not the best way to create and run an archival node, but it works.

Hardware

You'll need a Philips head screwdriver to open the NUC and a small screwdriver to secure the NVMe storage. It took about 15 minutes to assemble. Alex Slobodnik

Installation

Create Ubuntu ISO & Install

  1. Download & Install Etcher
  2. Download iso image from Ubuntu Desktop
  3. Create bootable USB by following the Ubuntu tutorial
  4. Install Ubuntu

Setting Up Ubuntu

sudo apt update // updates package list
sudo apt install curl // req for homebrew
sudo apt install git-all // req for homebrew
sudo apt install openssh-server // req for reth/lighthouse
Install homebrew

Installing Reth & Lighthouse

brew install paradigmxyz/brew/reth
brew install lighthouse // consensus client required

Running Reth First Time (syncing)

The official instructions can be found here.
sudo mkdir -p /secrets
// secret used in communicating between lighthouse and reth
openssl rand -hex 32 | tr -d "\n" | sudo tee /secrets/jwt.hex
        
// Consensus client must run
lighthouse bn \
--checkpoint-sync-url https://mainnet.checkpoint.sigp.io \
--execution-endpoint http://localhost:8551 \
--disable-deposit-contract-sync \
--execution-jwt /secrets/jwt.hex \
      
        
// Note the auth secret sharing
reth node \
--authrpc.jwtsecret /secrets/jwt.hex \
--authrpc.addr 127.0.0.1 \
--authrpc.port 8551
      
// reth Version: 0.2.0-beta.6-dev
Reth provides console log to let you know the progress of the syncing. There are 12 stages, the longest stage is stage 4, it took ~4 days to sync.

Running Reth After Syncing

To use reth as an RPC endpoint you will need to run the following

reth node \
--authrpc.jwtsecret /secrets/jwt.hex \
--authrpc.addr 127.0.0.1 \
--authrpc.port 8551 \
--http \
--http.api all
    
// reth Version: 0.2.0-beta.6-dev

Using Reth

Example #1: Query Reth

curl -H "Content-Type: application/json" -X POST --data \
'{
"jsonrpc":"2.0",
"method":"eth_blockNumber",
"params":[],
"id":67
}' \
127.0.0.1:8545
    
// Return: {"jsonrpc":"2.0","result":"0x1317f49","id":67}

Example #2: Use Reth Node as RPC with Metamask

  1. 1. Install Tailscale on Nuc & Local Machine
  2. 2. Set Up SSH Tunel on Local Machine
  3. ssh -N -v user@xxx.xxx.xxx.xxx -L 8545:localhost:8545
  4. 3. Change RPC to http://localhost:8545
  5. 4. Enjoy Uncensored Transactions