Skip to content

Commit

Permalink
Merge branch 'main' into cnupy/add_charon_cl_env_var
Browse files Browse the repository at this point in the history
  • Loading branch information
cnupy committed Oct 5, 2024
2 parents e7a0e65 + 521bc88 commit e33d1f7
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 39 deletions.
48 changes: 47 additions & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,37 @@ __lookup_cf_zone() { # Migrates traefik-cf setup to use Zone ID
}


__enable_v6() {
if [ "${__docker_major_version}" -lt 27 ]; then
return
fi

__var="IPV6"
IPV6=$(sed -n -e "s/^${__var}=\(.*\)/\1/p" "${__env_file}" || true)
if [ "${IPV6}" = "true" ]; then
return
fi

echo "Testing IPv6 host connectivity"
if ! ping -c1 2001:4860:4860::8888 >/dev/null; then
return
fi

echo "Testing IPv6 Docker connectivity"
__dodocker network create --ipv6 ip6net_ethd_test
__v6_works=$(__dodocker run --rm --network ip6net_ethd_test busybox sh -c \
"if ping -c1 -6 2001:4860:4860::8888 >/dev/null; then echo true; else echo false; fi")
__dodocker network rm ip6net_ethd_test

if [ "${__v6_works}" = "true" ]; then
echo "Enabling IPv4/6 dual-stack for your Eth Docker setup"
IPV6="true"
__set_value_in_env
__enabled_v6=1
fi
}


__env_migrate() {
if [ ! -f "${__env_file}" ]; then
return 0
Expand Down Expand Up @@ -1055,6 +1086,7 @@ __env_migrate() {
else
echo "Migrating ${__env_file} to version ${__target_ver}"
fi

${__as_owner} cp "${__env_file}" "${__env_file}".source
__during_migrate=1
__migrated=1
Expand All @@ -1076,6 +1108,12 @@ __env_migrate() {
if [ "${__var}" = "COMPOSE_FILE" ]; then
__migrate_compose_file
fi
if [[ "${__source_ver}" -lt "17" && "${__var}" = "IPV6" ]]; then # One-time attempt; remove after Pectra
__enable_v6
if [ "${__enabled_v6}" -eq 1 ]; then
__value="true"
fi
fi
if [ "${__var}" = "CL_QUIC_PORT" ]; then
__cl_port=$(sed -n -e "s/^CL_P2P_PORT=\(.*\)/\1/p" "${__env_file}.source" || true)
if [ -n "${__cl_port}" ] && [ "${__cl_port}" = "${__value}" ]; then
Expand Down Expand Up @@ -1245,6 +1283,7 @@ __pull_and_build() {
# shellcheck disable=SC2120
update() {
__during_update=1
__enabled_v6=0 # Remove after Pectra

if [[ $(${__as_owner} git status --porcelain) ]]; then
__dirty=1
Expand Down Expand Up @@ -1378,7 +1417,12 @@ reset to defaults."
fi
echo
if [ -z "${GITEXITCODE+x}" ] || [ "${GITEXITCODE}" -eq 0 ]; then
echo "An \"$__me up\" command will start using the new images and configuration."
if [ "${__enabled_v6}" -eq 0 ]; then # Remove after Pectra
echo "An \"$__me up\" command will start using the new images and configuration."
else
echo "IPv4/6 dual-stack support has been enabled."
echo "An \"$__me restart\" command will start using the new images and configuration."
fi
else
echo "WARNING"
echo
Expand Down Expand Up @@ -3696,6 +3740,8 @@ config() {
__set_value_in_env
fi

__enable_v6

${__as_owner} rm .env.original

__pull_and_build
Expand Down
4 changes: 2 additions & 2 deletions lodestar/Dockerfile.source
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:22.4-slim AS builder
FROM node:22-slim AS builder

# Here only to avoid build-time errors
ARG DOCKER_TAG
Expand All @@ -16,7 +16,7 @@ RUN bash -c "cd .. && rm -rf app && git clone ${SRC_REPO} app && cd app && git c
&& if [[ ${BUILD_TARGET} =~ pr-.+ ]]; then git fetch origin pull/$(echo ${BUILD_TARGET} | cut -d '-' -f 2)/head:ls-pr; git checkout ls-pr; else git checkout ${BUILD_TARGET}; fi \
&& yarn install --non-interactive --frozen-lockfile && yarn build"

FROM node:22.4-slim
FROM node:22-slim

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tzdata bash gosu git wget \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
Expand Down
36 changes: 0 additions & 36 deletions reth/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,42 +106,6 @@ distance = 10064
[prune.segments.storage_history]
distance = 10064
EOF
case "${NETWORK}" in
mainnet)
echo "Configuring Reth pruning to include RocketPool, SSV and StakeWise contracts"
cat <<EOF >> /var/lib/reth/reth.toml
[prune.segments.receipts_log_filter.0x00000000219ab540356cBB839Cbe05303d7705Fa]
before = 0
[prune.segments.receipts_log_filter.0xDD9BC35aE942eF0cFa76930954a156B3fF30a4E1]
before = 0
[prune.segments.receipts_log_filter.0xEE4d2A71cF479e0D3d0c3c2C923dbfEB57E73111]
before = 0
[prune.segments.receipts_log_filter.0x6B5815467da09DaA7DC83Db21c9239d98Bb487b5]
before = 0
EOF
;;
holesky)
echo "Configuring Reth pruning to include RocketPool, SSV and StakeWise contracts"
cat <<EOF >> /var/lib/reth/reth.toml
[prune.segments.receipts_log_filter.0x4242424242424242424242424242424242424242]
before = 0
[prune.segments.receipts_log_filter.0x38A4794cCEd47d3baf7370CcC43B560D3a1beEFA]
before = 0
[prune.segments.receipts_log_filter.0x9D210F9169bc6Cf49152F21A57A446bCcaA87b33]
before = 0
[prune.segments.receipts_log_filter.0xB580799Bf7d62721D1a523f0FDF2f5Ed7BA4e259]
before = 0
EOF
;;
esac
fi
fi

Expand Down

0 comments on commit e33d1f7

Please sign in to comment.