diff --git a/examples/charon.yml b/examples/charon.yml new file mode 100644 index 0000000..aabbe1d --- /dev/null +++ b/examples/charon.yml @@ -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 diff --git a/examples/monitoring.yml b/examples/monitoring.yml new file mode 100644 index 0000000..8453d0e --- /dev/null +++ b/examples/monitoring.yml @@ -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 diff --git a/examples/network.yml b/examples/network.yml new file mode 100644 index 0000000..424b5b9 --- /dev/null +++ b/examples/network.yml @@ -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 diff --git a/examples/rocketpool_net.yml b/examples/rocketpool_net.yml new file mode 100644 index 0000000..a2ddcb0 --- /dev/null +++ b/examples/rocketpool_net.yml @@ -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 diff --git a/examples/teku-vc.yml b/examples/teku-vc.yml new file mode 100644 index 0000000..e101c3e --- /dev/null +++ b/examples/teku-vc.yml @@ -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 diff --git a/teku/run-vc.sh b/teku/run-vc.sh new file mode 100644 index 0000000..6eb7a56 --- /dev/null +++ b/teku/run-vc.sh @@ -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}