1
1
# Full and sequencer node rollup setup
2
2
3
- This guide will cover how to set up the GM world rollup example as
4
- a multi-node network using a full and sequencer node.
5
-
6
- ## About
7
-
8
- This guide is using a feature released in v0.10.2 that
9
- uses [ go-header] ( https://github.com/celestiaorg/go-header ) ,
10
- which uses libp2p that syncs blocks over a peer-to-peer (p2p)
11
- network.
3
+ <!-- markdownlint-disable MD033 -->
4
+ <script setup >
5
+ import constants from ' ../.vitepress/constants/constants.js'
6
+ </script >
12
7
13
- This is the same way that celestia-node syncs blocks over p2p.
8
+ This guide will cover how to set up the GM World rollup example as
9
+ a multi-node network using a full and sequencer node.
14
10
15
- ## Prerequisites
11
+ ## Running a local DA network {#running-local-da}
16
12
17
- First, you 'll need to complete the [ GM world ] ( ../tutorials/gm-world ) tutorial.
13
+ In this demo, we 'll be using the local-da setup used in [ GM World ] ( ../tutorials/gm-world )
18
14
19
- In this demo, we'll be using the local-celestia-devnet setup used
20
- in [ part 1] ( ./gm-world ) .
15
+ To set up a local DA network node:
21
16
22
- ## Getting started
17
+ ``` bash-vue
18
+ curl -sSL https://rollkit.dev/install-local-da.sh | bash -s {{constants.localDALatestTag}}
19
+ ```
23
20
24
- For running a full node, you will need to update
25
- ` DA_HEIGHT ` and ` P2P_ID ` manually. You can retrieve
26
- namespace and height from your terminal output
27
- from when you ran the ` init-local.sh ` script.
21
+ This script builds and runs the node, now listening on port ` 7980 ` .
28
22
29
- They will be printed before your chain starts:
23
+ ## Running a sequencer node
30
24
31
- ``` txt
32
- ______ _ _ _ _ _
33
- | ___ \ | || || | (_)| |
34
- | |_/ / ___ | || || | __ _ | |_
35
- | / / _ \ | || || |/ /| || __|
36
- | |\ \ | (_) || || || < | || |_
37
- \_| \_| \___/ |_||_||_|\_\|_| \__|
25
+ By following the [ GM World] ( ../tutorials/gm-world ) tutorial, you will have a sequencer node running.
38
26
27
+ We wil now set up a full node to run alongside the sequencer node.
39
28
40
- Your DA_BLOCK_HEIGHT is 5 // [!code focus]
41
- ```
42
29
43
- ### Clone the script
30
+ ## Getting started
44
31
45
- Now, clone the script for the full node:
32
+ Clone the script for the full node:
46
33
47
34
``` bash
48
35
# From inside the `gm` directory
49
36
cd $HOME /gm
50
37
wget https://rollkit.dev/gm/init-full-node.sh
51
38
```
52
39
53
- ### Set DA height
54
-
55
- Next, you can open the script and set your namespace and DA height from above:
56
-
57
- ``` sh
58
- DA_BLOCK_HEIGHT=your-block-height // [! code --]
59
- DA_BLOCK_HEIGHT=5 // [! code ++]
60
- P2P_ID=" your-p2p-id"
61
- ```
62
-
63
40
### Update the p2p address
64
41
65
- Next, we'll update the p2p address.
66
-
67
- Once your sequencer starts producing blocks, it will show the p2p address,
42
+ Once your sequencer node starts producing blocks, it will show the p2p address,
68
43
beginning with 12D:
69
44
70
45
``` bash
71
- 3:55PM INF port binded module=x/ibc/port port=icahost
72
- 3:55PM INF claimed capability capability=2 module=icahost name=ports/icahost
73
- 3:55PM INF service start impl=RPC module=server msg={}
74
- 3:55PM INF service start impl=Node module=server msg={}
75
- 3:55PM INF starting P2P client module=server
76
- 3:55PM INF serving HTTP listen address={" IP" :" 127.0.0.1" ," Port" :36657," Zone" :" " } module=server
77
- 3:55PM INF listening on address=/ip4/10.0.0.171/tcp/36656/p2p/12D3KooWCmfJLkQjZUArWpNUDJSezeFiLYzCULXe1dEKY6ZpXZpk module=p2p // [! code focus]
78
- 3:55PM INF listening on address=/ip4/127.0.0.1/tcp/36656/p2p/12D3KooWCmfJLkQjZUArWpNUDJSezeFiLYzCULXe1dEKY6ZpXZpk module=p2p // [! code focus]
79
- 3:55PM INF no seed nodes - only listening for connections module=p2p
80
- 3:55PM INF starting Celestia Data Availability Layer Client baseURL=http://localhost:26658 module=da_client
46
+ ...
47
+ 1:55PM INF service start impl=RPC module=server msg=" Starting RPC service"
48
+ 1:55PM INF service start impl=Node module=server msg=" Starting Node service"
49
+ 1:55PM INF serving HTTP listen address=[::]:26657 module=server
50
+ 1:55PM INF starting P2P client module=server
51
+ 1:55PM INF listening on address=/ip4/127.0.0.1/tcp/36656/p2p/12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh module=p2p // [! code focus]
52
+ 1:55PM INF listening on address=/ip4/163.172.162.109/tcp/36656/p2p/12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh module=p2p // [! code focus]
53
+ 1:55PM INF no seed nodes - only listening for connections module=p2p
54
+ 1:55PM INF working in aggregator mode block time=1000 module=server
55
+ 1:55PM INF starting API server... address=tcp://0.0.0.0:1317 module=api-server
56
+ 1:55PM INF serve module=api-server msg=" Starting RPC HTTP server on [::]:1317"
57
+ 1:55PM INF Creating and publishing block height=3458 module=BlockManager
58
+ 1:55PM INF finalized block block_app_hash=A1A55270140B772643DCB444E0503B9865BB3702DF2D0A8E143CAF4717D2DB20 height=3458 module=BlockManager num_txs_res=0 num_val_updates=0
59
+ 1:55PM INF executed block app_hash=A1A55270140B772643DCB444E0503B9865BB3702DF2D0A8E143CAF4717D2DB20 height=3458 module=BlockManager
60
+ 1:55PM INF starting gRPC server... address=localhost:9090 module=grpc-server
61
+ ...
81
62
```
82
63
83
- In your ` init-full-node.sh ` script, you will now set the ` P2P_ADDRESS ` variable
64
+ In your ` init-full-node.sh ` script, you will now set the ` P2P_ID ` variable
84
65
for your script to use:
85
66
86
67
``` bash
87
- DA_BLOCK_HEIGHT=5
88
68
P2P_ID=" your-p2p-id" // [! code --]
89
- P2P_ID=" 12D3KooWCmfJLkQjZUArWpNUDJSezeFiLYzCULXe1dEKY6ZpXZpk" // [! code ++]
90
- ```
91
-
92
- Also, in your ` init-full-node.sh ` script, the ` AUTH_TOKEN ` is fetched from the celestia-node running in the docker, which is also used by the sequencer node. If you are running a separate celestia-node for sequencer and full node, please update the ` AUTH_TOKEN ` accordingly. Note that, the ` AUTH_TOKEN ` is needed to perform DA queries via celestia-node.
93
-
94
- ``` bash
95
- # uses the same celestia-node as sequencer node
96
- # if you are running a separate celestia-node for full node
97
- # use the auth token from that node
98
- AUTH_TOKEN=$( docker exec $( docker ps -q) celestia bridge auth admin --node.store /home/celestia/bridge)
69
+ P2P_ID=" 12D3KooWJbD9TQoMSSSUyfhHMmgVY3LqCjxYFz8wQ92Qa6DAqtmh" // [! code ++]
99
70
```
100
71
101
72
## Start the full node
@@ -107,5 +78,21 @@ Now run your full node with the script:
107
78
bash init-full-node.sh
108
79
```
109
80
81
+ Your full node will now start and connect to the sequencer node. You should see the following output:
82
+ ``` bash
83
+ ...
84
+ 2:33PM DBG indexed transactions height=1 module=txindex num_txs=0
85
+ 2:33PM INF block marked as DA included blockHash=7897885B959F52BF0D772E35F8DA638CF8BBC361C819C3FD3E61DCEF5034D1CC blockHeight=5532 module=BlockManager
86
+ 2:33PM DBG block body retrieved daHeight=1 hash=7897885B959F52BF0D772E35F8DA638CF8BBC361C819C3FD3E61DCEF5034D1CC height=5532 module=BlockManager
87
+ 2:33PM DBG block not found in cache height=2 module=BlockManager
88
+ 2:33PM INF block marked as DA included blockHash=E2E01078F151633768876E822D65EF52DD39E5073BB27AC5F903E52D48339F5C blockHeight=5533 module=BlockManager
89
+ 2:33PM INF block marked as DA included blockHash=B88DA651CD1AC7116CD95B3CFB6369BD8964BF77B3E909944F816B2E35DF8EF4 blockHeight=5534 module=BlockManager
90
+ 2:33PM DBG block body retrieved daHeight=1 hash=E2E01078F151633768876E822D65EF52DD39E5073BB27AC5F903E52D48339F5C height=5533 module=BlockManager
91
+ 2:33PM INF block marked as DA included blockHash=376E44AB9F7023E76480CCD39F2D908FFE05911BF5C0387F5FF788C32D4C312E blockHeight=5535 module=BlockManager
92
+ 2:33PM DBG block not found in cache height=2 module=BlockManager
93
+ 2:33PM INF block marked as DA included blockHash=ABF1789EFB08F3DF7422579C9E52A0E6A54B4CDC8EB5FA32CA2E751ACCAEE23B blockHeight=5536 module=BlockManager
94
+ ...
95
+ ```
96
+
110
97
Congratulations! You will now have a full node running alongside your
111
98
Rollkit sequencer.
0 commit comments