Skip to main content

Deploy Relayer

This guide walks you through deploying and configuring the Surge Relayer, a critical component responsible for cross-layer communication between L1 and L2 networks.

Step 1: Clone the Repository

Clone the Surge Taiko Mono repository to your local environment and navigate into it:

git clone https://github.com/NethermindEth/surge-taiko-mono.git
cd surge-taiko-mono/

Step 2: Checkout the Branch

Switch to the correct branch (surge/devnet):

git checkout surge/devnet

Step 3: Environment Configuration

Navigate to the relayer package and set up your environment variables:

cd packages/relayer
cp .default.env .env
note

The .default.env file contains default values for L1_RPC_URL and L2_RPC_URL based on the configuration steps completed earlier. These defaults are suitable for most setups, but feel free to update them to match your own environment if needed.

Step 4: Relayer Deployment

Deploy the relayer components in the following sequence:

Initialize Components

Run the command to start necessary services:

docker compose --profile init up -d

This starts essential services such as the relayer database and queue.

Verification

Post-deployment verification steps:

  • Ensure the database initialization succeeded.
  • Confirm database migrations completed without errors.
  • Validate the relayer is running and properly connected to L1 and L2.

Health Checks

Use the following commands to verify component health:

# List running containers
docker compose ps

# View logs for specific components, e.g., L1 processor
docker logs relayer-l1-processor

# Monitor database logs
docker compose logs db -f --tail=100

# Review migration logs for errors.
docker compose logs migrations
Important

Ensure all relayer components are fully operational before proceeding with network operations. The relayer is a critical component for cross-layer communication.