Skip to main content

Deploy L2

This guide provides clear instructions for deploying L2 network components using Simple Surge Node.

Setup Process

Follow these steps to set up and deploy your L2 network:

1. Clone Repository

Clone the Simple Surge Node repository and navigate into the directory:

git clone https://github.com/NethermindEth/simple-surge-node.git
cd simple-surge-node

2. Switch to the Devnet Branch

Checkout the surge/devnet branch:

git checkout surge/devnet

3. Configure Environment

Create your environment configuration file (.env) by copying the provided sample:

cp .env.sample .env
Environment Configuration

The .env.sample file includes default values for the devnet configuration, based on previously generated data. You can customize these values, such as L1 and L2 settings, genesis hashes, and addresses, as needed.

note

host.docker.internal values in the .env file might not work in all environments. If you encounter issues, replace host.docker.internal with your server's IP address or hostname.

4. Start Components

Deploying L2 involves sequentially starting five components. Ensure you follow the correct order for proper communication between them.

Component Order

Start components in this order:

  1. Driver: Manages network execution via Nethermind Execution Client.
  2. Proposer: Handles transaction bundling and block proposals.
  3. Prover Relayer: Relays proofs received from provers.
  4. Metrics: Monitors network performance using Prometheus and Grafana.
  5. BlockScout: Provides blockchain exploration and monitoring interface.

Following this sequence ensures components initialize correctly.

note

If you did not deploy a prover in the previous setup steps, you can safely skip launching the prover relayer.

Starts the Nethermind Execution Client for L2 network operation:

docker compose --profile nethermind_execution_l2 up -d

Verification

After deploying all components, ensure everything is running correctly by:

  • Checking the status of Docker containers using docker compose ps.
  • Monitoring logs for startup errors with docker compose --profile <profile_name> logs -f --tail 100.
  • Verifying network connectivity between components.
  • Accessing BlockScout for L1 and L2 chain exploration and verification:

Complete verification of the Surge devnet occurs after deploying additional services in subsequent steps.

note

Depending on your deployment setup, you might need to replace localhost with your server's IP address, hostname, or appropriate domain.

Troubleshooting

If issues arise during deployment:

  • Confirm environment variables in .env are correctly configured.
  • Review Docker logs for detailed error information.
  • Ensure required ports are open and accessible.
  • Check network connectivity between the deployed components.