Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update URL to downloaded data dir #24

Closed
wants to merge 1 commit into from
Closed
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: 3 additions & 2 deletions op-geth/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

DATA_DIR=/data
DATA_DIR_DOWNLOAD_URL=https://datadirs.optimism.io/latest/
PRELOADED_DATA_FILE=/mainnet-bedrock.tar.zst

# Configuration defined in https://community.optimism.io/docs/developers/bedrock/node-operator-guide/#configuring-op-geth
Expand Down Expand Up @@ -29,7 +30,7 @@ if [ "$(ls -A $DATA_DIR)" ]; then
echo "[INFO - entrypoint] Database already exists, skipping initialization"
else
echo "[INFO - entrypoint] $DATA_DIR is empty, initializing geth from preloaded data"
echo "[INFO - entrypoint] Downloading preloaded data from $PRELOADED_DATA_URL. This can take hours..."
echo "[INFO - entrypoint] Downloading preloaded data from $DATA_DIR_DOWNLOAD_URL. This can take hours..."
mkdir -p $DATA_DIR

# Before starting the download, check if a partial file exists.
Expand All @@ -39,7 +40,7 @@ else
fi

# Start the download.
wget -O $PRELOADED_DATA_FILE https://datadirs.optimism.io$PRELOADED_DATA_FILE
wget -O $PRELOADED_DATA_FILE $DATA_DIR_DOWNLOAD_URL
if [ $? -ne 0 ]; then
echo "[ERROR - entrypoint] Failed to download preloaded data."
exit 1
Expand Down
Loading