Shwap Upgrade: 12x Faster Data Availability Sampling for Celestia

Shwap upgrade boosts Celestia's data availability network with 12x faster sampling and 16.5x reduced storage, setting the stage for 1GB blocks.

Updates

Oct 16, 2024

0 min read

By

Winfred K. Mandela

Bigger blocks. Smaller, more efficient light nodes. That’s the promise of Celestia’s Shwap upgrade, a major step forward for the network's data availability (DA) capabilities. The upgrade is already active on the Arabica and Mocha testnetsusing v0.18.2 of celestia-node, and it brings significant improvements: data availability sampling is now 12 times faster, while storage needs are reduced by 16.5 times. Shwap is a key part of Celestia’s journey to achieving 1GB block sizes, making the network ready for much bigger workloads and more lightweight nodes.

Coordinated with input from the community, Shwap boosts network efficiency without increasing the requirements for light nodes, making it easier for users to run lightweight nodes in-browser or on mobile devices. After more testing, Shwap is set to launch on the Mainnet Beta in November, moving Celestia closer to its ambitious scalability goals.

What is Shwap, and Why Does it Matter?

Shwap is the second major upgrade to Celestia’s data availability network since its Mainnet Beta launch. Defined in CIP-19, Shwap introduces a new messaging framework and a reengineered storage system . It’s designed to let Celestia handle a lot more data (higher throughput) while keeping the workload on light nodes low.

These changes don’t just help today’s applications run better—they also set the stage for new kinds of decentralized apps that can do more while still keeping things lightweight for users. Shwap is a key step in the plan to reach 1GB block sizes, which would allow the network to handle much larger workloads than before.

How the Data Availability Network Works Now

Right now, Celestia’s data availability network operates with two main functions: one sends out the latest blockchain updates (chain headers), and the other deals with the actual block data organized in a data square. This data square is made up of many small pieces of information (called shares), which are checked by light nodes to verify data availability.

Before Shwap, the system was based on an older technology called IPLD (InterPlanetary Linked Data). While IPLD worked, it wasn’t built for the kind of massive scaling Celestia is aiming for. One big problem was how data was stored and retrieved. To check if a piece of data was available, light nodes had to make seven separate requests, which made the process slow. The old system also stored a lot of extra data, which increased storage needs and made it harder to scale.

What Shwap Brings to the Table

1. More Efficient Data Storage

Shwap introduces a revamped data square storage subsystem that eliminates the need for storing historical Merkle proofs and extraneous metadata. This change results in a 16.5x reduction in storage requirements, enabling more efficient data handling. The new system leverages modern CPUs to recompute hashes in real-time, offering performance gains over retrieving pre-stored data.

2. Better Networking for Data Sharing

The Shwap upgrade features a flexible messaging framework for the DA network, accommodating various transport protocols such as TCP/QUIC and HTTP/x. With the introduction of data Containers, users can access specific data parts within the square more precisely, improving the network's expressiveness and flexibility.

Protocol decoupling further enhances Shwap's adaptability, allowing for integration with protocols like Bitswap and ShrEx. This capability significantly accelerates block synchronization; for example, using Shwap with ShrEx reduces sync time from seven days to just eight hours on the Mocha testnet, achieving a 22x speed improvement.

3. O(1) Data Availability Sampling

One of the biggest improvements with Shwap is O(1) data availability sampling (DAS), which reduces the number of steps needed to check if data is available. Previously, checking a 128x128 data square required seven separate steps. Now, it takes just one step, making the process 12 times faster. This is a game-changer for light nodes, which can now keep up with the network with much less effort.

What This Means for Light Nodes

With Shwap, light nodes are now much more efficient. The faster data sampling means they can verify data availability in a fraction of the time, reducing sync times from 24 hours to just two hours. The upgrade also lowers the storage needed for light nodes by 2.66 times, making it easier for more people to run lightweight nodes on simple devices like mobile phones or web browsers.

Preparing for 1GB Blocks

The Shwap upgrade is a critical step on the path toward achieving 1GB block sizes, a central goal in Celestia’s scalability roadmap. While Shwap provides a solid foundation, additional optimizations and features will be needed to reach this ambitious target. The upgrade allows for ongoing improvements in performance, enhanced security, and the development of new capabilities without major protocol overhauls.

For more details, explore the official Shwap blog post.

——————————————————

About Stakecito Labs

At Stakecito Labs, we've honed our craft as validators. Our reputation as the third-largest validator by delegation count within the Cosmos ecosystem speaks to our unwavering dedication and the trust placed in us by over 270,000 delegators worldwide.

Our validation services are not just about maintaining Cosmos blockchain networks though; we validate networks outside of Cosmos as well (NEAR, Aleph Zero, etc.).

Our core mission is centered on demystifying blockchain technology to ensure it's accessible for everyone, from newcomers to seasoned investors. To begin staking, visit our homepage.

Stake with Stakecito | Follow us on Twitter | Subscribe to Our YouTube | Governance

——————————————————