Celestia

Celestia (opens in a new tab) is a modular data availability network that makes it easy for anyone to securely launch their own blockchain.

Celestia acts as a separate layer dedicated to storing transaction data, enabling app chains to focus solely on transaction execution and settlement. This design facilitates significant scalability improvements in the blockchain ecosystem.

Key Features

  • Data Availability Sampling: Celestia allows light nodes on its network to efficiently verify data availability without downloading the entire dataset, this ensures the scalability of the network.
  • Modular Design: Celestia's modular design separates data availability from consensus and execution functionalities. This allows developers to build custom blockchains on top of Celestia, fostering innovation and flexibility within the ecosystem.
  • Tendermint Consensus: Celestia leverages Tendermint for their consensus mechanism to guarantee the security and integrity of the data layer.

Use Celestia in Madara

When launching a Madara node, you can specify: --da-layer celestia.
This will use Celestia to publish the state_diff instead of Ethereum.

When launching the node, the da-config.json file path can be provided along the --da-conf flag.

da-config.json

{
  "http_provider": "http://127.0.0.1:26658",
  "ws_provider": "ws://127.0.0.1:26658",
  "nid": "Madara",
  "auth_token": "<see below>"
}

Launch with Celestia

The following steps require the Celestia CLI tool (opens in a new tab) to be installed and configured

Node Initialization

Run the following command to initialize a light node for the Mocha testnet:

celestia light init --p2p.network mocha

Authorization Token Generation

Generate an authorization token required for the da-config.json file with the following command:

celestia light auth admin --p2p.network mocha

This token grants administrative privileges to the light node, add this to da-config.json

Node Startup

Initiate the light node using the following command:

celestia light start --core.ip rpc.celestia-mocha.com --p2p.network mocha

Commands

# Madara needs to be built with the Celestia feature flag
cargo build --release --features celestia
 
# On Madara side, after launching the Celestia light client
# First setup
./madara setup --chain=dev --from-remote --base-path=../.madara
# Launch
./madara --chain=dev --base-path=../.madara --da-layer=celestia --da-conf=/home/da-config.json --force-authoring –alice
 

Resources