Lodestar
Overview
Official Links
Documentation
1. Initial configuration
Create a service user for the consensus service, create data directory and assign ownership.
sudo adduser --system --no-create-home --group consensus
sudo mkdir -p /var/lib/lodestar
sudo chown -R consensus:consensus /var/lib/lodestar
Install dependencies.
sudo apt-get install gcc g++ make git curl ccze -y
2. Install Binaries
Downloading binaries is often faster and more convenient.
Building from source code can offer better compatibility and is more aligned with the spirit of FOSS (free open source software).
3. Setup and configure systemd
Create a systemd unit file to define your consensus.service
configuration.
sudo nano /etc/systemd/system/consensus.service
Paste the following configuration into the file.
[Unit]
Description=Lodestar Consensus Layer Client service for Hoodi
Wants=network-online.target
After=network-online.target
Documentation=https://www.coincashew.com
[Service]
Type=simple
User=consensus
Group=consensus
Restart=on-failure
RestartSec=3
KillSignal=SIGINT
TimeoutStopSec=900
WorkingDirectory=/usr/local/bin/lodestar
ExecStart=/usr/local/bin/lodestar/lodestar beacon \
--dataDir /var/lib/lodestar \
--network hoodi \
--rest.port 5052 \
--port 9000 \
--targetPeers 100 \
--metrics.port 8008 \
--metrics true \
--checkpointSyncUrl https://hoodi.beaconstate.ethstaker.cc \
--jwt-secret /secrets/jwtsecret \
--execution.urls http://127.0.0.1:8551 \
--suggestedFeeRecipient <0x_CHANGE_THIS_TO_MY_ETH_FEE_RECIPIENT_ADDRESS>
[Install]
WantedBy=multi-user.target
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.Not staking? If you only want a full node, delete the whole line beginning with
--suggestedFeeRecipient
To exit and save, press Ctrl
+ X
, then Y
, then Enter
.
Run the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable consensus
Finally, start your consensus layer client and check it's status.
sudo systemctl start consensus
sudo systemctl status consensus
Press Ctrl
+ C
to exit the status.
4. Helpful consensus client commands
sudo journalctl -fu consensus | ccze
Example of Synced Lodestar Consensus Client Logs
Mar-19 04:09:49.000 info: Synced - slot: 3338 - head: 3355 0x5abb_ac30 - execution: valid(0x1a3c_2ca5) - finalized: 0xfa22_1142:3421 - peers: 25
Mar-19 04:09:52.000 info: Synced - slot: 3339 - head: 3356 0xcd2a_8b32 - execution: valid(0xab34_fa32) - finalized: 0xfa22_1142:3421 - peers: 25
Mar-19 04:09:04.000 info: Synced - slot: 3340 - head: 3357 0xff1a_f12a - execution: valid(0xfaf1_b35f) - finalized: 0xfa22_1142:3421 - peers: 25
Now that your consensus client is configured and started, you have a full node.
Proceed to the next step on setting up your validator client, which turns a full node into a staking node.
Last updated