Skip to main content

Deploy Relayer

This guide walks you through the process of deploying and configuring the Surge Relayer.

Deployment Steps

1. Clone Repository

First, clone the Surge Taiko Mono repository:

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

2. Configure Environment

Navigate to the relayer package and prepare the configuration:

cd surge-taiko-mono/packages/relayer
cp .default.env .env

Edit .env, make sure L1_RPC_URL and L2_RPC_URL are set correctly.

3. Deploy Components

Deploy the relayer components in the following sequence:

docker compose --profile init up -d

This command starts the relayer database and queue services.

Verification

After deployment, verify that:

  1. Database is properly initialized
  2. Migrations completed successfully
  3. Relayer service is running and connected to both L1 and L2

Component Health Checks

Monitor the health of your deployment:

# Check running containers
docker compose ps

# View logs of required relayer components, e.g. processor
docker logs relayer-l1-processor

# Check database status
docker compose logs db -f
Important

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

Troubleshooting

If you encounter issues:

  1. Connection Issues
  • Verify L1 and L2 RPC endpoints are accessible
  • Check network connectivity
  • Ensure all contract addresses are correct
  1. Database Issues
  • Verify PostgreSQL is running
  • Check migration logs for errors
  • Ensure database credentials are correct
  1. Service Issues
  • Check container logs for errors
  • Verify all environment variables are set
  • Ensure sufficient system resources
Need Help?

If you continue to experience issues, check the logs using:

docker compose logs --tail=100