Skip to content

easily deploy full geth + lighthouse + metrics stack docker-compose for running an eth2 validator

Notifications You must be signed in to change notification settings

clifton/eth2-stack

 
 

Repository files navigation

ETH2 stack

geth + lighthouse beacon/validator + mev-boost (coming soon) + metrics

Usage

  1. optional create alchemy and infura eth1/eth2 api endpoints.
  2. create a new .env file and add the following
BEACON_ENDPOINTS=http://beacon:5052,https://YOUR_API_KEY-beacon-mainnet.infura.io
FEE_RECIPIENT=0xYourAddress
EXECUTION_ENDPOINT=http://geth:8551
  1. import validator keys (instructions below)
  2. run dc up -d geth beacon
  3. copy geth/mainnet/jwtsecret to .lighthouse/jwtsecret
  4. run dc stop geth beacon && dc up -d to launch all the nodes
  5. that's it! beacon and validators will use the backup eth1/eth2 apis until your node is synced

Launching a new validator

  1. generate validator keys via eth2 launchpaid
  2. import validator keys: dc run --rm lighthouse-base lighthouse --network mainnet account validator import --directory /root/validator_keys

Migrating validator to a new machine

See https://lighthouse-book.sigmaprime.io/slashing-protection.html

Metrics (forked)

metrics.png

Provides a docker-compose environment which scrapes metrics from Lighthouse nodes using Prometheus and presents them in a browser-based Grafana GUI.

Metrics Usage

  1. Start a lighthouse node with $ lighthouse beacon --metrics
    • The --metrics flag is required for metrics.
  2. Bring the environment up with $ docker-compose up --build.
  3. Ensure that Prometheus can access your Lighthouse node by ensuring it is in the UP state at http://localhost:9090/targets.
  4. Browse to http://localhost:3000
    • Username: admin
    • Password: changeme
  5. Import some dashboards from the dashboards directory in this repo:
    • In the Grafana UI, go to Dashboards -> Manage -> Import -> Upload .json file.
    • The Summary.json dashboard is a good place to start.

Hosting Publicly

By default Prometheus and Grafana will only bind to localhost (127.0.0.1), in order to protect you from accidentally exposing them to the public internet. If you would like to change this you must edit the http_addr in grafana.ini.

Maintenance and Contributing

The Lighthouse team has a hosted version of this stack where we do the majority of the monitoring. The dashboards in this repo are not guaranteed to be kept updated as we add/modify metrics to Lighthouse. If you're having problems, please reach out and we can update the dashboards here.

Feel free to create your own dashboards, export them and submit them here as PRs.

About

easily deploy full geth + lighthouse + metrics stack docker-compose for running an eth2 validator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%