From 9f0a7b2b9dfb082bb5b3f9ff5a79517b3c0a9f22 Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Tue, 7 Jul 2026 06:52:47 +0000 Subject: [PATCH] worldchain-mainnet: add --strip-components=1 to snapshot-finish extract The reth_full.tar.lz4 archive has a top-level reth/ directory; without strip-components, extraction nests db/ under reth/ and wastes hours on re-extraction (reseed.sh already had the flag). --- scripts/worldchain-mainnet-snapshot-finish.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/worldchain-mainnet-snapshot-finish.sh diff --git a/scripts/worldchain-mainnet-snapshot-finish.sh b/scripts/worldchain-mainnet-snapshot-finish.sh new file mode 100755 index 00000000..77a9f9ce --- /dev/null +++ b/scripts/worldchain-mainnet-snapshot-finish.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -eu + +# Bench helper: extract a downloaded worldchain-mainnet op-reth snapshot into the node volume. +# Run after the background download to /slowdisk/worldchain-mainnet-snapshot/ completes. +# For wipe+re-extract recovery, use worldchain-mainnet-snapshot-reseed.sh instead. + +DATADIR="${DATADIR:-/var/lib/docker/volumes/rpc_worldchain-mainnet-op-reth-pruned-trace/_data}" +SNAP="${SNAP:-/slowdisk/worldchain-mainnet-snapshot/reth_full.tar.lz4}" + +if [ ! -f "$SNAP" ]; then + echo "worldchain-mainnet-snapshot-finish: snapshot not found: $SNAP" >&2 + exit 1 +fi + +mkdir -p "$DATADIR" + +echo "worldchain-mainnet-snapshot-finish: extracting $SNAP -> $DATADIR (--strip-components=1)" +tar --directory "$DATADIR" -I lz4 -xf "$SNAP" --strip-components=1 + +echo "worldchain-mainnet-snapshot-finish: done"