Skip to content

Commit 7700c91

Browse files
authored
Improve guides section (#41)
* Start working on the guides section * docs: enhance L1 deployment guide for clarity and detail * docs: update deployment guides for clarity and structure * docs: add further reading section for Based Rollups with helpful resources * docs: remove redundant "What's Next?" section from L1 deployment guide * docs: update L2 genesis preparation instructions for clarity
1 parent ed3232d commit 7700c91

File tree

10 files changed

+155
-109
lines changed

10 files changed

+155
-109
lines changed

docs/about/architecture.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 4
33
title: Surge Architecture
44
---
55

@@ -28,15 +28,9 @@ The Taiko Client consists of several sub-components:
2828
Surge has customized aspects of the Taiko architecture to enhance performance and remove any reliance on new tokens:
2929

3030
1. **Token-Free Design:** Surge removes token dependencies, allowing the use of Ether as a bond for block proposals.
31-
3231
2. **Execution Client Upgrade:** Replaced TaikoGeth with the Nethermind Execution Client (NMC) to achieve better performance. [NMC Documentation](https://github.com/NethermindEth/nethermind).
33-
3432
3. **Time-Locked Owner:** Modified the multisig implementation to feature a 45-day timelock, aligning with Stage 2 requirements by L2Beat.
35-
3633
4. **Verification Streak Checks:** Owner operations via the multisig are blocked if there has been a liveness disruption of 7 days or more within the past 45 days.
37-
3834
5. **Disabled Pausing:** The owner cannot pause the protocol or peripheral contracts.
39-
4035
6. **2/3 Proof Verifier:** There are three proof systems (SGX, SP1, and Risc0). At least two of these must agree on a state transition for it to be accepted.
41-
4236
7. **No Contestation Window:** As Surge employs a single ZK approach (no optimistic fallback), it does not require a contestation window. This design choice makes Surge a pure ZK-Rollup rather than an Optimistic Rollup.

docs/about/based-rollups.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,12 @@ Surge fully embraces this model for its rollup architecture. By integrating with
3636
- **Conventional Rollups**: A centralized sequencer has the final say on transaction order before batches go to L1, introducing potential risks of manipulation or censorship.
3737

3838
![Conventional Non-Based Rollups: A centralized sequencer decides transaction ordering before submitting them to L1.](./images/conventional-rollups.png)
39+
40+
## Further Reading
41+
42+
To learn more about Based Rollups, explore these helpful resources:
43+
44+
- **Taiko Documentation: [Based Rollups](https://docs.taiko.xyz/taiko-alethia-protocol/protocol-design/based-rollups)**
45+
Official documentation providing an in-depth understanding of Taiko's Based Rollups design and protocol specifications.
46+
- **Blog Post: [Understanding Based Rollups](https://taiko.mirror.xyz/7dfMydX1FqEx9_sOvhRt3V8hJksKSIWjzhCVu7FyMZU)**
47+
A clear and informative article by the Taiko team, offering valuable insights into how Based Rollups function and their benefits.

docs/about/no-token.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/guides/deploy-dapps/deploy-on-surge.md renamed to docs/guides/deploy-on-surge.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 3
3+
title: Deploying your DApp on Surge
34
---
45

56
# Deploying your DApp on Surge

docs/guides/running-surge/deploy-l1-protocols.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
sidebar_position: 4
2+
title: Deploy Protocols on L1
3+
sidebar_position: 2
34
---
45

56
import Tabs from '@theme/Tabs';
@@ -8,16 +9,16 @@ import TabItem from '@theme/TabItem';
89
# Deploy Protocols on L1
910

1011
:::note Skip if Using Kurtosis
11-
If you're using the Kurtosis Package to deploy L1, you can skip this section.
12+
If you're using the Kurtosis Package to [deploy L1](docs/guides/running-surge/deploy-l1.mdx), you can skip this section.
1213
:::
1314

1415
## 1. Deploy Taiko on L1
1516

1617
### Prerequisites
1718

18-
- L2 Chain ID (e.g. 763374)
19-
- L2 Genesis Hash (e.g. `0xbeced3738f1246571cccabc82a1e6cbd9ed9d5f7ed2b6c7ded28f9722317bd9e`)
20-
- L1 Account with funds
19+
- L2 Chain ID (e.g., `763374`)
20+
- L2 Genesis Hash (e.g., `0xbeced3738f1246571cccabc82a1e6cbd9ed9d5f7ed2b6c7ded28f9722317bd9e`)
21+
- L1 Account with sufficient funds
2122
- L1 RPC URL
2223

2324
### Set Environment Variables
@@ -197,7 +198,7 @@ docker run \
197198
- ATTESTATION_ADDRESS: `0xaE37C7A711bcab9B0f8655a97B738d6ccaB6560B`
198199
- PEM_CERTCHAIN_ADDRESS: `0x303CB317624c74bB20Acbb9E13c8D745C6379826`
199200
- Quote value (see documentation)
200-
- L1 Account with funds
201+
- L1 Account with sufficient funds
201202
- L1 RPC URL
202203

203204
:::info Full Quote Value
Lines changed: 81 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,124 @@
11
---
2-
sidebar_position: 2
2+
title: Deploy L1
3+
sidebar_position: 1
34
---
45

56
# Deploy L1
67

7-
In this guide, we'll walk through the process of deploying the L1 network using Kurtosis. This will also deploy the Taiko protocol on L1.
8+
This guide explains how to deploy an L1 development network using Kurtosis. This setup includes deploying the Taiko protocol on L1, which is required for launching the Surge L2 development network. By the end, you'll have a fully functional L1 environment running within a Kurtosis enclave.
89

910
## Prerequisites
1011

11-
- Git and Docker installed on your system
12-
- Terminal access
13-
- Basic command line knowledge
14-
15-
## Installation Steps
16-
1712
### 1. Install Kurtosis
1813

19-
First, you'll need to install Kurtosis on your system. Follow the installation guide at:
14+
First, install Kurtosis by following the official guide:
2015

2116
<div className="flex justify-center my-8">
2217
<a
2318
className="button button--primary button--lg"
24-
href="https://docs.kurtosis.com/quickstart"
19+
href="https://docs.kurtosis.com/install"
2520
target="_blank"
2621
rel="noopener noreferrer"
2722
>
2823
Kurtosis Installation Guide ↗
2924
</a>
3025
</div>
3126

32-
### 2. Clone the Repository
27+
After installation, verify Kurtosis is correctly installed by checking the engine status:
28+
29+
```bash
30+
kurtosis engine status
31+
```
32+
33+
You should see output similar to:
34+
35+
```
36+
A Kurtosis engine is running with the following info:
37+
Version: 1.6.0
38+
```
3339

34-
Clone the Surge devnet package repository and navigate to the directory:
40+
### 2. Clone Repository
41+
42+
Next, clone the `surge-devnet-package` repository and navigate into the directory:
3543

3644
```bash
3745
git clone https://github.com/NethermindEth/surge-devnet-package.git
38-
3946
cd surge-devnet-package
4047
```
4148

42-
### 3. Deploy Using Kurtosis
49+
## Deploy the L1 Network
4350

44-
Run Kurtosis with the following command to deploy the L1 network:
51+
Once you've installed Kurtosis and cloned the repository, deploy the L1 network with the following command:
4552

4653
```bash
4754
kurtosis run --enclave surge-devnet . --args-file network_params.yaml --production
4855
```
4956

5057
:::tip
51-
This command will also automatically deploy the Taiko protocol on L1 for you. Watch closely for the deployment outputs.
58+
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.
5259
:::
5360

54-
## Verification
61+
## Verify Your Deployment
5562

56-
After running the deployment command, Kurtosis will start setting up your L1 environment. You should see output in your terminal indicating the progress of the deployment.
63+
After deployment, verify that your environment is correctly set up by inspecting the Kurtosis enclave:
5764

58-
:::info What's Next?
59-
Once your L1 deployment is complete, you can proceed with setting up your prover or configuring additional network parameters.
60-
:::
65+
```bash
66+
kurtosis enclave inspect surge-devnet
67+
```
68+
69+
You should see a list of active services confirming that both the L1 network and the Taiko protocol have been successfully deployed.
70+
71+
### Verify the Execution Layer
72+
73+
Check if the Execution Layer is running correctly by sending a simple [`web3_clientVersion`](https://www.quicknode.com/docs/ethereum/web3_clientVersion) JSON-RPC request:
74+
75+
```bash
76+
curl -X POST -H "Content-Type: application/json" \
77+
--data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' \
78+
http://127.0.0.1:32002
79+
```
80+
81+
A successful response should look like:
82+
83+
```json
84+
{
85+
"jsonrpc": "2.0",
86+
"result": "Nethermind/v1.31.0-unstable+fd87ddb6/linux-x64/dotnet9.0.2",
87+
"id": 1
88+
}
89+
```
90+
91+
This indicates the Execution Layer is correctly initialized and running.
92+
93+
### Verify the Consensus Layer
94+
95+
Check the Consensus Layer's syncing status by running:
96+
97+
```bash
98+
curl http://127.0.0.1:33001/eth/v1/node/syncing
99+
```
100+
101+
A successful response should resemble:
102+
103+
```json
104+
{
105+
"data": {
106+
"is_syncing": false,
107+
"is_optimistic": false,
108+
"el_offline": false,
109+
"head_slot": "28046",
110+
"sync_distance": "0"
111+
}
112+
}
113+
```
114+
115+
This confirms the Consensus Layer is successfully running and synchronized.
61116

62117
## Troubleshooting
63118

64-
If you encounter any issues during deployment:
119+
If you encounter any issues:
120+
121+
1. Confirm that the `network_params.yaml` file is present in the `surge-devnet-package` directory.
122+
2. Verify that Kurtosis is properly installed and running with the correct version (`kurtosis engine status`).
65123

66-
1. Ensure all prerequisites are properly installed
67-
2. Check that the `network_params.yaml` file exists and is properly configured
68-
3. Make sure Kurtosis is running correctly on your system
124+
If problems persist, refer to the [Troubleshooting section](docs/troubleshooting/index.mdx) for additional support.
Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
11
---
2-
sidebar_position: 1
2+
title: Prepare L2 Genesis
3+
sidebar_position: 3
34
---
45

56
# Prepare L2 Genesis
67

7-
In this guide, we'll walk through the process of preparing the L2 genesis file, chainspec file and genesis hash later required by deploying L1 Network and L2.
8+
:::note Skip if Using `simple-surge-node`
9+
If you're using [`simple-surge-node`](https://github.com/NethermindEth/simple-surge-node) to [deploy L2](docs/guides/running-surge/deploy-l2.mdx), you can **skip this section** since `simple-surge-node` repository already includes a ready-to-use [`chainspec.json` file](https://github.com/NethermindEth/simple-surge-node/blob/main/static/chainspec.json).
10+
:::
11+
12+
This guide walks you through preparing your own L2 genesis file, chainspec file, and genesis hash which are required to deploy an L2 network.
813

914
## Prerequisites
1015

11-
- Foundry, pnpm and jq installed on your system
12-
- Terminal access
13-
- Basic command line knowledge
16+
Before proceeding, ensure the following tools are installed:
17+
18+
- [Foundry](https://github.com/foundry-rs/foundry#installation)
19+
- [pnpm](https://pnpm.io/installation)
20+
- [jq](https://jqlang.org/download/)
21+
- [Docker](https://docs.docker.com/get-docker/)
1422

15-
## Deployment Steps
23+
## Steps
1624

17-
### 1. Clone Repository
25+
### 1. Clone the Repository
1826

19-
First, clone the Surge Taiko Mono repository and navigate to the directory:
27+
Clone the `surge-taiko-mono` repository and navigate into it:
2028

2129
```bash
2230
git clone https://github.com/NethermindEth/surge-taiko-mono.git
23-
2431
cd surge-taiko-mono
2532
```
2633

27-
### 2. Switch to the Correct Branch
34+
### 2. Checkout Correct Branch
2835

2936
Checkout the `surge/devnet` branch:
3037

@@ -34,48 +41,48 @@ git checkout surge/devnet
3441

3542
### 3. Install Dependencies
3643

37-
Navigate to the protocol package and install all required dependencies:
44+
Navigate to the protocol package and install dependencies:
3845

3946
```bash
4047
cd packages/protocol
41-
42-
foundryup && pnpm install
48+
foundryup
49+
pnpm install
4350
```
4451

45-
### 4. Set Environment Variables
52+
### 4. Configure Environment Variables
4653

47-
Set the following environment variables as needed:
54+
Set required environment variables:
4855

4956
```bash
5057
export CONTRACT_OWNER=0x8943545177806ED17B9F23F0a21ee5948eCaa776
5158
export L1_CHAINID=3151908
5259
export L2_CHAINID=763374
5360
```
5461

55-
### 5. Generate L2 Genesis
62+
### 5. Generate L2 Genesis File
5663

57-
Then compile the L2 contracts and generate the genesis block:
64+
Compile L2 contracts and generate the genesis block:
5865

5966
```bash
6067
pnpm compile:l2
6168
pnpm genesis:gen
6269
```
6370

6471
:::tip
65-
You will find the genesis file in `./test/genesis/data/`.
72+
The generated files can be found at `./test/genesis/data/`.
6673
:::
6774

68-
### 6. Download Genesis to Chainspec Converter
75+
### 6. Download Genesis-to-Chainspec Converter
6976

70-
In order to convert the genesis file to chainspec file, you can download the following tool:
77+
Download the script used to convert the genesis file to a chainspec file:
7178

7279
```bash
7380
curl -O https://raw.githubusercontent.com/NethermindEth/core-scripts/refs/heads/main/gen2spec/gen2spec.jq
7481
```
7582

7683
### 7. Convert Genesis to Chainspec
7784

78-
Then run the following command to convert the genesis file to chainspec file:
85+
Convert the genesis file into a chainspec file:
7986

8087
```bash
8188
cat ./test/genesis/data/genesis.json | jq ". * {
@@ -90,12 +97,12 @@ cat ./test/genesis/data/genesis.json | jq ". * {
9097
```
9198

9299
:::tip
93-
You will find the chainspec file in `./test/genesis/data/`.
100+
The chainspec file will be created at `./test/genesis/data/chainspec.json`.
94101
:::
95102

96103
## Retrieve the Genesis Hash
97104

98-
To retrieve the genesis hash, you can use Nethermind Client:
105+
Use the Nethermind client Docker container to retrieve the genesis hash:
99106

100107
```bash
101108
docker run -d \
@@ -105,9 +112,18 @@ docker run -d \
105112
--config=none \
106113
--Init.ChainSpecPath=/chainspec.json
107114

115+
# Wait a few seconds for the container to initialize
116+
108117
docker logs nethermind-genesis-hash 2>/dev/null | grep "Genesis hash" | head -n 1 | sed 's/.*Genesis hash : \(.*\)/\1/'
109118
```
110119

111120
:::tip
112-
You will get the genesis hash in the logs.
121+
The genesis hash will be printed in the console.
113122
:::
123+
124+
### Clean Up (Optional)
125+
126+
Stop and remove the Docker container after obtaining the genesis hash:
127+
128+
```bash
129+
docker rm -f nethermind-genesis-hash

0 commit comments

Comments
 (0)