Setting up Validator Keys

🌱 1. Obtain testnet ETH

Every 32 ETH you own allows you to make 1 validator. You can run thousands of validators with your node. However on testnet, please only run 1 or 2 validators to keep the activation queue reasonably quick.

Option 1: Ethstaker's #cheap-holesky-validator Channel
  • Step 2: Use the /cheap-holesky-deposit slash command and follow the instructions from the bot. You need to start typing the slash command and it will show above your input box where you can use it.

  • Requirement: In order to use the cheap holesky validator process, you must now set your withdrawal address to 0x4D496CcC28058B1D74B7a19541663E21154f9c84 when creating your validator keys and deposit file. This is to prevent abuses of this service.

Option 2: Use faucet from pk910

πŸ”‘ 2. Generate validator keys

Before continuing please have the following:

Before continuing please understand the following:

Offline Key Generation Best Practices: The mnemonic seed (24 words) to your validator should be protected by keeping them offline. Use Tails OS (see option 3) or a Linux Live USB with staking-deposit-cli (Option 1) or Wagyu to generate keys.

If this is not possible, at least physically disconnect from the network by unplugging ethernet cable or disconnecting from Wifi.

Ways to create your validator keys:

Option 1 for Ubuntu - staking-deposit-cli

1. Download staking-deposit-cli from Github.

#Install dependencies
sudo apt install jq curl -y

#Setup variables
RELEASE_URL="https://api.github.com/repos/ethereum/staking-deposit-cli/releases/latest"
BINARIES_URL="$(curl -s $RELEASE_URL | jq -r ".assets[] | select(.name) | .browser_download_url" | grep linux-amd64.tar.gz$)"
BINARY_FILE="staking-deposit-cli.tar.gz"

echo "Downloading URL: $BINARIES_URL"

cd $HOME
#Download binary
wget -O $BINARY_FILE $BINARIES_URL
#Extract archive
tar -xzvf $BINARY_FILE -C $HOME
#Rename
mv staking_deposit-cli*amd64 staking-deposit-cli
cd staking-deposit-cli

2. Make a new mnemonic

Replace <HARDWARE_WALLET_ADDRESS> with withdrawal address.

./deposit new-mnemonic --chain holesky --execution_address <HARDWARE_WALLET_ADDRESS>
  • Choose your language

  • Repeat your withdrawal/execution address for confirmation

  • Choose the language of the mnemonic word list

  • Choose how many new validators you wish to run

  • Create a keystore password that secures your validator keystore files

  • Repeat your keystore password for confirmation

  • Write down your 24 word mnemonic seed

  • Type your mnemonic, first 4 letters is enough

You will see the following messages after successfully generated the keystore(s) and the deposit(s):


                  #####     #####
                ##     #####     ##
    ###         ##   #######     #########################
    ##  ##      #####               ##                   ##
    ##     #####                 ##                       ##
    ##     ##                     ##                      ###
   ########                        ##                     ####
   ##        ##   ###         #####                       #####
   #                          ##                         # #####
   #                            #                        #  #####
   ##                             ##                    ##
   ##                              ##                   ##
   ##             ###              ##                   ##
   ###############                 ##                   ##
   ###               ##                                 ##
      #############################                    ##
                     ##                             ###
                     #######     #################     ###
                     ##   ## ##        ##   ##    ###
                     ##############          #############

Creating your keys:               [####################################]  <N>/<N>
Creating your keystores:          [####################################]  <N>/<N>
Verifying your keystores:         [####################################]  <N>/<N>
Verifying your deposits:          [####################################]  <N>/<N>

Success!
Your keys can be found at: /home/username/staking-deposit-cli/validator_keys

3. Verify mnemonic seed

By re-generating the keystore files and comparing them to the originals, the mnemonic seen is verified correct by being reproducible.

#Make temp directory to verify seeds
mkdir -p ~/staking-deposit-cli/verify_seed
#Re-generate keys
./deposit existing-mnemonic --chain holesky --folder verify_seed --execution_address <HARDWARE_WALLET_ADDRESS>
  • Choose your language

  • Repeat your withdrawal/execution address for confirmation

  • Type your mnemonic seed, first 4 letters is enough

  • Since this is the first time generating keys, enter the index number as 0.

  • Repeat the index to confirm, 0.

  • Enter how many validators you with to run (same as before)

  • Enter any keystore password, since this is temporary and will be deleted

Compare the deposit_data files.

diff -s validator_keys/deposit_data*.json verify_seed/validator_keys/deposit_data*.json

When the deposit_data files are the same, this means your mnemonic seed is correct.

Example output:

Files validator_keys/deposit_data-16945983.json and verify_seed/validator_keys/deposit_data-16647657.json are identical

Clean up duplicate files.

rm -r verify_seed
Option 2 for Windows/Linux/Mac - Wagyu GUI

Wagyu is an application aimed at lowering the technical bar to staking on Ethereum.

As 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

  1. Click create new secret recovery phrase

  2. Select your network

  3. Click create

  4. Write down your 24 word secret recovery phrase

  5. Check your phrase to confirm you copied it correctly

  6. Specify number of new keys to generate

  7. Specify your keystore password

  8. Specify your Withdrawal address

  9. Click next

  10. Re-type your keystore password

  11. Browse to where you want to save your keys

  12. Review information and close

Option 3 - Offline Tails with staking-deposit-cli

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.

1. 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

2. 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.

3. Download and install the software to transfer your Tails image on your USB stick

For Windows, use one of

For Mac, download Etcher

4. 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.

5. Download and verify the staking-deposit-cli

Download the latest staking-deposit-cli binary by referring to Option 1's steps.

Copy the file to the other USB stick.

6. 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.

7. Welcome to Tails OS

You can boot with all the default settings.

8. Run the staking-deposit-cli

Plug in your other USB key with the staking-deposit-cli file.

Locate the USB key, mount the drive and add execute permissions.

# Locate the usb key
sudo fdisk -l
# Create a mount point
sudo mkdir -p /media/usb-drive
# Mount the usb key. Change device name
sudo mount /dev/sda1 /media/usb-drive
# Change directories
cd /media/usb-drive/staking-deposit-cli
# Add execute permissions
sudo chmod +x ./deposit

9. Make a new mnemonic

Replace <HARDWARE_WALLET_ADDRESS> with withdrawal address.

./deposit new-mnemonic --chain holesky --execution_address <HARDWARE_WALLET_ADDRESS>
  • Choose your language

  • Repeat your withdrawal/execution address for confirmation

  • Choose the language of the mnemonic word list

  • Choose how many new validators you wish to run

  • Create a keystore password that secures your validator keystore files

  • Repeat your keystore password for confirmation

  • Write down your 24 word mnemonic seed

  • Type your mnemonic, first 4 letters is enough

You will see the following messages after successfully generated the keystore(s) and the deposit(s):


                  #####     #####
                ##     #####     ##
    ###         ##   #######     #########################
    ##  ##      #####               ##                   ##
    ##     #####                 ##                       ##
    ##     ##                     ##                      ###
   ########                        ##                     ####
   ##        ##   ###         #####                       #####
   #                          ##                         # #####
   #                            #                        #  #####
   ##                             ##                    ##
   ##                              ##                   ##
   ##             ###              ##                   ##
   ###############                 ##                   ##
   ###               ##                                 ##
      #############################                    ##
                     ##                             ###
                     #######     #################     ###
                     ##   ## ##        ##   ##    ###
                     ##############          #############

Creating your keys:               [####################################]  <N>/<N>
Creating your keystores:          [####################################]  <N>/<N>
Verifying your keystores:         [####################################]  <N>/<N>
Verifying your deposits:          [####################################]  <N>/<N>

Success!
Your keys can be found at: /home/username/staking-deposit-cli/validator_keys

Result: a folder called validator_keys containing keystore-m files and deposit_data.json

10. Verify mnemonic seed

By re-generating the keystore files and comparing them to the originals, the mnemonic seen is verified correct by being reproducible.

#Make temp directory to verify seeds
mkdir verify_seed
#Re-generate keys
./deposit existing-mnemonic --chain holesky --folder verify_seed --execution_address <HARDWARE_WALLET_ADDRESS>
  • Choose your language

  • Repeat your withdrawal/execution address for confirmation

  • Type your mnemonic seed, first 4 letters is enough

  • Since this is the first time generating keys, enter the index number as 0.

  • Repeat the index to confirm, 0.

  • Enter how many validators you with to run (same as before)

  • Enter any keystore password, since this is temporary and will be deleted

Compare the deposit_data files.

diff -s validator_keys/deposit_data*.json verify_seed/validator_keys/deposit_data*.json

When the deposit_data files are the same, this means your mnemonic seed is correct.

Example output:

Files validator_keys/deposit_data-16945983.json and verify_seed/validator_keys/deposit_data-16647657.json are identical

Clean up duplicate files.

rm -r verify_seed

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.

Confirm your validator_keys are on the USB stick before leaving.

ls /media/usb-drive/staking-deposit-cli/validator_keys

πŸ”₯ 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.

Result: There are two types of files generated.

File typePurpose

Keystore file(s)

[i.e.. keystore-16945983.json]

  • Controls the validator's ability to sign transactions

  • Imported and loaded into your validator

  • Keep private. Do not share with anyone

  • Can be recreated from your mnemonic seed/secret recovery phrase

Deposit data file(s)

[i.e. deposit_data-16945983.json]

  • Public information about your validator

  • Required to execute your deposit through the Ethereum Launchpad

  • Can be recreated from your mnemonic seed/secret recovery phrase

⬆️ 3. Transfer validator keys to node

Local node: Skip this step if you generated your keys on your node with staking-deposit-cli. No need to transfer as they're already there.

After creating the validator keys offline, you'll want to copy these validator keys to your node.

To align with this guide's steps, make the default validator_keys path on your node.

mkdir -p $HOME/staking-deposit-cli/validator_keys

To transfer validator key files to your node from your local computer, consider using:

Option 1 - File Transfer

Transfer the keystore-m_xxxxxxxx.json files to the following location on your node.

$HOME/staking-deposit-cli/validator_keys
Option 2 - USB Key

Step 1: From OFFLINE machine, copy validator keys to a USB key.

Plug the USB key into offline machine, then locate the device name.

# Locate the usb key
sudo fdisk -l

Upon executing the above command you will get an output similar to the one below:

Disk /dev/sdc: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1  *     8192 15555555 25555555 7.4G  b W95 FAT32

Mount the key. Change the device name accordingly.

# Create a mount point
sudo mkdir -p /media/usb-drive
# Mount the usb key
sudo mount /dev/sdc1 /media/usb-drive

Copy the keys. Adjust the path names if needed.

# Create a directory on the usb drive to copy the keys into
sudo mkdir -p /media/usb-drive/staking-deposit-cli/validator_keys
# Copy the keys to the usb drive
sudo cp $HOME/staking-deposit-cli/validator_keys/*.json /media/usb-drive/staking-deposit-cli/validator_keys
# Cleanup
sudo umount /media/usb-drive

Step 2: From a USB key, copy validator keys to the NODE.

Plug the USB key into node, then locate the device name.

# Locate the usb key
sudo fdisk -l

Upon executing the above command you will get an output similar to the one below:

Disk /dev/sdc: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1  *     8192 15555555 25555555 7.4G  b W95 FAT32

Mount the key. Change the device name accordingly.

# Create a mount point
sudo mkdir -p /media/usb-drive
# Mount the usb key
sudo mount /dev/sdc1 /media/usb-drive

Copy the keys. Adjust the path names if needed.

# Create a directory copy the keys into
sudo mkdir -p $HOME/staking-deposit-cli/validator_keys
# Copy the keys to the default path
sudo cp /media/usb-drive/staking-deposit-cli/validator_keys/*.json $HOME/staking-deposit-cli/validator_keys
# Cleanup
sudo umount /media/usb-drive

After transfering the files, verify that the keystore-m files are in the proper location on your node.

ls -l $HOME/staking-deposit-cli/validator_keys

Expected sample output:

-r--r----- 1 ethereum ethereum 706 Oct  1 02:33 deposit_data-1696645983.json
-r--r----- 1 ethereum ethereum 710 Oct  1 02:33 keystore-m_12381_3600_0_0_0-161664283.json

πŸ‘©β€πŸ’» 4. Deposit transactions at the Launchpad

  1. Follow the walk-through at the Launchpad: https://holesky.launchpad.ethstaker.cc

Do not send real mainnet ETH during this process! πŸ›‘ Use only Holesky ETH.

  1. Upload yourdeposit_data-#########.json found in the validator_keys directory.

  2. Connect the launchpad with your wallet, review and accept terms. Ensure you're connected to HoleΕ‘ky network.

🐳 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.

On the tool's dropdown box, select HoleΕ‘ky network.

Source: https://twitter.com/AbyssFinance/status/1379732382044069888

  1. 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 Holesky ETH plus some extra to cover the gas fees.

Your transaction is depositing your ETH to the Holesky Deposit Contract address.

Check, double-check, triple-check that the Holesky Deposit Contract address is correct.

0x4242424242424242424242424242424242424242

4. Review backups

πŸ”₯ Critical Crypto Reminder: Keep your mnemonics, keep your ETH.

  • Stay Offline: Write down your mnemonic seed offline. Not email. Not cloud.

  • More than 1 backup of mnemonic: Multiple copies with multiple locations is better. Best stored in a metal seed.

  • Verify your hardware wallet's backup: Most important of all data, this is where your withdrawal address belongs and ultimately controls the 32 ETH

  • In case of recovery: Stored on a USB key, keep copies of

    • validator_keys directory - contains all the keystore .json files

    • keystore password - used to encrypt keystore files

πŸŽ‰Validator key setup and deposits are complete!

Last updated