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
6 changes: 3 additions & 3 deletions default.env
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ LODESTAR_HEAP=
CL_NODE_TYPE=pruned
# EL_NODE_TYPE can be "archive", "full", "pre-merge-expiry", "pre-cancun-expiry",
# "aggressive-expiry" or "rolling-expiry"
# "pre-merge-expiry" is only meaningful for mainnet and sepolia
# "pre-merge-expiry" and "pre-cancun-expiry" are only meaningful for mainnet and sepolia
# Switching node type typically requires a resync
# Consider using `./ethd prune-history`, which guides you as to whether to prune in-place
# or resync, depending on client
# "aggressive-expiry" is supported with Erigon
# "rolling-expiry" and "pre-cancun-expiry" are Nethermind features, for now
# "aggressive-expiry" is supported with Reth and Erigon
# "rolling-expiry" and "pre-cancun-expiry" are supported with Reth and Nethermind
# "rolling-expiry" remains experimental in Nethermind as of Dec 29th 2025
EL_NODE_TYPE=pre-merge-expiry
# Era URLs, see https://eth-clients.github.io/history-endpoints/
Expand Down
2 changes: 1 addition & 1 deletion reth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ services:
- ${EE_PORT:-8551}
- --authrpc.jwtsecret
- /var/lib/reth/ee-secret/jwtsecret
- ${EL_MAX_PEER_COUNT:+--max-outbound-peers}
- ${EL_MAX_PEER_COUNT:+--max-peers}
- ${EL_MAX_PEER_COUNT:+${EL_MAX_PEER_COUNT}}
labels:
- metrics.scrape=true
Expand Down
37 changes: 33 additions & 4 deletions reth/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ if [[ -n "${STATIC_DIR}" && ! "${STATIC_DIR}" = ".nada" ]]; then
__static="--datadir.static-files /var/lib/static"
fi

__prune="--block-interval 5 --prune.senderrecovery.full --prune.accounthistory.distance 10064 --prune.storagehistory.distance 10064"
case "${NODE_TYPE}" in
archive)
echo "Reth archive node without pruning"
__prune=""
;;
full)
echo "Reth full node without history expiry"
__prune="--block-interval 5 --prune.receipts.before 0 --prune.senderrecovery.full --prune.accounthistory.distance 10064 --prune.storagehistory.distance 10064"
echo "Pruning parameters: ${__prune}"
prune+=" --prune.receipts.before 0"
;;
pre-merge-expiry)
__prune="--block-interval 5 --prune.senderrecovery.full --prune.accounthistory.distance 10064 --prune.storagehistory.distance 10064 --prune.transactionlookup.distance 10064"
prune+=" --prune.transactionlookup.distance 10064"
case ${NETWORK} in
mainnet|sepolia)
echo "Reth minimal node with pre-merge history expiry"
Expand All @@ -115,7 +115,32 @@ case "${NODE_TYPE}" in
__prune+=" --prune.receipts.before 0"
;;
esac
echo "Pruning parameters: ${__prune}"
;;
pre-cancun-expiry)
prune+=" --prune.transactionlookup.distance 10064"
case "${NETWORK}" in
mainnet)
echo "Reth minimal node with pre-Cancun history expiry"
__prune+=" --prune.bodies.before 19426587 --prune.receipts.before 19426587"
;;
sepolia)
echo "Reth minimal node with pre-Cancun history expiry"
__prune+=" --prune.bodies.before 5187023 --prune.receipts.before 5187023"
;;
*)
echo "There is no pre-Cancun history for ${NETWORK} network, \"pre-cancun-expiry\" has no effect."
__prune+=" --prune.receipts.before 0"
;;
esac
;;
rolling-expiry)
echo "Reth minimal node with rolling history expiry, keeps 1 year."
# 365 days = 82125 epochs = 2628000 slots / blocks
__prune+=" --prune.transactionlookup.distance 10064 --prune.bodies.distance 2628000 --prune.receipts.distance 2628000"
;;
aggressive-expiry)
echo "Reth minimal node with aggressive expiry"
__prune="--minimal"
;;
*)
echo "ERROR: The node type ${NODE_TYPE} is not known to Eth Docker's Reth implementation."
Expand All @@ -124,6 +149,10 @@ case "${NODE_TYPE}" in
;;
esac

if [[ -n "${__prune}" ]]; then
echo "Pruning parameters: ${__prune}"
fi

if [[ -f /var/lib/reth/repair-trie ]]; then
if [[ "${NETWORK}" =~ ^https?:// ]]; then
echo "Can't repair database on custom network"
Expand Down