ETH2 - Validator

Eth2 || Validator || Generate Keys

Eth2 keys should be generated in a safe environment.

Please see this guide on how to securely generate Eth2 keys offline using Ubuntu to boot into a live USB.

Once you have generated your keys, the next step is to submit a deposit using the Launchpad.

Eth2 || Launchpad

You already installed an Eth1 node, synced an Eth2 beacon node, and generated the key pairs, so click continue until you reach "Upload Deposit File".

Upload Deposit File

Drag and drop your Deposit Data file onto the launchpad site:

Select Metamask Wallet

Be sure your Metamask wallets has more than 32 ETH to cover gas fees (about 0.1 ETH)

Accept the Risks and Continue

Create Deposit Transaction

Click "SEND DEPOSIT" to initiate the transaction in Metamask

Confirm Deposit Address is Correct:

Check the upper right corner in Metamask to ensure you are sending to the correct address

  • Deposit Contract: 0x00000000219ab540356cbb839cbe05303d7705fa

You may want to edit the gas fee to "Fast" to ensure quick execution.

Transaction Successful

Use https://beaconcha.in/ to search your validator and check the status

The deposit_data-[timestamp].json file contains your validator"pubkey" which you can use to check the status of Eth1 and Eth2 deposits.

Once the deposit is confirmed, you'll enter the queue and be assigned an activation epoch.

Note: It may take up to 15 hours for deposit to confirm on ETH2

Click Deposits

Eth2 || Validator || Import Keys

Change Ownership of Lighthouse Directory:

DO NOT JUST COPY THE NEXT COMMAND

You must change YOURUSERNAME:YOURUSERNAME to your username in the command below.

sudo chown -R YOURUSERNAME:YOURUSERNAME /var/lib/lighthouse

Note: If you don't know your username, use the command whoami

Change directory to lighthouse

cd ~/lighthouse

Import keystore into Lighthouse:

Copy your keystore file from the USB to the HOME folder then run the following command:

lighthouse account validator import --directory $HOME --datadir /var/lib/lighthouse

Keys Successfully Imported

Once the keystore is imported, you can delete the keystore from the HOME folder.

You should save an offline copy of the keystore on the USB, but you can always generate a new keystore file using the 24 word mnemonic if needed.

Change ownership of /var/lib/lighthouse back to root:

sudo chown root:root /var/lib/lighthouse

Change ownership of /var/lib/lighthouse/beacon :

sudo chown -R lighthousebeacon:lighthousebeacon /var/lib/lighthouse/beacon

Eth2 || Validator || Systemd

Create lighthousevalidator user:

sudo useradd --no-create-home --shell /bin/false lighthousevalidator

Create /var/lib/lighthouse/validators directory:

sudo mkdir -p /var/lib/lighthouse/validators

Set permissions for /var/lib/lighthouse/validators :

sudo chown -R lighthousevalidator:lighthousevalidator /var/lib/lighthouse/validators

Create lighthousevalidator.service:

sudo nano /etc/systemd/system/lighthousevalidator.service

Paste the following into the file:

[Unit] Description=Lighthouse Validator Wants=network-online.target After=network-online.target [Service] User=lighthousevalidator Group=lighthousevalidator Type=simple Restart=always RestartSec=5 ExecStart=/usr/local/bin/lighthouse validator_client --datadir /var/lib/lighthouse [Install] WantedBy=multi-user.target

The file should look like this:

Use Ctrl + X to exit, Y to save, then Enter to confirm.

Reload Daemon:

sudo systemctl daemon-reload

ETH2 || Validator || Run

Start lighthousevalidator.service:

sudo systemctl start lighthousevalidator

Check lighthousevalidator.service output:

sudo journalctl -fu lighthousevalidator.service

This shows running journal entries created by lighthousevalidator.service . You can use Ctrl + C to close the window, but the program will continue running in the background.

Use sudo systemctl stop lighthousevalidator if you need to stop the service.

Validator || Waiting for Beacon Node to Sync

If the beacon node has not finished syncing, the validator will provide a warning:

Validator || Awaiting Activation

You can use https://beaconcha.in/ to check the status of your validator.

Beaconcha.in || Awaiting Activation

Congratulations, you are officially ready to begin staking! Your validator will be assigned an activation epoch. Be sure you have all systems updated and online prior to activation!

Once your validator has activated and began attesting, no other action is needed. It's important to check for updates (both ETH1 and ETH2), and occassionally check your validator to ensure you are attesting.

Update Geth (and some other software packages)

sudo apt update && sudo apt upgrade

It may prompt you to hit "Y" to continue updating the system

Update Lighthouse

Lighthouse does not automatically update. Follow these instructions to install updates:

1. Stop lighthousebeacon and lighthousevalidator

sudo systemctl stop lighthousebeacon && sudo systemctl stop lighthousevalidator

2. Change directories to lighthouse:

cd ~/lighthouse

3. Pull Master:

git pull origin master

4. Make:

make

5. Copy into /usr/local/bin:

sudo cp /$HOME/.cargo/bin/lighthouse /usr/local/bin

6. Start beacon node and validator:

sudo systemctl start lighthousebeacon && sudo systemctl start lighthousevalidator

7. Check Beacon Node Output:

sudo journalctl -fu lighthousebeacon.service

8. Check Validator output:

sudo journalctl -fu lighthousevalidator.service

Lighthouse is updated! Check https://beaconcha.in/ to ensure you are attesting again.

Last updated