CoinCashew
English
Search…
⌃K
Links

Guide | How to setup a validator for Ethereum staking on testnet GOERLI

Become a validator and help secure Ethereum, a proof-of-stake blockchain. Anyone with 32 ETH can join.

Announcements

🎊
Support us on Gitcoin Grants: We improve this guide with your support!🙏
As of October 1 2022, this post-merge guide is version 5.1.0 and written for testnet GOERLI.
Always test and practice on testnet first. Mainnet guide available here.

​​
🏁
0. Prerequisites

👩💻
Skills to be a eth staker

As a eth staker, you will typically have the following abilities:
  • operational knowledge of how to set up, run and maintain a eth beacon node and validator continuously
  • a long term commitment to maintain your validator 24/7/365
  • basic operating system skills

👨💻
Experience required to be a successful validator

  • Operating system: 64-bit Linux (i.e. Ubuntu 22.0x+ 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
  • Internet: Broadband internet connections with speeds at least 10 Mbps without data limit.
  • Power: Reliable electrical power with uninterruptible power supply (UPS)
  • ETH balance: at least 32 goerli ETH and some goerli ETH for deposit transaction fees
  • Wallet: Metamask installed
💡
For examples of actual staking hardware builds, check out RocketPool's hardware guide.
Pro Validator Tip: Highly recommend you begin with a brand new instance of an OS, VM, and/or machine. Avoid headaches by NOT reusing testnet keys, wallets, or databases for your validator.
If you need ideas or a reminder on how to secure your staking node, refer to the security best practices guide.

🛠
Setup Ubuntu Operating System

If you need to install Ubuntu Server, refer to this guide.
Or Ubuntu Desktop, refer to this guide.

🎭
Setup Metamask

If you need to install Metamask, refer to this guide.

🧩
High Level Validator Node Overview

At the end of this guide, you will build a node that hosts three main components in two layers: consensus layer consists of a consensus client, also known as a validator client with a beacon chain client. The execution layer consists of a execution client, formerly a eth1 node.
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.
Execution client (aka Eth1 node) - Supplies incoming validator deposits from the eth
chain to the beacon chain client.
Note: Teku and Nimbus combines both clients into one process.
How Ethereum fits together featuring Leslie the ETH Rhino, the mascot named after American computer scientist Leslie Lamport

🌱
1. Obtain testnet ETH

Every 32 ETH you own allows you to make 1 validator. You can run thousands of validators with your beacon node. However on testnet, please only run 1 or 2 validators to keep the activation queue reasonably quick.
Watch this how-to youtube video for Goerli ETH

👩💻
2. Signup to be a validator at the Launchpad

  1. 1.
    Install dependencies, the ethereum foundation deposit tool and generate your two sets of key pairs.
Each validator will have two sets of key pairs. A signing key and a withdrawal key. These keys are derived from a single mnemonic phrase. Learn more about keys.
You have the choice of using the Wagyu GUI, downloading the pre-built Ethereum staking deposit tool or building it from source. Alternatively, you can use an air-gapped Tails OS or if you have a Ledger Nano X/S or Trezor Model T, you're able to generate deposit files with keys managed by a hardware wallet.
Build from source code
Pre-built staking-deposit-cli
Wagyu
Hardware Wallet - Most Secure
Advanced - Most Secure
Install dependencies.
sudo apt update
sudo apt install python3-pip git -y
Download source code and install.
cd $HOME
git clone https://github.com/ethereum/staking-deposit-cli
cd staking-deposit-cli
sudo ./deposit.sh install
Make a new mnemonic.
./deposit.sh new-mnemonic --chain goerli
Advanced option: Custom eth withdrawal address, often used for 3rd party staking.
# Add the following
--eth_withdrawal_address <eth address hex string>
# Example
./deposit.sh new-mnemonic --chain goerli --eth1_withdrawal_address 0x1...x
If this field is set and valid, the given Eth address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format.
Download staking-deposit-cli.
cd $HOME
wget https://github.com/ethereum/staking-deposit-cli/releases/download/v2.3.0/staking_deposit-cli-76ed782-linux-amd64.tar.gz
Verify the SHA256 Checksum matches the checksum on the releases page.
echo "8a7757995e70178ac953a746c7434f1bc816a2f4be0318d980bf1eca98930a3c *staking_deposit-cli-76ed782-linux-amd64.tar.gz" | shasum -a 256 --check
Example valid output:
staking_deposit-cli-76ed782-linux-amd64.tar.gz: OK
Only proceed if the sha256 check passes with OK!
Extract the archive.
tar -xvf staking_deposit-cli-76ed782-linux-amd64.tar.gz
mv staking_deposit-cli-76ed782-linux-amd64 staking-deposit-cli
rm staking_deposit-cli-76ed782-linux-amd64.tar.gz
cd staking-deposit-cli
Make a new mnemonic.
./deposit new-mnemonic --chain goerli
Advanced option: Custom eth withdrawal address, often used for 3rd party staking.
# Add the following
--eth1_withdrawal_address <eth address hex string>
# Example
./deposit.sh new-mnemonic --chain goerli --eth1_withdrawal_address 0x1...x
If this field is set and valid, the given Eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format.
Wagyu (formerly known as StakeHouse) is an application aimed at lowering the technical bar to staking on Ethereum 2.0.
Dubbed a 'one-click installer', it provides a clean UI automating the setup and management of all the infrastructure necessary to stake without the user needing to have any technical knowledge.
Download Wagyu: https://wagyu.gg
How to generate validator keys with Ledger Nano X/S and Trezor Model T
Allnodes has created an easy to use tool to connect a Ledger Nano X/S and Trezor Model T and generate the deposit json files such that the withdrawal credentials remain secured by the hardware wallet. This tool can be used by any validator or staker.
  1. 1.
    Connect your hardware wallet to your PC/laptop
  2. 2.
    If using a Ledger Nano X/S, open the "ETHEREUM" ledger app (if missing, install from Ledger Live)
  3. 4.
    Select network > Gorli Testnet
  4. 5.
    Select your wallet > then CONTINUE
6. From the dropdown, select your eth address with at least 32 ETH to fund your validators
7. On your hardware wallet, sign the ETH signature message to login to allnodes.com
8. Again on your hardware wallet, sign another message to verify your eth2 withdrawal credentials
Double check that your generated deposit data file contains the same string as in withdrawal credentials and that this string includes your Ethereum address (starting after 0x)
9. Enter the amount of nodes (or validators you want)
10. Finally, enter a KEYSTORE password to encrypt the deposit json files. Keep this password safe and offline.
11. Confirm password and click GENERATE
🔥
[ Optional ] Pro Security Tip: Run the staking-deposit-cli tool and generate your mnemonic seed for your validator keys on an air-gapped offline machine booted from usb.
You will learn how to boot up a windows PC into an airgapped Tails operating system.
The Tails OS is an amnesic operating system, meaning it will save nothing and leave no tracks behind each time you boot it.
Part 0 - Prerequisites
You need:
  • 2 storage mediums (can be USB stick, SD cards or external hard drives)
  • One of them must be > 8GB
  • Windows or Mac computer
  • 30 minutes or longer depending on your download speed
Part 1 - Download Tails OS
Download the official image from the Tails website. Might take a while, go grab a coffee.
Make sure you follow the guide on the Tails website to verify your download of Tails.
Part 2 - Download and install the software to transfer your Tails image on your USB stick
For Windows, use one of
For Mac, download Etcher
Part 3 - Making your bootable USB stick
Run the above software. This is an example how it looks like on Mac OS with etcher, but other software should be similar.
Select the Tails OS image that you downloaded as the image. Then select the USB stick (the larger one).
Then flash the image to the larger USB stick.
Part 4 - Download and verify the staking-deposit-cli
You can refer to the other tab on this guide on how to download and verify the staking-deposit-cli.
Copy the file to the other USB stick.
Part 5 - Reboot your computer and into Tails OS
After you have done all the above, you can reboot. If you are connected by a LAN cable to the internet, you can disconnect it manually.
Plug in the USB stick that has your Tails OS.
On Mac, press and hold the Option key immediately upon hearing the startup chime. Release the key after Startup Manager appears.
On Windows, it depends on your computer manufacturer. Usually it is by pressing F1 or F12. If it doesn't work, try googling "Enter boot options menu on [Insert your PC brand]"
Choose the USB stick that you loaded up with Tails OS to boot into Tails.
Part 6 - Welcome to Tails OS
You can boot with all the default settings.
Part 7 - Run the staking-deposit-cli
Plug in your other USB stick with the staking-deposit-cli file.
You can then open your command line and navigate into the directory containing the file. Then you can continue the guide from the other tab.
Make a new mnemonic.
./deposit.sh new-mnemonic --chain goerli
If you ran this command directly from your non-Tails USB stick, the validator keys should stay on it. If it hasn't, copy the directory over to your non-Tails USB stick.
🔥
Make sure you have saved your validator keys directory in your other USB stick (non Tails OS) before you shutdown Tails. Tails will delete everything saved on it after you shutdown..
🎉
Congrats on learning how to use Tails OS to make an air gapped system. As a bonus, you can reboot into Tails OS again and connect to internet to surf the dark web or clear net safely!
Alternatively, follow this ethstaker.cc exclusive for the low down on making a bootable usb.
Part 1 - Create a Ubuntu 20.04 USB Bootable Drive
Part 2 - Install Ubuntu 20.04 from the USB Drive
You can copy via USB key the pre-built staking-deposit-cli binaries from an online machine to an air-gapped offline machine booted from usb. Make sure to disconnect the ethernet cable and/or WIFI.
2. If using staking-deposit-cli, follow the prompts and pick a KEYSTORE password. This password encrypts your keystore files. Write down your mnemonic and keep this safe and offline.
Do not send real mainnet ETH during this process!
🛑
Use only goerli ETH.
Caution: Only deposit the 32 ETH per validator if you are confident your execution client (ETH1 node) and consensus client (ETH2 validator) will be fully synched and ready to perform validator duties. You can return later to launchpad with your deposit-data to finish the next steps.
3. Follow the steps at https://goerli.launchpad.ethereum.org while skipping over the steps you already just completed. Study the eth2 phase 0 overview material. Understanding eth2 is the key to success!
🐳
Batch Depositing Tip: If you have many deposits to make for many validators, consider using Abyss.finance's eth2depositor tool. This greatly improves the deposit experience as multiple deposits can be batched into one transaction, thereby saving gas fees and saving your fingers by minimizing Metamask clicking.
Make sure to switch to GÖRLI network.
4. Back on the launchpad website, upload yourdeposit_data-#########.json found in the validator_keys directory.
5. Connect to the launchpad with your Metamask wallet, review and accept terms. Ensure you're connected to GÖRLI network.
6. Confirm the transaction(s). There's one deposit transaction of 32 ETH for each validator.
For instance, if you want to run 3 validators you will need to have (32 x 3) = 96 goerli ETH plus some extra to cover the gas fees.
Your transaction is sending and depositing your ETH to the goerli ETH2 deposit contract address.
Check, double-check, triple-check that the goerli Eth2 deposit contract address is correct.
🔥
Critical Crypto Reminder: Keep your mnemonic, keep your ETH.
  • Write down your mnemonic seed offline. Not email. Not cloud.
  • Multiple copies are better. Best stored in a metal seed.
  • The withdrawal keys will be generated from this mnemonic in the future.
  • Make offline backups, such as to a USB key, of your validator_keys directory.

🛸
3. Install execution client (ETH1 node)

Ethereum requires a connection to the execution client in order to monitor for 32 ETH validator deposits. Hosting your own execution client is the best way to maximize decentralization and minimize dependency on third parties such as Infura.
The subsequent steps assume you have completed the best practices security guide.
🛑
Do not run your processes as ROOT user.
😱

Create a jwtsecret file

A jwtsecret file contains a hexadecimal string that is passed to both Execution Layer client and Consensus Layer clients, and is used to ensure authenticated communications between both clients.
#store the jwtsecret file at /secrets
sudo mkdir -p /secrets
#create the jwtsecret file
openssl rand -hex 32 | tr -d "\n" | sudo tee /secrets/jwtsecret
#enable read access
sudo chmod 644 /secrets/jwtsecret

Pick an execution client

Your choice of either Geth, Besu, Nethermind, or Erigon.
To strengthen Ethereum's resilience against potential attacks or consensus bugs, it's best practice to run a minority client in order to increase client diversity. Find the latest distribution of execution clients here: https://clientdiversity.org/
Geth
Besu
Nethermind
Erigon
Geth - Go Ethereum is one of the three original implementations (along with C++ and Python) of the Ethereum protocol. It is written in Go, fully open source and licensed under the GNU LGPL v3.
Review the latest release notes at https://github.com/ethereum/go-ethereum/releases
🧬
Install from the repository
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update -y
sudo apt-get install ethereum -y
Setup and configure systemd
Run the following to create a unit file to define your eth1.service configuration.
Simply copy/paste the following.
cat > $HOME/eth1.service << EOF
[Unit]
Description=Geth Execution Layer Client service
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=$USER
Restart=on-failure
RestartSec=3
TimeoutSec=300
ExecStart=/usr/bin/geth \
--goerli \
--metrics \
--pprof \
--authrpc.jwtsecret=/secrets/jwtsecret
[Install]
WantedBy=multi-user.target
EOF
Nimbus Specific Configuration: Add the following flag to the ExecStart line.
--ws
Move the unit file to /etc/systemd/system and give it permissions.
sudo mv $HOME/eth1.service /etc/systemd/system/eth1.service
sudo chmod 644 /etc/systemd/system/eth1.service
Run the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable eth1
Start geth
sudo systemctl start eth1
Geth Tip: When is my geth node synched?
  1. 1.
    Attach to the geth console with:geth attach http://127.0.0.1:8545``
  2. 2.
    Type the following:eth.syncing
  3. 3.
    If it returns false, your geth node is synched.
Hyperledger Besu is an open-source Ethereum client designed for demanding enterprise applications requiring secure, high-performance transaction processing in a private network. It's developed under the Apache 2.0 license and written in Java.
🧬
Install java dependency
sudo apt update
sudo apt install openjdk-17-jdk -y libjemalloc-dev
🌜
Download and unzip Besu
Review the latest release at https://github.com/hyperledger/besu/releases
Run the following to automatically download the latest linux release, un-tar and cleanup.
BINARIES_URL="$(curl -s https://api.github.com/repos/hyperledger/besu/releases/latest | grep -o 'https://hyperledger.jfrog.io/hyperledger/besu-binaries/besu/.*tar.gz' | sed -e 's/.*\\n\(https.*.tar.gz$\)/\1/')"
echo Downloading URL: $BINARIES_URL
cd $HOME
wget -O besu.tar.gz "$BINARIES_URL"
tar -xzvf besu.tar.gz -C $HOME
rm besu.tar.gz && mv besu-* besu
Setup and configure systemd
cat > $HOME/eth1.service << EOF
[Unit]
Description=Besu Execution Layer Client service
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=$USER
Restart=on-failure
RestartSec=3
KillSignal=SIGINT
TimeoutStopSec=300
Environment="JAVA_OPTS=-Xmx5g"
ExecStart=$HOME/besu/bin/besu \
--network=goerli \
--metrics-enabled=true \
--sync-mode=X_CHECKPOINT \
--data-storage-format=BONSAI \
--data-path="$HOME/.besu" \
--engine-jwt-secret=/secrets/jwtsecret
[Install]
WantedBy=multi-user.target
EOF
Move the unit file to /etc/systemd/system and give it permissions.
sudo mv $HOME/eth1.service /etc/systemd/system/eth1.service
sudo chmod 644 /etc/systemd/system/eth1.service
Run the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable eth1
Start besu
sudo systemctl start eth1
Nethermind is a flagship Ethereum client all about performance and flexibility. Built on .NET core, a widespread, enterprise-friendly platform, Nethermind makes integration with existing infrastructures simple, without losing sight of stability, reliability, data integrity, and security.
Install dependencies
sudo apt-get update
sudo apt-get install curl libsnappy-dev libc6-dev jq libc6 unzip -y
🌜
Download and unzip Nethermind
Run the following to automatically download the latest linux release, un-zip and cleanup.
cd $HOME
curl -s https://api.github.com/repos/NethermindEth/nethermind/releases/latest | jq -r ".assets[] | select(.name) | .browser_download_url" | grep linux-amd64 | xargs wget -q --show-progress
unzip -o nethermind*.zip -d $HOME/nethermind
rm nethermind*linux*.zip
Setup and configure systemd
Run the following to create a unit file to define your eth1.service configuration.
Simply copy/paste the following.
cat > $HOME/eth1.service << EOF
[Unit]
Description=Nethermind Execution Layer Client service
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=$USER
Restart=on-failure
RestartSec=3
KillSignal=SIGINT
TimeoutStopSec=300
WorkingDirectory=$HOME/nethermind
ExecStart=$HOME/nethermind/Nethermind.Runner \
--config goerli \
--baseDbPath $HOME/.nethermind_goerli \
--Metrics.Enabled true \
--Sync.SnapSync true \
--JsonRpc.JwtSecretFile /secrets/jwtsecret
[Install]
WantedBy=multi-user.target
EOF
Move the unit file to /etc/systemd/system and give it permissions.
sudo mv $HOME/eth1.service /etc/systemd/system/eth1.service
sudo chmod 644 /etc/systemd/system/eth1.service
Run the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable eth1
On Ubuntu 22.xx+, a workaround is required.
sudo ln -s /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so
Start Nethermind
sudo systemctl start eth1
Note about Metric Error messages: You will see these until prometheus pushergateway is setup in section 6. Error in MetricPusher: System.Net.Http.HttpRequestException: Connection refused
Erigon - Successor to OpenEthereum, Erigon is an implementation of Ethereum (aka "Ethereum client"), on the efficiency frontier, written in Go.
Erigon is considered alpha software and requires at least 16GB RAM.
Install Go dependencies
wget -O go.tar.gz https://go.dev/dl/go1.19.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go.tar.gz
echo export PATH=$PATH:/usr/local/go/bin>> $HOME/.bashrc
source $HOME/.bashrc
Verify Go is properly installed and cleanup files.
go version
rm go.tar.gz
🤖
Build and install Erigon
Install build dependencies.
sudo apt-get update
sudo apt install build-essential git
Review the latest release at https://github.com/ledgerwatch/erigon/releases
cd $HOME
git clone --recurse-submodules -j8 https://github.com/ledgerwatch/erigon.git
cd erigon
make erigon
​ Make data directory and update directory ownership.
sudo mkdir -p /var/lib/erigon
sudo chown $USER:$USER /var/lib/erigon
Setup and configure systemd
Run the following to create a unit file to define your eth1.service configuration.
Simply copy/paste the following.
cat > $HOME/eth1.service << EOF
[Unit]
Description=Erigon Execution Layer Client service
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=$USER
Restart=on-failure
RestartSec=3
KillSignal=SIGINT
TimeoutStopSec=300
ExecStart=$HOME/erigon/build/bin/erigon \
--datadir /var/lib/erigon \
--chain goerli \
--metrics \
--pprof \
--prune htc \
--authrpc.jwtsecret=/secrets/jwtsecret
[Install]
WantedBy=multi-user.target
EOF
By default with Erigon, --prune deletes data older than 90K blocks from the tip of the chain (aka, for if tip block is no. 12'000'000, only the data between 11'910'000-12'000'000 will be kept).
Move the unit files to /etc/systemd/system and give it permissions.
sudo mv $HOME/eth1.service /etc/systemd/system/eth1.service
sudo chmod 644 /etc/systemd/system/eth1.service
Run the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable eth1
Start Erigon
sudo systemctl start eth1
Syncing an execution client can take up to 1 week. On high-end machines with gigabit internet, expect syncing to take less than a day.
Your execution client is fully sync'd when these events occur.
  • Geth: Imported new chain segment
  • Besu: Imported #<block number>
  • Nethermind: No longer syncing Old Headers

🛠
Helpful eth1.service commands

​​
🗒
To view and follow eth1 logs
journalctl -fu eth1
🗒
To stop eth1 service
sudo systemctl stop eth1

4. Configure consensus client (beacon chain and validator)

To strengthen Ethereum's resilience against potential attacks or consensus bugs, it's best practice to run a minority client in order to increase client diversity. Find the latest distribution of consensus clients here: https://clientdiversity.org/
Your choice of Lighthouse, Nimbus, Teku, Prysm or Lodestar.
Lighthouse
Nimbus
Teku
Prysm
Lodestar
Lighthouse is an Eth client with a heavy focus on speed and security. The team behind it, Sigma Prime, is an information security and software engineering firm who have funded Lighthouse along with the Ethereum Foundation, Consensys, and private individuals. Lighthouse is built in Rust and offered under an Apache 2.0 License.
4.1. Install rust dependency
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Enter '1' to proceed with the default install.
Update your environment variables.
echo export PATH="$HOME/.cargo/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
Install rust dependencies.
sudo apt-get update
sudo apt install -y git gcc g++ make cmake pkg-config libssl-dev libclang-dev clang protobuf-compiler
💡
4.2. Build Lighthouse from source
mkdir ~/git
cd ~/git
git clone https://github.com/sigp/lighthouse.git
cd lighthouse
git fetch --all && git checkout stable && git pull
make
In case of compilation errors, run the following sequence.
rustup update
cargo clean
make
This build process may take a few minutes.
Verify lighthouse was installed properly by checking the version number.
lighthouse --version
🎩
4.3. Import validator key
Run the following command to import your validator keys from the staking-deposit-cli tool directory.
Enter your keystore password to import accounts.
lighthouse account validator import --network goerli --directory=$HOME/staking-deposit-cli/validator_keys
Verify the accounts were imported successfully.
lighthouse account_manager validator list --network goerli
WARNING: Do not import your validator keys into multiple validator clients and run them at the same time, or you might get slashed. If moving validators to a new setup or different validator client, ensure deletion of the previous validator keys before continuing.
🔥
4.4. Configure port forwarding and/or firewall
Specific to your networking setup or cloud provider settings, ensure your validator's firewall ports are open and reachable.
  • Lighthouse consensus client requires port 9000 for tcp and udp
  • Execution client requires port 30303 for tcp and udp
4.5. Start the beacon chain
Create a systemd unit file to define yourbeacon-chain.service configuration.
sudo nano /etc/systemd/system/beacon-chain.service
Paste the following configuration into the file.
# The eth beacon chain service (part of systemd)
# file: /etc/systemd/system/beacon-chain.service
[Unit]
Description=eth beacon chain service
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=<USER>
Restart=on-failure
ExecStart=<HOME>/.cargo/bin/lighthouse bn \
--network goerli \
--staking \
--validator-monitor-auto \
--metrics \
--checkpoint-sync-url=https://beaconstate.info \
--execution-endpoint http://127.0.0.1:8551 \
--execution-jwt /secrets/jwtsecret
[Install]
WantedBy=multi-user.target
To exit and save, press Ctrl + X, then Y, thenEnter.
Update the configuration file with your current user's home path and user name.
sudo sed -i /etc/systemd/system/beacon-chain.service -e "s:<HOME>:${HOME}:g"
sudo sed -i /etc/systemd/system/beacon-chain.service -e "s:<USER>:${USER}:g"
Update file permissions.
sudo chmod 644 /etc/systemd/system/beacon-chain.service
Run the following to enable auto-start at boot time and then start your beacon node service.
sudo systemctl daemon-reload
sudo systemctl enable beacon-chain
sudo systemctl start beacon-chain
Nice work. Your beacon chain is now managed by the reliability and robustness of systemd.
🧬
4.6. Start the validator
Create a systemd unit file to define your validator.service configuration.
sudo nano /etc/systemd/system/validator.service
Paste the following configuration into the file.
# The eth validator service (part of systemd)
# file: /etc/systemd/system/validator.service
[Unit]
Description=eth validator service
Wants=network-online.target beacon-chain.service
After=network-online.target
[Service]
Type=simple
User=<USER>
Restart=on-failure
ExecStart=<HOME>/.cargo/bin/lighthouse vc \
--network goerli \
--metrics \
--suggested-fee-recipient 0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESS
[Install]
WantedBy=multi-user.target
  • Replace0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESS** with your own Ethereum address that you control. Tips are sent to this address and are immediately spendable, unlike the validator's attestation and block proposal rewards.
To exit and save, press Ctrl + X, then Y, thenEnter.
Update the configuration file with your current user's home path and user name.
sudo sed -i /etc/systemd/system/validator.service -e "s:<HOME>:${HOME}:g"
sudo sed -i /etc/systemd/system/validator.service -e "s:<USER>:${USER}:g"
Update file permissions.
sudo chmod 644 /etc/systemd/system/validator.service
Run the following to enable auto-start at boot time and then start your validator.
sudo systemctl daemon-reload
sudo systemctl enable validator
sudo systemctl start validator
Nice work. Your validator is now managed by the reliability and robustness of systemd.
Nimbus is a research project and a client implementation for Ethereum 2.0 designed to perform well on embedded systems and personal mobile devices, including older smartphones with resource-restricted hardware. The Nimbus team are from Status the company best known for their messaging app/wallet/Web3 browser by the same name. Nimbus (Apache 2) is written in Nim, a language with Python-like syntax that compiles to C.
4.1. Build Nimbus from source
Install dependencies.
sudo apt-get update
sudo apt-get install curl build-essential git -y
Install and build Nimbus.
mkdir ~/git
cd ~/git
git clone https://github.com/status-im/nimbus-eth2
cd nimbus-eth2
make nimbus_beacon_node
The build process may take a few minutes.
Verify Nimbus was installed properly by displaying the version.
cd $HOME/git/nimbus-eth2/build
./nimbus_beacon_node --version
Copy the binary file to /usr/bin
sudo cp $HOME/git/nimbus-eth2/build/nimbus_beacon_node /usr/bin
🎩
4.2. Import validator key
Create a directory structure to store nimbus data.
sudo mkdir -p /var/lib/nimbus
Take ownership of this directory and set the correct permission level.
sudo chown $(whoami):$(whoami) /var/lib/nimbus
sudo chmod 700 /var/lib/nimbus
The following command will import your validator keys.
Enter your keystore password to import accounts.
cd $HOME/git/nimbus-eth2
build/nimbus_beacon_node deposits import --data-dir=/var/lib/nimbus $HOME/staking-deposit-cli/validator_keys
Now you can verify the accounts were imported successfully by doing a directory listing.
ll /var/lib/nimbus/validators
You should see a folder named for each of your validator's pubkey.
WARNING: Do not import your validator keys into multiple validator clients and run them at the same time, or you might get slashed. If moving validators to a new setup or different validator client, ensure deletion of the previous validator keys before continuing.
🔥
4.3. Configure port forwarding and/or firewall
Specific to your networking setup or cloud provider settings, ensure your validator's firewall ports are open and reachable.
  • Nimbus consensus client will use port 9000 for tcp and udp
  • Execution client requires port 30303 for tcp and udp
🏂
4.4. Start the beacon chain and validator
Nimbus combines both the beacon chain and validator into one process.
Running Checkpoint Sync
Checkpoint sync allows you to start your consensus layer within minutes instead of days.
Run the following command.
/usr/bin/nimbus_beacon_node trustedNodeSync \
--network=goerli \
--trusted-node-url=https://goerli.beaconstate.info \
--data-dir=/var/lib/nimbus \
--backfill=false