var img = document.createElement('img'); img.src = "https://nethermind.matomo.cloud//piwik.php?idsite=6&rec=1&url=https://www.surge.wtf" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

Run L2

tip

This guide is fairly similar to the Deploy L2 guide. The main difference is that this guide is focused on running the components of the Surge rollup on the Hoodi testnet, while the other one is more general.

A Layer 2 network builds on top of Layer 1 to increase scalability and reduce transaction costs, while still inheriting L1’s security. For Surge, the L2 network is where user transactions are executed and blocks are proposed and proven.

This guide provides clear instructions for running Surge’s L2 components using the Simple Surge Node, enabling you to run and test the core rollup logic.

To see how L2 fits into the overall system, refer to the Surge Architecture documentation.

Setup Process

Follow these steps to set up and run 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. Configure Environment

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

cp .env.hoodi .env
Environment Configuration

The .env.hoodi file contains default configuration values for Hoodi. You can customize these settings — such as L1 and L2 parameters, genesis hashes, and contract addresses — as needed.

And make sure to update the L1 URLs to match the ones you're using.

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

L2 consists of the following components, feel free to launch the ones specific to your needs.

tip

You can run multiple profiles at once:

docker compose --profile <profile1> --profile <profile2> up -d

Driver

tip

If you just want to follow the L2 chain, launching just the driver is sufficient.

Starts the Nethermind Execution Client for L2 network operation:

docker compose --profile nethermind_execution_l2 up -d

Proposer

Initiates the Proposer service for transaction bundling and block proposals:

docker compose --profile proposer up -d

Prover Relayer

note

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

Launches the Prover Relayer for proof relay:

docker compose --profile prover up -d

Metrics

Sets up Prometheus and Grafana for real-time monitoring:

docker compose --profile metrics up -d

Verification

After launching 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.

Troubleshooting

If issues arise during launch:

  • 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 launched components.