celestia-app

repository·main·Indexed 19 days ago

https://github.com/celestiaorg/celestia-app

The core software for validators and consensus nodes on the Celestia consensus network. Built using forks of the Cosmos SDK and CometBFT (celestia-core), it includes tools for running consensus nodes via Docker Compose (Corto and Mocha testnets), transaction simulation with txsim, and the Fibre server for shard management and payment promises.

Tokens
269.7K
Snippets
462
Records
793
Agent score
62%

What's inside celestia-app

  1. Overview of the Fibre DA Specification

    main

    Fibre is a Data Availability (DA) protocol that extends Celestia. It utilizes a verifiable form of erasure coding to disseminate data, allowing for data retrieval under honest majority assumptions without requiring full replication. The protocol is divided into five core functional areas:

    • Client: User-facing API, data dissemination via rsema1d, account management, and blob payment.
    • Server: API for data storage, construction verification, and payment validation.
    • SDK Fibre Module: State machine logic for handling payments, verifying validator signatures, and managing escrow account deductions.
    • Encoding: Specification for row encoding formats and data square share formats.
    • SDK Registry Module: A key-value store mapping validator addresses to their Fibre DA provider addresses.
  2. Overview of Celestia Latency Monitor

    main

    The Celestia Latency Monitor is a tool designed to measure transaction latency in Celestia networks. It works by submitting PayForBlob transactions at a configurable rate and measuring the duration between the initial submission and the final commitment.

    Key capabilities include:

    • Configurable submission delays and random blob sizes (within min/max bounds).
    • Support for custom namespaces.
    • Real-time monitoring of successful and failed confirmations.
    • Statistical analysis including mean and standard deviation of latency.
    • Automatic export of results to a CSV file.
  3. Identify State Machine Modules in app version 5

    main
    The state machine for celestia-app version 5 is composed of three categories of modules: native celestia-app modules, standard cosmos-sdk modules, and various third-party modules (including IBC and Hyperlane). Understanding this composition is essential for developers building integrations, custom modules, or interacting with the application's state.
  4. Identify State Machine Modules in celestia-app v1

    main

    The celestia-app version 1 state machine is composed of three categories of modules: native celestia-app modules, standard cosmos-sdk modules, and third-party modules. Developers building on or interacting with this version should account for the specific logic and state managed by each of these modules.

    ### celestia-app modules
    - blob
    - blobstream
    - mint
    - paramfilter
    - tokenfilter
    
    ### cosmos-sdk modules
    - auth
    - authz
    - bank
    - capability
    - crisis
    - distribution
    - evidence
    - feegrant
    - genutil
    - gov
    - params
    - slashing
    - staking
    - vesting
    
    ### Third-party modules
    - ibc
    - transfer
  5. Identify State Machine Modules in celestia-app v10

    main

    The celestia-app version 10 state machine is composed of three categories of modules: native celestia-app modules, standard cosmos-sdk modules, and various third-party modules. Understanding which module handles specific logic is essential for interacting with the state machine.

    celestia-app Modules

    These are native modules specific to the Celestia application:

    • blob
    • forwarding
    • minfee
    • mint
    • signal
    • zkism

    cosmos-sdk Modules

    These are standard modules provided by the Cosmos SDK:

    • auth, authz, bank, circuit, consensus, distribution, evidence, feegrant, genutil, gov, params, slashing, staking, upgrade, vesting

    Third-party Modules

    These include IBC-related modules and Hyperlane integrations:

    • capability (from ibc-go)
    • hyperlane/core and hyperlane/warp (from hyperlane-cosmos)
    • ibc
    • interchain accounts (ICS-027)
    • packetforwardmiddleware
    • transfer (ICS-020)
  6. What is the Content Addressable Transaction Pool (CAT)?

    main

    The Content Addressable Transaction Pool (CAT) is a protocol designed as an alternative to standard FIFO or Priority mempools in Tendermint-based systems.

    Instead of gossiping full transaction data, CAT uses small, unique tags (sha256 hashes) to identify transactions. This reduces network duplication by allowing nodes to broadcast which transactions they have seen (SeenTx) and which they want (WantTx), rather than sending the full transaction bytes repeatedly.

    Key Benefits:

    • Optimized Latency and Throughput: Faster transaction proposal and higher block capacity.
    • Reduced Bandwidth: Minimizes redundant data transmission by tracking peer state via transaction tags.
  7. Overview of the Transaction Client (TxClient)

    main

    The TxClient is a high-level abstraction for Celestia chain transactions. It manages the full lifecycle of a transaction: construction, signing, broadcasting, and confirmation.

    Key capabilities include:

    • Automatic Error Handling: Manages sequence mismatches, mempool evictions, and rejections.
    • Submission Strategies: Supports both Ordered (sequential, low throughput, reliable) and Unordered (parallel via worker accounts, high throughput) submission patterns.
    • Gas Management: Integrates with a gas estimation service to ensure transactions have appropriate limits and fees.
    • Reliability: Handles parallel submission via a pool of worker accounts to prevent sequence contention.
  8. Overview of the RSEMA1D Codec

    main

    RSEMA1D (Reed-Solomon Evans-Mohnblatt-Angeris 1D) is a data availability codec designed for vertically-extended data matrices. It provides efficient commitment, proof generation, and verification by applying Reed-Solomon encoding only along columns (vertical extension) using the Leopard codec.

    Key Properties

    • Vertical-only extension: Uses the Leopard codec for Reed-Solomon encoding applied exclusively to columns.
    • RLC-based verification: Employs random linear combinations (RLCs) to ensure soundness.
    • Efficient verification: Verification complexity is $O(K)$ for extended rows and $O(\log K)$ for original rows.
    • 128-bit security: Utilizes $GF(2^{128})$ for random linear combinations to protect against RLC forgery.
  9. What is the x/zkism module?

    main

    The x/zkism module is a Hyperlane Interchain Security Module (ISM) that uses zero-knowledge proofs (specifically SP1 Groth16 proofs) to authorize Hyperlane message processing.

    It functions by storing an on-chain state (opaque bytes) and a ZK verifier configuration. The first 32 bytes of this state are treated as a trusted root for membership proofs. The module supports two primary proof types:

    1. StateTransitionValues: Updates the on-chain state (state -> new_state).
    2. StateMembershipValues: Authorizes specific Hyperlane message IDs for processing by proving they belong to the current state.

    Integration with Hyperlane occurs via the Verify method, which checks if a message ID exists in the module's authorized set and consumes it upon successful verification.

  10. Understand Sequence Length Encoding in Shares

    main

    In celestia-app, shares (both sparse and compact) use a specific encoding for the sequence length. To ensure a single code path for parsing across different share types, the project uses a fixed-length encoding for both the sequence length and the reserved bytes.

    Encoding Specification

    • Sequence Length: Encoded as a 4-byte big endian uint32.
    • Reserved Bytes: Encoded as a 4-byte big endian uint32.

    This approach (Option D from the ADR) was chosen to provide consistency between compact shares and sparse shares, making it easier for non-Go implementations to parse the data without relying on variable-length integer (varint) logic for these specific fields.