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
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.
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.
Start components in this order:
- Driver: Manages network execution via Nethermind Execution Client.
- Proposer: Handles transaction bundling and block proposals.
- Prover Relayer: Relays proofs received from provers.
- Metrics: Monitors network performance using Prometheus and Grafana.
- BlockScout: Provides blockchain exploration and monitoring interface.
Following this sequence ensures components initialize correctly.
If you did not deploy a prover in the previous setup steps, you can safely skip launching the prover relayer.
- Driver
- Proposer
- Prover Relayer
- Metrics
- BlockScout
Starts the Nethermind Execution Client for L2 network operation:
docker compose --profile nethermind_execution_l2 up -d
Initiates the Proposer service for transaction bundling and block proposals:
docker compose --profile proposer up -d
Launches the Prover Relayer for proof relay:
docker compose --profile prover up -d
Sets up Prometheus and Grafana for real-time monitoring:
docker compose --profile metrics up -d
Launches BlockScout that provides a web-based interface to:
- Explore blocks, transactions, and accounts
- Verify smart contracts
- Monitor network activity
- Track token transfers and balances
docker compose --profile blockscout 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:
- L1 BlockScout: http://localhost:35003
- L2 BlockScout: http://localhost:4000
Complete verification of the Surge devnet occurs after deploying additional services in subsequent steps.
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.