diff --git a/default.env b/default.env index cfa930b1..3efae9dc 100644 --- a/default.env +++ b/default.env @@ -207,7 +207,8 @@ CL_MINIMAL_NODE=true # This expires pre-merge blocks and receipts as of June 2025, see https://hackmd.io/@hBXHLw_9Qq2va4pRtI4bIA/ryzBaf7fJx # Consider using `./ethd prune-history`, which guides you as to whether to prune in-place # or resync, depending on client -# Erigon also has an \"aggressive\" mode that prunes even more +# Erigon also has an "aggressive" mode that prunes even more +# Nethermind has a "rolling" mode that prunes everything but the last year # EL_ARCHIVE_NODE must be false for this to take effect EL_MINIMAL_NODE=true # Era URLs, see https://eth-clients.github.io/history-endpoints/ diff --git a/ethd b/ethd index b6a8bed2..dcb923ed 100755 --- a/ethd +++ b/ethd @@ -2469,9 +2469,9 @@ prune-history() { ;; *nethermind.yml* ) __client="Nethermind" - __min_ver="v1.31.9" - __extra_msg="To prune pre-merge history, a full resync is required, which should take 1-2 hours to where attestations work.\nYou can use https://rescuenode.com to keep attesting during resync." - __prune_marker="" + __min_ver="v1.33.0" + __extra_msg="Pruning pre-merge history does not require a resync and should be immediate." + __prune_marker="/var/lib/nethermind/minimal-node" ;; *besu.yml* ) __client="Besu" diff --git a/nethermind/docker-entrypoint.sh b/nethermind/docker-entrypoint.sh index b0dead28..e3ffec18 100755 --- a/nethermind/docker-entrypoint.sh +++ b/nethermind/docker-entrypoint.sh @@ -81,17 +81,17 @@ elif [[ ! "${NETWORK}" =~ ^https?:// ]]; then # Only configure prune parameters fi if [ "${MINIMAL_NODE}" = "true" ]; then case "${NETWORK}" in - mainnet ) - echo "Nethermind minimal node with pre-merge history expiry" - __prune+=" --Sync.AncientBodiesBarrier=15537394 --Sync.AncientReceiptsBarrier=15537394" - ;; - sepolia ) + sepolia|mainnet) echo "Nethermind minimal node with pre-merge history expiry" + __prune+=" --History.Pruning=UseAncientBarriers" ;; * ) echo "There is no pre-merge history for ${NETWORK} network, EL_MINIMAL_NODE has no effect." ;; esac + elif [ "${MINIMAL_NODE}" = "rolling" ]; then + echo "Nethermind minimal node with rolling history expiry, keep 1 year by default" + __prune+=" --History.Pruning=Rolling" else # Full node echo "Nethermind full node without history expiry" __prune+=" --Sync.AncientBodiesBarrier=0 --Sync.AncientReceiptsBarrier=0"