Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/eth-educators/eth-docker in…
Browse files Browse the repository at this point in the history
…to remove-migrations
  • Loading branch information
yorickdowne committed Oct 5, 2024
2 parents 9e333c1 + d1f4fa2 commit 5f66e07
Show file tree
Hide file tree
Showing 69 changed files with 1,764 additions and 821 deletions.
Empty file added .eth/charon/.empty
Empty file.
Empty file added .eth/lido-ejector/.empty
Empty file.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ ext-network.yml
ext-network.yml.original
ext-network.yml.bak
.eth/*
.eth_backup*
!.eth/README.md
!.eth/validator_keys/.empty
!.eth/exit_messages/.empty
!.eth/dkg_output/.empty
!.eth/charon/.empty
!.eth/lido-ejector/.empty
!.eth/ethdo/README.md
!.eth/ethdo/create-withdrawal-change.sh
*.swp
Expand All @@ -23,4 +26,5 @@ ssv-config/config.yaml
ssv-config/config.yaml.original
ssv-config/dkg-config.yaml
ssv-config/dkg-config.yaml.original
commit-boost/cb-config.toml
.nada
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Eth Docker uses a "semver-ish" scheme.
large.
- Second through fourth digit, [semver](https://semver.org/).

This is Eth Docker v2.12.0.0
This is Eth Docker v2.12.3.0
7 changes: 4 additions & 3 deletions besu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ services:
- EL_EXTRAS=${EL_EXTRAS:-}
- ARCHIVE_NODE=${ARCHIVE_NODE:-}
- NETWORK=${NETWORK}
- IPV6=${IPV6:-false}
volumes:
- besu-eth1-data:/var/lib/besu
- besu-el-data:/var/lib/besu
- besu-eth1-data:/var/lib/besu-og
- /etc/localtime:/etc/localtime:ro
- jwtsecret:/var/lib/besu/ee-secret
ports:
Expand All @@ -43,8 +45,6 @@ services:
entrypoint:
- docker-entrypoint.sh
- /opt/besu/bin/besu
- --data-path
- /var/lib/besu
- --p2p-port
- ${EL_P2P_PORT:-30303}
- --rpc-http-enabled
Expand Down Expand Up @@ -92,6 +92,7 @@ services:
command: /bin/sh

volumes:
besu-el-data:
besu-eth1-data:
jwtsecret:

Expand Down
1 change: 1 addition & 0 deletions besu/Dockerfile.binary
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN set -eux; \
gosu nobody true

# Create data mount point with permissions
RUN mkdir -p /var/lib/besu-og && chown -R ${USER}:${USER} /var/lib/besu-og && chmod -R 700 /var/lib/besu-og
RUN mkdir -p /var/lib/besu/ee-secret && chown -R ${USER}:${USER} /var/lib/besu && chmod -R 700 /var/lib/besu && chmod 777 /var/lib/besu/ee-secret

# Cannot assume buildkit, hence no chmod
Expand Down
6 changes: 4 additions & 2 deletions besu/Dockerfile.source
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Besu in a stock Ubuntu container
FROM eclipse-temurin:21-jdk-jammy AS builder
FROM eclipse-temurin:21-jdk-noble AS builder

# This is here to avoid build-time complaints
ARG DOCKER_TAG
Expand All @@ -14,7 +14,7 @@ WORKDIR /usr/src
RUN bash -c "git clone --recurse-submodules -j8 ${SRC_REPO} besu && cd besu && git config advice.detachedHead false && git fetch --all --tags && if [[ ${BUILD_TARGET} =~ pr-.+ ]]; then git fetch origin pull/$(echo ${BUILD_TARGET} | cut -d '-' -f 2)/head:besu-pr; git checkout besu-pr; else git checkout ${BUILD_TARGET}; fi && ./gradlew installDist"

# Pull all binaries into a second stage deploy Ubuntu container
FROM eclipse-temurin:21-jre-jammy
FROM eclipse-temurin:21-jre-noble

ARG USER=besu
ARG UID=10001
Expand All @@ -28,6 +28,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
libjemalloc-dev \
git \
wget \
adduser \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -46,6 +47,7 @@ RUN adduser \
--ingroup "${USER}" \
"${USER}"

RUN mkdir -p /var/lib/besu-og && chown -R ${USER}:${USER} /var/lib/besu-og && chmod -R 700 /var/lib/besu-og
RUN mkdir -p /var/lib/besu/ee-secret && chown -R besu:besu /var/lib/besu && chmod -R 700 /var/lib/besu && chmod 777 /var/lib/besu/ee-secret

# Cannot assume buildkit, hence no chmod
Expand Down
23 changes: 19 additions & 4 deletions besu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ if [[ "${NETWORK}" =~ ^https?:// ]]; then
__network="--genesis-file=/var/lib/besu/testnet/${config_dir}/besu.json --bootnodes=${bootnodes} \
--Xfilter-on-enr-fork-id=true --rpc-http-api=ADMIN,CLIQUE,MINER,ETH,NET,DEBUG,TXPOOL,ENGINE,TRACE,WEB3"
else
__network="--network ${NETWORK} --rpc-http-api WEB3,ETH,NET"
__network="--network ${NETWORK}"
fi

if [ "${ARCHIVE_NODE}" = "true" ]; then
echo "Besu archive node without pruning"
__prune="--data-storage-format=FOREST --sync-mode=FULL"
else
__prune="--data-storage-format=BONSAI --sync-mode=SNAP"
__prune=""
fi

__memtotal=$(awk '/MemTotal/ {printf "%d", int($2/1024/1024)}' /proc/meminfo)
Expand All @@ -65,6 +65,21 @@ else
__spec=""
fi

# New or old datadir
if [ -d /var/lib/besu-og/database ]; then
__datadir="--data-path /var/lib/besu-og"
else
__datadir="--data-path /var/lib/besu"
fi

# DiscV5 for IPV6
if [ "${IPV6:-false}" = "true" ]; then
echo "Configuring Besu for discv5 for IPv6 advertisements"
__ipv6="--Xv5-discovery-enabled"
else
__ipv6=""
fi

if [ -f /var/lib/besu/prune-marker ]; then
rm -f /var/lib/besu/prune-marker
if [ "${ARCHIVE_NODE}" = "true" ]; then
Expand All @@ -73,9 +88,9 @@ if [ -f /var/lib/besu/prune-marker ]; then
fi
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__network} ${__prune} ${EL_EXTRAS} storage trie-log prune
exec "$@" ${__datadir} ${__network} ${__prune} ${EL_EXTRAS} storage trie-log prune
else
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__network} ${__prune} ${__spec} ${EL_EXTRAS}
exec "$@" ${__datadir} ${__network} ${__ipv6} ${__prune} ${__spec} ${EL_EXTRAS}
fi
2 changes: 1 addition & 1 deletion central-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ x-logging: &logging
services:
ethereum-metrics-exporter:
restart: "unless-stopped"
image: samcm/ethereum-metrics-exporter:0.23.0-debian
image: samcm/ethereum-metrics-exporter:0.24.0-debian
entrypoint:
- /ethereum-metrics-exporter
- --consensus-url=${CL_NODE}
Expand Down
22 changes: 22 additions & 0 deletions commit-boost-pbs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
x-logging: &logging
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'

services:
cb-pbs:
image: ${CB_PBS_DOCKER_REPO:-ghcr.io/commit-boost/pbs}:${CB_PBS_DOCKER_TAG:-latest}
environment:
CB_CONFIG: /cb-config.toml
CB_METRICS_PORT: 10000
volumes:
- ./commit-boost/cb-config.toml:/cb-config.toml:ro
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=10000
- metrics.instance=cb-pbs
- metrics.network=${NETWORK}
17 changes: 17 additions & 0 deletions commit-boost/cb-config.toml.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
chain = "Holesky"

[pbs]
port = 18550

[[relays]]
id = "bloxroute"
url = "https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.holesky.blxrbdn.com"
[[relays]]
id = "aestus"
url = "https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7c0406754376c2c8285a36c630346aa5c5f833@holesky.aestus.live"
[[relays]]
id = "titan"
url = "https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz"
[[relays]]
id = "flashbots"
url = "https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-holesky.flashbots.net"
41 changes: 33 additions & 8 deletions default.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FEE_RECIPIENT=
# If "true" and used with a CL, it also requires :mev-boost.yml in COMPOSE_FILE
MEV_BOOST=false
# For relay information, please see https://ethstaker.cc/mev-relay-list/
MEV_RELAYS=https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-holesky.flashbots.net,https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz,https://0xb1d229d9c21298a87846c7022ebeef277dfc321fe674fa45312e20b5b6c400bfde9383f801848d7837ed5fc449083a12@relay-holesky.edennetwork.io,https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.holesky.blxrbdn.com
MEV_RELAYS=https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-holesky.flashbots.net,https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz,https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.holesky.blxrbdn.com
# Set a minimum MEV bid (e.g. 0.05), used by mev-boost.yml. If empty, no minimum is used.
MEV_MIN_BID=
# Graffiti to use for validator
Expand Down Expand Up @@ -79,13 +79,18 @@ HOST_IP=
# IP address to use when host-mapping a port through *-shared.yml. Set this to 127.0.0.1 to restrict the share to localhost
SHARE_IP=

# Relays to connect charon node
OBOL_P2P_RELAYS=

# P2P ports you will forward to your staking node. Adjust here if you are
# going to use something other than defaults.
EL_P2P_PORT=30303
CL_P2P_PORT=9000
PRYSM_PORT=9000
PRYSM_UDP_PORT=9000
CL_QUIC_PORT=9001
# Some clients need a separate port for IPv6
CL_IPV6_P2P_PORT=9090
# Local grafana dashboard port. Do not expose to Internet, it is insecure http
GRAFANA_PORT=3000
# Local Siren UI port
Expand Down Expand Up @@ -115,6 +120,8 @@ SSV_P2P_PORT=13001
SSV_P2P_PORT_UDP=12001
# SSV DKG port
SSV_DKG_PORT=3030
# OBOL Node ports
OBOL_P2P_PORT=3610
# Engine port. Only for distributed setups, this should otherwise be left alone
EE_PORT=8551
# Consensus layer REST port. Only for distributed setups, this should otherwise be left alone
Expand Down Expand Up @@ -160,10 +167,14 @@ EL_NODE=http://execution:8551
CL_NODE=http://consensus:5052
# MEV-boost address. This would only be changed for Vouch setups
MEV_NODE=http://mev-boost:18550
# Consensus client address for Charon and Lido Validator Ejector in Obol setup
OBOL_CL_NODE=http://consensus:5052
# Execution client address (RPC) for Lido Validator Ejector in Obol setup
OBOL_EL_NODE=http://execution:8545

# You can set specific version targets and choose binary or compiled from source builds below,
# via "Dockerfile.binary" or "Dockerfile.source"
# These settings are only migrated when running "./ethd update --keep-targets"
# These settings can be reset to defaults with "./ethd update --refresh-targets"
# The default source build targets build from the latest github tag

# Eth Docker updates its code to latest by default.
Expand All @@ -172,11 +183,25 @@ ETH_DOCKER_TAG=

# SSV
SSV_NODE_TAG=latest
SSV_NODE_REPO=bloxstaking/ssv-node
SSV_DKG_TAG=latest

SSV_DKG_REPO=bloxstaking/ssv-dkg

# Lido OBOL
CHARON_VERSION=latest
VE_OPERATOR_ID=
VE_STAKING_MODULE_ID=
VE_LOCATOR_ADDRESS=
VE_ORACLE_ADDRESSES_ALLOWLIST=
ENABLE_DIST_ATTESTATION_AGGR=
LIDO_DV_EXIT_EXIT_EPOCH=

# Commit-Boost
CB_PBS_DOCKER_TAG=latest
CB_PBS_DOCKER_REPO=ghcr.io/commit-boost/pbs
# MEV-Boost
# SRC build target can be a tag, a branch, or a pr as "pr-ID"
MEV_SRC_BUILD_TARGET=develop
MEV_SRC_BUILD_TARGET=stable
MEV_SRC_REPO=https://github.com/flashbots/mev-boost
MEV_DOCKER_TAG=latest
MEV_DOCKER_REPO=flashbots/mev-boost
Expand Down Expand Up @@ -257,8 +282,8 @@ BESU_DOCKERFILE=Dockerfile.binary
# SRC build target can be a tag, a branch, or a pr as "pr-ID"
ERIGON_SRC_BUILD_TARGET='$(git describe --tags $(git rev-list --tags --max-count=1))'
ERIGON_SRC_REPO=https://github.com/ledgerwatch/erigon
ERIGON_DOCKER_TAG=v2.60.4
ERIGON_DOCKER_REPO=thorax/erigon
ERIGON_DOCKER_TAG=latest
ERIGON_DOCKER_REPO=erigontech/erigon
ERIGON_DOCKERFILE=Dockerfile.binary

# Nethermind
Expand Down Expand Up @@ -301,11 +326,11 @@ DEPCLI_SRC_REPO=https://github.com/ethereum/staking-deposit-cli
DEPCLI_DOCKER_TAG=nonesuch

# traefik and ddns-updater
TRAEFIK_TAG=v3.0
TRAEFIK_TAG=v3.1
DDNS_TAG=v2

# For the Node Dashboard, define a regex of mount points to ignore for the diskspace check.
NODE_EXPORTER_IGNORE_MOUNT_REGEX='^/(dev|proc|sys|run|var/lib/docker/.+)($|/)'

# Used by ethd update - please do not adjust
ENV_VERSION=13
ENV_VERSION=17
4 changes: 2 additions & 2 deletions erigon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ services:
args:
- BUILD_TARGET=${ERIGON_SRC_BUILD_TARGET:-'$(git describe --tags $(git rev-list --tags --max-count=1))'}
- SRC_REPO=${ERIGON_SRC_REPO:-https://github.com/ledgerwatch/erigon}
- DOCKER_TAG=${ERIGON_DOCKER_TAG:-stable}
- DOCKER_REPO=${ERIGON_DOCKER_REPO:-thorax/erigon}
- DOCKER_TAG=${ERIGON_DOCKER_TAG:-latest}
- DOCKER_REPO=${ERIGON_DOCKER_REPO:-erigontech/erigon}
stop_grace_period: 5m
image: erigon:local
pull_policy: never
Expand Down
4 changes: 2 additions & 2 deletions erigon/Dockerfile.binary
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG DOCKER_TAG=stable
ARG DOCKER_REPO=thorax/erigon
ARG DOCKER_TAG=latest
ARG DOCKER_REPO=erigontech/erigon

FROM ${DOCKER_REPO}:${DOCKER_TAG}

Expand Down
2 changes: 1 addition & 1 deletion erigon/Dockerfile.source
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Erigon in a stock Go build container
FROM golang:1.22-alpine AS builder
FROM golang:1.23-alpine AS builder

# Unused, this is here to avoid build time complaints
ARG DOCKER_TAG
Expand Down
Loading

0 comments on commit 5f66e07

Please sign in to comment.