Lodestar

Setup a Lodestar validator client

Create a service user for the validator service, as this improves security, then create data directories.

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

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

cd /usr/local/bin/lodestar
sudo ./lodestar validator import \
  --network holesky \
  --dataDir="/var/lib/lodestar/validators" \
  --keystore=$HOME/staking-deposit-cli/validator_keys

Verify that your keystore file was imported successfully.

sudo ./lodestar validator list \
  --network holesky \
  --dataDir="/var/lib/lodestar/validators"

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/lodestar/validators
sudo chmod 700 /var/lib/lodestar/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 Lodestar 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: Published attestations".