Setting up an ETH 2.0 Validator Node — Simply Staking (2024)

In this tutorial, we’ll be going through the steps to set up, install and run an ETH 2.0 validator node on the Pyrmont testnet. Note that the process of deploying a validator node on Prater (testnet) and mainnet is similar.

Setting up an ETH 2.0 Validator Node — Simply Staking (3)

To run an ETH 2.0 node one needs:

  • Validator client — Responsible for producing new blocks and attestations in the beacon chain and shard chains.
  • Beacon chain client — Responsible for managing the state of the beacon chain, validator shuffling, and more.
  • Eth1 node — Supplies incoming validator deposits from the eth1 chain to the beacon chain client.

In this case, our Eth1 node will be connected to the Goerli network. Moreover, in this tutorial, the validator client, beacon chain client, and Eth1 node will all be set up on the same machine.

Machine Requirements:

  • Operating system: 64-bit Linux (i.e. Ubuntu 20.04 LTS Server or Desktop)
  • Processor: Quad core CPU, Intel Core i7–4770 or AMD FX-8310 or better
  • Memory: 16GB RAM or more
  • Storage: 2TB SSD or more
  • ETH balance: Goerli ETH and some ETH for deposit transaction fees
  • Wallet: Metamask installed

Ports required:

  • Prysm uses port 13000 tcp and port 12000 udp
  • Port 30303 tcp/udp for eth1 node

Now, we will be going through the necessary steps to set up the validator node.

Step 1: Obtaining testnet ETH

One needs 32ETH per validator and hence, we need to obtain some testnet ETH for Goerli account on Metamask.

To do this, you have two options:
1) Use the faucet at https://faucet.goerli.mudit.blog/
2) Join the discord server at https://discord.gg/hfgjQDr. However, this requires a process that will be explained when we get to depositing the 32ETH

Step 2: Setting up a user so that we do not use the root user

The commands in the script below create a new user named validator so that we run our commands through this user instead of using the root user, to mitigate any possible security vulnerabilities.
Note: The commands below should be run as root

#create user
sudo useradd -m -s /bin/bash validator
#disable login
passwd -l validator
#add user to sudo group
sudo usermod -aG sudo validator
#use the user
su validator

Step 3: Downloading eth2deposit-cli to generate key pairs

This step involves downloading eth2deposit-cli to generate key pairs used to create a deposit through the launchpad website.

Note: For this tutorial, we are using a pre-built binary whose checksum and binary can be obtained from this releases page.

#download the pre-built binary
cd $HOME
wget https://github.com/ethereum/eth2.0-deposit-cli/releases/download/v1.2.0/eth2deposit-cli-256ea21-linux-amd64.tar.gz
#perform a checksum
echo "825035b6d6c06c0c85a38f78e8bf3e9df93dfd16bf7b72753b6888ae8c4cb30a *eth2deposit-cli-256ea21-linux-amd64.tar.gz" | shasum -a 256 --check

After performing the checksum, ensure that the following output is visible

eth2deposit-cli-256ea21-linux-amd64.tar.gz: OK

Once the checksum is complete, the binary is extracted

#extract the binary
tar -xvf eth2deposit-cli-256ea21-linux-amd64.tar.gz
mv eth2deposit-cli-256ea21-linux-amd64 eth2deposit-cli
rm eth2deposit-cli-256ea21-linux-amd64.tar.gz
cd eth2deposit-cli

Step 4: Generating key pairs

This step involves generating two sets of key pairs which are then used to create a deposit through the launchpad website.

#create a new mnemonic (change the chain according to your need) ./deposit new-mnemonic --chain pyrmont

The last command will prompt for a KEYSTORE password which should be kept safely together with the generated mnemonic.
Moreover, it will generate files inside a folder named validator_keys in $HOME/eth2deposit-cli. Once again, these should be backed up and kept safe.

Step 5: Signing up to be a validator by depositing ETH through Launchpad

To be an ETH 2.0 validator, one has to make a deposit through the launchpad’s website.

Below is a list of launchpad links according to the different networks available:

According to what you chose in step 1, follow the respective option below:

A) If you used the authenticated faucet, follow Step 5A
B) If you joined the discord server, follow Step 5B

Step 5A: Depositing after using the authenticated faucet

A) Upload your deposit_data-#########.json (found in the validator_keys directory) to the launchpad website

Setting up an ETH 2.0 Validator Node — Simply Staking (4)

B) Connect to the launchpad with your Metamask wallet, review and accept terms.

Setting up an ETH 2.0 Validator Node — Simply Staking (5)

C) Confirm the transaction(s). There’s one deposit transaction of 32 ETH for each validator.

Step 5B: Depositing after using the Discord server’s faucet

If you joined the Discord Server, follow this video

Step 6: Checking the status of the application

After following one of the options above, you can monitor your validator’s application process by going on this link
https://pyrmont.beaconcha.in/validator/0x<pubkey>. (Pyrmont can be changed to Prater or mainnet)

When the application is still pending it will look like the below

Setting up an ETH 2.0 Validator Node — Simply Staking (6)

When the application is ready, the output should look like this

Setting up an ETH 2.0 Validator Node — Simply Staking (7)

Step 7: Setting up an ETH 1 node

In order to set up an ETH 2 node, you need a connection to an Ethereum 1.0 node. In this tutorial, Geth will be used to do so.
The following commands can be used to set up the node

#install from repository
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update -y
sudo apt-get install ethereum -y
#write a service file
cat > $HOME/eth1.service << EOF
[Unit]
Description = geth eth1 service
Wants = network-online.target
After = network-online.target
[Service]
User = $(whoami)
ExecStart = /usr/bin/geth --http --goerli --metrics --pprof
Restart = on-failure
RestartSec = 3
TimeoutSec = 300
[Install]
WantedBy = multi-user.target
EOF
#move the file to /etc/systemd/system
sudo mv $HOME/eth1.service /etc/systemd/system/eth1.service
sudo chmod 644 /etc/systemd/system/eth1.service
#enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable eth1
sudo systemctl start eth1

Step 8: Downloading Prysm and importing the validator keys

In this tutorial, Prysm is used to set up the ETH 2.0 beacon chain node and validator. Therefore, in this step, we will be downloading Prysm and importing our validator keys that were generated in the previous steps

#install prysm
mkdir ~/prysm && cd ~/prysm
curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh
#import validator keys
#here you have to enter a new passwory to encrypt your local prysm wallet and the keystore password for your imported which was entered earlier
#NOTE: the prysm and keystore password can be the same

$HOME/prysm/prysm.sh validator accounts import --pyrmont --keys-dir=$HOME/eth2deposit-cli/validator_keys
#verify that the validators were imported
$HOME/prysm/prysm.sh validator accounts list --pyrmont

Step 9: Starting the beacon chain node

#create the service
cat > $HOME/beacon-chain.service << EOF
# The eth2 beacon chain service (part of systemd)
# file: /etc/systemd/system/beacon-chain.service
[Unit]
Description = eth2 beacon chain service
Wants = network-online.target
After = network-online.target
[Service]
Type = simple
User = $(whoami)
ExecStart = $(echo $HOME)/prysm/prysm.sh beacon-chain --pyrmont --p2p-max-peers=45 --monitoring-host="0.0.0.0" --http-web3provider=http://127.0.0.1:8545 --accept-terms-of-use
Restart = on-failure
[Install]
WantedBy = multi-user.target
EOF
#move the service to /etc/systemd/system
sudo mv $HOME/beacon-chain.service /etc/systemd/system/beacon-chain.service
sudo chmod 644 /etc/systemd/system/beacon-chain.service
#start the service
sudo systemctl daemon-reload
sudo systemctl enable beacon-chain
sudo systemctl start beacon-chain

Step 10: Storing the Prysm password

In this step, we store the Prysm password so that Prysm can pick it up, decrypt it and load the validator

#This is required so that Prysm can decrypt and load your validators.
echo 'my_password_goes_here' > $HOME/.eth2validators/validators-password.txt
sudo chmod 600 $HOME/.eth2validators/validators-password.txt

Step 11: Starting the validator

#create the service
cat > $HOME/validator.service << EOF
# The eth2 validator service (part of systemd)
# file: /etc/systemd/system/validator.service
[Unit]
Description = eth2 validator service
Wants = network-online.target beacon-chain.service
After = network-online.target
[Service]
User = $(whoami)
ExecStart = $(echo $HOME)/prysm/prysm.sh validator --pyrmont --accept-terms-of-use --wallet-password-file $(echo $HOME)/.eth2validators/validators-password.txt
Restart = on-failure
[Install]
WantedBy = multi-user.target
EOF
#move the file to /etc/systemd/system
sudo mv $HOME/validator.service /etc/systemd/system/validator.service
sudo chmod 644 /etc/systemd/system/validator.service
#start the service
sudo systemctl daemon-reload
sudo systemctl enable validator
sudo systemctl start validator

One can verify that the validator started by verifying that the validator’s public key appears in the logs as below:

INFO Enabled validator voting_pubkey: 0x2374.....7121

This section explains how the number of validators in a node can be increased.

NOTE: On testnets such as Prater and Pyrmont, do not create more than 2 validators per node so that the activation queue is kept reasonably quick.

This tutorial assumes there are already 2 existing validators and adds 4 new ones.

Step 1: Backing up existing validator_keys

# Adjust your eth2deposit-cli directory accordingly
cd $HOME/eth2deposit-cli
# Renames and append the date to the existing validator_keys directory
mv validator_keys validator_keys_$(date +"%Y%d%m-%H%M%S")

Step 2: Generating new validator keys using the same mnemonic

Note: Use the same KEYSTORE password as before

# Generate from an existing mnemonic 4 more validators when 2 were previously already created
./deposit existing-mnemonic --validator_start_index 2 --num_validators 4 --chain pyrmont

Step 3: Uploading the deposit_data-#########.json file to the launchpad website

Upload the newly created deposit_data-#########.json files to the launchpad website as we did when creating the validator the first time in step 5 above.

This section sets up monitoring assuming Grafana and Prometheus are already installed.

Step 1: Add the following jobs

NOTE: if Grafana and Prometheus are not set up on the same machine as the ETH 1 node, beacon chain node and ETH 2 validator node, localhost has to be changed to the respective IP of where they are set up.

- job_name: 'ETH 2 node_exporter'
static_configs:
- targets: ['localhost:9100']
- job_name: 'ETH 2 validator'
static_configs:
- targets: ['localhost:8081']
- job_name: 'ETH 2 beacon node'.
static_configs:
- targets: ['localhost:8080']
- job_name: 'ETH 1 node'
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /debug/metrics/prometheus
scheme: http
static_configs:
- targets: ['localhost:6060']

Step 2: Use the following templates for Grafana

Step 3: Enjoy the metrics!

Setting up an ETH 2.0 Validator Node — Simply Staking (8)
Setting up an ETH 2.0 Validator Node — Simply Staking (2024)

FAQs

How do I set up a staking node? ›

How to Stake as a Node Operator
  1. Step 1: Connect your wallet. ...
  2. Step 2: Begin the Deposit Process. ...
  3. Step 3: Register your validator key file. ...
  4. Step 4: Select an LSD Network and deposit 4 ETH. ...
  5. Step 5: Stake your validator. ...
  6. Step 6: Set your LSD Network Fee Recipient Address. ...
  7. Step 7: Mint your derivative tokens.

Is running an ETH validator node profitable? ›

Running an Ethereum node can be very profitable if you are willing to invest the time and money into setting up and maintaining the node. Node operators not only benefit from the potential revenue generated from mining tokens, but also contribute to the security and development of the Ethereum network.

How much do ETH 2.0 validators make? ›

What is the average ETH staking APY? The average ETH staking APY is roughly 4% for validators that do not utilize MEV-Boost. Validators with MEV-Boost enabled average roughly 5.69%.

How to setup a validator node? ›

mainnet ​
  1. Clone nearcore project from GitHub​ First, clone the nearcore repository. ...
  2. Compile nearcore binary​ In the nearcore folder run the following commands: ...
  3. Initialize working directory​ ...
  4. Get data backup​ ...
  5. Run the node​ ...
  6. Prepare to become a validator​ ...
  7. Install and check near-cli​ ...
  8. Prepare validator key​
Mar 19, 2024

How do I set up an Ethereum validator node? ›

Use the Voluntary Exit command to signal your intentions to permanently stop your duties as a validator. Timeline: Voluntary exiting is possible after your validator is actively validating. If there is no exit queue, the exit process requires at least 4 epochs, or 26 minutes.

What is the difference between a node and a validator? ›

First, the logic of validators and transaction processors help to determine if the submitted transaction meets all criteria to be added to the blockchain. Nodes will then use their computer hardware to publish the transaction to the blockchain and update the global state for everyone.

What are the requirements for eth2 node? ›

The system requirements for running an Ethereum 2.0 node include a hard drive with enough space (~400GB for the Eth1 mainnet chain data alone), sufficient CPU and RAM as per client documentation, reliable 24/7 internet connection with enough upload bandwidth (~700-800 MB/hour as of February 2021), and an Eth1 client to ...

How do I become a staking validator? ›

To become a validator, you must stake by depositing 32 ETH into an Ethereum smart contract. This sum must remain committed in order for the validator to remain active, generating rewards.

How much money can I make as an Ethereum validator? ›

So how much do you make staking Ethereum? According to the figures from the official Ethereum website, validators earn an average annualized return of 3.6%. This figure varies slightly, depending on how you stake ETH.

How much can you earn by staking 32 ETH? ›

Ethereum staking rewards currently average around 4-7% annually but can fluctuate depending on network activity. Here are some estimates: Staking 32 ETH (1 validator) – ~4-7% SRR = 1.6 – 2.24 ETH per year. Staking 1,000 ETH – ~4-7% SRR = 160 – 224 ETH per year.

How much do node validators earn? ›

These also go to validators. Overall annual coin inflation is about 0.5%. Average income daily generated by validator node with average stake as of April 2023 is ~120 Toncoin / per day.

Is ETH 2.0 staking safe? ›

Risks while ETH 2.0 Staking at Binance

Similarly, staking Ethereum 2.0 has its pool of risks associated with it. However, the risk on Binance is far less than staking the Ethereum directly. So the main risk while staking ETH 2.0 is that prices of ETH vs. BETH are volatile and change frequently.

Can you stake more than 32 ETH per validator? ›

Yes, but you have to stake in chunks of 32 ETH. If you have 64 ETH, you can run 2 validators, and you would double your probability of one of your validators being selected as a block proposer.

Where is the safest place to stake ETH? ›

Staking Ethereum on Coinbase is generally considered safe, as Coinbase is a well-established and reputable cryptocurrency exchange.

What do you need to be an Ethereum validator? ›

The Ethereum Proof-of-Stake system works like many others on the surface. To become a validator, you must stake 32ETH and the funds act as collateral. If you attempt to undermine the system or fail to validate accurately and reliably, you risk losing their staked ETH investment.

How much does it cost to be an Ethereum validator? ›

Launchnodes Node Pricing
NodesSubscription fees per node (prices shown are annual, USD)
Ethereum Validator Node Prysmatic Client (For Solo Staking)$240
Ethereum Teku Beacon node with Geth (For Solo Staking)$200
Ethereum Prysmatic Beacon Node with Geth (For Solo Staking)$200
4 more rows

How much does it cost to become an ETH validator? ›

The minimum requirement to become an Ethereum validator is 32 ETH. This amount is necessary to participate in the network's proof-of-stake consensus mechanism. Unlike systems with no strict minimum, Ethereum sets this threshold to ensure validators have a significant stake in the network's security and performance.

Top Articles
Latest Posts
Article information

Author: Sen. Emmett Berge

Last Updated:

Views: 6255

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Sen. Emmett Berge

Birthday: 1993-06-17

Address: 787 Elvis Divide, Port Brice, OH 24507-6802

Phone: +9779049645255

Job: Senior Healthcare Specialist

Hobby: Cycling, Model building, Kitesurfing, Origami, Lapidary, Dance, Basketball

Introduction: My name is Sen. Emmett Berge, I am a funny, vast, charming, courageous, enthusiastic, jolly, famous person who loves writing and wants to share my knowledge and understanding with you.