Eridian
eridian.xyzx.comGitHub
  • 📖Eridian Docs
  • Ethereum Dev
    • ✏️Ethereum Notes
      • 🎛️Technical Basics
      • 🪧Ethereum Addresses
      • 📚Ethereum State Explained
      • ⛽Gas Fees Explained
    • 🔧Useful Tools
      • ☁️Ethers
      • *️⃣Ethernal
    • 📝Solidity Notes
      • ❔Interview Questions
        • 🟢1. Easy - Interview Questions
        • 🟠2. Medium - Interview Questions
        • 🟡3. Hard - Interview Questions
        • 🔴4. Advanced - Interview Questions
      • 💡Note Ideas
      • ABI
      • abi.encodePacked
      • Abstract Contracts
      • Arrays
      • Casting
      • CEI - Checks, Effects, Interactions
      • Comments (NATSPEC)
      • Constructor
      • Contract Structure & Versions
      • Data - Storage vs Memory
      • Data - Storage Layout
      • Enum
      • Errors (require & revert)
      • Events
      • EVM Opcodes
      • External Contract Interaction
      • 🏗️External Dependencies
      • Functions
      • Function Modifiers
      • If / Else / For / While Loops
      • Inheritance
      • Interfaces
      • Keccak256
      • Library
      • Mappings
      • msg.sender
      • Objects & Types
      • OpenZeppelin
      • Payable
      • Public State Variable vs Function
      • Receive & Fallback
      • Security
      • Self Destruct
      • Send ETH (transfer, send, call)
      • Stack Too Deep
      • Structs
      • Style Guide
      • Time Units
      • Try / Catch
      • Typecasting
      • Using Directive
      • Variables, Consts & Immutable
      • Withdraws
    • ⚒️Foundry Notes
      • 📖Docs & GitHub Pages
      • 🤝Useful Commands
        • 🔨Anvil
        • 🪄Cast
        • 🔥Forge
      • 🧪Tests
        • Cheatcodes
      • 📝Useful Scripts
        • Deploy Contract Using Hex
    • 👾DeFi Challenges
      • 👨‍🚀Ethernaut
        • Ethernaut - Template
        • Level 1 - Fallback ⏺
        • Level 2 - Fallout ⏺
        • Level 3 - Coin Flip ⏺⏺
        • Level 4 - Telephone ⏺
        • Level 5 - Token ⏺⏺
        • Level 6 - Delegation ⏺⏺
        • Level 7 - Force ⏺⏺⏺
        • Level 8 - Vault ⏺⏺
        • Level 9 - King ⏺⏺⏺
        • Level 10 - Re-entrancy ⏺⏺⏺
        • Level 11 - Elevator ⏺⏺
        • Level 12 - Privacy ⏺⏺⏺
        • Level 13 - Gatekeeper 1 ⏺⏺⏺⏺
        • Level 14 - Gatekeeper 2 ⏺⏺⏺
        • Level 15 - Naught Coin ⏺⏺⏺
        • Level 16 - Preservation ⏺⏺⏺⏺
        • Level 17 - Recovery ⏺⏺⏺
        • Level 18 - Magic Number ⏺⏺⏺
        • Level 19 - Alien Codex ⏺⏺⏺⏺
        • Level 20 - Denial ⏺⏺⏺
        • Level 21 - Shop ⏺⏺
        • Level 22 - Dex ⏺⏺
        • Level 23 - Dex Two ⏺⏺
        • Level 24 - Puzzle Wallet ⏺⏺⏺⏺
        • Level 25 - Motorbike ⏺⏺⏺
        • Level 26 - DoubleEntryPoint ⏺⏺
        • Level 27 - Good Samaritan ⏺⏺⏺
        • Level 28 - Gatekeeper 3 ⏺⏺⏺
        • Level 29 - Switch ⏺⏺⏺⏺
        • Level 30 - Higher Order ⏺⏺⏺⏺
        • Level 31 - Stake ⏺⏺⏺
      • 💸Damn Vulnerable DeFi
    • 🔍Auditing
      • 🗞️Exploit Resources
      • 🔧Audit Tools
    • 🤖MEV
  • Infrastructure Docs
    • 💻Hardware
    • 🐧Linux
      • 📖Linux Glossary
      • ⌨️Linux Commands
      • 💾Installation
      • 🏗️Maintenance
      • 🖥️Ubuntu Desktop
      • 🛜ZeroTier
      • 🎞️TMUX
      • 🔵Bluetooth
    • ⛓️Ethereum Clients
      • ⚙️Execution Clients
        • ⛏️Geth
          • 💾Installation
          • ⌨️Useful Commands
          • 🏗️Maintenance
        • 🐻Erigon
          • 💾Installation
          • ⌨️Useful Commands
          • 🏗️Maintenance
        • 🧶Besu
          • 💾Installation
          • ⌨️Useful Commands
          • 🏗️Maintenance
      • 🤝Beacon Clients
        • 💡Lighthouse
          • 💾Installation
          • ⌨️Useful Commands
          • 🏗️Maintenance
        • 🪅Teku
          • 💾Installation
          • ⌨️Useful Commands
          • 🏗️Maintenance
      • 💎Validator Clients
        • 💡Lighthouse
          • 💾Installation
          • ⌨️Useful Commands
          • 🏗️Maintenance
      • ➕L2 Clients
        • 🔵Base
          • 💾Installation
          • ⌨️Useful Commands
          • 🏗️Maintenance
      • 💰MEV Boost
        • 💾Installation
        • 🏗️Maintenance
    • 🚨Alerting and Monitoring
      • 🔥Prometheus
      • 🌡️HealthChecks.io
      • 📟PagerDuty
  • General Dev
    • 💾Git Notes
      • Repos
      • Committing changes
      • Branches
      • Merging & Rebasing
      • PRs
Powered by GitBook
On this page
  • Create Aliases
  • Lighthouse VC - Configure Service
  • Command Aliases
Edit on GitHub
  1. Infrastructure Docs
  2. Ethereum Clients
  3. Validator Clients
  4. Lighthouse

Installation

Lighthouse Validator client installation guide.

Last updated 1 year ago

Create Aliases

echo "alias lighthouse-validator-log='journalctl -f -u lighthousevalidator.service -o cat | ccze -A'" >> ~/.bashrc
echo "alias lighthouse-validator-start='sudo systemctl start lighthousevalidator.service'" >> ~/.bashrc
echo "alias lighthouse-validator-stop='sudo systemctl stop lighthousevalidator.service'" >> ~/.bashrc
echo "alias lighthouse-validator-restart='sudo systemctl restart lighthousevalidator.service'" >> ~/.bashrc
echo "alias lighthouse-validator-status='sudo systemctl status lighthousevalidator.service'" >> ~/.bashrc
echo "alias lighthouse-validator-config='sudo vim /etc/systemd/system/lighthousevalidator.service'" >> ~/.bashrc
echo "alias lighthouse-validator-enable='sudo systemctl enable lighthousevalidator.service'" >> ~/.bashrc
echo "alias lighthouse-validator-disable='sudo systemctl disable lighthousevalidator.service'" >> ~/.bashrc

source ~/.bashrc

Lighthouse VC - Configure Service

Create lighthousevalidator user and set permissions.

sudo useradd --no-create-home --shell /bin/false lighthousevalidator
sudo mkdir -p /var/lib/lighthouse/validators
sudo chown -R lighthousevalidator:lighthousevalidator /var/lib/lighthouse/validators

# <THIS IS NEEDED SO THE VALIDATOR CAN IMPORT THE KEYSTORES>
sudo chmod 700 /var/lib/lighthouse/validators

Configure lighthousevalidator service using the command line flags.

sudo vim /etc/systemd/system/lighthousevalidator.service
/etc/systemd/system/lighthousevalidator.service
[Unit]
Description=Lighthouse Ethereum Client - Validator Client
After=network-online.target
Wants=network-online.target

[Service]
User=lighthousevalidator
Group=lighthousevalidator
Type=simple
Restart=always
RestartSec=5

Environment=NETWORK=                    # E.g. mainnet or holesky
Environment=DATADIR=                    # Default: /var/lib/lighthouse
Environment=GRAFFITI=                   # E.g. For the merge!
Environment=METRICS_PORT=               # Default: 5064
Environment=MONITORING_ENDPOINTS=
Environment=SUGGESTED_FEE_RECIPIENT=
Environment=BEACON_NODES=

ExecStart=/usr/local/bin/lighthouse vc \
    --network ${NETWORK} \
    --datadir ${DATADIR} \
    --graffiti ${GRAFFITI} \
    --metrics \
    --metrics-port ${METRICS_PORT} \
    --monitoring-endpoint ${MONITORING_ENDPOINTS} \
    --enable-doppelganger-protection \
    --suggested-fee-recipient ${SUGGESTED_FEE_RECIPIENT} \
    --builder-proposals \
    --beacon-nodes ${BEACON_NODES}

[Install]
WantedBy=multi-user.target

/usr/local/bin/lighthouse vc

Starts the validator node

--network

Name of the chain Lighthouse will sync and follow

  • Possible values:

    • mainnet

    • prater

    • gnosis

    • kiln

    • ropsten

--datadir

Used to specify a custom root data directory for lighthouse keys and databases

--graffiti

Specify your custom graffiti to be included in blocks

--monitoring-endpoint

--enable-doppelganger-protection

Protects from the chance of two instances of the validator starting on the same system

Not perfect, and does have a penalty of waiting for 2-3 epochs (approx. 6.4 minutes per epoch)

It's a bit annoying to miss a few attestations, and would be very sad to miss a block, but the chance of me being a block proposer during that downtime is very low, and the benefits of not getting slashed are much greater

--metrics

Enable the Prometheus metrics HTTP server

  • Disabled by default

--suggested-fee-recipient

The fallback address provided to the Beacon Node if nothing suitable is found in the validator definitions or fee recipient file

Start the service and check it's working as expected.

Command Aliases

daemon-reload        # Reload any changes made to the lighthousevalidator.service
lighthouse-validator-enable     # Enable the lighthousevalidator.service
lighthouse-validator-start      # Start the lighthousevalidator.service
lighthouse-validator-status     # View the status of the lighthousevalidator.service

lighthouse-validator-log        # View the lighthousevalidator.service logs

At this point, the lighthousevalidator.service is running with no keystores.

So it will just show a message saying something like No validators present which is fine.

Set to a monitoring service e.g.

⛓️
💎
💡
💾
Create Aliases
Lighthouse VC - Configure Service
https://beaconcha.in
https://lighthouse-book.sigmaprime.io/validator-doppelganger.html