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.
This guide assumes you have a CometBFT app set up and Ignite CLI installed.
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:
ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.0
Add Rollkit Features to Your CometBFT App
Now that Rollkit is installed, you can add Rollkit features to your existing blockchain app. Run the following command to integrate Rollkit:
ignite rollkit add
Initialize Rollkit with 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:
ignite rollkit init --local-da
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:
rollkit toml init
This command sets up the rollkit.toml
file, where you can further customize configuration parameters as needed.
Start Your 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:
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.