Lighthouse

Create a service user for the validator service and create data directories.

sudo adduser --system --no-create-home --group validator
sudo mkdir -p /var/lib/lighthouse/validators

Import your validator keys by importing your keystore file. Be sure to enter your keystore password correctly.

sudo lighthouse account validator import \
  --network holesky \
  --datadir /var/lib/lighthouse \
  --directory=$HOME/staking-deposit-cli/validator_keys \
  --reuse-password

Verify that your keystore file was imported successfully.

sudo lighthouse account_manager validator list \
  --network holesky \
  --datadir /var/lib/lighthouse

Once successful, you will be shown your validator's public key.

For example, 0x8d9138fcf5676e2031dc4eae30a2c92e3306903eeec83ca83f4f851afbd4cb3b33f710e6f4ac516b4598697b30b04302

Setup ownership permissions, including hardening the access to this directory.

sudo chown -R validator:validator /var/lib/lighthouse/validators
sudo chmod 700 /var/lib/lighthouse/validators

Create a systemd unit file to define your validator.service configuration.

Paste the following configuration into the file.

  • Replace<0x_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.

  • If you wish to customize a graffiti message that is included when you produce a block, add your message between the double quotes after --graffiti. Maximum length is 16 characters.

To exit and save, press Ctrl + X, then Y, then Enter.

Run the following to enable auto-start at boot time.

Finally, start your validator client and check it's status.

Check your logs to confirm that the validator clients are up and functioning.

For example when using 2 validators, logs will show the following:

Press Ctrl + C to exit the logs.

Example of Synced Lighthouse Validator Client Logs

  • Once the validator is active and proceeded through the validator activation queue, attestation messages will appear indicating successful attestations.

  • Notice the key words "INFO Successfully published attestations".

Cleanup leftover validator_keys

Verify that you have backups of validator_keys directory. The contents are the keystore files.

Having backup copies of your validator_keys directory on USB media can make recovery from node problems quicker. Validator keys can always be regenerated from secret recovery mnemonic phrase.

You may safely delete the directory.

Last updated