Skip to content

Commit 1f673fb

Browse files
feat: cometbft to rollkit how-to guide (#477)
* Ingite-rollkit guides * Rename guide * Update sidebar title * Fix vitepress config * Fix path for comet guide
1 parent 24c83ee commit 1f673fb

File tree

5 files changed

+165
-1
lines changed

5 files changed

+165
-1
lines changed

.vitepress/config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,14 @@ function sidebarHome() {
286286
text: "Run a rollup full node",
287287
link: "/guides/full-node",
288288
},
289+
{
290+
text: "CometBFT into a Rollkit app",
291+
link: "/guides/cometbft-to-rollkit",
292+
},
293+
{
294+
text: "Use Ignite to create a Rollkit app",
295+
link: "/guides/ignite-rollkit",
296+
},
289297
{
290298
text: "Configuration",
291299
collapsed: true,

.vitepress/constants/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ const constants = Object.freeze({
1111

1212
localDALatestTag: "v0.3.1",
1313

14-
igniteVersionTag: "v28.4.0",
14+
igniteVersionTag: "v28.5.3",
1515
});
1616
export default constants;

guides/cometbft-to-rollkit.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# How to Turn Your CometBFT App into a Rollkit App
2+
3+
This guide will walk you through the process of turning your existing CometBFT app into a Rollkit app. By integrating Rollkit into your CometBFT-based blockchain, you can leverage enhanced modularity and data availability features.
4+
5+
<!-- markdownlint-disable MD033 -->
6+
<script setup>
7+
import Callout from '../.vitepress/components/callout.vue'
8+
import constants from '../.vitepress/constants/constants.js'
9+
</script>
10+
11+
This guide assumes you have a CometBFT app set up and [Ignite CLI](https://docs.ignite.com) installed.
12+
13+
## Install Rollkit {#install-rollkit}
14+
15+
You need to install Rollkit in your CometBFT app. Open a terminal in the directory where your app is located and run the following command:
16+
17+
```bash
18+
ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.0
19+
```
20+
21+
## Add Rollkit Features to Your CometBFT App {#add-rollkit-features}
22+
23+
Now that Rollkit is installed, you can add Rollkit features to your existing blockchain app. Run the following command to integrate Rollkit:
24+
25+
```bash
26+
ignite rollkit add
27+
```
28+
29+
## Initialize Rollkit with Local DA {#initialize-rollkit-local-da}
30+
31+
To prepare your app for Rollkit, you'll need to initialize it with Local Data Availability (Local DA). This allows your app to interact with a lightweight, testable DA layer.
32+
33+
Run the following command to initialize Rollkit with Local DA:
34+
35+
```bash
36+
ignite rollkit init --local-da
37+
```
38+
39+
## Initialize Rollkit CLI Configuration {#initialize-rollkit-cli-configuration}
40+
41+
Next, you'll need to initialize the Rollkit CLI configuration by generating the `rollkit.toml` file. This file is crucial for Rollkit to understand the structure of your rollup.
42+
43+
To create the `rollkit.toml` configuration, use this command:
44+
45+
```bash
46+
rollkit toml init
47+
```
48+
49+
This command sets up the `rollkit.toml` file, where you can further customize configuration parameters as needed.
50+
51+
## Start Your Rollkit App {#start-rollkit-app}
52+
53+
Once everything is configured, you can start your Rollkit-enabled CometBFT app or (simply rollkit app). Use the following command to start your blockchain:
54+
55+
```bash
56+
rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980
57+
```
58+
59+
## Summary
60+
61+
By following this guide, you've successfully converted your CometBFT app into a Rollkit app.

guides/ignite-rollkit.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# How to Use Ignite to Create a Rollkit App
2+
3+
This guide will walk you through the process of using Ignite to create a Rollkit app.
4+
5+
<!-- markdownlint-disable MD033 -->
6+
<script setup>
7+
import Callout from '../.vitepress/components/callout.vue'
8+
import constants from '../.vitepress/constants/constants.js'
9+
</script>
10+
11+
## Install Ignite {#install-ignite}
12+
13+
You can read more about Ignite [here](https://docs.ignite.com).
14+
15+
To install Ignite, you can run this command in your terminal:
16+
17+
```bash-vue
18+
curl https://get.ignite.com/cli@{{constants.igniteVersionTag}}! | bash
19+
```
20+
21+
Once Ignite is installed, scaffold a new blockchain with the following command:
22+
23+
```bash
24+
ignite scaffold chain gm --address-prefix gm --minimal --skip-proto
25+
```
26+
27+
This will create the `gm` blockchain. Navigate to the blockchain directory:
28+
29+
```bash
30+
cd gm
31+
```
32+
33+
## Run a local Data Availability (DA) node {#run-local-da-node}
34+
35+
First, set up a local data availability network node:
36+
37+
```bash-vue
38+
cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s {{constants.localDALatestTag}}
39+
```
40+
41+
This script builds and runs a DA node, which will listen on port `7980`.
42+
43+
## Install Ignite App Rollkit {#install-ignite-app-rollkit}
44+
45+
In a new terminal window, you'll now install and run the Ignite App Rollkit.
46+
47+
Run the following command to install the Rollkit App:
48+
49+
```bash
50+
ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.0
51+
```
52+
53+
This installs the Rollkit application, which will be integrated into your blockchain.
54+
55+
## Add Rollkit Features {#add-rollkit-features}
56+
57+
Enhance your blockchain by adding Rollkit features. Use the following command:
58+
59+
```bash
60+
ignite rollkit add
61+
```
62+
63+
## Initialize Your Blockchain {#initialize-your-blockchain}
64+
65+
Before starting your blockchain, you need to initialize it with Rollkit support. Initialize the blockchain with Local DA as follows:
66+
67+
```bash
68+
ignite rollkit init --local-da
69+
```
70+
71+
### Initialize Rollkit CLI Configuration {#initialize-rollkit-cli-configuration}
72+
73+
To initialize the Rollkit CLI configuration, generate the `rollkit.toml` file by running the following command:
74+
75+
```bash
76+
rollkit toml init
77+
```
78+
79+
This will set up the Rollkit configuration file rollkit.toml, allowing you to use the Rollkit CLI for managing and running your blockchain.
80+
81+
## Start Your Rollup {#start-your-blockchain}
82+
83+
Finally, start your rollup (blockchain) using the following command:
84+
85+
```bash
86+
rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980
87+
```
88+
89+
Your rollkit app is now up and running.
90+
91+
## Summary
92+
93+
By following these steps, you've successfully installed Ignite, set up Local DA, integrated Rollkit features into your blockchain, and configured the Rollkit CLI.

guides/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ In this section, you'll find:
1919
* [Create genesis for your rollup](/guides/create-genesis)
2020
* [Restart your rollup](/guides/restart-rollup)
2121
* [Run a rollup full node](/guides/full-node)
22+
* [Turn your CometBFT app into a Rollkit app](/guides/cometbft-to-rollkit)
23+
* [Use Ignite to create a Rollkit app](/guides/ignite-rollkit)
2224
* Configuration
2325
* [Configure gas price](/guides/gas-price)
2426
* [Configure max pending blocks](/guides/max-pending-blocks)

0 commit comments

Comments
 (0)