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

Fix archive node snapshot, base snapshot and bump op-node version #128

Merged
merged 5 commits into from
Feb 20, 2024
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
7 changes: 0 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ NETWORK_NAME=op-mainnet
# Type of node to run ("full" or "archive"), note that "archive" is 10x bigger
NODE_TYPE=full

###############################################################################
# ↓ REQUIRED (LEGACY) ↓ #
###############################################################################

# L1 node to get chain data from (L2 sync no longer supported)
DATA_TRANSPORT_LAYER__RPC_ENDPOINT=

###############################################################################
# ↓ REQUIRED (BEDROCK) ↓ #
###############################################################################
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- ${PORT__HEALTHCHECK_METRICS:-7300}:7300

op-geth:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101308.0
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101308.1
restart: unless-stopped
stop_grace_period: 5m
entrypoint: /scripts/start-op-geth.sh
Expand All @@ -47,7 +47,7 @@ services:
- "host.docker.internal:host-gateway"

op-node:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.5.1
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.6.1
restart: unless-stopped
stop_grace_period: 5m
entrypoint: /scripts/start-op-node.sh
Expand Down
21 changes: 17 additions & 4 deletions scripts/init-bedrock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,23 @@ echo "Initializing via download..."

# Fix OP link with hardcoded official OP snapshot
echo "Fetching download link..."
if [ "$NETWORK_NAME" = "op-mainnet" ]; then
BEDROCK_TAR_DOWNLOAD="https://r2-snapshots.fastnode.io/op/$(curl -s https://r2-snapshots.fastnode.io/op/latest-mainnet)"
elif [ "$NETWORK_NAME" = "op-goerli" ]; then
BEDROCK_TAR_DOWNLOAD="https://datadirs.optimism.io/goerli-bedrock.tar.zst"

if [ "$NODE_TYPE" = "full" ]; then
if [ "$NETWORK_NAME" = "op-mainnet" ]; then
BEDROCK_TAR_DOWNLOAD="https://r2-snapshots.fastnode.io/op/$(curl -s https://r2-snapshots.fastnode.io/op/latest-mainnet)"
elif [ "$NETWORK_NAME" = "op-goerli" ]; then
BEDROCK_TAR_DOWNLOAD="https://datadirs.optimism.io/goerli-bedrock.tar.zst"
elif [ "$NETWORK_NAME" = "base-mainnet" ]; then
BEDROCK_TAR_DOWNLOAD="https://base-snapshots-mainnet-archive.s3.amazonaws.com/$(curl -s https://base-snapshots-mainnet-archive.s3.amazonaws.com/latest)"
elif [ "$NETWORK_NAME" = "base-goerli" ]; then
BEDROCK_TAR_DOWNLOAD="https://base-snapshots-goerli-archive.s3.amazonaws.com/$(curl -s https://base-snapshots-goerli-archive.s3.amazonaws.com/latest)"
elif [ "$NETWORK_NAME" = "base-sepolia" ]; then
BEDROCK_TAR_DOWNLOAD="https://base-snapshots-sepolia-archive.s3.amazonaws.com/$(curl -s https://base-snapshots-sepolia-archive.s3.amazonaws.com/latest)"
fi
elif [ "$NODE_TYPE" = "archive" ]; then
if [ "$NETWORK_NAME" = "op-mainnet" ]; then
BEDROCK_TAR_DOWNLOAD="$(curl -s https://datadirs.optimism.io/latest/ | grep -oE 'https://[^\"]+')"
fi
fi

if [ -n "${BEDROCK_TAR_DOWNLOAD+x}" ]; then
Expand Down
Loading