Understanding Rollkit: Building Bitcoin Sovereign Rollup

Rollkit
2023-03-09 12:55:15
Collection
Bitcoin sovereign Rollup not only expands the possibilities of Rollup but also has the potential to help guide a healthy fee market for Bitcoin block space.

Original Title: "Sovereign rollups on Bitcoin with Rollkit"

Original Author: Rollkit

Original Compiler: Kate, Marsbit

Last week, we introduced Rollkit, a modular framework for rollups. Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. Early research implementations allow Rollkit rollups to use Bitcoin for data availability.

Rollkit opens a door for developers to create rollups with arbitrary execution environments that inherit Bitcoin's data availability guarantees and reorganization resistance. With the new integration, EVM can now run on Bitcoin as a Rollkit sovereign rollup. The sovereign rollup on Bitcoin not only expands the possibilities of rollups but also has the potential to help guide a healthy fee market for Bitcoin block space, leading to a more sustainable security budget.

TL;DR

With Rollkit's new early research integration, sovereign rollups using Bitcoin for data availability have now become a reality.

Next is a demonstration of EVM running on Bitcoin as a sovereign Rollkit rollup.

The implementation became possible due to Bitcoin's Taproot upgrade and the use of Ordinals to publish arbitrary data on Bitcoin.

Publishing Bitcoin Data with Taproot

On February 1, 2023, the Luxor mining pool mined the largest Bitcoin block ever (#774628), approximately 4 MB. Most of the block space was used to embed a Taproot Wizards NFT using Ordinals, a project that enables Bitcoin NFTs by publishing image data on-chain.

Bitcoin NFTs use Taproot witnesses to record arbitrary data, made possible by Bitcoin's Taproot upgrade. Taproot witnesses provide a slightly better payload-to-data ratio than SegWit transactions. A standard transaction can contain up to about 390kB of arbitrary data while still going through the public mempool. Non-standard transactions that miners include directly without going through the mempool can contain close to 4MB of arbitrary data. In short, with SegWit, publishing large amounts of data to the Bitcoin blockchain has become feasible.

Since then, Ordinals have been used for NFT inscriptions, and the use of Taproot has begun. Eric Wall noted that at the time of his tweet, publishing data on Bitcoin was 7 times cheaper than on Ethereum. Now there are thousands of inscriptions on Bitcoin, making it clear that a sovereign rollup and dapp ecosystem on Bitcoin could become a reality. The missing piece is a rollup framework that can easily integrate Bitcoin as a data availability layer.

Integrating Bitcoin as a Data Availability Layer into Rollkit

Rollkit is a modular framework for rollups where developers can insert custom execution layers and data availability layers. Initially, Rollkit only supported Celestia as an option for data availability and consensus. Now, thanks to the early research implementation of Rollkit's Bitcoin data availability module, Bitcoin has become an option. In this case, the sovereign rollup manages its own execution and settlement while offloading consensus and data availability to Bitcoin.

rollkit-bitcoin-rollup

How Rollkit Publishes Data to Bitcoin

To read and write data on Bitcoin, we used Taproot transactions. To facilitate this, we implemented a Go package called bitcoin-da, which provides a reader/writer interface for Bitcoin. For details on how the interface works and how to use Taproot, please refer to the specifications. Any project that wants to read and write data on Bitcoin can reuse this package.

Rollkit is built with modularity at its core. It has a data availability interface, so developers can simply implement specific methods to add new data availability layers. To add a data availability layer, implementers need to satisfy the DataAvailabilityLayerClient interface, which defines the behavior of the data availability client, and the BlockRetriever interface, which defines how to synchronize blocks. These interfaces are located in the da package. The most important methods in these interfaces are SubmitBlock and RetrieveBlock for reading and writing blocks.

After implementing the Taproot reader/writer interface for Bitcoin (bitcoin-da), it took less than a day to add it as Rollkit's data availability module. We basically only needed to implement the SubmitBlock and RetrieveBlocks functions in Rollkit to call the Read and Write methods in bitcoin-da.

rollkit-bitcoin-rollup-2

EVM in the Bitcoin Demonstration

Rollkit supports custom execution layers, including EVM, CosmWasm, or Cosmos SDK. To test the integration, we ran EVM (using Ethermint) as a sovereign rollup on a local Bitcoin test network with Rollkit. Please see the demonstration below.

https://youtu.be/qBKFEctzgT0

Conclusion

As we move into the future, sovereign communities will form around different applications, and requiring them to bear the high costs and overhead of deploying a Layer 1 blockchain as sovereign is unsustainable. Sovereign rollups solve this problem, making it possible to deploy a sovereign chain that inherits the data availability and consensus of another Layer 1 chain (like Bitcoin).

Our goal with Rollkit is to make building and customizing rollups easy. We invite you to try Rollkit and build sovereign rollups on Bitcoin, or customize Rollkit with different execution environments and data availability layers. For details on how to run Rollkit with the Bitcoin data availability module, please refer to the instructions here. Please remember that the integration is an early research implementation and is not yet ready for production!

Modular, not maximalist.

Related tags
ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators