BlackNodes LogoBlackNodes · Blog
Shwap Upgrade: 12× Faster DA Sampling & 16.5× Lighter Storage
news

Shwap Upgrade: 12× Faster DA Sampling & 16.5× Lighter Storage

Celestia’s Shwap upgrade slashes sampling latency by 12× and cuts storage by 16.5×, paving the way for bigger blocks and lean, browser-friendly light nodes.

Prashant Swami

Prashant Swami

Technical Writer

October 30, 2024
7 min read
#Celestia#Shwap#Data Availability#Blockchain #Upgrade#Modular Blockchain

Shwap Upgrade Overview

Shwap is Celestia’s first major post-launch upgrade, already live on Arabica and Mocha testnets and slated for Mainnet Beta soon.
With this release the data-availability layer can be sampled twelve times faster while consuming sixteen-and-a-half times less storage—unlocking bigger blocks for rollups and shrinking hardware requirements so light clients can live comfortably inside browsers and wallets.

Why introduce “Shwap”?

Celestia’s original data-availability sampling (DAS) design was inherited from the dev-net era and centred on hash-addressable IPLD objects. That choice made early development easy but imposed three hard limits on scalability:

Hash-addressability bottlenecks

1. Seven network round-trips were required to verify a single share in a 128 × 128 square.
2. Full nodes had to maintain a global Merkle-proof index, throttling disk I/O.
3. Access time grew at O(log₂ n), even though constant-time look-ups were possible.

The community goal of 1 GB blocks demanded a fresh start—hence Shwap (“share + swap”).

Key improvements

🔧 Square Storage

The new storage subsystem discards historical proofs and keeps only the data that matters, achieving a 16.5 × reduction in disk usage. An immutable SST format groups shares with optional parity shards so one disk seek returns everything a sampler needs. Modern CPUs recompute hashes faster than NVMe can read them, so most proofs are now generated on the fly.

🌐 Composable Networking

Shwap adds a Containers API that can fetch any slice of the data square—samples, rows, blobs, namespace data, and more—over whichever transport a node prefers (TCP, QUIC, HTTP/3, ShrEx). With Bitswap handling requests, a light client now completes DAS in one round-trip. When ShrEx is used for full-node sync, Mocha’s historical data downloads 22 × faster.

🚀 Constant-time DAS

Where the legacy protocol performed logarithmic tree walks, Shwap makes sampling O(1). A client requests a container, verifies it once, and moves on—no iterative proof hopping required.

Impact by node type

Light nodes

Table 1.1

Table 1.1

Full / bridge nodes – network layer

Table 1.2

Table 1.2

Full / bridge nodes – storage layer

Table 1.3

Table 1.3