Skip to content

Commit e7903cf

Browse files
committed
Merge branch 'main' of https://github.com/eth-educators/eth-docker into prysm-rest
2 parents f77d191 + 86f3526 commit e7903cf

74 files changed

Lines changed: 1939 additions & 895 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eth/charon/.empty

Whitespace-only changes.

.eth/lido-ejector/.empty

Whitespace-only changes.

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- name: Lint sources
1515
run: |
16-
pip install pre-commit
16+
sudo apt-get update && sudo apt-get install -y pre-commit
1717
pre-commit run --all-files

.github/workflows/test-prysm-geth.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
FEE_RECIPIENT=0xDccf8451070a86183eE70D330C4c43b686E9CF86
3232
var=FEE_RECIPIENT
3333
set_value_in_env
34+
CL_NODE=consensus:4000
35+
var=CL_NODE
36+
set_value_in_env
3437
- name: Start Prysm/Geth
3538
run: ./ethd up
3639
- name: Pause for 30 seconds

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ ext-network.yml
44
ext-network.yml.original
55
ext-network.yml.bak
66
.eth/*
7+
.eth_backup*
78
!.eth/README.md
89
!.eth/validator_keys/.empty
910
!.eth/exit_messages/.empty
1011
!.eth/dkg_output/.empty
12+
!.eth/charon/.empty
13+
!.eth/lido-ejector/.empty
1114
!.eth/ethdo/README.md
1215
!.eth/ethdo/create-withdrawal-change.sh
1316
*.swp
@@ -23,4 +26,5 @@ ssv-config/config.yaml
2326
ssv-config/config.yaml.original
2427
ssv-config/dkg-config.yaml
2528
ssv-config/dkg-config.yaml.original
29+
commit-boost/cb-config.toml
2630
.nada

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Eth Docker uses a "semver-ish" scheme.
3434
large.
3535
- Second through fourth digit, [semver](https://semver.org/).
3636

37-
This is Eth Docker v2.12.0.0
37+
This is Eth Docker v2.12.3.0

besu.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ services:
2727
- EL_EXTRAS=${EL_EXTRAS:-}
2828
- ARCHIVE_NODE=${ARCHIVE_NODE:-}
2929
- NETWORK=${NETWORK}
30+
- IPV6=${IPV6:-false}
3031
volumes:
31-
- besu-eth1-data:/var/lib/besu
32+
- besu-el-data:/var/lib/besu
33+
- besu-eth1-data:/var/lib/besu-og
3234
- /etc/localtime:/etc/localtime:ro
3335
- jwtsecret:/var/lib/besu/ee-secret
3436
ports:
@@ -43,8 +45,6 @@ services:
4345
entrypoint:
4446
- docker-entrypoint.sh
4547
- /opt/besu/bin/besu
46-
- --data-path
47-
- /var/lib/besu
4848
- --p2p-port
4949
- ${EL_P2P_PORT:-30303}
5050
- --rpc-http-enabled
@@ -92,6 +92,7 @@ services:
9292
command: /bin/sh
9393

9494
volumes:
95+
besu-el-data:
9596
besu-eth1-data:
9697
jwtsecret:
9798

besu/Dockerfile.binary

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ RUN set -eux; \
2323
gosu nobody true
2424

2525
# Create data mount point with permissions
26+
RUN mkdir -p /var/lib/besu-og && chown -R ${USER}:${USER} /var/lib/besu-og && chmod -R 700 /var/lib/besu-og
2627
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
2728

2829
# Cannot assume buildkit, hence no chmod

besu/Dockerfile.source

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build Besu in a stock Ubuntu container
2-
FROM eclipse-temurin:21-jdk-jammy AS builder
2+
FROM eclipse-temurin:21-jdk-noble AS builder
33

44
# This is here to avoid build-time complaints
55
ARG DOCKER_TAG
@@ -14,7 +14,7 @@ WORKDIR /usr/src
1414
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"
1515

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

1919
ARG USER=besu
2020
ARG UID=10001
@@ -28,6 +28,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install
2828
libjemalloc-dev \
2929
git \
3030
wget \
31+
adduser \
3132
&& apt-get clean \
3233
&& rm -rf /var/lib/apt/lists/*
3334

@@ -46,6 +47,7 @@ RUN adduser \
4647
--ingroup "${USER}" \
4748
"${USER}"
4849

50+
RUN mkdir -p /var/lib/besu-og && chown -R ${USER}:${USER} /var/lib/besu-og && chmod -R 700 /var/lib/besu-og
4951
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
5052

5153
# Cannot assume buildkit, hence no chmod

besu/docker-entrypoint.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ if [[ "${NETWORK}" =~ ^https?:// ]]; then
4848
__network="--genesis-file=/var/lib/besu/testnet/${config_dir}/besu.json --bootnodes=${bootnodes} \
4949
--Xfilter-on-enr-fork-id=true --rpc-http-api=ADMIN,CLIQUE,MINER,ETH,NET,DEBUG,TXPOOL,ENGINE,TRACE,WEB3"
5050
else
51-
__network="--network ${NETWORK} --rpc-http-api WEB3,ETH,NET"
51+
__network="--network ${NETWORK}"
5252
fi
5353

5454
if [ "${ARCHIVE_NODE}" = "true" ]; then
5555
echo "Besu archive node without pruning"
5656
__prune="--data-storage-format=FOREST --sync-mode=FULL"
5757
else
58-
__prune="--data-storage-format=BONSAI --sync-mode=SNAP"
58+
__prune=""
5959
fi
6060

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

68+
# New or old datadir
69+
if [ -d /var/lib/besu-og/database ]; then
70+
__datadir="--data-path /var/lib/besu-og"
71+
else
72+
__datadir="--data-path /var/lib/besu"
73+
fi
74+
75+
# DiscV5 for IPV6
76+
if [ "${IPV6:-false}" = "true" ]; then
77+
echo "Configuring Besu for discv5 for IPv6 advertisements"
78+
__ipv6="--Xv5-discovery-enabled"
79+
else
80+
__ipv6=""
81+
fi
82+
6883
if [ -f /var/lib/besu/prune-marker ]; then
6984
rm -f /var/lib/besu/prune-marker
7085
if [ "${ARCHIVE_NODE}" = "true" ]; then
@@ -73,9 +88,9 @@ if [ -f /var/lib/besu/prune-marker ]; then
7388
fi
7489
# Word splitting is desired for the command line parameters
7590
# shellcheck disable=SC2086
76-
exec "$@" ${__network} ${__prune} ${EL_EXTRAS} storage trie-log prune
91+
exec "$@" ${__datadir} ${__network} ${__prune} ${EL_EXTRAS} storage trie-log prune
7792
else
7893
# Word splitting is desired for the command line parameters
7994
# shellcheck disable=SC2086
80-
exec "$@" ${__network} ${__prune} ${__spec} ${EL_EXTRAS}
95+
exec "$@" ${__datadir} ${__network} ${__ipv6} ${__prune} ${__spec} ${EL_EXTRAS}
8196
fi

0 commit comments

Comments
 (0)