Celestia blocks are organized into a matrix of shares, fixed-size data containers that are the atomic unit of the Data Availability (DA) layer. For indexers, custom light clients, and data pipeline operators, understanding the compact share format is essential to extract rollup data directly from raw blocks without relying on a full consensus node or a third-party API. This page details the binary layout, namespace association, and decoding rules required to manually parse Celestia shares.

Share Format Parsing and Decoding
Introduction
A technical reference for parsing and decoding raw Celestia shares to extract rollup transaction and blob data without full node dependencies.
The share format uses a compact, non-self-describing layout to minimize DA overhead. Each share belongs to a specific namespace, with the first share of a sequence containing a length-delimited beginning of the data and subsequent continuation shares packing raw bytes. Reserved namespaces, such as those for transactions and intermediate state roots, follow special encoding rules. Parsing logic must correctly handle padding shares, which fill the remainder of a row, and must distinguish between a sequence's first share and its continuations to reassemble the original blob or transaction.
Operators building custom indexers or trust-minimized light clients must implement this parsing logic to verify data availability sampling proofs against the block's data root. A failure to correctly decode the share format can lead to data corruption, missed rollup transactions, or an inability to reconstruct state. Teams integrating this logic into bridge verifiers or data availability sampling clients should subject their parsing implementation to a rigorous security review to ensure it handles all edge cases defined by the canonical specification.
Quick Facts
Essential facts for developers building custom parsers to extract rollup data from Celestia blocks without relying on full node APIs.
| Field | Value | Why it matters |
|---|---|---|
Share size | 256 bytes (first share in a sequence uses the first byte for namespace version and info) | Determines memory layout and offset calculations for all parsing logic. |
Namespace version | First byte of the first share's namespace (0x00 for standard shares) | Incorrect version handling will cause misidentification of share types and data corruption. |
Reserved namespaces | 0x00 to 0xFF (primary reserved: TRANSACTION = 0x01, PAY_FOR_BLOB = 0x04) | Parsers must filter or isolate reserved namespace data to avoid mixing system transactions with rollup blobs. |
Padding shares | Tail padding (namespace 0xFF) fills the last sequence to the next row boundary | Failing to skip tail padding will inject garbage bytes into decoded rollup data. |
Share sequence length | Encoded as a big-endian uint32 in the first 4 bytes of the info byte area for the first share | Essential for allocating the correct buffer size when reassembling multi-share blobs or transactions. |
Blob vs transaction shares | Blobs use namespace version 0x00 with user-defined namespaces; transactions use reserved namespace 0x01 | Indexers and data teams must branch decoding logic based on namespace to correctly extract rollup state. |
Canonical reference | Verify against the celestia-app specs repository for the exact share encoding format | Spec changes between network versions can silently break custom parsers if not tracked. |
The Compact Share Format and Data Layout
The canonical binary layout of a Celestia share, defining how transaction and blob data are packed into a Namespace Merkle Tree.
Celestia blocks are composed of a sequence of fixed-size shares, each belonging to a specific namespace. The compact share format is the binary encoding that allows a block to be split into these uniform units and later reassembled. A share is not a transaction or a blob itself, but a container for a portion of one. The first share of a sequence includes a start indicator and a length field, while continuation shares carry only raw data. This layout is fundamental for any system that parses raw blocks, including indexers, custom light clients, and data availability sampling (DAS) verifiers.
Every share begins with a namespace ID (NAMESPACE_ID_BYTES), immediately followed by a share version and a sequence start indicator encoded in a single info byte. If the share is the first in a sequence, the next bytes encode a sequence_length as a variable-length unsigned integer (varint), with the remaining space filled by the raw data chunk. Continuation shares omit the length and pack data from the first byte after the info byte. The final share in a sequence is padded with zero bytes to maintain the fixed SHARE_SIZE. Reserved namespaces like TRANSACTION_NAMESPACE and PAY_FOR_BLOB_NAMESPACE have specific parsing rules that determine how data is split across shares, making correct handling of these namespaces critical for accurate data extraction.
A common parsing error is to treat all shares as independent data units, which breaks when a blob or transaction spans multiple shares. Implementations must buffer data across share boundaries, using the sequence_length from the first share to determine when a complete unit has been reconstructed. Another pitfall is ignoring the info byte's version bits, which could lead to silent misinterpretation of data if the share format is upgraded. Teams building custom indexers or light clients should verify their parsers against the celestia-app reference implementation and test edge cases like zero-length sequences, maximum-size blobs, and blocks with only padding shares.
For rollup developers and data teams extracting transaction or blob data without running a full consensus node, a correct share parser is the foundation of reliable data retrieval. Chainscore Labs can review custom share parsing implementations, assess compatibility with the latest Celestia network upgrade, and help integration teams build robust data pipelines that handle edge cases like reserved namespace rules and format version upgrades.
Who Needs This
Indexers & Data Teams
You are the primary consumer of raw share data. Your systems must parse Celestia blocks to extract rollup blobs without running full rollup nodes.
Action items:
- Implement namespace filtering to isolate relevant blobs from the reserved padding and transaction shares.
- Handle the compact share format's info byte to correctly identify sequence start, continuation, and padding shares.
- Account for the first sparse share in a sequence, which contains the data length delimiter.
- Build resilience against malformed shares that could cause parsing panics.
Chainscore Labs can review your parsing pipeline to ensure it correctly handles edge cases like zero-length sequences and reserved namespace ranges, preventing data corruption in your indexed datasets.
Implementation Workflow and Key Decisions
Critical architectural decisions and operational steps for building a reliable share parsing and decoding pipeline.
Namespace Detection and Filtering
The first parsing step is identifying the namespace of each share. A share's namespace is in its first 29 bytes (version + ID). Implement logic to filter for your rollup's specific namespace and to handle reserved namespaces like TRANSACTION_NAMESPACE (for PFBs) or PAY_FOR_BLOB_NAMESPACE. Ignoring namespace filtering means you will waste cycles decoding irrelevant data. Builders of custom indexers must ensure their filtering logic correctly handles the full namespace version and ID to avoid missing blobs from updated rollup deployments.
Sequence Length Delimiting for Blob Reconstruction
A single blob may span multiple consecutive shares within the same namespace. The first share in a sequence contains a variable-length unsigned integer (varint) indicating the total sequence length. Your parser must read this length, then consume exactly that many subsequent bytes across the following shares to reconstruct the complete blob. A common failure mode is not accounting for the varint's own byte length, leading to incorrect byte slicing and corrupted data extraction. This logic is critical for data teams reconstructing rollup state from raw blocks.
Reserved Bytes and Padding Handling
Shares have a fixed size, but the data they carry is often not perfectly aligned. The first share of a sequence may contain a single reserved byte indicating the start of user data. The final share of a sequence will contain trailing zero-padding bytes. Your decoder must identify and strip this reserved byte and any padding to recover the exact original blob. Failing to do so will result in a data payload with prepended garbage or trailing zeros, causing downstream deserialization failures in your rollup's state machine or data pipeline.
Decoding PayForBlob vs. Standard Transactions
Shares in the TRANSACTION_NAMESPACE contain standard Cosmos SDK transactions. To identify a PayForBlob (PFB) transaction, you must decode the transaction bytes and check for a MsgPayForBlobs message. This is distinct from the blob data itself, which resides in a user-specified namespace. Indexers and wallets that only decode standard transactions will miss PFBs, leading to an incomplete view of network activity. Your pipeline must branch logic to parse PFBs and link them to their corresponding blob data for accurate fee accounting and data availability verification.
Compact Share Format and Efficient Parsing
Celestia uses a compact share format to minimize overhead. This format uses varints for lengths and packs data tightly without explicit per-share headers beyond the namespace. A naive parser that scans every byte is inefficient. An optimized implementation will use the sequence length to jump directly to the next namespace or sequence boundary. For high-throughput indexers processing full blocks, this jump-scanning approach is essential to avoid CPU bottlenecks. Teams should benchmark their parser against mainnet blocks to ensure it meets their latency requirements.
Parsing Risks and Failure Modes
Common failure modes, affected actors, and recommended actions for systems that manually parse and decode Celestia's compact share format.
| Area | Failure Mode | Who is affected | Action |
|---|---|---|---|
Reserved Namespace Parsing | Parser incorrectly handles or ignores shares in reserved namespaces (e.g., | Indexers, custom light clients, data teams | Verify parser logic against the canonical namespace ordering and reserved ID rules. Implement strict validation that rejects blocks with unexpected reserved namespace data. |
Padding Share Detection | Parser misinterprets padding shares as valid data or fails to skip them, causing incorrect blob reconstruction or out-of-bounds reads. | Rollup sequencers, bridge relayers, data retrieval pipelines | Implement explicit checks for the padding namespace ( |
Compact Share Layout Assumptions | Hardcoded assumptions about share size or the layout of sequence length delimiters break after a protocol upgrade that modifies the compact share format. | Custom light clients, indexers, cross-chain bridge verifiers | Design parsers to read the share version and sequence length from the share header dynamically. Monitor CIPs for changes to the share format specification. |
Namespace Merkle Tree (NMT) Traversal | Incorrect NMT proof verification or leaf traversal logic rejects valid inclusion proofs or accepts invalid ones, breaking trust-minimized verification. | Bridge settlement contracts, light client implementations, Blobstream relayers | Use a well-tested NMT library. Perform differential testing against a |
Blob Continuation Index Handling | Parser fails to correctly link shares across multiple sequences using the continuation index, resulting in truncated or concatenated blob data. | Indexers, data availability samplers, rollup full nodes | Validate the sequence length and continuation index for every share in a blob sequence. Implement fuzz tests that verify blob reconstruction against the canonical |
Signer Byte Extraction | Parser extracts the signer byte from the wrong offset in a transaction share, attributing a PayForBlob to an incorrect signer. | Block explorers, analytics platforms, fee accounting systems | Confirm the signer byte offset against the current share format specification. Cross-reference extracted signers with the transaction's actual signer information from a full node. |
Version Bits Mismatch | Parser ignores or misinterprets version bits in the share header, applying incorrect decoding logic for a future share version. | All custom parsers and indexers | Implement a strict version check. If an unknown version is encountered, the parser should halt and alert an operator, not attempt to decode with potentially incompatible logic. |
Implementation and Validation Checklist
A step-by-step checklist for developers implementing custom share parsing and decoding logic. Each item confirms that your system correctly handles the compact share format, reserved namespaces, padding rules, and data extraction from raw Celestia blocks.
Confirm that your parser correctly identifies and isolates shares based on their namespace. This is the foundational step for extracting data for a specific rollup.
- What to check: Verify that your logic can parse the namespace from the first
NAMESPACE_ID_BYTESof every share. Test against shares withPARITY_SHARE_NAMESPACE,TAIL_TRANSACTION_PADDING_NAMESPACE, andRESERVED_PADDING_NAMESPACE. - Why it matters: Misidentifying a namespace will cause you to parse data from the wrong rollup or interpret padding/parity data as valid transactions, leading to state corruption.
- Readiness signal: Your parser correctly discards all shares from reserved namespaces and only processes data from the target rollup's namespace ID.
Canonical Resources
Official Celestia repositories and specifications should be the source of truth for teams decoding raw shares, blobs, namespaces, and proofs. Use these resources to validate parser behavior against the implementation that network clients actually run.
Looking to build on a specific blockchain?
We build smart contracts, DeFi applications, wallets, tokenization platforms, and blockchain infrastructure across the major ecosystems teams choose today. That includes Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana, Sui, Aptos, Hedera, Stellar, and NEAR, with support for additional EVM and non-EVM networks based on your product requirements.
EVM ecosystems
- Ethereum
- Arbitrum
- Optimism
- Polygon
- Avalanche
- Cronos

Non-EVM ecosystems
- Solana
- Sui
- Aptos
- Hedera
- Stellar
- NEAR
Additional ecosystems
- Polkadot
- Cosmos
- TON
- Cardano
- Algorand
- Tempo
Also available for Base, appchains, custom EVM networks, and cross-chain product architecture.
Frequently Asked Questions
Common questions from developers manually parsing Celestia blocks to extract transaction and blob data from raw shares.
The first byte of each share is the namespace version and share version combined. For compact shares, the first share of a sequence contains a reserved bytes section followed by an info byte that indicates the start of a sequence. Look for the SequenceStart indicator in the info byte. Subsequent shares in the same sequence will have a continuation indicator. If you encounter a share with a different namespace ID than the current sequence, you've reached the boundary of a new sequence. Always validate namespace ordering: shares must be ordered by namespace ID, and all shares for a given namespace must be contiguous.
Delivering blockchain solutions for 5+ years.
We have partnered with 50+ leading DeFi protocols, NFT ecosystems, and fintech innovators to build secure, scalable, and capital-efficient blockchain products.
Selected Partners & Clients
“I've been working with Chainscore Labs for last 3+ years, they've consistently delivered with strong ownership across multiple projects. The team is reliable and detail-oriented.”
How to get started?
If you're looking for blockchain integration, ChainScore Labs has 5+ years of experience helping teams build and integrate exchanges, wallets, smart contracts, tokenization solutions, and protocol-connected products, we can help you choose the right path, integrate securely, and get to production faster. Our team consists of experienced blockchain developers and architects who can help you with your blockchain integration needs.
Exploration & Strategy
Define your product goals and choose the right blockchain architecture for your use case.
Architecture & Design
Design the smart contracts, tokenomics, and security parameters of your system.
Development & Integration
Build and integrate with wallets, oracles, and front-end dApps for a seamless experience.
Security & Launch
Comprehensive audits followed by a risk-managed mainnet deployment to protect your users.
Discover our
blockchain development services.
We build production-grade blockchain solutions for top-tier projects across DeFi and Web3.
Need a blockchain engineering team?
Send the project context and we will respond with next steps, scope questions, and a practical path to delivery.


