Run Reth Full Node On Ethereum Mainnet
Table of Contents
This tutorial will help you start a reth node (with consensus client prysm) on a AWS linux server.
-
Reth: A new Ethereum full node implementation that is focused on being user-friendly, highly modular, as well as being fast and efficient.
-
Prysm: A Golang implementation of the Ethereum Consensus specification,
Dependencies
Before starting reth, some dependencies should be installed in your linux server.
First, install the rust by rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Then, install the pre-requisites for building reth from source.
yum install -y gcc gcc-c++ llvm-devel clang-devel
Finally, create a folder called ethereum on your disk, and then two subfolders within it: consensus and execution
mkdir -p consensus
mkdir -p execution
Building Reth
Now, let’s clone the reth repository and build it form source.
cd execution
git clone https://github.com/paradigmxyz/reth
cd reth
cargo install --locked --path bin/reth --bin reth
// or
cargo build --release
take a while(~10-20 min) and go down.
Generate JWT
In Ethereum, JWT (JSON Web Token) serves as a credential for secure communication between the Consensus Layer (CL) and the Execution Layer (EL). It ensures:
- Authentication: Verifying the identities of CL and EL.
- Authorization: Determining access levels based on token information.
- Data Integrity: Ensuring data hasn’t been tampered with through signatures.
cd consensus
curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh
./prysm.sh beacon-chain generate-auth-secret
mv jwt.hex ../
Running reth and prysm
Now, we can starting the reth(EL) and prysm(CL).
cd execution
nohup reth node --datadir ./data-seed --full --discovery.port 0 --authrpc.jwtsecret ../jwt.hex --authrpc.addr 127.0.0.1 --authrpc.port 8551 > reth.log 2>&1 &
run a beacon node
cd consensus
nohup ./prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --mainnet --jwt-secret=../jwt.hex --checkpoint-sync-url=https://beaconstate.info --genesis-beacon-api-url=https://beaconstate.info > beacon.log 2>&1 &
check the status of the nodes
curl http://localhost:8080/healthz
the result will be shown above. Wait for execution layer is fully synced, the status of all will be ok.
*p2p.Service: OK
*backfill.Service: OK
*initialsync.Service: OK
*builder.Service: OK
*execution.Service: ERROR, retryExecutionClientConnection: processPastLogs: abi: attempting to unmarshall an empty string while arguments are expected
*attestations.Service: OK
*blockchain.Service: ERROR, service is optimistic, and only limited service functionality is provided please check if execution layer is fully synced
*sync.Service: OK
*rpc.Service: ERROR, service is optimistic, validators can't perform duties please check if execution layer is fully synced
*gateway.Gateway: OK
*prometheus.Service: OK
Reference
comments powered by Disqus