Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -2973,6 +2973,9 @@ prune-history() {
choices+=("rolling" "Rolling expiry")
choices+=("aggressive" "Aggressive expiry")
;;
*geth.yml*)
choices+=("pre-prague" "Pre-Prague expiry")
;;
esac
Comment thread
yorickdowne marked this conversation as resolved.

num_items=$(( ${#choices[@]} / 2 ))
Expand Down Expand Up @@ -3035,7 +3038,7 @@ prune-history() {
case "${COMPOSE_FILE}" in
*geth.yml*)
client="Geth"
if [[ "${target}" =~ ^(pre-prague|rolling|aggressive)$ ]]; then
if [[ "${target}" =~ ^(rolling|aggressive)$ ]]; then
echo "${target} expiry is not supported by ${client}, or ${__project_name} doesn't know how to configure it."
echo "Aborting."
exit 1
Expand Down
14 changes: 13 additions & 1 deletion geth/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ case "${NODE_TYPE}" in
;;
esac
;;
pre-prague-expiry)
case "${NETWORK}" in
mainnet|sepolia|hoodi)
echo "Geth minimal node with pre-Prague history expiry"
__prune="--history.chain postprague"
;;
*)
echo "There is no pre-Prague history for ${NETWORK} network, \"pre-prague-expiry\" has no effect."
__prune=""
;;
esac
;;
*)
echo "ERROR: The node type ${NODE_TYPE} is not known to Eth Docker's Geth implementation."
sleep 30
Expand Down Expand Up @@ -166,7 +178,7 @@ if [[ -f /var/lib/geth/prune-marker ]]; then
fi
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__datadir} ${__ancient} ${__network} ${EL_EXTRAS} prune-history
exec "$@" ${__datadir} ${__ancient} ${__network} ${__prune} ${EL_EXTRAS} prune-history
else
exec "$@" ${__datadir} ${__ancient} ${__network} ${__prune} ${__trace} ${__verbosity} ${EL_EXTRAS}
fi
Loading