From cd500e4630e86e3928dcb3389f83ad324c49f7a7 Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Fri, 27 Nov 2026 13:09:04 +0100 Subject: [PATCH] fix(reth): skip snapshot download off mainnet and log failures reth download only auto-discovers snapshots for Ethereum mainnet and fails on other chains, and its exit code was ignored, so hoodi and sepolia silently synced from genesis after an error. Skip the download off mainnet and log a warning when a mainnet download fails before falling back to syncing from genesis. --- reth/entrypoint.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/reth/entrypoint.sh b/reth/entrypoint.sh index 16a2220..70faa65 100755 --- a/reth/entrypoint.sh +++ b/reth/entrypoint.sh @@ -73,15 +73,20 @@ if [ "${STORAGE_MODE}" = custom ]; then elif [ "${DOWNLOAD_SNAPSHOT}" = true ]; then if is_data_dir_initialized; then echo "[INFO - entrypoint] Reth data directory already initialized; skipping snapshot download" + elif [ "${NETWORK}" != mainnet ]; then + # reth download only auto-discovers snapshots for Ethereum mainnet + echo "[INFO - entrypoint] No Reth snapshot available for ${NETWORK}; syncing from genesis" else echo "[INFO - entrypoint] Downloading ${NETWORK} ${SNAPSHOT_MODE_FLAG#--} snapshot before starting Reth" # shellcheck disable=SC2086 - reth \ + if ! reth \ download \ -y \ ${SNAPSHOT_MODE_FLAG} \ --chain "${NETWORK}" \ - --datadir "${DATA_DIR}" + --datadir "${DATA_DIR}"; then + echo "[WARN - entrypoint] Snapshot download failed; falling back to syncing ${NETWORK} from genesis" + fi fi fi