Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,8 @@ function sidebarHome() {
collapsed: true,
items: [
{
text: "GM world rollup: Part 2, mocha testnet",
link: "/tutorials/gm-world-mocha-testnet",
},
{
text: "GM world rollup: Part 3, mainnet",
link: "/tutorials/gm-world-mainnet",
text: "Celestia",
link: "/tutorials/celestia-da",
},
],
},
Expand Down
119 changes: 119 additions & 0 deletions tutorials/celestia-da.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# GM world rollup: Deploying to Celestia

## 🌞 Introduction {#introduction}

This tutorial serves as a comprehensive guide for deploying your GM world 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.

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 mock DA node.

## 🪶 Running a Celestia light node

Before you can start your rollup node, you need to initiate, sync, and possibly fund a light node on one of Celestia's networks:

- [Arabica Devnet](https://docs.celestia.org/nodes/arabica-devnet)
- [Mocha Testnet](https://docs.celestia.org/nodes/mocha-testnet)
- [Mainnet Beta](https://docs.celestia.org/nodes/mainnet)

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.

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

## 🧹 Cleaning previous chain history

From the [GM world rollup](/tutorials/gm-world) tutorial, you should already have the `gmd` binary and the `$HOME/.gm` directory.

To clear old rollup data:

```bash
rm -r /usr/local/bin/gmd && rm -rf $HOME/.gm
```
Comment thread
jcstein marked this conversation as resolved.

## 🏗️ Building your rollup

Now we need to rebuild our rollup by simply running the existing `init.sh` script:

```bash
cd $HOME/gm && bash init.sh
```

This process creates a new `$HOME/.gm` directory and a new `gmd` binary. Next, we need to connect our rollup to the running Celestia light node.

## 🛠️ Configuring flags for DA

Now we're prepared to initiate our rollup and establish a connection with the Celestia light node. The `gmd start` command requires three DA configuration flags:

- `--rollkit.da_start_height`
- `--rollkit.da_auth_token`
- `--rollkit.da_namespace`

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

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)

Here is an example for the Mocha testnet (replace URL for mainnet beta if needed):
Comment thread
jcstein marked this conversation as resolved.

```bash
Comment thread
jcstein marked this conversation as resolved.
DA_BLOCK_HEIGHT=$(curl https://rpc-mocha.pops.one/block | jq -r '.result.block.header.height')
echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n"
```
Comment thread
jcstein marked this conversation as resolved.

You will see the output like this:

```bash
Your DA_BLOCK_HEIGHT is 1777655
```

Now, obtain an authentication token for your light node as follows (for Mainnet Beta, simply omit the --p2p.network flag):

```bash
AUTH_TOKEN=$(celestia light auth write --p2p.network mocha)
echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n"
```
Comment thread
jcstein marked this conversation as resolved.

The output will look like this:

```bash
Your DA AUTH_TOKEN is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiXX0.cSrJjpfUdTNFtzGho69V0D_8kyECn9Mzv8ghJSpKRDE
```

Now, let's also set up a namespace for our blocks by simply setting a variable like this:

```bash
DA_NAMESPACE=00000000000000000000000000000000000000000008e5f679bf7116cb
```

:::tip
`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 😎):

```bash
openssl rand -hex 10
```

Replace the last 20 characters (10 bytes) in `00000000000000000000000000000000000000000008e5f679bf7116cb` with the newly generated 10 bytes.

[Learn more about namespaces](https://docs.celestia.org/developers/node-tutorial#namespaces).
Comment thread
jcstein marked this conversation as resolved.
:::

## 🔥 Running your rollup connected to a Celestia light node

Now let's run our rollup node with all DA flags:

```bash
gmd start \
--rollkit.aggregator \
--rollkit.da_auth_token $AUTH_TOKEN \
--rollkit.da_namespace $DA_NAMESPACE \
--rollkit.da_start_height $DA_BLOCK_HEIGHT \
--minimum-gas-prices="0.025stake"
```

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.

::: info
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.
:::

## 🎉 Next steps

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!
8 changes: 4 additions & 4 deletions tutorials/gm-world.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
description: Build a sovereign rollup with Ignite CLI, Celestia, and Rollkit locally and on a testnet
description: Build a sovereign rollup using only Rollkit CLI and a mock DA network.
Comment thread
jcstein marked this conversation as resolved.
---

# GM World Rollup
# GM world rollup
Comment thread
jcstein marked this conversation as resolved.

## 🌞 Introduction {#introduction}

Expand Down Expand Up @@ -68,10 +68,10 @@ If you get errors of `gmd` not found, you may need to add the `go/bin` directory
:::

```bash
curl -sSL https://rollkit.dev/install-gm-rollup.sh | sh
cd $HOME && bash -c "$(curl -sSL https://rollkit.dev/install-gm-rollup.sh)"
```

## 🚀 Starting Your Rollup {#start-your-rollup}
## 🚀 Starting your rollup {#start-your-rollup}

Start the rollup, posting to the local DA network:

Expand Down