-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5f856f
commit 67abfc1
Showing
5 changed files
with
161 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# How to Turn Your CometBFT App into a Rollkit App | ||
|
||
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. | ||
|
||
<!-- markdownlint-disable MD033 --> | ||
<script setup> | ||
import Callout from '../.vitepress/components/callout.vue' | ||
import constants from '../.vitepress/constants/constants.js' | ||
</script> | ||
|
||
This guide assumes you have a CometBFT app set up and [Ignite CLI](https://docs.ignite.com) installed. | ||
|
||
## Install Rollkit {#install-rollkit} | ||
|
||
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: | ||
|
||
```bash | ||
ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.0 | ||
``` | ||
|
||
## Add Rollkit Features to Your CometBFT App {#add-rollkit-features} | ||
|
||
Now that Rollkit is installed, you can add Rollkit features to your existing blockchain app. Run the following command to integrate Rollkit: | ||
|
||
```bash | ||
ignite rollkit add | ||
``` | ||
|
||
## Initialize Rollkit with Local DA {#initialize-rollkit-local-da} | ||
|
||
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. | ||
|
||
Run the following command to initialize Rollkit with Local DA: | ||
|
||
```bash | ||
ignite rollkit init --local-da | ||
``` | ||
|
||
## Initialize Rollkit CLI Configuration {#initialize-rollkit-cli-configuration} | ||
|
||
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. | ||
|
||
To create the `rollkit.toml` configuration, use this command: | ||
|
||
```bash | ||
rollkit toml init | ||
``` | ||
|
||
This command sets up the `rollkit.toml` file, where you can further customize configuration parameters as needed. | ||
|
||
## Start Your Rollkit App {#start-rollkit-app} | ||
|
||
Once everything is configured, you can start your Rollkit-enabled CometBFT app or (simply rollkit app). Use the following command to start your blockchain: | ||
|
||
```bash | ||
rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 | ||
``` | ||
|
||
## Summary | ||
|
||
By following this guide, you've successfully converted your CometBFT app into a Rollkit app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# How to Use Ignite to Create a Rollkit App | ||
|
||
This guide will walk you through the process of using Ignite to create a Rollkit app. | ||
|
||
<!-- markdownlint-disable MD033 --> | ||
<script setup> | ||
import Callout from '../.vitepress/components/callout.vue' | ||
import constants from '../.vitepress/constants/constants.js' | ||
</script> | ||
|
||
## Install Ignite {#install-ignite} | ||
|
||
You can read more about Ignite [here](https://docs.ignite.com). | ||
|
||
To install Ignite, you can run this command in your terminal: | ||
|
||
```bash-vue | ||
curl https://get.ignite.com/cli@{{constants.igniteVersionTag}}! | bash | ||
``` | ||
|
||
Once Ignite is installed, scaffold a new blockchain with the following command: | ||
|
||
```bash | ||
ignite scaffold chain gm --address-prefix gm --minimal --skip-proto | ||
``` | ||
|
||
This will create the `gm` blockchain. Navigate to the blockchain directory: | ||
|
||
```bash | ||
cd gm | ||
``` | ||
|
||
## Run a local Data Availability (DA) node {#run-local-da-node} | ||
|
||
First, set up a local data availability network node: | ||
|
||
```bash-vue | ||
cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s {{constants.localDALatestTag}} | ||
``` | ||
|
||
This script builds and runs a DA node, which will listen on port `7980`. | ||
|
||
## Install Ignite App Rollkit {#install-ignite-app-rollkit} | ||
|
||
In a new terminal window, you'll now install and run the Ignite App Rollkit. | ||
|
||
Run the following command to install the Rollkit App: | ||
|
||
```bash | ||
ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.0 | ||
``` | ||
|
||
This installs the Rollkit application, which will be integrated into your blockchain. | ||
|
||
## Add Rollkit Features {#add-rollkit-features} | ||
|
||
Enhance your blockchain by adding Rollkit features. Use the following command: | ||
|
||
```bash | ||
ignite rollkit add | ||
``` | ||
|
||
## Initialize Your Blockchain {#initialize-your-blockchain} | ||
|
||
Before starting your blockchain, you need to initialize it with Rollkit support. Initialize the blockchain with Local DA as follows: | ||
|
||
```bash | ||
ignite rollkit init --local-da | ||
``` | ||
|
||
### Initialize Rollkit CLI Configuration {#initialize-rollkit-cli-configuration} | ||
|
||
To initialize the Rollkit CLI configuration, generate the `rollkit.toml` file by running the following command: | ||
|
||
```bash | ||
rollkit toml init | ||
``` | ||
|
||
This will set up the Rollkit configuration file rollkit.toml, allowing you to use the Rollkit CLI for managing and running your blockchain. | ||
|
||
## Start Your Rollup {#start-your-blockchain} | ||
|
||
Finally, start your rollup (blockchain) using the following command: | ||
|
||
```bash | ||
rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 | ||
``` | ||
|
||
Your rollkit app is now up and running. | ||
|
||
## Summary | ||
|
||
By following these steps, you've successfully installed Ignite, set up Local DA, integrated Rollkit features into your blockchain, and configured the Rollkit CLI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters