Skip to content

Commit c564635

Browse files
docs: full node guide (#462)
* Full node, before refining * Rewording * use bash instead of toml code block * update overview * Add comments on moniker, jsonrpc and api ports, and tip on data dir
1 parent f0770dd commit c564635

File tree

4 files changed

+94
-101
lines changed

4 files changed

+94
-101
lines changed

.vitepress/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ function sidebarHome() {
283283
link: "/guides/restart-rollup",
284284
},
285285
{
286-
text: "Run as a full and sequencer node",
287-
link: "/guides/full-and-sequencer-node",
286+
text: "Run a rollup full node",
287+
link: "/guides/full-node",
288288
},
289289
{
290290
text: "Configuration",

guides/full-and-sequencer-node.md

-98
This file was deleted.

guides/full-node.md

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Rollup Full Node Setup Guide
2+
3+
## Introduction
4+
5+
This guide covers how to set up a full node to run alongside a sequencer node in a Rollkit-based blockchain network. A full node maintains a complete copy of the blockchain and helps validate transactions, improving the network's decentralization and security.
6+
7+
## Prerequisites
8+
9+
Before starting, ensure you have:
10+
11+
- A local Data Availability (DA) network node running on port `7980`.
12+
- A Rollkit sequencer node running and posting blocks to the DA network.
13+
- The Rollkit CLI installed on your system.
14+
15+
## Setting Up Your Full Node
16+
17+
### Initialize Chain Config and Copy Genesis File
18+
19+
First, update the `config_dir` in the `rollkit.toml` file:
20+
21+
```bash
22+
[chain]
23+
config_dir = "/root/.yourrollupd" // [!code --]
24+
config_dir = "/root/.yourrollupd_fn" // [!code ++]
25+
```
26+
27+
Initialize the chain config for the full node, lets call it `FullNode` and set the chain ID to your rollup chain ID:
28+
29+
```bash
30+
rollkit init FullNode --chain-id=your-rollup-chain-id
31+
```
32+
33+
Copy the genesis file from the sequencer node:
34+
35+
```bash
36+
cp /root/.yourrollupd/config/genesis.json /root/.yourrollupd_fn/config/genesis.json
37+
```
38+
39+
### Set Up P2P Connection to Sequencer Node
40+
41+
Identify the sequencer node's P2P address from its logs. It will look similar to:
42+
43+
```
44+
1:55PM INF listening on address=/ip4/127.0.0.1/tcp/36656/p2p/12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh
45+
```
46+
47+
Create an environment variable with the P2P address:
48+
49+
```bash
50+
export P2P_ID="12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh"
51+
```
52+
53+
### Start the Full Node
54+
55+
Run your full node with the following command:
56+
57+
```bash
58+
rollkit start --rollkit.aggregator=false \
59+
--rollkit.da_address http://127.0.0.1:7980 \
60+
--rpc.laddr tcp://127.0.0.1:46657 \
61+
--grpc.address 127.0.0.1:9390 \
62+
--p2p.seeds $P2P_ID@127.0.0.1:26656 \
63+
--p2p.laddr "0.0.0.0:46656" \
64+
--json-rpc.ws-address 127.0.0.1:8547 \
65+
--api.address tcp://localhost:1318
66+
```
67+
68+
Key points about this command:
69+
- `--rollkit.aggregator=false` indicates this is not an aggregator node.
70+
- The ports and addresses are different from the sequencer node to avoid conflicts. Not everything may be necessary for your setup.
71+
- We use the `P2P_ID` environment variable to set the seed node.
72+
73+
## Verifying Full Node Operation
74+
75+
After starting your full node, you should see output similar to:
76+
77+
```
78+
2:33PM DBG indexed transactions height=1 module=txindex num_txs=0
79+
2:33PM INF block marked as DA included blockHash=7897885B959F52BF0D772E35F8DA638CF8BBC361C819C3FD3E61DCEF5034D1CC blockHeight=5532 module=BlockManager
80+
```
81+
82+
This output indicates that your full node is successfully connecting to the network and processing blocks.
83+
84+
:::tip
85+
If your rollup uses EVM as an execution layar and you see an error like `datadir already used by another process`, it means you have to remove all the state from rollup data directory (`/root/.yourrollup_fn/data/`) and specify a different data directory for the EVM client.
86+
:::
87+
88+
89+
## Conclusion
90+
91+
You've now set up a full node running alongside your Rollkit sequencer.

guides/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ In this section, you'll find:
1717
* [How to restart your rollup](/guides/restart-rollup.md)
1818
* [zkML rollup](/guides/zkml.md)
1919
* [IBC connection](/guides/ibc-connection.md)
20-
* [Full and sequencer node rollup setup](/guides/full-and-sequencer-node.md)
20+
* [Full rollup node setup](/guides/full-node.md)
2121
* [How to configure gas price](/guides/gas-price.md)
2222
* [How to change speed of block production](/guides/block-times.md)
2323
* [How to use lazy sequencing (aggregation)](/guides/lazy-sequencing.md)

0 commit comments

Comments
 (0)