Skip to content

Commit 84e6767

Browse files
committed
update docs
1 parent 828ad26 commit 84e6767

12 files changed

+477
-191
lines changed

guides/block-times.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ and then the argument for block time.
1010
The flag is:
1111

1212
```bash
13-
--rollkit.block_time 1s
13+
--rollkit.node.block_time 1s
1414
```
1515

1616
Where `1s` can be adjusted to the speed of your choosing.
@@ -20,18 +20,18 @@ Here is an example:
2020
```bash
2121
# start the chain
2222
rollkit start [existing flags...] // [!code --]
23-
rollkit start [existing flags...] --rollkit.block_time 1s // [!code ++]
23+
rollkit start [existing flags...] --rollkit.node.block_time 1s // [!code ++]
2424
```
2525

2626
In the above example, we've changed it to one second blocks.
2727
Alternatively, you could slow your rollup down to 30 seconds:
2828

2929
```bash
30-
--rollkit.block_time 30s
30+
--rollkit.node.block_time 30s
3131
```
3232

3333
Or speed it up even more, to sub-second block times (100 milliseconds):
3434

3535
```bash
36-
--rollkit.block_time 100ms
36+
--rollkit.node.block_time 100ms
3737
```

guides/create-genesis.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
This guide will walk you through the process of setting up a genesis for your rollup. Follow the steps below to initialize your rollup chain, add a genesis account, and start the chain.
44

5-
## 0. Pre-requisities
5+
## 0. Pre-requisities
66

7-
For this guide you need to have a chain directory where you have created and built your chain.
7+
For this guide you need to have a chain directory where you have created and built your chain.
88

99
If you don't have a chain directory yet, you can initialize a simple ignite chain by following [this guide](./ignite-rollkit.md)
1010

1111
:::tip
12-
This guide will use the simple ignite chain created in linked guide. Make sure to update any relevant variables to match your chain.
12+
This guide will use the simple ignite chain created in linked guide. Make sure to update any relevant variables to match your chain.
1313
:::
1414

1515
## 1. Setting variables
@@ -50,6 +50,7 @@ You can always recreate the `rollkit.toml` file by deleting it and re-running th
5050
```sh
5151
rollkit toml init
5252
```
53+
5354
:::
5455

5556
## 3. Resetting existing genesis/chain data

guides/da-block-time.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# How to configure DA chain block syncing time
22

3-
The `--rollkit.da_block_time` flag is used to configure the time in seconds that the rollup will wait for a block to be synced from the DA chain.
3+
The `--rollkit.da.block_time` flag is used to configure the time in seconds that the rollup will wait for a block to be synced from the DA chain.
44

55
```bash
6-
--rollkit.da_block_time duration
6+
--rollkit.da.block_time duration
77
```
88

99
An example command would look like this:
1010

1111
```bash
1212
rollkit start [existing flags...] // [!code --]
13-
rollkit start [existing flags...] --rollkit.da_block_time=30s // [!code ++]
13+
rollkit start [existing flags...] --rollkit.da.block_time=30s // [!code ++]
1414
```

guides/evm-based.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Rollkit EVM Based Sequencer Setup Guide
2+
3+
## Introduction
4+
5+
This guide covers how to set up and run the Based Sequencer implementation of Rollkit EVM rollups. This implementation provides a DA-based approach to transaction sequencing while using EVM as the execution layer.
6+
7+
## Prerequisites
8+
9+
Before starting, ensure you have:
10+
11+
- Go 1.20 or later
12+
- Docker and Docker Compose
13+
- Access to the go-execution-evm repository (op-geth branch)
14+
- Git
15+
16+
## Setting Up the Environment
17+
18+
### 1. Clone the Rollkit Repository
19+
20+
```bash
21+
git clone https://github.com/rollkit/rollkit.git
22+
cd rollkit
23+
```
24+
25+
### 2. Build the Rollkit EVM Based Sequencer Implementation
26+
27+
```bash
28+
make build-evm-based
29+
make build-da
30+
```
31+
32+
This will create the following binaries in the `build` directory:
33+
34+
- `evm-based` - Based sequencer implementation
35+
- `local-da` - Local data availability node for testing
36+
37+
## Setting Up the Data Availability (DA) Layer
38+
39+
### Start the Local DA Node
40+
41+
```bash
42+
cd build
43+
./local-da start
44+
```
45+
46+
This will start a local DA node on the default port (26658).
47+
48+
## Setting Up the EVM Layer
49+
50+
### 1. Clone the go-execution-evm Repository
51+
52+
```bash
53+
git clone https://github.com/rollkit/go-execution-evm.git
54+
cd go-execution-evm
55+
git checkout op-geth
56+
```
57+
58+
### 2. Start the EVM Layer Using Docker Compose
59+
60+
```bash
61+
docker compose up -d
62+
```
63+
64+
This will start Reth (Rust Ethereum client) with the appropriate configuration for Rollkit.
65+
66+
### 3. Note the JWT Secret Path
67+
68+
The JWT secret is typically located at `go-execution-evm/docker/jwttoken/jwt.hex`. You'll need this path for the sequencer configuration.
69+
70+
## Running the Based Sequencer Implementation
71+
72+
### 1. Initialize the Sequencer
73+
74+
```bash
75+
cd build
76+
./evm-based init --rollkit.node.aggregator=true --rollkit.signer.passphrase secret
77+
```
78+
79+
### 2. Start the Sequencer
80+
81+
```bash
82+
./evm-based start \
83+
--evm.jwt-secret $(cat /path/to/go-execution-evm/docker/jwttoken/jwt.hex) \
84+
--evm.genesis-hash 0x0a962a0d163416829894c89cb604ae422323bcdf02d7ea08b94d68d3e026a380 \
85+
--rollkit.node.block_time 1s \
86+
--rollkit.node.aggregator=true \
87+
--rollkit.signer.passphrase secret \
88+
--based.url http://localhost:26658 \
89+
--based.namespace 0102030405060708090a \
90+
--based.start-height 0 \
91+
--based.max-height-drift 1 \
92+
--based.gas-multiplier 1.0 \
93+
--based.gas-price 1.0
94+
```
95+
96+
Replace `/path/to/` with the actual path to your go-execution-evm repository.
97+
98+
## Setting Up a Full Node
99+
100+
To run a full node alongside your sequencer, follow these steps:
101+
102+
### 1. Initialize a New Node Directory
103+
104+
```bash
105+
./evm-based init --home ~/.rollkit/evm-based-fullnode
106+
```
107+
108+
### 2. Copy the Genesis File
109+
110+
Copy the genesis file from the sequencer node to the full node:
111+
112+
```bash
113+
cp ~/.rollkit/evm-based/config/genesis.json ~/.rollkit/evm-based-fullnode/config/
114+
```
115+
116+
### 3. Get the Sequencer's P2P Address
117+
118+
Find the sequencer's P2P address in its logs. It will look similar to:
119+
120+
```bash
121+
INF listening on address=/ip4/127.0.0.1/tcp/26659/p2p/12D3KooWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
122+
```
123+
124+
### 4. Start the Full Node
125+
126+
```bash
127+
./evm-based start \
128+
--home ~/.rollkit/evm-based-fullnode \
129+
--evm.jwt-secret $(cat /path/to/go-execution-evm/docker/jwttoken/jwt.hex) \
130+
--evm.genesis-hash 0x0a962a0d163416829894c89cb604ae422323bcdf02d7ea08b94d68d3e026a380 \
131+
--rollkit.node.block_time 1s \
132+
--rollkit.node.aggregator=false \
133+
--rollkit.p2p.peers <SEQUENCER_P2P_ID>@127.0.0.1:26659 \
134+
--based.url http://localhost:26658 \
135+
--based.namespace 0102030405060708090a
136+
```
137+
138+
Replace `<SEQUENCER_P2P_ID>` with the actual P2P ID from your sequencer's logs.
139+
140+
## Verifying Node Operation
141+
142+
After starting your nodes, you should see logs indicating successful block processing:
143+
144+
```bash
145+
INF block marked as DA included blockHash=XXXX blockHeight=XX module=BlockManager
146+
```
147+
148+
## Configuration Reference
149+
150+
### Common Flags
151+
152+
| Flag | Description |
153+
|------|-------------|
154+
| `--rollkit.node.aggregator` | Set to true for sequencer mode, false for full node |
155+
| `--rollkit.signer.passphrase` | Passphrase for the signer |
156+
| `--rollkit.node.block_time` | Block time for the Rollkit node |
157+
158+
### EVM Flags
159+
160+
| Flag | Description |
161+
|------|-------------|
162+
| `--evm.eth-url` | Ethereum JSON-RPC URL (default `http://localhost:8545`) |
163+
| `--evm.engine-url` | Engine API URL (default `http://localhost:8551`) |
164+
| `--evm.jwt-secret` | JWT secret file path for the Engine API |
165+
| `--evm.genesis-hash` | Genesis block hash of the chain |
166+
| `--evm.fee-recipient` | Address to receive priority fees |
167+
168+
### Based Sequencer Flags
169+
170+
| Flag | Description |
171+
|------|-------------|
172+
| `--based.url` | URL for DA endpoint (default `http://localhost:26658`) |
173+
| `--based.auth` | Auth token for based DA layer |
174+
| `--based.namespace` | Hex-encoded namespace ID for submitting rollup transactions |
175+
| `--based.start-height` | Starting DA height for fetching transactions (default `0`) |
176+
| `--based.max-height-drift` | Max number of DA heights to look ahead during batching (default `1`) |
177+
| `--based.gas-multiplier` | Gas multiplier to apply on DA submission (default `1.0`) |
178+
| `--based.gas-price` | Base gas price to use during DA submission (default `1.0`) |
179+
180+
## Conclusion
181+
182+
You've now set up and configured the Based Sequencer implementation of Rollkit EVM rollups. This implementation provides a DA-based approach to transaction sequencing while using EVM as the execution layer.

0 commit comments

Comments
 (0)