Skip to content

Commit 4f8b4b5

Browse files
a26ninejcsteincoderabbitai[bot]yarikbratashchukManav-Aggarwal
authored
chore: update celestia-da.md (#396)
* Update celestia-da.md - Added couple of missing commands. - Polished the document. * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review * chore: remove `ignite chain build` per suggestion --------- Co-authored-by: joshcs.eth <46639943+jcstein@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Yarik Bratashchuk <yarik.bratashchuk@gmail.com> Co-authored-by: Manav Aggarwal <manavaggarwal1234@gmail.com>
1 parent f1890b5 commit 4f8b4b5

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

tutorials/celestia-da.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Deploying a rollup to Celestia
1+
# Deploying a rollup to Celestia
22

33
<!-- markdownlint-disable MD033 -->
44
<script setup>
@@ -9,7 +9,7 @@ import constants from '../.vitepress/constants/constants.js'
99

1010
This tutorial serves as a comprehensive guide for deploying your rollup on Celestia's data availability (DA) network. From the Rollkit perspective, there's no difference in posting blocks to Celestia's testnets or Mainnet Beta.
1111

12-
Before proceeding, ensure that you have completed the [GM world rollup](/tutorials/gm-world) tutorial, which covers setting up a local sovereign gm-world rollup and connecting it to a local DA node.
12+
Before proceeding, ensure that you have completed the [GM world rollup](/tutorials/gm-world) tutorial, which covers setting up a local sovereign `gm-world` rollup and connecting it to a local DA node.
1313

1414
## 🪶 Running a Celestia light node
1515

@@ -21,11 +21,11 @@ Before you can start your rollup node, you need to initiate, sync, and possibly
2121

2222
The main difference lies in how you fund your wallet address: using testnet TIA or [TIA](https://docs.celestia.org/learn/tia#overview-of-tia) for Mainnet Beta.
2323

24-
After successfully starting a light node, it's time to start posting the batches of blocks of data that your rollup generates.
24+
After successfully starting a light node, it's time to start posting the batches of blocks of data that your rollup generates to Celestia.
2525

26-
## 🏗️ Prerequisites {#prerequisites}
26+
## 🏗️ Prerequisites {#prerequisites}
2727

28-
From the [GM world rollup](/tutorials/gm-world) tutorial, you should already have the `rollkit` CLI and `ignite` installed.
28+
From the [GM world rollup](/tutorials/gm-world) tutorial, you should already have the `rollkit` CLI and `ignite` CLI installed.
2929

3030
## 🏗️ Building your sovereign rollup {#building-your-sovereign-rollup}
3131

@@ -43,7 +43,7 @@ cd $HOME/gm
4343
ignite app install github.com/ignite/apps/rollkit@rollkit/{{constants.rollkitIgniteAppVersion}}
4444
```
4545

46-
Next, move to the `gm` directory and add the Rollkit app:
46+
Add the Rollkit app:
4747

4848
```bash
4949
ignite rollkit add
@@ -57,17 +57,15 @@ ignite rollkit init
5757

5858
This will create a `$HOME/.gm` directory with the chain configuration files.
5959

60+
## 🧰 Configuring your sovereign rollup {#configuring-your-sovereign-rollup}
6061

61-
## 🧰 Configuring your rollup {#configuring-your-rollup}
62-
63-
64-
From inside the `$HOME/gm` directory, generate a rollkit.toml file by running:
62+
From the `$HOME/gm` directory, generate a `rollkit.toml` file by running:
6563

6664
```bash
6765
rollkit toml init
6866
```
6967

70-
The output should be similar to this (our `$HOME` is `/root`):
68+
The output should be similar to this (`$HOME` in the below example is `/root`):
7169

7270
```
7371
Found rollup entrypoint: /root/gm/cmd/gmd/main.go, adding to rollkit.toml
@@ -77,55 +75,59 @@ Initialized rollkit.toml file in the current directory.
7775

7876
## 🛠️ Configuring flags for DA
7977

80-
Now we're prepared to initiate our rollup and establish a connection with the Celestia light node. The `rollkit start` command requires three DA configuration flags:
78+
Now, we're prepared to initiate our rollup and establish a connection with the Celestia light node. The `rollkit start` command requires three DA configuration flags:
8179

8280
- `--rollkit.da_start_height`
8381
- `--rollkit.da_auth_token`
8482
- `--rollkit.da_namespace`
8583

84+
Let's determine which values to provide for each of them.
85+
86+
First, let's query the DA layer start height using an RPC endpoint provided by Celestia's documentation.
87+
8688
::: tip
8789
Optionally, you could also set the `--rollkit.da_block_time` flag. This should be set to the finality time of the DA layer, not its actual block time, as Rollkit does not handle reorganization logic. The default value is 15 seconds.
8890
:::
8991

9092
Let's determine what to provide for each of them.
9193

92-
First, let's query the DA Layer start height using an RPC endpoint provided by Celestia Labs. For Mocha testnet it would be - [https://rpc-mocha.pops.one/block](https://rpc-mocha.pops.one/block), and for mainnet beta - [https://rpc.lunaroasis.net/block](https://rpc.lunaroasis.net/block)
94+
- Mocha testnet: [https://rpc-mocha.pops.one/block](https://rpc-mocha.pops.one/block)
95+
- Mainnet Beta: [https://rpc.lunaroasis.net/block](https://rpc.lunaroasis.net/block)
9396

94-
Here is an example for the Mocha testnet (replace URL for mainnet beta if needed):
97+
Here is an example for the Mocha testnet (replace URL for Mainnet Beta accordingly):
9598

9699
```bash
97100
DA_BLOCK_HEIGHT=$(curl https://rpc-mocha.pops.one/block | jq -r '.result.block.header.height')
98101
echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n"
99102
```
100103

101-
You will see the output like this:
104+
The output of the command above will look similar to this:
102105

103106
```bash
104107
Your DA_BLOCK_HEIGHT is 1777655
105108
```
106109

107-
Now, obtain an authentication token for your light node as follows (for Mainnet Beta, simply omit the --p2p.network flag):
110+
Now, let's obtain the authentication token of your light node using the following command (omit the --p2p.network flag for Mainnet Beta):
108111

109112
```bash
110113
AUTH_TOKEN=$(celestia light auth write --p2p.network mocha)
111114
echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n"
112115
```
113116

114-
The output will look like this:
117+
The output of the command above will look similar to this:
115118

116119
```bash
117120
Your DA AUTH_TOKEN is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiXX0.cSrJjpfUdTNFtzGho69V0D_8kyECn9Mzv8ghJSpKRDE
118121
```
119122

120-
Now, let's also set up a namespace for our blocks by simply setting a variable like this:
123+
Lastly, let's set up the namespace to be used for posting data on Celestia:
121124

122125
```bash
123126
DA_NAMESPACE=00000000000000000000000000000000000000000008e5f679bf7116cb
124127
```
125128

126129
:::tip
127-
`00000000000000000000000000000000000000000008e5f679bf7116cb` is a default namespace for Mocha testnet. You can set your own by using a command
128-
similar to this (or, you could get creative 😎):
130+
`00000000000000000000000000000000000000000008e5f679bf7116cb` is a default namespace for Mocha testnet. You can set your own by using a command similar to this (or, you could get creative 😎):
129131

130132
```bash
131133
openssl rand -hex 10
@@ -136,9 +138,9 @@ Replace the last 20 characters (10 bytes) in `0000000000000000000000000000000000
136138
[Learn more about namespaces](https://docs.celestia.org/developers/node-tutorial#namespaces).
137139
:::
138140

139-
## 🔥 Running your rollup connected to a Celestia light node
141+
## 🔥 Running your rollup connected to Celestia light node
140142

141-
Now let's run our rollup node with all DA flags:
143+
Finally, let's initiate the rollup node with all the flags:
142144

143145
```bash
144146
rollkit start \
@@ -149,12 +151,12 @@ rollkit start \
149151
--minimum-gas-prices="0.025stake"
150152
```
151153

152-
Now, the rollup is running and posting blocks (aggregated in batches) to Celestia. You can view your rollup by finding your namespace or account on [Mocha testnet](https://docs.celestia.org/nodes/mocha-testnet#explorers) or [mainnet beta](https://docs.celestia.org/nodes/mainnet#explorers) explorers.
154+
Now, the rollup is running and posting blocks (aggregated in batches) to Celestia. You can view your rollup by using your namespace or account on [Mocha testnet](https://docs.celestia.org/nodes/mocha-testnet#explorers) or [Mainnet Beta](https://docs.celestia.org/nodes/mainnet#explorers) explorers.
153155

154156
::: info
155-
For details on configuring gas prices specifically for the DA network, see our [DA Network Gas Price Guide](/guides/gas-price). This is separate from the `--minimum-gas-prices="0.025stake"` setting, which is used for rollup network operations.
157+
For details on configuring gas prices, specifically for the Celestia network, see the [DA Network Gas Price Guide](/guides/gas-price). The Celestia gas price is separate from the `--minimum-gas-prices="0.025stake"` setting, which is used for the rollup network operations.
156158
:::
157159

158160
## 🎉 Next steps
159161

160-
Congratulations! You've built a local rollup that posts to Celestia's testnets or Mainnet Beta. Well done! Now, go forth and build something great! Good luck!
162+
Congratulations! You've built a local rollup that posts data to Celestia's DA layer. Well done! Now, go forth and build something great! Good luck!

0 commit comments

Comments
 (0)