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

Deploy L1

In blockchain technology, a Layer 1 network refers to the base protocol, such as Ethereum or Bitcoin, that operates independently to process and finalize transactions. For the Surge development network, establishing an L1 environment is essential because it serves as the foundational layer where the Taiko protocol is deployed. This setup is crucial for launching and operating the Surge Layer 2 network, as L2 solutions rely on L1 for security and consensus.

This guide explains how to deploy an L1 development network using Kurtosis. By the end, you'll have a fully functional L1 environment running within a Kurtosis enclave, providing the necessary infrastructure for Surge's L2 deployment.

For a comprehensive understanding of how L1 integrates into Surge's architecture, refer to the Surge Architecture documentation.

Prerequisites

1. Install Kurtosis

info

Kurtosis is a tool that simplifies the development and testing of distributed systems by orchestrating complex, containerized environments using Docker.

First, install Kurtosis by following the official guide:

After installation, verify Kurtosis is correctly installed by checking the engine status:

kurtosis engine status

You should see output similar to:

A Kurtosis engine is running with the following info:
Version: 1.6.0

2. Clone Repository

Next, clone the surge-devnet-package repository and navigate into the directory:

git clone https://github.com/NethermindEth/surge-devnet-package.git
cd surge-devnet-package

Deploy the L1 Network

Once you've installed Kurtosis and cloned the repository, deploy the L1 network with the following command:

kurtosis run --enclave surge-devnet . --args-file network_params.yaml --production
tip

This command not only deploys the L1 network but also automatically deploys the Taiko protocol on L1. Monitor your terminal output for details on the deployment progress.

Verify Your Deployment

After deployment, verify that your environment is correctly set up by inspecting the Kurtosis enclave:

kurtosis enclave inspect surge-devnet

You should see a list of active services confirming that both the L1 network and the Taiko protocol have been successfully deployed.

Verify the Execution Layer

Check if the Execution Layer is running correctly by sending a simple web3_clientVersion JSON-RPC request:

curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' \
http://127.0.0.1:32002

A successful response should look like:

{
"jsonrpc": "2.0",
"result": "Nethermind/v1.31.0-unstable+fd87ddb6/linux-x64/dotnet9.0.2",
"id": 1
}

This indicates the Execution Layer is correctly initialized and running.

Verify the Consensus Layer

Check the Consensus Layer's syncing status by running:

curl http://127.0.0.1:33001/eth/v1/node/syncing

A successful response should resemble:

{
"data": {
"is_syncing": false,
"is_optimistic": false,
"el_offline": false,
"head_slot": "28046",
"sync_distance": "0"
}
}

This confirms the Consensus Layer is successfully running and synchronized.

Troubleshooting

If you encounter any issues:

  1. Confirm that the network_params.yaml file is present in the surge-devnet-package directory.
  2. Verify that Kurtosis is properly installed and running with the correct version (kurtosis engine status).