Skip to content

Commit

Permalink
Adjust Erigon entrypoint to new tags (#1925)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne authored Sep 14, 2024
1 parent a58fe0d commit b24fb1d
Showing 1 changed file with 33 additions and 32 deletions.
65 changes: 33 additions & 32 deletions erigon/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,39 @@ fi

__caplin=""
__db_params=""
#if [[ "${DOCKER_TAG}" =~ "v3" || "${DOCKER_TAG}" = "latest" || "${DOCKER_TAG}" = "stable" ]]; then # No stable yet
if [[ "${DOCKER_TAG}" =~ "v3" || "${DOCKER_TAG}" = "latest" ]]; then
# Literal match intended
# shellcheck disable=SC2076
if [[ "${DOCKER_TAG}" =~ "2." || "${DOCKER_TAG}" = "latest" ]]; then
# Check for network, and set prune accordingly
if [ "${ARCHIVE_NODE}" = "true" ]; then
echo "Erigon archive node without pruning"
__prune=""
else
if [[ "${NETWORK}" = "mainnet" ]]; then
echo "mainnet: Running with prune.r.before=11052984 for eth deposit contract"
__prune="--prune=htc --prune.r.before=11052984"
elif [[ "${NETWORK}" = "goerli" ]]; then
echo "goerli: Running with prune.r.before=4367322 for eth deposit contract"
__prune="--prune=htc --prune.r.before=4367322"
elif [[ "${NETWORK}" = "sepolia" ]]; then
echo "sepolia: Running with prune.r.before=1273020 for eth deposit contract"
__prune="--prune=htc --prune.r.before=1273020"
elif [[ "${NETWORK}" = "gnosis" ]]; then
echo "gnosis: Running with prune.r.before=19469077 for gno deposit contract"
__prune="--prune=htc --prune.r.before=19469077"
elif [[ "${NETWORK}" = "holesky" ]]; then
echo "holesky: Running without prune.r for eth deposit contract"
__prune="--prune=htc"
elif [[ "${NETWORK}" =~ ^https?:// ]]; then
echo "Custom testnet: Running without prune.r for eth deposit contract"
__prune="--prune=htc"
else
echo "Unable to determine eth deposit contract, running without prune.r"
__prune="--prune=htc"
fi
fi
__db_params="--db.pagesize 16K --db.size.limit 8TB"
else # Erigon v3
if [ "${ARCHIVE_NODE}" = "true" ]; then
echo "Erigon archive node without pruning"
__prune="--prune.mode=archive"
Expand Down Expand Up @@ -90,36 +121,6 @@ if [[ "${DOCKER_TAG}" =~ "v3" || "${DOCKER_TAG}" = "latest" ]]; then
fi
echo "Caplin parameters: ${__caplin}"
fi
else
# Check for network, and set prune accordingly
if [ "${ARCHIVE_NODE}" = "true" ]; then
echo "Erigon archive node without pruning"
__prune=""
else
if [[ "${NETWORK}" = "mainnet" ]]; then
echo "mainnet: Running with prune.r.before=11052984 for eth deposit contract"
__prune="--prune=htc --prune.r.before=11052984"
elif [[ "${NETWORK}" = "goerli" ]]; then
echo "goerli: Running with prune.r.before=4367322 for eth deposit contract"
__prune="--prune=htc --prune.r.before=4367322"
elif [[ "${NETWORK}" = "sepolia" ]]; then
echo "sepolia: Running with prune.r.before=1273020 for eth deposit contract"
__prune="--prune=htc --prune.r.before=1273020"
elif [[ "${NETWORK}" = "gnosis" ]]; then
echo "gnosis: Running with prune.r.before=19469077 for gno deposit contract"
__prune="--prune=htc --prune.r.before=19469077"
elif [[ "${NETWORK}" = "holesky" ]]; then
echo "holesky: Running without prune.r for eth deposit contract"
__prune="--prune=htc"
elif [[ "${NETWORK}" =~ ^https?:// ]]; then
echo "Custom testnet: Running without prune.r for eth deposit contract"
__prune="--prune=htc"
else
echo "Unable to determine eth deposit contract, running without prune.r"
__prune="--prune=htc"
fi
fi
__db_params="--db.pagesize 16K --db.size.limit 8TB"
fi

if [ "${IPV6}" = "true" ]; then
Expand Down

0 comments on commit b24fb1d

Please sign in to comment.