Eth 2.0 Key Generation: Ubuntu Live USB
This guide demonstrates how to safely generate Eth 2.0 validator keys using Ubuntu live boot from USB.
The process to create mainnet and testnet keys is identical, but the keys are NOT interchangeable. Be sure to practice everything on testnet prior to depositing on mainnet.
DISCLAIMER - FOR EDUCATIONAL PURPOSES ONLY
Summary
You will need 2 USB sticks and a PC running either Linux, Windows, or macOS.
Step 1 - Download eth2.0-deposit-cli
Key Generator
eth2.0-deposit-cli
Key GeneratorPlease be sure you are using the official Ethereum Foundation GitHub account.
Select the file ending in linux-amd64.tar.gz
, then choose "Save". Once complete, the file (aka tarball) should appear in your Downloads folder.
Copy the eth2deposit-cli
tarball to the USB:
eth2deposit-cli
tarball to the USB:Eject the USB with the tarball and insert the 2nd USB to be used for Ubuntu.
Step 2 - Download Ubuntu
Visit http://www.releases.ubuntu.com/20.04/ and download the desktop image:
Step 3 - Burn Ubuntu ISO image to USB
Choose the Ubuntu ISO and Make Startup Disk:
The USB will be completely wiped, be sure to back up any important data!
Installation Complete:
Step 4 - Disconnect Internet
Step 5 - Boot into Ubuntu Live USB
Ubuntu USB Startup Process:
Begin with the computer powered down
Plug the Ubuntu live USB into the computer
Start the computer and continually press
F-12
to enter one-time boot menuChoose the Ubuntu live USB from the boot menu
Tapping F-12 or F-10 at computer startup is the standard method to enter the one-time boot menu. If that doesn't work you can search "one-time boot menu" for your computer model.
If nothing is working, you may need to use F-2 and enter the BIOS to allow booting from USB.
If successful, the Ubuntu live USB will pull up the GRUB menu. It may automatically continue, otherwise select the first option by hitting ENTER
Select Try Ubuntu
:
Try Ubuntu
:Once you click Try Ubuntu
, the Ubuntu 20.04 desktop will begin to load.
Turn Off WiFi and Bluetooth:
Plug in 2nd USB and double click the eth2deposit-cli
tarball:
eth2deposit-cli
tarball:Click Extract
in the upper left corner:
Extract
in the upper left corner:Click Home
towards the upper left, then click the green Extract
Home
towards the upper left, then click the green Extract
Navigate to the Home
Folder:
Home
Folder:Rename the folder to eth2.0-deposit-cli
eth2.0-deposit-cli
Step 6 - Eth 2.0 Key Generation
Open new terminal window using Ctrl + Alt + T
Ctrl + Alt + T
Change directory to eth2.0-deposit-cli folder:
Run ./deposit new-mnemonic
:
./deposit new-mnemonic
:You will be asked to provide the following responses:
Please choose your mnemonic language:
Please choose how many validators you wish to run:
Please choose mainnet or testnet:
Type a password to secure your validator
Repeat password for confirmation
Step 7 - Mnemonic Seed
After confirming the password, you'll be given a mnemonic seed phrase:
Write down the mnemonic, then reenter it to ensure it's correct:
A few things to keep in mind regarding the 24-word mnemonic phrase:
Make sure you use durable paper and permanent pen
Store in a waterproof, fireproof bag inside a safe
A bank security box is helpful in preventing the $5 wrench attack
Minimum of 2 copies in 2 different locations
You can split a copy 12/12 and give to trusted family/friends
Once you correctly re-enter the mnemonic, your validator_keys
will be created.
Step 8 - deposit_data
and keystore
files
deposit_data
and keystore
filesFiles can be found at:/home/YOURUSERNAME/eth2.0-deposit-cli/validator_keys
deposit_data-[timestamp].json
contains data used to register your validator on the Eth2 launchpad
keystore -[timestamp].json
validator keystore file protected by password (aka validator signing key)
If you lose the mnemonic seed, your stake is lost forever.
Navigate to /home/eth2.0-deposit-cli/validator_keys
:
/home/eth2.0-deposit-cli/validator_keys
:The "pubkey" is the validator public key and should be the same in both files.
Deposit_data
file contents:
Deposit_data
file contents:Keystore
file contents:
Keystore
file contents:Copy deposit_data
and keystore
files to external USB:
deposit_data
and keystore
files to external USB:You can always use your mnemonic seed to generate a new keystore file if necessary.
Congratulations, you successfully created your Eth 2.0 validator keys!
Close Ubuntu, store the seed, and transfer deposit_data
and keystore
to your main PC.
Learn how to run a testnet validator: Pyrmont || Lighthouse Eth2 Staking Guide
Last updated