simple-surge-node
is a lightweight tool for setting up and managing a node on the Surge network. This repository is intended for development purposes only and is not recommended for production use.
This repository is ideal for easy set up operating Layer 2 (L2) solutions, simplifying the process of running Surge node.
Get started with the guide or explore deploying L2.
Note: This "How to Use" section assumes that you have already completed the Deploying L1 step from the full guide.
Create your environment configuration file (.env
) by copying the provided sample:
# for devnet
cp .env.devnet .env
# for hoodi
cp .env.hoodi .env
Tip: The
.env.devnet
file includes default values devnet configuration. 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, replacehost.docker.internal
with your server's IP address or hostname.
Deploying L2 involves sequentially starting five components. Ensure you follow the correct order for proper communication between them.
Component 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.
Note: If you did not deploy a prover in the setup steps, provided by full guide, you can safely skip launching the prover relayer.
-
Driver: 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: 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
-
BlockScout: Launches BlockScout for blockchain exploration and monitoring:
docker compose --profile blockscout up -d
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
Note: Depending on your deployment setup, you might need to replace
localhost
with your server's IP address, hostname, or appropriate domain.
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.