Skip to content

Commit

Permalink
Support for LH v1.0.1 metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Nov 27, 2020
1 parent 37a403a commit a06b30e
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ directory (`cd ~/eth2-docker` by default):
* !! If coming from Prysm alpha.29 or earlier, make changes as per notes for [v0.1.7](#v017-2020-10-15)
* `sudo docker-compose up -d eth2`

## v0.2.2 2020-11-27

* Lighthouse v1.0.1 validator metrics supported

## v0.2.1 2020-11-24

* Support for Besu eth1 client
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# eth2-docker v0.2.1
# eth2-docker v0.2.2

Unofficial docker environment for Ethereum 2.0 clients

Expand Down Expand Up @@ -216,7 +216,8 @@ A baseline set of dashboards has been included.
- [Metanull's Prysm Dashboard JSON](https://raw.githubusercontent.com/metanull-operator/eth2-grafana/master/eth2-grafana-dashboard-single-source.json)
- [Prysm Dashboard JSON](https://raw.githubusercontent.com/GuillaumeMiralles/prysm-grafana-dashboard/master/less_10_validators.json)
- [Prysm Dashboard JSON for more than 10 validators](https://raw.githubusercontent.com/GuillaumeMiralles/prysm-grafana-dashboard/master/more_10_validators.json)
- [Lighthouse Dashboard JSON](https://raw.githubusercontent.com/sigp/lighthouse-metrics/master/dashboards/Summary.json)
- [Lighthouse Beacon Dashboard JSON](https://raw.githubusercontent.com/sigp/lighthouse-metrics/master/dashboards/Summary.json)
- [Lighthouse Validator Client Dashboard JSON](https://raw.githubusercontent.com/sigp/lighthouse-metrics/master/dashboards/ValidatorClient.json)
- [Nimbus Dashboard JSON](https://raw.githubusercontent.com/status-im/nimbus-eth2/master/grafana/beacon_nodes_Grafana_dashboard.json)
- [Teku Dashboard](https://grafana.com/api/dashboards/12199/revisions/1/download)

Expand Down Expand Up @@ -338,6 +339,11 @@ changing the directory name the project is stored in; or when you want to start
with a fresh database. Keep in mind that synchronizing Ethereum 1 can take days on main
net, however.

> **Caution** If you are removing the client to recreate it, please be careful
> to wait 10 minutes before importing validator key(s) and starting it again.
> The slashing protection DB will be gone, and you risk slashing your validator(s)
> otherwise.
## Addendum: Add or recover validators

You can use eth2.0-deposit-cli to either recover validator signing keys or add
Expand Down Expand Up @@ -377,15 +383,15 @@ prompts.
If you wish to exit validators that were running on other clients, you can do this
as follows:

- Stop the other client(s), and wait 20 minutes. This is so you won't have
- Stop the other client(s), and wait 10 minutes. This is so you won't have
a validator attest in the same epoch twice.
- Copy all `keystore-m` JSON files into `.eth2/validator_keys` in this project
directory.
- Stop the Prysm client in this project, `sudo docker-compose down`
- Import the new keys via `sudo docker-compose run validator-import`. Note
that Prysm assumes they all have the same password. If that's not the case,
maybe work in batches.
- Verify once more that the old client is down, has been for 20 minutes, and
- Verify once more that the old client is down, has been for 10 minutes, and
can't come back up. **If both the old client and this Prysm run at the same time,
you will slash yourself**
- Bring the Prysm client up: `sudo docker-compose up -d eth2`
Expand Down
2 changes: 2 additions & 0 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ and with which options. See below for available compose files. Think of this as
blocks you combine: One ethereum 2 client, optionally one ethereum 1 node, optionally reporting.
- If you are going to use a 3rd-party provider as your eth1 chain source, set `ETH1_NODE` to that URL.
Look into [Alchemy](https://alchemyapi.io) or see [how to create your own Infura account](https://status-im.github.io/nimbus-eth2/infura-guide)
- For Lighthouse, you can set `ETH1_NODE` to a comma-separated list, for example `http://eth1:8545,https://<alchemy-url>`
would use a local eth1 first, and fail back to Alchemy when it does not respond.
- Adjust ports if you are going to need custom ports instead of the defaults. These are the ports
exposed to the host, and for the P2P ports to the Internet via your firewall/router.
- Set the `NETWORK` variable to either "mainnet" or a test network such as "pyrmont"
Expand Down
1 change: 1 addition & 0 deletions default.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ LOCAL_UID=1000
# Client choice: See SETUP.md for available options
COMPOSE_FILE=lh-base.yml:geth.yml:lh-grafana.yml
# ETH1 endpoint / chain source. This default uses the eth1 node container
# For Lighthouse, you can specify multiple endpoints separated by commas
ETH1_NODE=http://eth1:8545
# Graffiti to use for validator, in order to receive POAP
GRAFFITI=eth2-docker
Expand Down
6 changes: 6 additions & 0 deletions grafana/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ ARG lighthouse_summary_url='https://raw.githubusercontent.com/sigp/lighthouse-me
ARG lighthouse_summary_file='/etc/grafana/provisioning/dashboards/lighthouse_summary.json'
RUN wget -qcO - $lighthouse_summary_url | jq '.title = "lighthouse_summary"' | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$lighthouse_summary_file

# lighthouse_validator_client

ARG lighthouse_validator_client_url='https://raw.githubusercontent.com/sigp/lighthouse-metrics/master/dashboards/ValidatorClient.json'
ARG lighthouse_validator_client_file='/etc/grafana/provisioning/dashboards/lighthouse_validator_client.json'
RUN wget -qcO - $lighthouse_validator_client_url | jq '.title = "lighthouse_validator_client"' >$lighthouse_validator_client_file

# teku_overview
ARG teku_overview_url='https://grafana.com/api/dashboards/12199/revisions/1/download'
ARG teku_overview_file='/etc/grafana/provisioning/dashboards/teku_overview.json'
Expand Down
2 changes: 1 addition & 1 deletion lh-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
- ${NETWORK}
- --port
- ${LH_PORT}
- --eth1-endpoint
- --eth1-endpoints
- ${ETH1_NODE}
- --debug-level=${LOG_LEVEL}
validator:
Expand Down
7 changes: 7 additions & 0 deletions lh-grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ services:
- --metrics
- --metrics-address
- 0.0.0.0
validator:
expose:
- 5064/tcp
command:
- --metrics
- --metrics-address
- 0.0.0.0
prometheus:
restart: "${RESTART}"
build:
Expand Down
1 change: 1 addition & 0 deletions maindefault.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ LOCAL_UID=1000
# Client choice: See SETUP.md for available options
COMPOSE_FILE=lh-base.yml:geth.yml:lh-grafana.yml
# ETH1 endpoint / chain source. This default uses the eth1 node container
# For Lighthouse, you can specify multiple endpoints separated by commas
ETH1_NODE=http://eth1:8545
# Graffiti to use for validator, in order to receive POAP
GRAFFITI=eth2-docker
Expand Down
3 changes: 3 additions & 0 deletions prometheus/lh-prom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ scrape_configs:
- job_name: 'nodes'
static_configs:
- targets: ['beacon:5054']
- job_name: 'validator'
static_configs:
- targets: ['validator:5064']
- job_name: 'node_exporter'
static_configs:
- targets: ['node-exporter:9100']

0 comments on commit a06b30e

Please sign in to comment.