Last Updated: June 4, 2022
Table of Contents
This is Part 1 of a step-by-step guide to setup the ChainSafe Lodestar consensus client on the Ethereum Beacon Chain.
This guide is separated into a series of parts, grouped by related steps to setup a full Lodestar consensus beacon node and validator client from start to finish. The topics are separated as follows:
In order to participate in staking it is necessary to generate some data files based on the number of validators you’d like to fund and operate.
OPTIONAL: If you have already generated your deposit data and validator key(s) you can skip this step.
Each validator requires a deposit of 32 ETH. You should have sufficient ETH in your MetaMask wallet to fund each validator. For example if you plan to run 5 validators you will need to have (32 x 5) = 160 ETH plus some extra to cover the gas fees. The ETH deposit will happen later in the guide after everything else is up and running.
TESTNET USERS: If you are running Lodestar on a testnet, you will need testnet ETH to complete your setup. You can obtain it from the following sources:
Join our ChainSafe Discord channel and request some GoETH (Goerli Testnet Ether) from our lodestar-general
channel.
Alternative Goerli Testnet Faucets
https://gitter.im/goerli/testnet/
https://faucet.goerli.mudit.blog/
https://goerli-faucet.slock.it/
You may need a Twitter account to prove your identity before being able to obtain Testnet Ether for testing.
Go here to get the “Latest release” of the deposit command line interface (CLI) app.
In the assets section download the version matching the platform you are currently on (e.g. Windows, Mac, Linux Desktop, etc.).
Decompress the archive. There should be a binary file (executable) inside. The deposit tool generates files for staking as well as a Secret Recovery Phrase (mnemonic key). This key must be handled securely. There are two options to proceed from here.
Recommended — Copy the binary file to a USB drive. Connect to a fully air-gapped machine (never previously connected to the internet), copy the file over and run from there.
Not recommended — Run from the current machine. An internet connection may be an opportunity to leak your mnemonic key. If a fully air-gapped machine isn’t available disconnect the internet on the current machine before proceeding.
When ready, we will run the file in a terminal window (or CMD in Windows) using the commands based on your platform below.
NOTE:
--num_validators <NumberOfValidators>
with the number of validators you want to fund. E.g. --num_validators 2
.--chain <ChainID>
with the network you intend to use. E.g. --chain mainnet
or --chain prater
Open your Terminal and navigate to the folder which contains the eth2-deposit-cli executable program.
Run the application with the following command. Ensure you have replaced the <NumberOfValidators>
and <ChainID>
parameters:
./deposit new-mnemonic --num_validators <NumberOfValidators> --chain <ChainID>
After unzipping and double clicking on deposit
you may encounter a "deposit" cannot be opened because it is from an unidentified developer
error. This is due to the software not being officially signed by Apple. To open the application:
System Preferences
Security and Privacy
Open Anyway
To turn on the New Terminal at Folder service and be able to open command prompts for arbitrary folders fast from Finder windows:
Select Finder > Services > Services Preferences… from the menu in Finder.
Make sure New Terminal at Folder and New Terminal Tab at Folder are checked under Files and Folders.
Then select the enclosing folder, right-click and select Services > New Terminal at Folder.
When your Terminal is open, run the application with the following command. Ensure you have replaced the <NumberOfValidators>
and <ChainID>
parameters:
./deposit new-mnemonic --num_validators <NumberOfValidators> --chain <ChainID>
Example:
./deposit new-mnemonic --num_validators 1 --chain mainnet
Extract the contents of the downloaded eth2deposit-cli zip folder.
Navigate into the unzipped folder which contains the deposit.exe file.
Open the CMD terminal within this folder by navigating to the address bar and replacing the bar contents with cmd
and press 'Enter'
A CMD terminal will start in the current folder. Ensure you have replaced the <NumberOfValidators>
and <ChainID>
parameters:
deposit.exe new-mnemonic --num_validators <NumberOfValidators> --chain <ChainID>
Once you execute the above steps on your platform of choice you will be asked to create a validator keystore password. Back it up somewhere safe. You will need this later to load the validator keys into the Lodestar validator client.
WARNING: A secret recovery phrase (24 random words) will be generated.
Back it up somewhere safe. This is CRITICAL.
You will eventually use this to generate your withdrawal keys for your ETH or add additional validators. If you lose this key you will not be able to withdraw your funds. If this key is compromised by somebody else, they will be able to withdraw your funds.
WARNING: Do not use the 24 word example above. Once a 24 word secret recovery phrase is made public, it is compromised.
Once you have confirmed your mnemonic your validator keys will be created.
The deposit_data-[timestamp].json
file contains the public keys for the validators and information about the staking deposit. This file will be used to complete the ETH deposit process later on.
The keystore-m...json
files contain the encrypted validator signing key. There is one keystore-m per validator that you are funding. These will be imported into the Lodestar validator client for use while staking. You will copy these files over to the Ubuntu server (if not already there) later.
Ensure you know the location of your validator_keys
folder. We will need to refer to it later. If your staking setup is on another machine, copy your validator_keys
folder onto a USB stick. You will need it later.
Continue onward to the Final Steps.
You can download the StakeHouse Wagyu Key Generator here maintained by Colfax Selby from the r/EthStaker community. Support the project here through Gitcoin Grants.
Download the software by selecting the platform you are using. Install and run the Wagyu Key Gen.
Select Create New Secret Recovery Phrase
to generate a new 24 word secret recovery phrase.
Follow the instructions to create your new validator key files, then continue to the Final Steps.
The deposit_data-[timestamp].json
file contains the public keys for the validators and information about the staking deposit. This file will be used to complete the ETH deposit process later on.
The keystore-m...json
files contain the encrypted validator signing key. There is one keystore-m per validator that you are funding. These will be imported into the Lodestar validator client for use while staking. You will copy these files over to the Ubuntu server (if not already there) later.
Now that you have the deposit data and the keystore files move on to set up the Ubuntu server.
DO NOT DEPOSIT any ETH at this moment.
It is important to complete and verify your staking setup first. If the ETH deposits become active and your staking setup is not ready you will start receiving penalties for non-activity.
Continue on with the guide to Part 2: Set up and Secure your Server.