Skip to content
Open
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
36 changes: 36 additions & 0 deletions .env.devnet
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,42 @@ TX_SAFE_ABORT_NONCE_TOO_LOW_COUNT=
# Timeout for sending transactions. If 0 it is disabled.
TX_SEND_TIMEOUT=

############################### BLOB INDEXER #####################################
# Database Configuration
BLOB_INDEXER_DATABASE_URL=mysql://root:password@mysql:3306/blobindexer

# Beacon API Configuration
# Use a public beacon node endpoint or your own local beacon node
BLOB_INDEXER_BEACON_URL=http://host.docker.internal:33001

# Exposed port
BLOB_INDEXER_PORT=9000

# HTTP Server Configuration
BLOB_INDEXER_HTTP_BIND=0.0.0.0:9000

# Indexer Performance Configuration
BLOB_INDEXER_POLL_INTERVAL=6s
BLOB_INDEXER_HTTP_TIMEOUT=20s
BLOB_INDEXER_MAX_CONCURRENCY=4
BLOB_INDEXER_BACKFILL_BATCH=32

# Reorg and Finality Configuration
BLOB_INDEXER_REORG_LOOKBACK=128
BLOB_INDEXER_FINALITY_CONFIRMATIONS=64

# Logging Configuration
BLOB_INDEXER_LOG_FORMAT=pretty
RUST_LOG=info

# Optional: Watch specific contract addresses for blob transactions
# Comma-separated list of 0x-prefixed addresses
# BLOB_INDEXER_WATCH_ADDRESSES=0x328F1b56a6128E5F5Efb2d1C9E1b8C2776539363

# Optional: Start indexing from a specific slot (useful for bootstrapping)
# If not set, will start from the latest finalized slot
# BLOB_INDEXER_START_SLOT=8000000

############################### RELAYER #####################################
# Database
MYSQL_USER=admin
Expand Down
36 changes: 36 additions & 0 deletions .env.hoodi
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,42 @@ TX_SAFE_ABORT_NONCE_TOO_LOW_COUNT=
# Timeout for sending transactions. If 0 it is disabled.
TX_SEND_TIMEOUT=

############################### BLOB INDEXER #####################################
# Database Configuration
BLOB_INDEXER_DATABASE_URL=mysql://root:password@mysql:3306/blobindexer

# Beacon API Configuration
# Use a public beacon node endpoint or your own local beacon node
BLOB_INDEXER_BEACON_URL=http://host.docker.internal:33001

# Exposed port
BLOB_INDEXER_PORT=9000

# HTTP Server Configuration
BLOB_INDEXER_HTTP_BIND=0.0.0.0:9000

# Indexer Performance Configuration
BLOB_INDEXER_POLL_INTERVAL=6s
BLOB_INDEXER_HTTP_TIMEOUT=20s
BLOB_INDEXER_MAX_CONCURRENCY=4
BLOB_INDEXER_BACKFILL_BATCH=32

# Reorg and Finality Configuration
BLOB_INDEXER_REORG_LOOKBACK=128
BLOB_INDEXER_FINALITY_CONFIRMATIONS=64

# Logging Configuration
BLOB_INDEXER_LOG_FORMAT=pretty
RUST_LOG=info

# Optional: Watch specific contract addresses for blob transactions
# Comma-separated list of 0x-prefixed addresses
# BLOB_INDEXER_WATCH_ADDRESSES=0x328F1b56a6128E5F5Efb2d1C9E1b8C2776539363

# Optional: Start indexing from a specific slot (useful for bootstrapping)
# If not set, will start from the latest finalized slot
# BLOB_INDEXER_START_SLOT=8000000

############################### RELAYER #####################################
# Database
MYSQL_USER=admin
Expand Down
36 changes: 36 additions & 0 deletions .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,42 @@ TX_SAFE_ABORT_NONCE_TOO_LOW_COUNT=
# Timeout for sending transactions. If 0 it is disabled.
TX_SEND_TIMEOUT=

############################### BLOB INDEXER #####################################
# Database Configuration
BLOB_INDEXER_DATABASE_URL=mysql://root:password@mysql:3306/blobindexer

# Beacon API Configuration
# Use a public beacon node endpoint or your own local beacon node
BLOB_INDEXER_BEACON_URL=http://host.docker.internal:33001

# Exposed port
BLOB_INDEXER_PORT=9000

# HTTP Server Configuration
BLOB_INDEXER_HTTP_BIND=0.0.0.0:9000

# Indexer Performance Configuration
BLOB_INDEXER_POLL_INTERVAL=6s
BLOB_INDEXER_HTTP_TIMEOUT=20s
BLOB_INDEXER_MAX_CONCURRENCY=4
BLOB_INDEXER_BACKFILL_BATCH=32

# Reorg and Finality Configuration
BLOB_INDEXER_REORG_LOOKBACK=128
BLOB_INDEXER_FINALITY_CONFIRMATIONS=64

# Logging Configuration
BLOB_INDEXER_LOG_FORMAT=pretty
RUST_LOG=info

# Optional: Watch specific contract addresses for blob transactions
# Comma-separated list of 0x-prefixed addresses
# BLOB_INDEXER_WATCH_ADDRESSES=0x328F1b56a6128E5F5Efb2d1C9E1b8C2776539363

# Optional: Start indexing from a specific slot (useful for bootstrapping)
# If not set, will start from the latest finalized slot
# BLOB_INDEXER_START_SLOT=8000000

############################### RELAYER #####################################
# Database
MYSQL_USER=admin
Expand Down
50 changes: 50 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,56 @@ services:
profiles:
- prover

# MySQL Database for storing blob data
mysql:
image: mysql:8.4
container_name: l2-taiko-blob-indexer-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: blobindexer
ports:
- 3307:3306
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --max-connections=1000
- --innodb-buffer-pool-size=1G
volumes:
- ./blobindexer-mysql:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-ppassword"]
interval: 5s
timeout: 3s
retries: 20
networks:
- surge
profiles:
- blobindexer

# Blob Indexer Service
blobindexer:
image: nethermind/surge-blob-indexer:sha-b978642
container_name: l2-taiko-blob-indexer
restart: unless-stopped
depends_on:
mysql:
condition: service_healthy
env_file:
- .env
ports:
- ${BLOB_INDEXER_PORT}:${BLOB_INDEXER_PORT}
networks:
- surge
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${BLOB_INDEXER_PORT}/healthz"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
profiles:
- blobindexer

tx-spammer:
image: ethpandaops/spamoor:master
container_name: l2-tx-spammer
Expand Down
1 change: 1 addition & 0 deletions script/start-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ARGS="${ARGS} \
--l2.ws ws://l2-nethermind-execution-client:"${L2_WS_PORT}" \
--l1.beacon ${L1_BEACON_HTTP} \
--l2.auth http://l2-nethermind-execution-client:${L2_ENGINE_API_PORT} \
--blob.server http://l2-taiko-blob-indexer:${BLOB_INDEXER_PORT} \
--taikoInbox ${TAIKO_INBOX} \
--taikoAnchor ${TAIKO_ANCHOR} \
--jwtSecret /tmp/jwt/jwtsecret \
Expand Down
1 change: 1 addition & 0 deletions surge-remover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ remove_db() {
echo

# Remove DB
rm -rf ./blobindexer-mysql
rm -rf ./execution-data
rm -rf ./blockscout-postgres-data
rm -rf ./mysql-data
Expand Down
17 changes: 17 additions & 0 deletions surge-stack-deployer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,20 @@ start_l2_stack() {
fi
}

start_blob_indexer() {
echo
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ Starting Blob Indexer... ║"
echo "╚══════════════════════════════════════════════════════════════╝"
echo
docker compose --profile blobindexer up -d --remove-orphans
echo
echo "╔══════════════════════════════════════════════════════════════╗"
echo " ✅ Blob Indexer started successfully "
echo "╚══════════════════════════════════════════════════════════════╝"
echo
}

deploy_l2() {
# Check if deployment is already completed
if [ -f "deployment/setup_l2.json" ]; then
Expand Down Expand Up @@ -469,6 +483,9 @@ EOF
}

deploy_surge_stack() {
# Start Blob Indexer
start_blob_indexer

# Start L2 Stack
start_l2_stack

Expand Down