Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teku validator client with separated charon and monitoring #278

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions examples/charon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Override any defaults specified by `${FOO:-bar}` in `.env` with `FOO=qux`.
# ${VARIABLE:-default} evaluates to default if VARIABLE is unset or empty in the environment.
# ${VARIABLE-default} evaluates to default only if VARIABLE is unset in the environment.

services:
# _
# ___| |__ __ _ _ __ ___ _ __
# / __| '_ \ / _` | '__/ _ \| '_ \
# | (__| | | | (_| | | | (_) | | | |
# \___|_| |_|\__,_|_| \___/|_| |_|

charon:
image: obolnetwork/charon:${CHARON_VERSION:-v1.0.1}
environment:
- CHARON_BEACON_NODE_ENDPOINTS=${CHARON_BEACON_NODE_ENDPOINTS:-http://eth2_bn:5052}
- CHARON_LOG_LEVEL=${CHARON_LOG_LEVEL:-info}
- CHARON_LOG_FORMAT=${CHARON_LOG_FORMAT:-console}
- CHARON_P2P_RELAYS=${CHARON_P2P_RELAYS:-https://0.relay.obol.tech}
- CHARON_P2P_EXTERNAL_HOSTNAME=${CHARON_P2P_EXTERNAL_HOSTNAME:-} # Empty default required to avoid warnings.
- CHARON_P2P_TCP_ADDRESS=0.0.0.0:${CHARON_PORT_P2P_TCP:-3610}
- CHARON_VALIDATOR_API_ADDRESS=0.0.0.0:3600
- CHARON_MONITORING_ADDRESS=0.0.0.0:3620
- CHARON_BUILDER_API=${BUILDER_API_ENABLED:-false}
ports:
- ${CHARON_PORT_P2P_TCP:-3610}:${CHARON_PORT_P2P_TCP:-3610}/tcp # P2P TCP libp2p
volumes:
- ../.charon:/opt/charon/.charon
restart: unless-stopped
healthcheck:
test: wget -qO- http://localhost:3620/readyz
32 changes: 32 additions & 0 deletions examples/monitoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Override any defaults specified by `${FOO:-bar}` in `.env` with `FOO=qux`.
# ${VARIABLE:-default} evaluates to default if VARIABLE is unset or empty in the environment.
# ${VARIABLE-default} evaluates to default only if VARIABLE is unset in the environment.

services:
# _ _ _
# _ __ ___ ___ _ __ (_) |_ ___ _ __(_)_ __ __ _
# | '_ ` _ \ / _ \| '_ \| | __/ _ \| '__| | '_ \ / _` |
# | | | | | | (_) | | | | | || (_) | | | | | | | (_| |
# |_| |_| |_|\___/|_| |_|_|\__\___/|_| |_|_| |_|\__, |
# |___/

prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION:-v2.43.0}
user: ":"
volumes:
- ../prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ../data/prometheus:/prometheus
restart: unless-stopped

grafana:
image: grafana/grafana:${GRAFANA_VERSION:-9.4.7}
user: ":"
ports:
- ${MONITORING_PORT_GRAFANA:-3000}:3000
volumes:
- ../grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ../grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/datasource.yml
- ../grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ../grafana/dashboards:/etc/dashboards
- ../data/grafana:/var/lib/grafana
restart: unless-stopped
6 changes: 6 additions & 0 deletions examples/network.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# include this file to link various other services together such as your validator client, charon, your eth1 and eth2 clients, prometheus, and grafana
# if you are using a RocketPool reverse-hybrid configuration include rocketpool_net.yml instead of this file

networks:
default:
name: dvnode
7 changes: 7 additions & 0 deletions examples/rocketpool_net.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# include this file instead of network.yml file if you are using a RocketPool reverse-hybrid configuration
# to get Charon to use the RocketPool eth2 client, set CHARON_BEACON_NODE_ENDPOINTS="http://rocketpool_eth2:5052" in .env

networks:
default:
name: rocketpool_net
external: true
34 changes: 34 additions & 0 deletions examples/teku-vc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Override any defaults specified by `${FOO:-bar}` in `.env` with `FOO=qux`.
# ${VARIABLE:-default} evaluates to default if VARIABLE is unset or empty in the environment.
# ${VARIABLE-default} evaluates to default only if VARIABLE is unset in the environment.

services:
# | | | |
# | |_ ___| | ___ _
# | __/ _ \ |/ / | | |
# | || __/ <| |_| |
# \__\___|_|\_\\__,_|
teku-vc:
image: consensys/teku:${TEKU_VERSION:-24.8.0}
depends_on: [ charon ]
restart: unless-stopped
environment:
- NETWORK=${NETWORK:-auto}
- BUILDER_API_ENABLED=${BUILDER_API_ENABLED:-false}
- FEE_RECIPIENT=${FEE_RECIPIENT:-0x0000000000000000000000000000000000000000}
entrypoint:
- /opt/charon/teku/run-vc.sh
- /opt/teku/bin/teku
- validator-client
- --beacon-node-api-endpoints=http://charon:3600
- --log-destination=CONSOLE
- --validator-keys=/opt/charon/validator_keys:/opt/charon/validator_keys
- --validators-keystore-locking-enabled=false
- --metrics-enabled=true
- --metrics-port=8008
- --metrics-interface=0.0.0.0
- --metrics-host-allowlist=*
- --Xobol-dvt-integration-enabled=true
volumes:
- ../.charon/validator_keys:/opt/charon/validator_keys
- ../teku:/opt/charon/teku
14 changes: 14 additions & 0 deletions teku/run-vc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

_network="--network=${NETWORK}"

if [ "${BUILDER_API_ENABLED}" = "true" ]; then
echo "MEV Boost enabled"
_mev_boost="--validators-builder-registration-default-enabled --validators-proposer-blinded-blocks-enabled"
else
_mev_boost=""
fi

_fee_recipient="--validators-proposer-default-fee-recipient=${FEE_RECIPIENT}"

exec "$@" ${_network} ${_mev_boost} ${_fee_recipient}