diff --git a/pr-339/404.html b/pr-339/404.html index a0a70a7d5..ee490949e 100644 --- a/pr-339/404.html +++ b/pr-339/404.html @@ -34,7 +34,7 @@

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- + \ No newline at end of file diff --git a/pr-339/README.html b/pr-339/README.html index 91d5a006e..225b8c8bf 100644 --- a/pr-339/README.html +++ b/pr-339/README.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Rollkit Documentation Site

Welcome to the official documentation repository for Rollkit.

Here you'll find comprehensive guides, tutorials, and reference materials to help you make the most out of Rollkit.

Building the site

To get started, clone the repository and run the following:

bash
yarn run docs:dev

This documentation site is built with VitePress

Contribution Guidelines

We love contributions from the community! Whether you're fixing typos, improving content clarity, or adding new topics, every contribution helps.

  • Fork & Clone: Fork this repository and clone it to your local machine.
  • Branch: Always create a new branch for your changes. Naming it relevantly.
  • Commit Changes: Make your changes and commit them with a clear and concise commit message.
  • Push & Create PR: Push your changes to your fork and create a pull request to the main branch of this repository.

Please ensure to review the detailed Contribution Guidelines above before making a pull request.

Directory Structure

  • /tutorials: Step-by-step instructions to help users build their own rollups with Rollkit.
  • /learn: Technical reference materials, such as configuration options and details about the Rollkit stack.
  • /blog: Blog posts for the Rollkit blog.
  • /public: Images, diagrams, and other media files used in the documentation.

Feedback & Suggestions

We value feedback from the community. If you have suggestions for improvements or find any discrepancies in the documentation, please raise an issue in this repository.

- +
On this page

Rollkit Documentation Site

Welcome to the official documentation repository for Rollkit.

Here you'll find comprehensive guides, tutorials, and reference materials to help you make the most out of Rollkit.

Building the site

To get started, clone the repository and run the following:

bash
yarn run docs:dev

This documentation site is built with VitePress

Contribution Guidelines

We love contributions from the community! Whether you're fixing typos, improving content clarity, or adding new topics, every contribution helps.

  • Fork & Clone: Fork this repository and clone it to your local machine.
  • Branch: Always create a new branch for your changes. Naming it relevantly.
  • Commit Changes: Make your changes and commit them with a clear and concise commit message.
  • Push & Create PR: Push your changes to your fork and create a pull request to the main branch of this repository.

Please ensure to review the detailed Contribution Guidelines above before making a pull request.

Directory Structure

  • /tutorials: Step-by-step instructions to help users build their own rollups with Rollkit.
  • /learn: Technical reference materials, such as configuration options and details about the Rollkit stack.
  • /blog: Blog posts for the Rollkit blog.
  • /public: Images, diagrams, and other media files used in the documentation.

Feedback & Suggestions

We value feedback from the community. If you have suggestions for improvements or find any discrepancies in the documentation, please raise an issue in this repository.

+ \ No newline at end of file diff --git a/pr-339/assets/README.md.310c8e95.js b/pr-339/assets/README.md.baab927f.js similarity index 98% rename from pr-339/assets/README.md.310c8e95.js rename to pr-339/assets/README.md.baab927f.js index d3f2cece1..abc1d9820 100644 --- a/pr-339/assets/README.md.310c8e95.js +++ b/pr-339/assets/README.md.baab927f.js @@ -1 +1 @@ -import{_ as e,o as t,c as i,X as o}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"Rollkit Documentation Site","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit Documentation Site | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"README.md","filePath":"README.md","lastUpdated":1713200494000}'),a={name:"README.md"},n=o('

Rollkit Documentation Site

Welcome to the official documentation repository for Rollkit.

Here you'll find comprehensive guides, tutorials, and reference materials to help you make the most out of Rollkit.

Building the site

To get started, clone the repository and run the following:

bash
yarn run docs:dev

This documentation site is built with VitePress

Contribution Guidelines

We love contributions from the community! Whether you're fixing typos, improving content clarity, or adding new topics, every contribution helps.

Please ensure to review the detailed Contribution Guidelines above before making a pull request.

Directory Structure

Feedback & Suggestions

We value feedback from the community. If you have suggestions for improvements or find any discrepancies in the documentation, please raise an issue in this repository.

',16),s=[n];function r(l,c,u,d,h,p){return t(),i("div",null,s)}const b=e(a,[["render",r]]);export{g as __pageData,b as default}; +import{_ as e,o as t,c as i,X as o}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"Rollkit Documentation Site","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit Documentation Site | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"README.md","filePath":"README.md","lastUpdated":1713275863000}'),a={name:"README.md"},n=o('

Rollkit Documentation Site

Welcome to the official documentation repository for Rollkit.

Here you'll find comprehensive guides, tutorials, and reference materials to help you make the most out of Rollkit.

Building the site

To get started, clone the repository and run the following:

bash
yarn run docs:dev

This documentation site is built with VitePress

Contribution Guidelines

We love contributions from the community! Whether you're fixing typos, improving content clarity, or adding new topics, every contribution helps.

Please ensure to review the detailed Contribution Guidelines above before making a pull request.

Directory Structure

Feedback & Suggestions

We value feedback from the community. If you have suggestions for improvements or find any discrepancies in the documentation, please raise an issue in this repository.

',16),s=[n];function r(l,c,u,d,h,p){return t(),i("div",null,s)}const b=e(a,[["render",r]]);export{g as __pageData,b as default}; diff --git a/pr-339/assets/README.md.310c8e95.lean.js b/pr-339/assets/README.md.baab927f.lean.js similarity index 88% rename from pr-339/assets/README.md.310c8e95.lean.js rename to pr-339/assets/README.md.baab927f.lean.js index 47c0273de..4460e99d4 100644 --- a/pr-339/assets/README.md.310c8e95.lean.js +++ b/pr-339/assets/README.md.baab927f.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as i,X as o}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"Rollkit Documentation Site","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit Documentation Site | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"README.md","filePath":"README.md","lastUpdated":1713200494000}'),a={name:"README.md"},n=o("",16),s=[n];function r(l,c,u,d,h,p){return t(),i("div",null,s)}const b=e(a,[["render",r]]);export{g as __pageData,b as default}; +import{_ as e,o as t,c as i,X as o}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"Rollkit Documentation Site","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit Documentation Site | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"README.md","filePath":"README.md","lastUpdated":1713275863000}'),a={name:"README.md"},n=o("",16),s=[n];function r(l,c,u,d,h,p){return t(),i("div",null,s)}const b=e(a,[["render",r]]);export{g as __pageData,b as default}; diff --git a/pr-339/assets/blog_overview.md.7face621.js b/pr-339/assets/blog_overview.md.3383e2a6.js similarity index 95% rename from pr-339/assets/blog_overview.md.7face621.js rename to pr-339/assets/blog_overview.md.3383e2a6.js index 58238dfed..05acc2ec5 100644 --- a/pr-339/assets/blog_overview.md.7face621.js +++ b/pr-339/assets/blog_overview.md.3383e2a6.js @@ -1 +1 @@ -import{_ as e,o,c as t,X as a}from"./chunks/framework.adc83686.js";const v=JSON.parse('{"title":"Blog","description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","frontmatter":{"description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","head":[["meta",{"name":"og:title","content":"Blog | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/overview.md","filePath":"blog/overview.md","lastUpdated":1713200494000}'),l={name:"blog/overview.md"},n=a('

Blog

Welcome to our blog! Here, you'll find a variety of articles on a range of topics. Use this overview to navigate through our content.

Table of contents

Stay tuned for more exciting content!

',5),r=[n];function i(s,c,h,d,p,_){return o(),t("div",null,r)}const f=e(l,[["render",i]]);export{v as __pageData,f as default}; +import{_ as e,o,c as t,X as a}from"./chunks/framework.adc83686.js";const v=JSON.parse('{"title":"Blog","description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","frontmatter":{"description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","head":[["meta",{"name":"og:title","content":"Blog | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/overview.md","filePath":"blog/overview.md","lastUpdated":1713275863000}'),l={name:"blog/overview.md"},n=a('

Blog

Welcome to our blog! Here, you'll find a variety of articles on a range of topics. Use this overview to navigate through our content.

Table of contents

Stay tuned for more exciting content!

',5),r=[n];function i(s,c,h,d,p,_){return o(),t("div",null,r)}const f=e(l,[["render",i]]);export{v as __pageData,f as default}; diff --git a/pr-339/assets/blog_overview.md.7face621.lean.js b/pr-339/assets/blog_overview.md.3383e2a6.lean.js similarity index 91% rename from pr-339/assets/blog_overview.md.7face621.lean.js rename to pr-339/assets/blog_overview.md.3383e2a6.lean.js index e1578dbfc..667bc6084 100644 --- a/pr-339/assets/blog_overview.md.7face621.lean.js +++ b/pr-339/assets/blog_overview.md.3383e2a6.lean.js @@ -1 +1 @@ -import{_ as e,o,c as t,X as a}from"./chunks/framework.adc83686.js";const v=JSON.parse('{"title":"Blog","description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","frontmatter":{"description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","head":[["meta",{"name":"og:title","content":"Blog | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/overview.md","filePath":"blog/overview.md","lastUpdated":1713200494000}'),l={name:"blog/overview.md"},n=a("",5),r=[n];function i(s,c,h,d,p,_){return o(),t("div",null,r)}const f=e(l,[["render",i]]);export{v as __pageData,f as default}; +import{_ as e,o,c as t,X as a}from"./chunks/framework.adc83686.js";const v=JSON.parse('{"title":"Blog","description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","frontmatter":{"description":"This page provides an overview of all the blog posts. It serves as a central hub for all the blog content.","head":[["meta",{"name":"og:title","content":"Blog | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/overview.md","filePath":"blog/overview.md","lastUpdated":1713275863000}'),l={name:"blog/overview.md"},n=a("",5),r=[n];function i(s,c,h,d,p,_){return o(),t("div",null,r)}const f=e(l,[["render",i]]);export{v as __pageData,f as default}; diff --git a/pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.f05a0382.js b/pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.6c903a9e.js similarity index 99% rename from pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.f05a0382.js rename to pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.6c903a9e.js index d02cc34b1..d41af503d 100644 --- a/pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.f05a0382.js +++ b/pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.6c903a9e.js @@ -1,2 +1,2 @@ -import{_ as i}from"./chunks/rollkit-bitcoin-1.019c5d05.js";import{_ as e,o as a,c as n,X as l,k as t,a as o}from"./chunks/framework.adc83686.js";const r="/docs-preview/pr-339/bitcoin-rollkit/rollkit-bitcoin.png",s="/docs-preview/pr-339/bitcoin-rollkit/rollkit-bitcoin-2.png",x=JSON.parse('{"title":"Sovereign rollups on Bitcoin with Rollkit","description":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it.","frontmatter":{"head":[["meta",{"name":"title","content":"Sovereign rollups on Bitcoin with Rollkit"}],["meta",{"name":"description","content":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it."}],["meta",{"name":"keywords","content":"Rollkit, Celestia"}],["meta",{"name":"og:image","content":"/introducing-rollkit/rollkit-blog-cover.png"}],["meta",{"name":"og:title","content":"Sovereign rollups on Bitcoin with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/sovereign-rollups-on-bitcoin.md","filePath":"blog/sovereign-rollups-on-bitcoin.md","lastUpdated":1713200494000}'),c={name:"blog/sovereign-rollups-on-bitcoin.md"},d=l('

Sovereign rollups on Bitcoin with Rollkit

By Rollkit

rollkit-bitcoinOriginally published on 5 March 2023

Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. An early research implementation allows Rollkit rollups to use Bitcoin for data availability.

Rollkit is opening the door for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and re-org resistance. With the new integration it is now possible to run the EVM on Bitcoin as a Rollkit sovereign rollup. Sovereign rollups on Bitcoin not only expand the possibilities for rollups, but also have the potential to help bootstrap a healthy blockspace fee market on Bitcoin, enabling a more sustainable security budget.

Tl;dr

Posting data on Bitcoin with Taproot

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

Bitcoin NFTs use Taproot witnesses to inscribe arbitrary data, enabled by Bitcoin's Taproot upgrade. Taproot witnesses provide a slightly better payload-to-data ratio than SegWit transactions. A standard transaction can include up to around 390kB of arbitrary data while still passing through the public mempool. A non-standard transaction, included by a miner directly without passing through the mempool, can include close to 4MB of arbitrary data. In short, with SegWit, it became viable to post big blobs of data to the Bitcoin blockchain.

Since then, the usage of Ordinals for NFT inscriptions and Taproot utilization has kicked off. Eric Wall found that at the time of his tweet, posting data on Bitcoin was 7x cheaper than Ethereum. Now that there are thousands of inscriptions on Bitcoin, it has become clear that sovereign rollups and an ecosystem of dapps on Bitcoin could become a reality. The missing piece: a rollup framework for easily integrating 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 plug-in custom execution layers and data availability layers. Initially, Rollkit only supported Celestia as an option for data availability and consensus. Now, Bitcoin is an option, thanks to an early research implementation of a Bitcoin data availability module for Rollkit. In this case, sovereign rollups manage their own execution and settlement while offloading consensus and data availability to Bitcoin.

rollkit-bitcoin-rollup

How Rollkit posts data to Bitcoin

To write and read data on Bitcoin, we make use of Taproot transactions. To facilitate this, we implemented a Go package called bitcoin-da that provides a reader/writer interface to Bitcoin. For details of how the interface works and how it uses Taproot, see the specs. The package can be re-used by any project that wants to read or write data on Bitcoin.

Rollkit was built with modularity at its core. It has a data availability interface so that developers can simply implement specific methods to add a new data availability layer. 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 blocks can be synced. These interfaces live in the da package. The most important methods in these interfaces are SubmitBlock and RetrieveBlock for reading and writing the blocks.

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

rollkit-bitcoin-rollup-2

EVM on Bitcoin demo

Rollkit supports custom execution layers, including EVM, CosmWasm, or the Cosmos SDK. To test the integration, we used Rollkit to run the EVM (using Ethermint) as a sovereign rollup on a local Bitcoin test network. See below for a demo.

',21),h=t("iframe",{title:"Rollkit: Ethermint + Bitcoin DA demo",src:"https://www.youtube.com/embed/qBKFEctzgT0",allowfullscreen:""},` +import{_ as i}from"./chunks/rollkit-bitcoin-1.019c5d05.js";import{_ as e,o as a,c as n,X as l,k as t,a as o}from"./chunks/framework.adc83686.js";const r="/docs-preview/pr-339/bitcoin-rollkit/rollkit-bitcoin.png",s="/docs-preview/pr-339/bitcoin-rollkit/rollkit-bitcoin-2.png",x=JSON.parse('{"title":"Sovereign rollups on Bitcoin with Rollkit","description":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it.","frontmatter":{"head":[["meta",{"name":"title","content":"Sovereign rollups on Bitcoin with Rollkit"}],["meta",{"name":"description","content":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it."}],["meta",{"name":"keywords","content":"Rollkit, Celestia"}],["meta",{"name":"og:image","content":"/introducing-rollkit/rollkit-blog-cover.png"}],["meta",{"name":"og:title","content":"Sovereign rollups on Bitcoin with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/sovereign-rollups-on-bitcoin.md","filePath":"blog/sovereign-rollups-on-bitcoin.md","lastUpdated":1713275863000}'),c={name:"blog/sovereign-rollups-on-bitcoin.md"},d=l('

Sovereign rollups on Bitcoin with Rollkit

By Rollkit

rollkit-bitcoinOriginally published on 5 March 2023

Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. An early research implementation allows Rollkit rollups to use Bitcoin for data availability.

Rollkit is opening the door for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and re-org resistance. With the new integration it is now possible to run the EVM on Bitcoin as a Rollkit sovereign rollup. Sovereign rollups on Bitcoin not only expand the possibilities for rollups, but also have the potential to help bootstrap a healthy blockspace fee market on Bitcoin, enabling a more sustainable security budget.

Tl;dr

Posting data on Bitcoin with Taproot

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

Bitcoin NFTs use Taproot witnesses to inscribe arbitrary data, enabled by Bitcoin's Taproot upgrade. Taproot witnesses provide a slightly better payload-to-data ratio than SegWit transactions. A standard transaction can include up to around 390kB of arbitrary data while still passing through the public mempool. A non-standard transaction, included by a miner directly without passing through the mempool, can include close to 4MB of arbitrary data. In short, with SegWit, it became viable to post big blobs of data to the Bitcoin blockchain.

Since then, the usage of Ordinals for NFT inscriptions and Taproot utilization has kicked off. Eric Wall found that at the time of his tweet, posting data on Bitcoin was 7x cheaper than Ethereum. Now that there are thousands of inscriptions on Bitcoin, it has become clear that sovereign rollups and an ecosystem of dapps on Bitcoin could become a reality. The missing piece: a rollup framework for easily integrating 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 plug-in custom execution layers and data availability layers. Initially, Rollkit only supported Celestia as an option for data availability and consensus. Now, Bitcoin is an option, thanks to an early research implementation of a Bitcoin data availability module for Rollkit. In this case, sovereign rollups manage their own execution and settlement while offloading consensus and data availability to Bitcoin.

rollkit-bitcoin-rollup

How Rollkit posts data to Bitcoin

To write and read data on Bitcoin, we make use of Taproot transactions. To facilitate this, we implemented a Go package called bitcoin-da that provides a reader/writer interface to Bitcoin. For details of how the interface works and how it uses Taproot, see the specs. The package can be re-used by any project that wants to read or write data on Bitcoin.

Rollkit was built with modularity at its core. It has a data availability interface so that developers can simply implement specific methods to add a new data availability layer. 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 blocks can be synced. These interfaces live in the da package. The most important methods in these interfaces are SubmitBlock and RetrieveBlock for reading and writing the blocks.

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

rollkit-bitcoin-rollup-2

EVM on Bitcoin demo

Rollkit supports custom execution layers, including EVM, CosmWasm, or the Cosmos SDK. To test the integration, we used Rollkit to run the EVM (using Ethermint) as a sovereign rollup on a local Bitcoin test network. See below for a demo.

',21),h=t("iframe",{title:"Rollkit: Ethermint + Bitcoin DA demo",src:"https://www.youtube.com/embed/qBKFEctzgT0",allowfullscreen:""},` `,-1),p=t("h2",{id:"conclusion",tabindex:"-1"},[o("Conclusion "),t("a",{class:"header-anchor",href:"#conclusion","aria-label":'Permalink to "Conclusion"'},"​")],-1),u=t("p",null,[o("As we move towards a future where sovereign communities will form around different applications, asking them to incur the high cost and overhead of deploying a layer 1 blockchain to be sovereign is not sustainable. "),t("a",{href:"https://blog.celestia.org/sovereign-rollup-chains/",target:"_blank",rel:"noreferrer"},"Sovereign rollups"),o(" fix this by making it possible to deploy a sovereign chain that inherits the data availability and consensus of another layer 1 chain such as Bitcoin.")],-1),m=t("p",null,[o("Our goal with Rollkit is to make it easy to build and customize rollups. We invite you to play around 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, see the instructions "),t("a",{href:"/docs-preview/pr-339/docs/tutorials/bitcoin"},"here"),o(". Keep in mind that the integration is an early research implementation and it is not yet production-ready!")],-1),b=t("p",null,"Modularism, not maximalism.",-1),g=[d,h,p,u,m,b];function f(k,w,y,v,B,_){return a(),n("div",null,g)}const S=e(c,[["render",f]]);export{x as __pageData,S as default}; diff --git a/pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.f05a0382.lean.js b/pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.6c903a9e.lean.js similarity index 97% rename from pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.f05a0382.lean.js rename to pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.6c903a9e.lean.js index 8845d0517..5e148af1d 100644 --- a/pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.f05a0382.lean.js +++ b/pr-339/assets/blog_sovereign-rollups-on-bitcoin.md.6c903a9e.lean.js @@ -1,2 +1,2 @@ -import{_ as i}from"./chunks/rollkit-bitcoin-1.019c5d05.js";import{_ as e,o as a,c as n,X as l,k as t,a as o}from"./chunks/framework.adc83686.js";const r="/docs-preview/pr-339/bitcoin-rollkit/rollkit-bitcoin.png",s="/docs-preview/pr-339/bitcoin-rollkit/rollkit-bitcoin-2.png",x=JSON.parse('{"title":"Sovereign rollups on Bitcoin with Rollkit","description":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it.","frontmatter":{"head":[["meta",{"name":"title","content":"Sovereign rollups on Bitcoin with Rollkit"}],["meta",{"name":"description","content":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it."}],["meta",{"name":"keywords","content":"Rollkit, Celestia"}],["meta",{"name":"og:image","content":"/introducing-rollkit/rollkit-blog-cover.png"}],["meta",{"name":"og:title","content":"Sovereign rollups on Bitcoin with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/sovereign-rollups-on-bitcoin.md","filePath":"blog/sovereign-rollups-on-bitcoin.md","lastUpdated":1713200494000}'),c={name:"blog/sovereign-rollups-on-bitcoin.md"},d=l("",21),h=t("iframe",{title:"Rollkit: Ethermint + Bitcoin DA demo",src:"https://www.youtube.com/embed/qBKFEctzgT0",allowfullscreen:""},` +import{_ as i}from"./chunks/rollkit-bitcoin-1.019c5d05.js";import{_ as e,o as a,c as n,X as l,k as t,a as o}from"./chunks/framework.adc83686.js";const r="/docs-preview/pr-339/bitcoin-rollkit/rollkit-bitcoin.png",s="/docs-preview/pr-339/bitcoin-rollkit/rollkit-bitcoin-2.png",x=JSON.parse('{"title":"Sovereign rollups on Bitcoin with Rollkit","description":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it.","frontmatter":{"head":[["meta",{"name":"title","content":"Sovereign rollups on Bitcoin with Rollkit"}],["meta",{"name":"description","content":"Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. This allows Rollkit rollups to use Bitcoin for data availability. The implementation is in alpha, but we invite curious developers to experiment with it."}],["meta",{"name":"keywords","content":"Rollkit, Celestia"}],["meta",{"name":"og:image","content":"/introducing-rollkit/rollkit-blog-cover.png"}],["meta",{"name":"og:title","content":"Sovereign rollups on Bitcoin with Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"blog/sovereign-rollups-on-bitcoin.md","filePath":"blog/sovereign-rollups-on-bitcoin.md","lastUpdated":1713275863000}'),c={name:"blog/sovereign-rollups-on-bitcoin.md"},d=l("",21),h=t("iframe",{title:"Rollkit: Ethermint + Bitcoin DA demo",src:"https://www.youtube.com/embed/qBKFEctzgT0",allowfullscreen:""},` `,-1),p=t("h2",{id:"conclusion",tabindex:"-1"},[o("Conclusion "),t("a",{class:"header-anchor",href:"#conclusion","aria-label":'Permalink to "Conclusion"'},"​")],-1),u=t("p",null,[o("As we move towards a future where sovereign communities will form around different applications, asking them to incur the high cost and overhead of deploying a layer 1 blockchain to be sovereign is not sustainable. "),t("a",{href:"https://blog.celestia.org/sovereign-rollup-chains/",target:"_blank",rel:"noreferrer"},"Sovereign rollups"),o(" fix this by making it possible to deploy a sovereign chain that inherits the data availability and consensus of another layer 1 chain such as Bitcoin.")],-1),m=t("p",null,[o("Our goal with Rollkit is to make it easy to build and customize rollups. We invite you to play around 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, see the instructions "),t("a",{href:"/docs-preview/pr-339/docs/tutorials/bitcoin"},"here"),o(". Keep in mind that the integration is an early research implementation and it is not yet production-ready!")],-1),b=t("p",null,"Modularism, not maximalism.",-1),g=[d,h,p,u,m,b];function f(k,w,y,v,B,_){return a(),n("div",null,g)}const S=e(c,[["render",f]]);export{x as __pageData,S as default}; diff --git a/pr-339/assets/index.md.d43e98c4.js b/pr-339/assets/index.md.f6249348.js similarity index 96% rename from pr-339/assets/index.md.d43e98c4.js rename to pr-339/assets/index.md.f6249348.js index 29dcb0aa0..1e81770eb 100644 --- a/pr-339/assets/index.md.d43e98c4.js +++ b/pr-339/assets/index.md.f6249348.js @@ -1 +1 @@ -import{_ as e,o as t,c as o}from"./chunks/framework.adc83686.js";const m=JSON.parse('{"title":"","titleTemplate":":title","description":"","frontmatter":{"layout":"home","titleTemplate":":title","hero":{"name":"Rollkit","text":"The first sovereign rollup framework","tagline":"Rollkit utilizes the shared security of a modular data availability network to allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract","image":{"src":"/logo-big.svg","alt":"Rollkit"},"actions":[{"theme":"brand","text":"Starter Rollup","link":"/tutorials/gm-world"},{"theme":"alt","text":"Introduction","link":"/learn/intro"}]},"features":[{"title":"Build with the Best","details":"Utilize all the existing powerful tooling in the Cosmos ecosystem including IBC, ABCI++, and CometBFT RPC equivalency.","link":"/learn/about#why-rollkit","icon":"✨"},{"title":"Optimize for your needs","details":"Take full advantage of modularity by optimizing your rollup to your needs. Tailor your block production. Choose your VM. Pick your DA layer.","link":"/learn/stack","icon":"⚙️"},{"title":"Take Control","details":"Retain the ability to upgrade via hard forks. Break free of offchain councils holding upgrade keys. Allow your community to be sovereign.","link":"/learn/intro","icon":"🎮"}],"head":[["meta",{"name":"og:title","content":"Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1713200494000}'),i={name:"index.md"};function a(l,n,r,s,c,d){return t(),o("div")}const h=e(i,[["render",a]]);export{m as __pageData,h as default}; +import{_ as e,o as t,c as o}from"./chunks/framework.adc83686.js";const m=JSON.parse('{"title":"","titleTemplate":":title","description":"","frontmatter":{"layout":"home","titleTemplate":":title","hero":{"name":"Rollkit","text":"The first sovereign rollup framework","tagline":"Rollkit utilizes the shared security of a modular data availability network to allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract","image":{"src":"/logo-big.svg","alt":"Rollkit"},"actions":[{"theme":"brand","text":"Starter Rollup","link":"/tutorials/gm-world"},{"theme":"alt","text":"Introduction","link":"/learn/intro"}]},"features":[{"title":"Build with the Best","details":"Utilize all the existing powerful tooling in the Cosmos ecosystem including IBC, ABCI++, and CometBFT RPC equivalency.","link":"/learn/about#why-rollkit","icon":"✨"},{"title":"Optimize for your needs","details":"Take full advantage of modularity by optimizing your rollup to your needs. Tailor your block production. Choose your VM. Pick your DA layer.","link":"/learn/stack","icon":"⚙️"},{"title":"Take Control","details":"Retain the ability to upgrade via hard forks. Break free of offchain councils holding upgrade keys. Allow your community to be sovereign.","link":"/learn/intro","icon":"🎮"}],"head":[["meta",{"name":"og:title","content":"Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1713275863000}'),i={name:"index.md"};function a(l,n,r,s,c,d){return t(),o("div")}const h=e(i,[["render",a]]);export{m as __pageData,h as default}; diff --git a/pr-339/assets/index.md.d43e98c4.lean.js b/pr-339/assets/index.md.f6249348.lean.js similarity index 96% rename from pr-339/assets/index.md.d43e98c4.lean.js rename to pr-339/assets/index.md.f6249348.lean.js index 29dcb0aa0..1e81770eb 100644 --- a/pr-339/assets/index.md.d43e98c4.lean.js +++ b/pr-339/assets/index.md.f6249348.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as o}from"./chunks/framework.adc83686.js";const m=JSON.parse('{"title":"","titleTemplate":":title","description":"","frontmatter":{"layout":"home","titleTemplate":":title","hero":{"name":"Rollkit","text":"The first sovereign rollup framework","tagline":"Rollkit utilizes the shared security of a modular data availability network to allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract","image":{"src":"/logo-big.svg","alt":"Rollkit"},"actions":[{"theme":"brand","text":"Starter Rollup","link":"/tutorials/gm-world"},{"theme":"alt","text":"Introduction","link":"/learn/intro"}]},"features":[{"title":"Build with the Best","details":"Utilize all the existing powerful tooling in the Cosmos ecosystem including IBC, ABCI++, and CometBFT RPC equivalency.","link":"/learn/about#why-rollkit","icon":"✨"},{"title":"Optimize for your needs","details":"Take full advantage of modularity by optimizing your rollup to your needs. Tailor your block production. Choose your VM. Pick your DA layer.","link":"/learn/stack","icon":"⚙️"},{"title":"Take Control","details":"Retain the ability to upgrade via hard forks. Break free of offchain councils holding upgrade keys. Allow your community to be sovereign.","link":"/learn/intro","icon":"🎮"}],"head":[["meta",{"name":"og:title","content":"Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1713200494000}'),i={name:"index.md"};function a(l,n,r,s,c,d){return t(),o("div")}const h=e(i,[["render",a]]);export{m as __pageData,h as default}; +import{_ as e,o as t,c as o}from"./chunks/framework.adc83686.js";const m=JSON.parse('{"title":"","titleTemplate":":title","description":"","frontmatter":{"layout":"home","titleTemplate":":title","hero":{"name":"Rollkit","text":"The first sovereign rollup framework","tagline":"Rollkit utilizes the shared security of a modular data availability network to allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract","image":{"src":"/logo-big.svg","alt":"Rollkit"},"actions":[{"theme":"brand","text":"Starter Rollup","link":"/tutorials/gm-world"},{"theme":"alt","text":"Introduction","link":"/learn/intro"}]},"features":[{"title":"Build with the Best","details":"Utilize all the existing powerful tooling in the Cosmos ecosystem including IBC, ABCI++, and CometBFT RPC equivalency.","link":"/learn/about#why-rollkit","icon":"✨"},{"title":"Optimize for your needs","details":"Take full advantage of modularity by optimizing your rollup to your needs. Tailor your block production. Choose your VM. Pick your DA layer.","link":"/learn/stack","icon":"⚙️"},{"title":"Take Control","details":"Retain the ability to upgrade via hard forks. Break free of offchain councils holding upgrade keys. Allow your community to be sovereign.","link":"/learn/intro","icon":"🎮"}],"head":[["meta",{"name":"og:title","content":"Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1713275863000}'),i={name:"index.md"};function a(l,n,r,s,c,d){return t(),o("div")}const h=e(i,[["render",a]]);export{m as __pageData,h as default}; diff --git a/pr-339/assets/learn_about.md.2153449a.js b/pr-339/assets/learn_about.md.5ca41336.js similarity index 99% rename from pr-339/assets/learn_about.md.2153449a.js rename to pr-339/assets/learn_about.md.5ca41336.js index 8ebe88645..c0a9152a1 100644 --- a/pr-339/assets/learn_about.md.2153449a.js +++ b/pr-339/assets/learn_about.md.5ca41336.js @@ -1 +1 @@ -import{_ as e,o as t,c as a,X as o}from"./chunks/framework.adc83686.js";const y=JSON.parse('{"title":"About Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"About Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/about.md","filePath":"learn/about.md","lastUpdated":1713200494000}'),i={name:"learn/about.md"},l=o('

About Rollkit

Our mission is allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

TIP

In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

If you're familiar with Rollkit, you may want to skip to the tutorials section.

What is Rollkit?

Rollkit is a sovereign rollup framework that gives developers the freedom to deploy rollups throughout the modular stack, opening new possibilities for rapid experimentation and innovation.

The Rollkit framework features a modular node that can run rollups and exposes an ABCI-compatible client interface, which can be used as a substitute for CometBFT in any ABCI-compatible blockchain application. By default, the node utilizes Celestia as the data availability (DA) layer, however other data availability layers can be integrated.

Rollkit can currently be used to deploy sovereign rollups or sovereign settlement layers.

Rollkit is built as an open-source framework, so that developers can easily modify it to suit their applications.

Our goal is to empower developers to quickly innovate and create new classes of rollups with minimal trade-offs, and to make deploying a new chain as easy as deploying a smart contract.

What problems is Rollkit solving?

1. Scalability and customizability

Deploying your decentralized application as a smart contract on a shared blockchain has many limitations. Your smart contract has to share computational resources with every other application, so scalability is limited.

Plus, you're restricted to the execution environment that the shared blockchain uses, so developer flexibility is limited.

2. Security and time to market

Deploying a new chain might sound like the perfect solution for the problems listed above. While it's somewhat true, deploying a new layer 1 chain presents a complex set of challenges and trade-offs for developers looking to build blockchain products.

Deploying a new layer 1 requires significant resources, including time, capital, and expertise, which can be a barrier to entry for some developers.

In order to secure the network, developers must bootstrap a sufficiently secure set of validators, incurring the overhead of managing a full consensus network. This requires paying validators with inflationary tokens, putting the business sustainability of the network at risk. A strong community and network effect are also critical for success, but can be challenging to achieve as the network must gain widespread adoption to be secure and valuable.

In a potential future with millions of chains, it's unlikely all of those chains will be able to sustainably attract a sufficiently secure and decentralized validator set.

Why Rollkit?

Rollkit solves the challenges encountered during the deployment of a smart contract or a new layer 1, by minimizing these tradeoffs through the implementation of rollup chains (rollups).

With Rollkit, developers can benefit from:

How can you use Rollkit?

As briefly mentioned above, Rollkit could be used in many different ways. From sovereign rollups, to settlement layers, and in the future even to L3s.

Rollup with any execution environment

Rollkit gives developers the flexibility to use pre-existing ABCI-compatible state machines or create a custom state machine tailored to their rollup needs. Rollkit does not restrict the use of any specific virtual machine, allowing developers to experiment and bring innovative applications to life.

Sovereign rollup with Cosmos SDK

Similarly to how developers utilize the Cosmos SDK to build a sovereign layer 1 chain, the Cosmos SDK could be utilized to create a Rollkit-compatible rollup chain. Cosmos-SDK has great documentation and tooling that developers can leverage to learn.

Another possibility is taking an existing layer 1 built with the Cosmos SDK and deploying it as a Rollkit rollup. This can provide a great opportunity for experimentation and growth.

Build a settlement layer

Settlement layers are ideal for developers who want to avoid deploying sovereign rollups. They provide a platform for rollups to verify proofs and resolve disputes. Additionally, they act as a hub for rollups to facilitate trust-minimized token transfers and liquidity sharing between rollups that share the same settlement layer. Think of settlement layers as a special type of execution layer.

When can you use Rollkit?

As of today, Rollkit is still in the MVP stages. The framework currently provides a centralized sequencer, an execution interface (ABCI or Cosmos SDK), and a connection to a data availability layer (Celestia).

We're currently working on implementing many new and exciting features such as light nodes and state fraud proofs.

Head down to the next section (Rollkit stack) to learn more about what's coming for Rollkit. If you're ready to start building, you can skip to the Tutorials section.

Spoiler alert, whichever you choose, it's going to be a great rabbit hole!

',36),r=[l];function s(n,c,h,u,d,p){return t(),a("div",null,r)}const b=e(i,[["render",s]]);export{y as __pageData,b as default}; +import{_ as e,o as t,c as a,X as o}from"./chunks/framework.adc83686.js";const y=JSON.parse('{"title":"About Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"About Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/about.md","filePath":"learn/about.md","lastUpdated":1713275863000}'),i={name:"learn/about.md"},l=o('

About Rollkit

Our mission is allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

TIP

In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

If you're familiar with Rollkit, you may want to skip to the tutorials section.

What is Rollkit?

Rollkit is a sovereign rollup framework that gives developers the freedom to deploy rollups throughout the modular stack, opening new possibilities for rapid experimentation and innovation.

The Rollkit framework features a modular node that can run rollups and exposes an ABCI-compatible client interface, which can be used as a substitute for CometBFT in any ABCI-compatible blockchain application. By default, the node utilizes Celestia as the data availability (DA) layer, however other data availability layers can be integrated.

Rollkit can currently be used to deploy sovereign rollups or sovereign settlement layers.

Rollkit is built as an open-source framework, so that developers can easily modify it to suit their applications.

Our goal is to empower developers to quickly innovate and create new classes of rollups with minimal trade-offs, and to make deploying a new chain as easy as deploying a smart contract.

What problems is Rollkit solving?

1. Scalability and customizability

Deploying your decentralized application as a smart contract on a shared blockchain has many limitations. Your smart contract has to share computational resources with every other application, so scalability is limited.

Plus, you're restricted to the execution environment that the shared blockchain uses, so developer flexibility is limited.

2. Security and time to market

Deploying a new chain might sound like the perfect solution for the problems listed above. While it's somewhat true, deploying a new layer 1 chain presents a complex set of challenges and trade-offs for developers looking to build blockchain products.

Deploying a new layer 1 requires significant resources, including time, capital, and expertise, which can be a barrier to entry for some developers.

In order to secure the network, developers must bootstrap a sufficiently secure set of validators, incurring the overhead of managing a full consensus network. This requires paying validators with inflationary tokens, putting the business sustainability of the network at risk. A strong community and network effect are also critical for success, but can be challenging to achieve as the network must gain widespread adoption to be secure and valuable.

In a potential future with millions of chains, it's unlikely all of those chains will be able to sustainably attract a sufficiently secure and decentralized validator set.

Why Rollkit?

Rollkit solves the challenges encountered during the deployment of a smart contract or a new layer 1, by minimizing these tradeoffs through the implementation of rollup chains (rollups).

With Rollkit, developers can benefit from:

How can you use Rollkit?

As briefly mentioned above, Rollkit could be used in many different ways. From sovereign rollups, to settlement layers, and in the future even to L3s.

Rollup with any execution environment

Rollkit gives developers the flexibility to use pre-existing ABCI-compatible state machines or create a custom state machine tailored to their rollup needs. Rollkit does not restrict the use of any specific virtual machine, allowing developers to experiment and bring innovative applications to life.

Sovereign rollup with Cosmos SDK

Similarly to how developers utilize the Cosmos SDK to build a sovereign layer 1 chain, the Cosmos SDK could be utilized to create a Rollkit-compatible rollup chain. Cosmos-SDK has great documentation and tooling that developers can leverage to learn.

Another possibility is taking an existing layer 1 built with the Cosmos SDK and deploying it as a Rollkit rollup. This can provide a great opportunity for experimentation and growth.

Build a settlement layer

Settlement layers are ideal for developers who want to avoid deploying sovereign rollups. They provide a platform for rollups to verify proofs and resolve disputes. Additionally, they act as a hub for rollups to facilitate trust-minimized token transfers and liquidity sharing between rollups that share the same settlement layer. Think of settlement layers as a special type of execution layer.

When can you use Rollkit?

As of today, Rollkit is still in the MVP stages. The framework currently provides a centralized sequencer, an execution interface (ABCI or Cosmos SDK), and a connection to a data availability layer (Celestia).

We're currently working on implementing many new and exciting features such as light nodes and state fraud proofs.

Head down to the next section (Rollkit stack) to learn more about what's coming for Rollkit. If you're ready to start building, you can skip to the Tutorials section.

Spoiler alert, whichever you choose, it's going to be a great rabbit hole!

',36),r=[l];function s(n,c,h,u,d,p){return t(),a("div",null,r)}const b=e(i,[["render",s]]);export{y as __pageData,b as default}; diff --git a/pr-339/assets/learn_about.md.2153449a.lean.js b/pr-339/assets/learn_about.md.5ca41336.lean.js similarity index 87% rename from pr-339/assets/learn_about.md.2153449a.lean.js rename to pr-339/assets/learn_about.md.5ca41336.lean.js index ed5d0c517..467135424 100644 --- a/pr-339/assets/learn_about.md.2153449a.lean.js +++ b/pr-339/assets/learn_about.md.5ca41336.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a,X as o}from"./chunks/framework.adc83686.js";const y=JSON.parse('{"title":"About Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"About Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/about.md","filePath":"learn/about.md","lastUpdated":1713200494000}'),i={name:"learn/about.md"},l=o("",36),r=[l];function s(n,c,h,u,d,p){return t(),a("div",null,r)}const b=e(i,[["render",s]]);export{y as __pageData,b as default}; +import{_ as e,o as t,c as a,X as o}from"./chunks/framework.adc83686.js";const y=JSON.parse('{"title":"About Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"About Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/about.md","filePath":"learn/about.md","lastUpdated":1713275863000}'),i={name:"learn/about.md"},l=o("",36),r=[l];function s(n,c,h,u,d,p){return t(),a("div",null,r)}const b=e(i,[["render",s]]);export{y as __pageData,b as default}; diff --git a/pr-339/assets/learn_based-pessimistic-rollup.md.d84bcc21.js b/pr-339/assets/learn_based-pessimistic-rollup.md.d5fe808d.js similarity index 98% rename from pr-339/assets/learn_based-pessimistic-rollup.md.d84bcc21.js rename to pr-339/assets/learn_based-pessimistic-rollup.md.d5fe808d.js index bf1ff119c..cd4f1d3cc 100644 --- a/pr-339/assets/learn_based-pessimistic-rollup.md.d84bcc21.js +++ b/pr-339/assets/learn_based-pessimistic-rollup.md.d5fe808d.js @@ -1 +1 @@ -import{_ as o,K as r,o as e,c as i,b as l,w as a,a5 as n,X as t,O as d,a as h}from"./chunks/framework.adc83686.js";const B=JSON.parse('{"title":"Basic Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Basic Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/based-pessimistic-rollup.md","filePath":"learn/based-pessimistic-rollup.md","lastUpdated":1713200494000}'),c={name:"learn/based-pessimistic-rollup.md"},p=t('

Basic Rollup

Description

The simplest way to build a Rollup. You delegate Aggregation to the DA-Layer. Every Rollup node has to replay all the transactions in the rollup in order to check and update to the newest state.

Design

Here is an example of what this design could look like:

',5),u=t('

Aggregation

The DA-Layer is the Aggregator. It does Inclusion and Ordering.

Header Production

Each Full Node has to execute all transactions. There are no Light Nodes in this system so there is no need to produce a rollup header.

Censorship Resistance

Based rollups enjoy the same censorship resistance as the DA-Layer.

Liveness

Based rollups enjoys the same liveness guarantees as the DA-Layer (Based Rollups).

Rollup Light Nodes

This design has no Rollup Light Nodes.

Smallest Trust-Minimized Setup

DA-Layer Light Node + Rollup Full Node

',12);function m(_,g,A,b,f,T){const s=r("Mermaid");return e(),i("div",null,[p,(e(),l(n,null,{default:a(()=>[d(s,{id:"mermaid-15",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%0A%20%20T%20--%3E%20A%5B%22DA%20Layer%22%5D%0A%20%20%0A%20%20A%20--%3E%20B%5B%22Ordered%20Batch%22%5D%0A%20%20B%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20A%20stroke%3AcurrentColor%2C%20fill%3A%20%2387CEFA%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A"})]),fallback:a(()=>[h(" Loading... ")]),_:1})),u])}const q=o(c,[["render",m]]);export{B as __pageData,q as default}; +import{_ as o,K as r,o as e,c as i,b as l,w as a,a5 as n,X as t,O as d,a as h}from"./chunks/framework.adc83686.js";const B=JSON.parse('{"title":"Basic Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Basic Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/based-pessimistic-rollup.md","filePath":"learn/based-pessimistic-rollup.md","lastUpdated":1713275863000}'),c={name:"learn/based-pessimistic-rollup.md"},p=t('

Basic Rollup

Description

The simplest way to build a Rollup. You delegate Aggregation to the DA-Layer. Every Rollup node has to replay all the transactions in the rollup in order to check and update to the newest state.

Design

Here is an example of what this design could look like:

',5),u=t('

Aggregation

The DA-Layer is the Aggregator. It does Inclusion and Ordering.

Header Production

Each Full Node has to execute all transactions. There are no Light Nodes in this system so there is no need to produce a rollup header.

Censorship Resistance

Based rollups enjoy the same censorship resistance as the DA-Layer.

Liveness

Based rollups enjoys the same liveness guarantees as the DA-Layer (Based Rollups).

Rollup Light Nodes

This design has no Rollup Light Nodes.

Smallest Trust-Minimized Setup

DA-Layer Light Node + Rollup Full Node

',12);function m(_,g,A,b,f,T){const s=r("Mermaid");return e(),i("div",null,[p,(e(),l(n,null,{default:a(()=>[d(s,{id:"mermaid-15",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%0A%20%20T%20--%3E%20A%5B%22DA%20Layer%22%5D%0A%20%20%0A%20%20A%20--%3E%20B%5B%22Ordered%20Batch%22%5D%0A%20%20B%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20A%20stroke%3AcurrentColor%2C%20fill%3A%20%2387CEFA%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A"})]),fallback:a(()=>[h(" Loading... ")]),_:1})),u])}const q=o(c,[["render",m]]);export{B as __pageData,q as default}; diff --git a/pr-339/assets/learn_based-pessimistic-rollup.md.d84bcc21.lean.js b/pr-339/assets/learn_based-pessimistic-rollup.md.d5fe808d.lean.js similarity index 94% rename from pr-339/assets/learn_based-pessimistic-rollup.md.d84bcc21.lean.js rename to pr-339/assets/learn_based-pessimistic-rollup.md.d5fe808d.lean.js index 866beee86..e56ae8034 100644 --- a/pr-339/assets/learn_based-pessimistic-rollup.md.d84bcc21.lean.js +++ b/pr-339/assets/learn_based-pessimistic-rollup.md.d5fe808d.lean.js @@ -1 +1 @@ -import{_ as o,K as r,o as e,c as i,b as l,w as a,a5 as n,X as t,O as d,a as h}from"./chunks/framework.adc83686.js";const B=JSON.parse('{"title":"Basic Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Basic Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/based-pessimistic-rollup.md","filePath":"learn/based-pessimistic-rollup.md","lastUpdated":1713200494000}'),c={name:"learn/based-pessimistic-rollup.md"},p=t("",5),u=t("",12);function m(_,g,A,b,f,T){const s=r("Mermaid");return e(),i("div",null,[p,(e(),l(n,null,{default:a(()=>[d(s,{id:"mermaid-15",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%0A%20%20T%20--%3E%20A%5B%22DA%20Layer%22%5D%0A%20%20%0A%20%20A%20--%3E%20B%5B%22Ordered%20Batch%22%5D%0A%20%20B%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20A%20stroke%3AcurrentColor%2C%20fill%3A%20%2387CEFA%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A"})]),fallback:a(()=>[h(" Loading... ")]),_:1})),u])}const q=o(c,[["render",m]]);export{B as __pageData,q as default}; +import{_ as o,K as r,o as e,c as i,b as l,w as a,a5 as n,X as t,O as d,a as h}from"./chunks/framework.adc83686.js";const B=JSON.parse('{"title":"Basic Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Basic Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/based-pessimistic-rollup.md","filePath":"learn/based-pessimistic-rollup.md","lastUpdated":1713275863000}'),c={name:"learn/based-pessimistic-rollup.md"},p=t("",5),u=t("",12);function m(_,g,A,b,f,T){const s=r("Mermaid");return e(),i("div",null,[p,(e(),l(n,null,{default:a(()=>[d(s,{id:"mermaid-15",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%0A%20%20T%20--%3E%20A%5B%22DA%20Layer%22%5D%0A%20%20%0A%20%20A%20--%3E%20B%5B%22Ordered%20Batch%22%5D%0A%20%20B%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20A%20stroke%3AcurrentColor%2C%20fill%3A%20%2387CEFA%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A"})]),fallback:a(()=>[h(" Loading... ")]),_:1})),u])}const q=o(c,[["render",m]]);export{B as __pageData,q as default}; diff --git a/pr-339/assets/learn_basic-rollup.md.aeb9f27e.js b/pr-339/assets/learn_basic-rollup.md.2a964152.js similarity index 98% rename from pr-339/assets/learn_basic-rollup.md.aeb9f27e.js rename to pr-339/assets/learn_basic-rollup.md.2a964152.js index 02d2fe2c3..ec838d86e 100644 --- a/pr-339/assets/learn_basic-rollup.md.aeb9f27e.js +++ b/pr-339/assets/learn_basic-rollup.md.2a964152.js @@ -1 +1 @@ -import{_ as o,K as i,o as e,c as l,b as s,w as a,a5 as n,X as t,O as c,a as d}from"./chunks/framework.adc83686.js";const D=JSON.parse('{"title":"Basic Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Basic Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/basic-rollup.md","filePath":"learn/basic-rollup.md","lastUpdated":1713200494000}'),h={name:"learn/basic-rollup.md"},u=t('

Basic Rollup

Description

The User submits a transaction to the Aggregator. After Aggregation, the Rollup Full Node can use the Batch and apply the changes to the state.

During the Header Production, the Header is generated with some security grantees. The Rollup Light Node can consume the Header and validate those security guarantees.

Diagram

Here is an example of what this design could look like:

',6),p=t('

Aggregation

TBD

Header Production

TBD

Censorship Resistance

TBD

Liveness

TBD

Rollup Light Nodes

TBD

Smallest Trust-Minimized Setup

TBD

',12);function m(A,g,_,B,b,f){const r=i("Mermaid");return e(),l("div",null,[u,(e(),s(n,null,{default:a(()=>[c(r,{id:"mermaid-18",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%0A%20%20T%20--%3E%20A%5B%22Aggregator%22%5D%0A%20%20%0A%20%20A%20--%3E%20B%5B%22Batch%22%5D%0A%20%20B%20--%3E%20HP%5B%22Header%20Producer%22%5D%0A%20%20B%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%20%20%0A%20%20HP%20--%3E%20H%5B%22Header%2B%22%5D%0A%20%20H%20--%3E%20LN%5B%22Rollup%20Light%20Node%22%5D%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A%20%20style%20LN%20stroke%3AcurrentColor%2C%20fill%3A%23D8BFD8%0A%20%20style%20A%20stroke%3AcurrentColor%2C%20fill%3A%20%2387CEFA%0A%20%20style%20HP%20stroke%3AcurrentColor%2C%20fill%3A%23FA8072%0A"})]),fallback:a(()=>[d(" Loading... ")]),_:1})),p])}const P=o(h,[["render",m]]);export{D as __pageData,P as default}; +import{_ as o,K as i,o as e,c as l,b as s,w as a,a5 as n,X as t,O as c,a as d}from"./chunks/framework.adc83686.js";const D=JSON.parse('{"title":"Basic Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Basic Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/basic-rollup.md","filePath":"learn/basic-rollup.md","lastUpdated":1713275863000}'),h={name:"learn/basic-rollup.md"},u=t('

Basic Rollup

Description

The User submits a transaction to the Aggregator. After Aggregation, the Rollup Full Node can use the Batch and apply the changes to the state.

During the Header Production, the Header is generated with some security grantees. The Rollup Light Node can consume the Header and validate those security guarantees.

Diagram

Here is an example of what this design could look like:

',6),p=t('

Aggregation

TBD

Header Production

TBD

Censorship Resistance

TBD

Liveness

TBD

Rollup Light Nodes

TBD

Smallest Trust-Minimized Setup

TBD

',12);function m(A,g,_,B,b,f){const r=i("Mermaid");return e(),l("div",null,[u,(e(),s(n,null,{default:a(()=>[c(r,{id:"mermaid-18",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%0A%20%20T%20--%3E%20A%5B%22Aggregator%22%5D%0A%20%20%0A%20%20A%20--%3E%20B%5B%22Batch%22%5D%0A%20%20B%20--%3E%20HP%5B%22Header%20Producer%22%5D%0A%20%20B%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%20%20%0A%20%20HP%20--%3E%20H%5B%22Header%2B%22%5D%0A%20%20H%20--%3E%20LN%5B%22Rollup%20Light%20Node%22%5D%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A%20%20style%20LN%20stroke%3AcurrentColor%2C%20fill%3A%23D8BFD8%0A%20%20style%20A%20stroke%3AcurrentColor%2C%20fill%3A%20%2387CEFA%0A%20%20style%20HP%20stroke%3AcurrentColor%2C%20fill%3A%23FA8072%0A"})]),fallback:a(()=>[d(" Loading... ")]),_:1})),p])}const P=o(h,[["render",m]]);export{D as __pageData,P as default}; diff --git a/pr-339/assets/learn_basic-rollup.md.aeb9f27e.lean.js b/pr-339/assets/learn_basic-rollup.md.2a964152.lean.js similarity index 95% rename from pr-339/assets/learn_basic-rollup.md.aeb9f27e.lean.js rename to pr-339/assets/learn_basic-rollup.md.2a964152.lean.js index ba499a28b..05c377d46 100644 --- a/pr-339/assets/learn_basic-rollup.md.aeb9f27e.lean.js +++ b/pr-339/assets/learn_basic-rollup.md.2a964152.lean.js @@ -1 +1 @@ -import{_ as o,K as i,o as e,c as l,b as s,w as a,a5 as n,X as t,O as c,a as d}from"./chunks/framework.adc83686.js";const D=JSON.parse('{"title":"Basic Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Basic Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/basic-rollup.md","filePath":"learn/basic-rollup.md","lastUpdated":1713200494000}'),h={name:"learn/basic-rollup.md"},u=t("",6),p=t("",12);function m(A,g,_,B,b,f){const r=i("Mermaid");return e(),l("div",null,[u,(e(),s(n,null,{default:a(()=>[c(r,{id:"mermaid-18",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%0A%20%20T%20--%3E%20A%5B%22Aggregator%22%5D%0A%20%20%0A%20%20A%20--%3E%20B%5B%22Batch%22%5D%0A%20%20B%20--%3E%20HP%5B%22Header%20Producer%22%5D%0A%20%20B%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%20%20%0A%20%20HP%20--%3E%20H%5B%22Header%2B%22%5D%0A%20%20H%20--%3E%20LN%5B%22Rollup%20Light%20Node%22%5D%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A%20%20style%20LN%20stroke%3AcurrentColor%2C%20fill%3A%23D8BFD8%0A%20%20style%20A%20stroke%3AcurrentColor%2C%20fill%3A%20%2387CEFA%0A%20%20style%20HP%20stroke%3AcurrentColor%2C%20fill%3A%23FA8072%0A"})]),fallback:a(()=>[d(" Loading... ")]),_:1})),p])}const P=o(h,[["render",m]]);export{D as __pageData,P as default}; +import{_ as o,K as i,o as e,c as l,b as s,w as a,a5 as n,X as t,O as c,a as d}from"./chunks/framework.adc83686.js";const D=JSON.parse('{"title":"Basic Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Basic Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/basic-rollup.md","filePath":"learn/basic-rollup.md","lastUpdated":1713275863000}'),h={name:"learn/basic-rollup.md"},u=t("",6),p=t("",12);function m(A,g,_,B,b,f){const r=i("Mermaid");return e(),l("div",null,[u,(e(),s(n,null,{default:a(()=>[c(r,{id:"mermaid-18",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%0A%20%20T%20--%3E%20A%5B%22Aggregator%22%5D%0A%20%20%0A%20%20A%20--%3E%20B%5B%22Batch%22%5D%0A%20%20B%20--%3E%20HP%5B%22Header%20Producer%22%5D%0A%20%20B%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%20%20%0A%20%20HP%20--%3E%20H%5B%22Header%2B%22%5D%0A%20%20H%20--%3E%20LN%5B%22Rollup%20Light%20Node%22%5D%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A%20%20style%20LN%20stroke%3AcurrentColor%2C%20fill%3A%23D8BFD8%0A%20%20style%20A%20stroke%3AcurrentColor%2C%20fill%3A%20%2387CEFA%0A%20%20style%20HP%20stroke%3AcurrentColor%2C%20fill%3A%23FA8072%0A"})]),fallback:a(()=>[d(" Loading... ")]),_:1})),p])}const P=o(h,[["render",m]]);export{D as __pageData,P as default}; diff --git a/pr-339/assets/learn_building-and-deploying-a-rollup.md.6aafdfad.js b/pr-339/assets/learn_building-and-deploying-a-rollup.md.cc5573f1.js similarity index 98% rename from pr-339/assets/learn_building-and-deploying-a-rollup.md.6aafdfad.js rename to pr-339/assets/learn_building-and-deploying-a-rollup.md.cc5573f1.js index 827097fb4..7915e9cf8 100644 --- a/pr-339/assets/learn_building-and-deploying-a-rollup.md.6aafdfad.js +++ b/pr-339/assets/learn_building-and-deploying-a-rollup.md.cc5573f1.js @@ -1 +1 @@ -import{_ as e,o as t,c as a,X as l}from"./chunks/framework.adc83686.js";const m=JSON.parse('{"title":"🗞️ Building a rollup and testnet deployment","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ Building a rollup and testnet deployment | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/building-and-deploying-a-rollup.md","filePath":"learn/building-and-deploying-a-rollup.md","lastUpdated":1713200494000}'),r={name:"learn/building-and-deploying-a-rollup.md"},o=l('

🗞️ Building a rollup and testnet deployment

The following tutorials will help you get started building Cosmos-SDK and EVM applications that connect to Celestia's data availability (DA) layer via Rollkit to Celestia's Mocha testnet or Arabica devnet. We call those chains Sovereign Rollups.

You can get started with the following tutorials:

1. Beginner

2️. Intermediate

3️. Advanced

💻 Support

The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

',11),i=[o];function n(s,d,u,p,c,h){return t(),a("div",null,i)}const f=e(r,[["render",n]]);export{m as __pageData,f as default}; +import{_ as e,o as t,c as a,X as l}from"./chunks/framework.adc83686.js";const m=JSON.parse('{"title":"🗞️ Building a rollup and testnet deployment","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ Building a rollup and testnet deployment | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/building-and-deploying-a-rollup.md","filePath":"learn/building-and-deploying-a-rollup.md","lastUpdated":1713275863000}'),r={name:"learn/building-and-deploying-a-rollup.md"},o=l('

🗞️ Building a rollup and testnet deployment

The following tutorials will help you get started building Cosmos-SDK and EVM applications that connect to Celestia's data availability (DA) layer via Rollkit to Celestia's Mocha testnet or Arabica devnet. We call those chains Sovereign Rollups.

You can get started with the following tutorials:

1. Beginner

2️. Intermediate

3️. Advanced

💻 Support

The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

',11),i=[o];function n(s,d,u,p,c,h){return t(),a("div",null,i)}const f=e(r,[["render",n]]);export{m as __pageData,f as default}; diff --git a/pr-339/assets/learn_building-and-deploying-a-rollup.md.6aafdfad.lean.js b/pr-339/assets/learn_building-and-deploying-a-rollup.md.cc5573f1.lean.js similarity index 90% rename from pr-339/assets/learn_building-and-deploying-a-rollup.md.6aafdfad.lean.js rename to pr-339/assets/learn_building-and-deploying-a-rollup.md.cc5573f1.lean.js index 20230a759..be419465a 100644 --- a/pr-339/assets/learn_building-and-deploying-a-rollup.md.6aafdfad.lean.js +++ b/pr-339/assets/learn_building-and-deploying-a-rollup.md.cc5573f1.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a,X as l}from"./chunks/framework.adc83686.js";const m=JSON.parse('{"title":"🗞️ Building a rollup and testnet deployment","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ Building a rollup and testnet deployment | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/building-and-deploying-a-rollup.md","filePath":"learn/building-and-deploying-a-rollup.md","lastUpdated":1713200494000}'),r={name:"learn/building-and-deploying-a-rollup.md"},o=l("",11),i=[o];function n(s,d,u,p,c,h){return t(),a("div",null,i)}const f=e(r,[["render",n]]);export{m as __pageData,f as default}; +import{_ as e,o as t,c as a,X as l}from"./chunks/framework.adc83686.js";const m=JSON.parse('{"title":"🗞️ Building a rollup and testnet deployment","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ Building a rollup and testnet deployment | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/building-and-deploying-a-rollup.md","filePath":"learn/building-and-deploying-a-rollup.md","lastUpdated":1713275863000}'),r={name:"learn/building-and-deploying-a-rollup.md"},o=l("",11),i=[o];function n(s,d,u,p,c,h){return t(),a("div",null,i)}const f=e(r,[["render",n]]);export{m as __pageData,f as default}; diff --git a/pr-339/assets/learn_intro.md.300774b4.js b/pr-339/assets/learn_intro.md.18f5fc24.js similarity index 98% rename from pr-339/assets/learn_intro.md.300774b4.js rename to pr-339/assets/learn_intro.md.18f5fc24.js index d18bb2007..df87ce913 100644 --- a/pr-339/assets/learn_intro.md.300774b4.js +++ b/pr-339/assets/learn_intro.md.18f5fc24.js @@ -1 +1 @@ -import{_ as e,o,c as t,X as a}from"./chunks/framework.adc83686.js";const k=JSON.parse('{"title":"Introduction to Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Introduction to Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/intro.md","filePath":"learn/intro.md","lastUpdated":1713200494000}'),i={name:"learn/intro.md"},r=a('

Introduction to Rollkit

Welcome to the Rollkit docs. We're happy you made it here!

Rollkit is the first sovereign rollup framework.

Our mission is allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

We're setting the bar high for developers' flexibility and ability to customize rollups however they see fit.

TIP

In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

If you're familiar with Rollkit, you may want to skip to the tutorials section.

Table of contents

Introduction

Learn

Rollup Wiki

Tutorials

Overview

Networks

Blog

',19),l=[r];function n(s,c,d,h,u,p){return o(),t("div",null,l)}const m=e(i,[["render",n]]);export{k as __pageData,m as default}; +import{_ as e,o,c as t,X as a}from"./chunks/framework.adc83686.js";const k=JSON.parse('{"title":"Introduction to Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Introduction to Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/intro.md","filePath":"learn/intro.md","lastUpdated":1713275863000}'),i={name:"learn/intro.md"},r=a('

Introduction to Rollkit

Welcome to the Rollkit docs. We're happy you made it here!

Rollkit is the first sovereign rollup framework.

Our mission is allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

We're setting the bar high for developers' flexibility and ability to customize rollups however they see fit.

TIP

In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

If you're familiar with Rollkit, you may want to skip to the tutorials section.

Table of contents

Introduction

Learn

Rollup Wiki

Tutorials

Overview

Networks

Blog

',19),l=[r];function n(s,c,d,h,u,p){return o(),t("div",null,l)}const m=e(i,[["render",n]]);export{k as __pageData,m as default}; diff --git a/pr-339/assets/learn_intro.md.300774b4.lean.js b/pr-339/assets/learn_intro.md.18f5fc24.lean.js similarity index 88% rename from pr-339/assets/learn_intro.md.300774b4.lean.js rename to pr-339/assets/learn_intro.md.18f5fc24.lean.js index 827496d14..1bc284f62 100644 --- a/pr-339/assets/learn_intro.md.300774b4.lean.js +++ b/pr-339/assets/learn_intro.md.18f5fc24.lean.js @@ -1 +1 @@ -import{_ as e,o,c as t,X as a}from"./chunks/framework.adc83686.js";const k=JSON.parse('{"title":"Introduction to Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Introduction to Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/intro.md","filePath":"learn/intro.md","lastUpdated":1713200494000}'),i={name:"learn/intro.md"},r=a("",19),l=[r];function n(s,c,d,h,u,p){return o(),t("div",null,l)}const m=e(i,[["render",n]]);export{k as __pageData,m as default}; +import{_ as e,o,c as t,X as a}from"./chunks/framework.adc83686.js";const k=JSON.parse('{"title":"Introduction to Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Introduction to Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/intro.md","filePath":"learn/intro.md","lastUpdated":1713275863000}'),i={name:"learn/intro.md"},r=a("",19),l=[r];function n(s,c,d,h,u,p){return o(),t("div",null,l)}const m=e(i,[["render",n]]);export{k as __pageData,m as default}; diff --git a/pr-339/assets/learn_overview.md.345be122.js b/pr-339/assets/learn_overview.md.1ebbd909.js similarity index 96% rename from pr-339/assets/learn_overview.md.345be122.js rename to pr-339/assets/learn_overview.md.1ebbd909.js index f714de577..86ffa7b46 100644 --- a/pr-339/assets/learn_overview.md.345be122.js +++ b/pr-339/assets/learn_overview.md.1ebbd909.js @@ -1 +1 @@ -import{_ as e,o as a,c as t,X as o}from"./chunks/framework.adc83686.js";const v=JSON.parse('{"title":"Learn","description":"This page provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, and more.","frontmatter":{"description":"This page provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, and more.","head":[["meta",{"name":"og:title","content":"Learn | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/overview.md","filePath":"learn/overview.md","lastUpdated":1713200494000}'),r={name:"learn/overview.md"},n=o('

Learn

This category provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, a glossary, and more.

Table of contents

',4),l=[n];function i(s,c,d,h,p,f){return a(),t("div",null,l)}const k=e(r,[["render",i]]);export{v as __pageData,k as default}; +import{_ as e,o as a,c as t,X as o}from"./chunks/framework.adc83686.js";const v=JSON.parse('{"title":"Learn","description":"This page provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, and more.","frontmatter":{"description":"This page provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, and more.","head":[["meta",{"name":"og:title","content":"Learn | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/overview.md","filePath":"learn/overview.md","lastUpdated":1713275863000}'),r={name:"learn/overview.md"},n=o('

Learn

This category provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, a glossary, and more.

Table of contents

',4),l=[n];function i(s,c,d,h,p,f){return a(),t("div",null,l)}const k=e(r,[["render",i]]);export{v as __pageData,k as default}; diff --git a/pr-339/assets/learn_overview.md.345be122.lean.js b/pr-339/assets/learn_overview.md.1ebbd909.lean.js similarity index 93% rename from pr-339/assets/learn_overview.md.345be122.lean.js rename to pr-339/assets/learn_overview.md.1ebbd909.lean.js index 02d405b9f..3e1048f30 100644 --- a/pr-339/assets/learn_overview.md.345be122.lean.js +++ b/pr-339/assets/learn_overview.md.1ebbd909.lean.js @@ -1 +1 @@ -import{_ as e,o as a,c as t,X as o}from"./chunks/framework.adc83686.js";const v=JSON.parse('{"title":"Learn","description":"This page provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, and more.","frontmatter":{"description":"This page provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, and more.","head":[["meta",{"name":"og:title","content":"Learn | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/overview.md","filePath":"learn/overview.md","lastUpdated":1713200494000}'),r={name:"learn/overview.md"},n=o("",4),l=[n];function i(s,c,d,h,p,f){return a(),t("div",null,l)}const k=e(r,[["render",i]]);export{v as __pageData,k as default}; +import{_ as e,o as a,c as t,X as o}from"./chunks/framework.adc83686.js";const v=JSON.parse('{"title":"Learn","description":"This page provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, and more.","frontmatter":{"description":"This page provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, and more.","head":[["meta",{"name":"og:title","content":"Learn | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/overview.md","filePath":"learn/overview.md","lastUpdated":1713275863000}'),r={name:"learn/overview.md"},n=o("",4),l=[n];function i(s,c,d,h,p,f){return a(),t("div",null,l)}const k=e(r,[["render",i]]);export{v as __pageData,k as default}; diff --git a/pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.9523e182.js b/pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.d924c589.js similarity index 98% rename from pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.9523e182.js rename to pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.d924c589.js index 3f1363918..ca4e76852 100644 --- a/pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.9523e182.js +++ b/pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.d924c589.js @@ -1 +1 @@ -import{_ as s,K as i,o as e,c as o,b as n,w as a,a5 as h,X as t,O as l,a as d}from"./chunks/framework.adc83686.js";const y=JSON.parse('{"title":"Pessimistic Rollup with a Shared Sequencer","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Pessimistic Rollup with a Shared Sequencer | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/pessimistic-rollup-with-a-shared-sequencer.md","filePath":"learn/pessimistic-rollup-with-a-shared-sequencer.md","lastUpdated":1713200494000}'),c={name:"learn/pessimistic-rollup-with-a-shared-sequencer.md"},u=t('

Pessimistic Rollup with a Shared Sequencer

Description

This is a pessimistic Rollup using a Shared Sequencer. This design follows the Forum Post originating the Shared Sequencer Design. We assume the only canonical way to order the transactions are through the Shared Sequencer. All transactions have to be ordered by the Shared Sequencer and other batches are ignored.

Design

Here is an example of what this design could look like:

',5),p=t('

Aggregation

The Shared Sequencer Aggregates Transactions and posts the ordered Batch to the underlying DA-Layer.

To unlock a web2 equivalent UX, the shared sequencers […] can provide fast soft commitments. These soft commitments provide some arbitrary promise of the final ordering of transactions, and can be used to create prematurely updated versions of the state. As soon as the block data has been confirmed to be posted on the base layer, the state can be considered final.

The Shared Sequencer does Inclusion and Ordering.

Header Production

Each Full Node has to execute all transactions. There are no Light Nodes in this system so there is no need to produce a rollup header.

Censorship Resistance

Lets assume $L_{ss}$ is the liveness of the Shared Sequencer and the $L_{da}$ is the liveness of the DA-Layer. Then the liveness of this scheme is $L = Min[L_{ss},L_{da}]$ saying if one of the Systems has a liveness failure the Rollup has a liveness failure. If the Shared Sequencer fails then we cannot proceed with the Rollup. If the DA-Layer fails we could continue with the Shared Sequencers Soft Commitments. We would inherit the consensuses and data-availability from the Shared Sequencer which would be worse than the original Data-Availability Layer.

Liveness

Based rollups enjoys the same liveness guarantees as the DA-Layer (Based Rollups).

Rollup Light Nodes

N/A

Smallest Trust-Minimized Setup

DA-Layer Light Node + Shared Sequencer Light Node + Rollup Full Node

We need a Shared Sequencer Light Node to validate the Headers of the Shared Sequencer. We made an assumption in the beginning that the order is fixed by the ordering of the shared sequencer. The Shared Sequencer will have a cryptographic commitment of the order of the Transaction inside the Shared Sequencer Header. This way we can confirm that the batch that we receive or read from the DA-Layer is the one created by the Shared Sequencer.

',15);function m(g,S,f,A,q,_){const r=i("Mermaid");return e(),o("div",null,[u,(e(),n(h,null,{default:a(()=>[l(r,{id:"mermaid-15",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%20--%3E%20SA%5B%22Shared%20Aggregator%22%5D%0A%0A%20%20subgraph%20A%5B%22Aggregator%22%5D%0A%20%20%20%20SA%20--%3E%20OB1%5B%22Ordered%20Batch%22%5D%20--%3E%20DAL%5B%22DA-Layer%22%5D%0A%20%20%20%20SA%20--%3E%20OB2%5B%22Soft%20Committed%20Ordered%20Batch%20%5Cn%20%26%20Shared%20Aggregator%20Header%2B%22%5D%0A%20%20end%0A%20%20%0A%20%20OB2%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%20%20DAL%20--%3E%20OB3%5B%22Ordered%20Batch%22%5D%20--%3E%20FN%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20SA%20stroke%3AcurrentColor%2C%20fill%3A%2387CEFA%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A%20%20style%20DAL%20stroke%3AcurrentColor%2C%20fill%3A%23D8BFD8%0A"})]),fallback:a(()=>[d(" Loading... ")]),_:1})),p])}const D=s(c,[["render",m]]);export{y as __pageData,D as default}; +import{_ as s,K as i,o as e,c as o,b as n,w as a,a5 as h,X as t,O as l,a as d}from"./chunks/framework.adc83686.js";const y=JSON.parse('{"title":"Pessimistic Rollup with a Shared Sequencer","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Pessimistic Rollup with a Shared Sequencer | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/pessimistic-rollup-with-a-shared-sequencer.md","filePath":"learn/pessimistic-rollup-with-a-shared-sequencer.md","lastUpdated":1713275863000}'),c={name:"learn/pessimistic-rollup-with-a-shared-sequencer.md"},u=t('

Pessimistic Rollup with a Shared Sequencer

Description

This is a pessimistic Rollup using a Shared Sequencer. This design follows the Forum Post originating the Shared Sequencer Design. We assume the only canonical way to order the transactions are through the Shared Sequencer. All transactions have to be ordered by the Shared Sequencer and other batches are ignored.

Design

Here is an example of what this design could look like:

',5),p=t('

Aggregation

The Shared Sequencer Aggregates Transactions and posts the ordered Batch to the underlying DA-Layer.

To unlock a web2 equivalent UX, the shared sequencers […] can provide fast soft commitments. These soft commitments provide some arbitrary promise of the final ordering of transactions, and can be used to create prematurely updated versions of the state. As soon as the block data has been confirmed to be posted on the base layer, the state can be considered final.

The Shared Sequencer does Inclusion and Ordering.

Header Production

Each Full Node has to execute all transactions. There are no Light Nodes in this system so there is no need to produce a rollup header.

Censorship Resistance

Lets assume $L_{ss}$ is the liveness of the Shared Sequencer and the $L_{da}$ is the liveness of the DA-Layer. Then the liveness of this scheme is $L = Min[L_{ss},L_{da}]$ saying if one of the Systems has a liveness failure the Rollup has a liveness failure. If the Shared Sequencer fails then we cannot proceed with the Rollup. If the DA-Layer fails we could continue with the Shared Sequencers Soft Commitments. We would inherit the consensuses and data-availability from the Shared Sequencer which would be worse than the original Data-Availability Layer.

Liveness

Based rollups enjoys the same liveness guarantees as the DA-Layer (Based Rollups).

Rollup Light Nodes

N/A

Smallest Trust-Minimized Setup

DA-Layer Light Node + Shared Sequencer Light Node + Rollup Full Node

We need a Shared Sequencer Light Node to validate the Headers of the Shared Sequencer. We made an assumption in the beginning that the order is fixed by the ordering of the shared sequencer. The Shared Sequencer will have a cryptographic commitment of the order of the Transaction inside the Shared Sequencer Header. This way we can confirm that the batch that we receive or read from the DA-Layer is the one created by the Shared Sequencer.

',15);function m(g,S,f,A,q,_){const r=i("Mermaid");return e(),o("div",null,[u,(e(),n(h,null,{default:a(()=>[l(r,{id:"mermaid-15",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%20--%3E%20SA%5B%22Shared%20Aggregator%22%5D%0A%0A%20%20subgraph%20A%5B%22Aggregator%22%5D%0A%20%20%20%20SA%20--%3E%20OB1%5B%22Ordered%20Batch%22%5D%20--%3E%20DAL%5B%22DA-Layer%22%5D%0A%20%20%20%20SA%20--%3E%20OB2%5B%22Soft%20Committed%20Ordered%20Batch%20%5Cn%20%26%20Shared%20Aggregator%20Header%2B%22%5D%0A%20%20end%0A%20%20%0A%20%20OB2%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%20%20DAL%20--%3E%20OB3%5B%22Ordered%20Batch%22%5D%20--%3E%20FN%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20SA%20stroke%3AcurrentColor%2C%20fill%3A%2387CEFA%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A%20%20style%20DAL%20stroke%3AcurrentColor%2C%20fill%3A%23D8BFD8%0A"})]),fallback:a(()=>[d(" Loading... ")]),_:1})),p])}const D=s(c,[["render",m]]);export{y as __pageData,D as default}; diff --git a/pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.9523e182.lean.js b/pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.d924c589.lean.js similarity index 96% rename from pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.9523e182.lean.js rename to pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.d924c589.lean.js index 5cabfb56a..b9d36d765 100644 --- a/pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.9523e182.lean.js +++ b/pr-339/assets/learn_pessimistic-rollup-with-a-shared-sequencer.md.d924c589.lean.js @@ -1 +1 @@ -import{_ as s,K as i,o as e,c as o,b as n,w as a,a5 as h,X as t,O as l,a as d}from"./chunks/framework.adc83686.js";const y=JSON.parse('{"title":"Pessimistic Rollup with a Shared Sequencer","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Pessimistic Rollup with a Shared Sequencer | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/pessimistic-rollup-with-a-shared-sequencer.md","filePath":"learn/pessimistic-rollup-with-a-shared-sequencer.md","lastUpdated":1713200494000}'),c={name:"learn/pessimistic-rollup-with-a-shared-sequencer.md"},u=t("",5),p=t("",15);function m(g,S,f,A,q,_){const r=i("Mermaid");return e(),o("div",null,[u,(e(),n(h,null,{default:a(()=>[l(r,{id:"mermaid-15",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%20--%3E%20SA%5B%22Shared%20Aggregator%22%5D%0A%0A%20%20subgraph%20A%5B%22Aggregator%22%5D%0A%20%20%20%20SA%20--%3E%20OB1%5B%22Ordered%20Batch%22%5D%20--%3E%20DAL%5B%22DA-Layer%22%5D%0A%20%20%20%20SA%20--%3E%20OB2%5B%22Soft%20Committed%20Ordered%20Batch%20%5Cn%20%26%20Shared%20Aggregator%20Header%2B%22%5D%0A%20%20end%0A%20%20%0A%20%20OB2%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%20%20DAL%20--%3E%20OB3%5B%22Ordered%20Batch%22%5D%20--%3E%20FN%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20SA%20stroke%3AcurrentColor%2C%20fill%3A%2387CEFA%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A%20%20style%20DAL%20stroke%3AcurrentColor%2C%20fill%3A%23D8BFD8%0A"})]),fallback:a(()=>[d(" Loading... ")]),_:1})),p])}const D=s(c,[["render",m]]);export{y as __pageData,D as default}; +import{_ as s,K as i,o as e,c as o,b as n,w as a,a5 as h,X as t,O as l,a as d}from"./chunks/framework.adc83686.js";const y=JSON.parse('{"title":"Pessimistic Rollup with a Shared Sequencer","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Pessimistic Rollup with a Shared Sequencer | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/pessimistic-rollup-with-a-shared-sequencer.md","filePath":"learn/pessimistic-rollup-with-a-shared-sequencer.md","lastUpdated":1713275863000}'),c={name:"learn/pessimistic-rollup-with-a-shared-sequencer.md"},u=t("",5),p=t("",15);function m(g,S,f,A,q,_){const r=i("Mermaid");return e(),o("div",null,[u,(e(),n(h,null,{default:a(()=>[l(r,{id:"mermaid-15",graph:"graph%20TB%0A%20%20U%5B%22User%22%5D%20--%3E%20T%5B%22Transaction%22%5D%20--%3E%20SA%5B%22Shared%20Aggregator%22%5D%0A%0A%20%20subgraph%20A%5B%22Aggregator%22%5D%0A%20%20%20%20SA%20--%3E%20OB1%5B%22Ordered%20Batch%22%5D%20--%3E%20DAL%5B%22DA-Layer%22%5D%0A%20%20%20%20SA%20--%3E%20OB2%5B%22Soft%20Committed%20Ordered%20Batch%20%5Cn%20%26%20Shared%20Aggregator%20Header%2B%22%5D%0A%20%20end%0A%20%20%0A%20%20OB2%20--%3E%20FN%5B%22Rollup%20Full%20Node%22%5D%0A%20%20DAL%20--%3E%20OB3%5B%22Ordered%20Batch%22%5D%20--%3E%20FN%0A%0A%20%20style%20U%20stroke%3AcurrentColor%2C%20fill%3A%23FFA07A%0A%20%20style%20SA%20stroke%3AcurrentColor%2C%20fill%3A%2387CEFA%0A%20%20style%20FN%20stroke%3AcurrentColor%2C%20fill%3A%2398FB98%0A%20%20style%20DAL%20stroke%3AcurrentColor%2C%20fill%3A%23D8BFD8%0A"})]),fallback:a(()=>[d(" Loading... ")]),_:1})),p])}const D=s(c,[["render",m]]);export{y as __pageData,D as default}; diff --git a/pr-339/assets/learn_readme.md.ce0fbcec.js b/pr-339/assets/learn_readme.md.180d5433.js similarity index 99% rename from pr-339/assets/learn_readme.md.ce0fbcec.js rename to pr-339/assets/learn_readme.md.180d5433.js index a66096867..68a677568 100644 --- a/pr-339/assets/learn_readme.md.ce0fbcec.js +++ b/pr-339/assets/learn_readme.md.180d5433.js @@ -1,4 +1,4 @@ -import{_ as e,o as t,c as a,X as l}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/readme.md","filePath":"learn/readme.md","lastUpdated":1713200494000}'),o={name:"learn/readme.md"},r=l(`

Rollkit

The first sovereign rollup framework, with an ABCI-compatible client interface. For more in-depth information about Rollkit, please visit our website.

build-and-testgolangci-lintGo Report CardcodecovGoDoc

Rollkit CLI

Requires Go version >= 1.21.

A cli tool that allows you to run different kinds of nodes for a rollkit network while also helping you generate the required configuration files

Install

To install rollkit, simply run the following command at the root of the rollkit repo

bash
make install

The latest Rollkit is now installed. You can verify the installation by running:

bash
rollkit version

Explore the CLI documentation here

Building with Rollkit

While Rollkit is a modular framework that aims to be compatible with a wide range of data availability layers, settlement layers, and execution environments, the most supported development environment is building on Celestia as a data availability layer.

Building on Celestia

You can build Rollkit rollups with local-celestia-devnet, arabica devnet and mocha testnet and mainnet beta.

Compatibility

networkrollkitcelestia-nodecelestia-app
local-celestia-devnetv0.13.1v0.13.1v1.7.0
arabicav0.13.1v0.13.1v1.7.0
mochav0.13.1v0.13.1v1.7.0
mainnetv0.13.1v0.13.1v1.7.0
rollkit/cosmos-sdkrollkit/cometbftrollkit
v0.50.5-rollkit-v0.13.1-no-fraud-proofsv0.38.5v0.13.1

Local development environment

The Rollkit v0.13.1 release is compatible with the local-celestia-devnet v0.13.1 release. This version combination is compatible with celestia-app v1.7.0 and celestia-node v0.13.1.

Arabica devnet and Mocha testnet

The Rollkit v0.13.1 release is compatible with arabica-11 devnet mocha-4 testnet which are running celestia-app v1.7.0 and celestia-node v0.13.1.

Celestia mainnet

The Rollkit v0.13.1 release is compatible with mainnet-beta which is running celestia-app v1.7.0 and celestia-node v0.13.1.

Cometbft v0.37.x and Cosmos-SDK v0.47.x

The Rollkit v0.10.7 release is compatible with Cometbft v0.37.2 and Cosmos-SDK v0.47.6. However, this version is no longer supported for future developments and it is recommended to use Rollkit v0.13.x.

Tools

  1. Install golangci-lint
  2. Install markdownlint
  3. Install hadolint
  4. Install yamllint

Helpful commands

sh
# Run unit tests
+import{_ as e,o as t,c as a,X as l}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/readme.md","filePath":"learn/readme.md","lastUpdated":1713275863000}'),o={name:"learn/readme.md"},r=l(`

Rollkit

The first sovereign rollup framework, with an ABCI-compatible client interface. For more in-depth information about Rollkit, please visit our website.

build-and-testgolangci-lintGo Report CardcodecovGoDoc

Rollkit CLI

Requires Go version >= 1.21.

A cli tool that allows you to run different kinds of nodes for a rollkit network while also helping you generate the required configuration files

Install

To install rollkit, simply run the following command at the root of the rollkit repo

bash
make install

The latest Rollkit is now installed. You can verify the installation by running:

bash
rollkit version

Explore the CLI documentation here

Building with Rollkit

While Rollkit is a modular framework that aims to be compatible with a wide range of data availability layers, settlement layers, and execution environments, the most supported development environment is building on Celestia as a data availability layer.

Building on Celestia

You can build Rollkit rollups with local-celestia-devnet, arabica devnet and mocha testnet and mainnet beta.

Compatibility

networkrollkitcelestia-nodecelestia-app
local-celestia-devnetv0.13.1v0.13.1v1.7.0
arabicav0.13.1v0.13.1v1.7.0
mochav0.13.1v0.13.1v1.7.0
mainnetv0.13.1v0.13.1v1.7.0
rollkit/cosmos-sdkrollkit/cometbftrollkit
v0.50.5-rollkit-v0.13.1-no-fraud-proofsv0.38.5v0.13.1

Local development environment

The Rollkit v0.13.1 release is compatible with the local-celestia-devnet v0.13.1 release. This version combination is compatible with celestia-app v1.7.0 and celestia-node v0.13.1.

Arabica devnet and Mocha testnet

The Rollkit v0.13.1 release is compatible with arabica-11 devnet mocha-4 testnet which are running celestia-app v1.7.0 and celestia-node v0.13.1.

Celestia mainnet

The Rollkit v0.13.1 release is compatible with mainnet-beta which is running celestia-app v1.7.0 and celestia-node v0.13.1.

Cometbft v0.37.x and Cosmos-SDK v0.47.x

The Rollkit v0.10.7 release is compatible with Cometbft v0.37.2 and Cosmos-SDK v0.47.6. However, this version is no longer supported for future developments and it is recommended to use Rollkit v0.13.x.

Tools

  1. Install golangci-lint
  2. Install markdownlint
  3. Install hadolint
  4. Install yamllint

Helpful commands

sh
# Run unit tests
 make test
 
 # Generate protobuf files (requires Docker)
diff --git a/pr-339/assets/learn_readme.md.ce0fbcec.lean.js b/pr-339/assets/learn_readme.md.180d5433.lean.js
similarity index 87%
rename from pr-339/assets/learn_readme.md.ce0fbcec.lean.js
rename to pr-339/assets/learn_readme.md.180d5433.lean.js
index b4b5a2de9..b7bd22864 100644
--- a/pr-339/assets/learn_readme.md.ce0fbcec.lean.js
+++ b/pr-339/assets/learn_readme.md.180d5433.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,X as l}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/readme.md","filePath":"learn/readme.md","lastUpdated":1713200494000}'),o={name:"learn/readme.md"},r=l("",40),n=[r];function s(i,c,h,d,p,m){return t(),a("div",null,n)}const u=e(o,[["render",s]]);export{g as __pageData,u as default};
+import{_ as e,o as t,c as a,X as l}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/readme.md","filePath":"learn/readme.md","lastUpdated":1713275863000}'),o={name:"learn/readme.md"},r=l("",40),n=[r];function s(i,c,h,d,p,m){return t(),a("div",null,n)}const u=e(o,[["render",s]]);export{g as __pageData,u as default};
diff --git a/pr-339/assets/learn_rollup-glossary.md.47632137.js b/pr-339/assets/learn_rollup-glossary.md.65406fdc.js
similarity index 97%
rename from pr-339/assets/learn_rollup-glossary.md.47632137.js
rename to pr-339/assets/learn_rollup-glossary.md.65406fdc.js
index 7259495d9..66f93958f 100644
--- a/pr-339/assets/learn_rollup-glossary.md.47632137.js
+++ b/pr-339/assets/learn_rollup-glossary.md.65406fdc.js
@@ -1 +1 @@
-import{_ as a,o as e,c as o,X as t}from"./chunks/framework.adc83686.js";const b=JSON.parse('{"title":"Rollup glossary","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollup glossary | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/rollup-glossary.md","filePath":"learn/rollup-glossary.md","lastUpdated":1713200494000}'),r={name:"learn/rollup-glossary.md"},l=t('

Rollup glossary

A wiki of terms to define different Rollup designs and terminology:

Terminology

Aggregation

Aggregation is the process of batching transactions into one batch. A batch of transactions consists of one or more transactions.

Based rollup

A based rollup is a rollup that delegates aggregation to a DA-Layer.

Execution

Execution is the process by which the transactions in the blockchain are processed and their effects are applied to the state of the blockchain.

Header production

Header production is the process of creating the Rollup header backed by specific security properties.

Inclusion

Inclusion is the process by which a transaction is accepted into the blockchain.

Ordering

Ordering is the process of arranging transactions in a specific sequence in the blockchain.

Pessimistic rollup

A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup to check its validity.

Rollup Block

A rollup block is a data structure representing the Blockchain at a certain height. It consists of Rollup Data and Rollup Headers.

Rollup Data

Rollup data is either a batch of transactions or the state difference between transaction batches.

Rollup Header

is metadata about the block which at minimum includes a commitment to the transactions in that block.

Rollups

Rollups are blockchains that post their Transaction Data to another blockchain and inherit its consensus and data availability.

Sequencing

Sequencing is the process of aggregation and header production.

',27),i=[l];function n(s,c,h,p,d,u){return e(),o("div",null,i)}const f=a(r,[["render",n]]);export{b as __pageData,f as default}; +import{_ as a,o as e,c as o,X as t}from"./chunks/framework.adc83686.js";const b=JSON.parse('{"title":"Rollup glossary","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollup glossary | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/rollup-glossary.md","filePath":"learn/rollup-glossary.md","lastUpdated":1713275863000}'),r={name:"learn/rollup-glossary.md"},l=t('

Rollup glossary

A wiki of terms to define different Rollup designs and terminology:

Terminology

Aggregation

Aggregation is the process of batching transactions into one batch. A batch of transactions consists of one or more transactions.

Based rollup

A based rollup is a rollup that delegates aggregation to a DA-Layer.

Execution

Execution is the process by which the transactions in the blockchain are processed and their effects are applied to the state of the blockchain.

Header production

Header production is the process of creating the Rollup header backed by specific security properties.

Inclusion

Inclusion is the process by which a transaction is accepted into the blockchain.

Ordering

Ordering is the process of arranging transactions in a specific sequence in the blockchain.

Pessimistic rollup

A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup to check its validity.

Rollup Block

A rollup block is a data structure representing the Blockchain at a certain height. It consists of Rollup Data and Rollup Headers.

Rollup Data

Rollup data is either a batch of transactions or the state difference between transaction batches.

Rollup Header

is metadata about the block which at minimum includes a commitment to the transactions in that block.

Rollups

Rollups are blockchains that post their Transaction Data to another blockchain and inherit its consensus and data availability.

Sequencing

Sequencing is the process of aggregation and header production.

',27),i=[l];function n(s,c,h,p,d,u){return e(),o("div",null,i)}const f=a(r,[["render",n]]);export{b as __pageData,f as default}; diff --git a/pr-339/assets/learn_rollup-glossary.md.47632137.lean.js b/pr-339/assets/learn_rollup-glossary.md.65406fdc.lean.js similarity index 77% rename from pr-339/assets/learn_rollup-glossary.md.47632137.lean.js rename to pr-339/assets/learn_rollup-glossary.md.65406fdc.lean.js index eba6acc0a..255b92708 100644 --- a/pr-339/assets/learn_rollup-glossary.md.47632137.lean.js +++ b/pr-339/assets/learn_rollup-glossary.md.65406fdc.lean.js @@ -1 +1 @@ -import{_ as a,o as e,c as o,X as t}from"./chunks/framework.adc83686.js";const b=JSON.parse('{"title":"Rollup glossary","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollup glossary | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/rollup-glossary.md","filePath":"learn/rollup-glossary.md","lastUpdated":1713200494000}'),r={name:"learn/rollup-glossary.md"},l=t("",27),i=[l];function n(s,c,h,p,d,u){return e(),o("div",null,i)}const f=a(r,[["render",n]]);export{b as __pageData,f as default}; +import{_ as a,o as e,c as o,X as t}from"./chunks/framework.adc83686.js";const b=JSON.parse('{"title":"Rollup glossary","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollup glossary | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/rollup-glossary.md","filePath":"learn/rollup-glossary.md","lastUpdated":1713275863000}'),r={name:"learn/rollup-glossary.md"},l=t("",27),i=[l];function n(s,c,h,p,d,u){return e(),o("div",null,i)}const f=a(r,[["render",n]]);export{b as __pageData,f as default}; diff --git a/pr-339/assets/learn_stack.md.562d0dd6.js b/pr-339/assets/learn_stack.md.b0a511cc.js similarity index 99% rename from pr-339/assets/learn_stack.md.562d0dd6.js rename to pr-339/assets/learn_stack.md.b0a511cc.js index adc0e2d8f..ef565dcf8 100644 --- a/pr-339/assets/learn_stack.md.562d0dd6.js +++ b/pr-339/assets/learn_stack.md.b0a511cc.js @@ -1 +1 @@ -import{_ as l,K as i,o,c as n,b as s,w as a,a5 as c,k as e,a as t,X as d,O as h}from"./chunks/framework.adc83686.js";const C=JSON.parse('{"title":"Rollkit stack","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit stack | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/stack.md","filePath":"learn/stack.md","lastUpdated":1713200494000}'),p={name:"learn/stack.md"},u=e("h1",{id:"rollkit-stack",tabindex:"-1"},[t("Rollkit stack "),e("a",{class:"header-anchor",href:"#rollkit-stack","aria-label":'Permalink to "Rollkit stack"'},"​")],-1),f=e("p",null,"This page will cover the main components of Rollkit.",-1),m=e("p",null,"Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.",-1),g=e("h2",{id:"application-structure",tabindex:"-1"},[t("Application structure "),e("a",{class:"header-anchor",href:"#application-structure","aria-label":'Permalink to "Application structure"'},"​")],-1),b=d('

ABCI interface

Rollkit is a fully functional Application BlockChain Interface (ABCI) client software. It can be used as a CometBFT replacement for any ABCI application. Thanks to this compatibility, you can use tools like abci-cli to test and debug your rollup.

Cosmos SDK

Would you like to change your Cosmos SDK application to a Rollkit rollup? No problem! You need to replace the Cosmos SDK Go dependency with a Rollkit-enabled version, which can be found at the rollkit/cosmos-sdk repository.

Note the rollkit/cosmos-sdk repository follows the release branches of upstream Cosmos SDK, but with the bonus of using Rollkit instead of CometBFT as the ABCI client.

And don't forget to replace another dependency, CometBFT, with rollkit/cometbft, which has an enhanced ABCI interface that includes the methods needed for state fraud proofs.

Data availability

Data availability (DA) can be accessed using generic interfaces. This design allows for seamless integration with any DA layer. New implementations can be plugged in programmatically, without a need to fork Rollkit.

The DataAvailabilityLayerClient interface includes essential lifecycle methods (Init, Start, Stop) as well as data availability methods (SubmitBlocks, RetrieveBlocks).

The BlockRetriever interface serves to enable syncing of full nodes from the data availability layer. It's important to keep in mind that there is no direct correlation between the DA layer block height and the rollup height. Each DA layer block may contain an arbitrary number of rollup blocks.

Celestia

Celestia is an example of a data availability integration implemented for Rollkit. It's using the Celestia Node API via the rollkit/celestia-da package. To deploy a Rollkit rollup on Celestia you also have to run a Celestia light node.

Use of other data availability (DA) layers is also supported by Rollkit, and research integrations for Bitcoin, Mock, gRPC are works in progress. New DA layer integrations can be added by using the go-da interface.

Node components

Mempool

The mempool is inspired by the CometBFT mempool. By default, transactions are handled in a First Come, First Served (FCFS) manner. Ordering of transactions can be implemented on the application level; currently this is possible by returning a priority on CheckTx, and once we support ABCI++ it is also possible via PrepareProposal and the application mempool.

Block manager

The block manager contains routines AggregationLoop, RetrieveLoop, and SyncLoop that communicate through Go channels. These Go routines are ran when a Rollkit node starts up (OnStart). Only the sequencer nodes run AggregationLoop which controls the frequency of block production for a rollup with a timer as per the BlockTime in BlockManager.

All nodes run SyncLoop which looks for the following operations:

  • Receive block headers: block headers are received through a channel HeaderInCh and Rollkit nodes attempt to verify the block with the corresponding block data.
  • Receive block data: block bodies are received through a channel blockInCh and Rollkit nodes attempt to verify the block.
  • Signal RetrieveLoop with timer as per the DABlockTime in BlockManager.

All nodes also run RetrieveLoop which is responsible for interacting with the data availability layer. It checks the last updated DAHeight to retrieve a block with timer DABlockTime signaled by SyncLoop. Note that the start height of the DA layer for the rollup, DAStartHeight, is configurable in BlockManager.

RPC

Rollkit's RPC fully implements the CometBFT RPC interfaces and APIs for querying:

  • Information about the rollup node: information such as node's health, status, and network info.
  • The rollup blockchain: getting information about the rollup blockchain such as blocks and block headers.
  • The rollup transactions: getting transaction information and broadcasting raw transactions, with search capabilities.
  • ABCI: rollup application information.

The following RPC protocols are currently supported:

  • URI over HTTP
  • JSON-RPC over HTTP
  • JSON-RPC over WebSockets

P2P layer

Rollkit's P2P layer enables direct communication between rollup nodes. It's used to gossip transactions, headers of newly created blocks, and state fraud proofs. The P2P layer is implemented using libp2p.

Rollkit uses DHT-based active peer discovery. Starting a node connects to pre-configured bootstrap peers, and advertises its namespace ID in the DHT. This solution is flexible, because multiple rollup networks may reuse the same DHT/bootstrap nodes, but specific rollup network might decide to use dedicated nodes as well.

Rollkit node types

Rollkit nodes are implemented in the node package.

Full node

Full nodes verify all blocks, and produce fraud proofs for optimistic rollups. Since they fully verify all rollup blocks, they don't rely on fraud or validity proofs for security.

Light node (work in progress)

Light nodes are light-weight rollup nodes that authenticate block headers, and can be secured by fraud proofs or validity proofs. They're recommended for average users on low-resource devices. Users running light nodes can make trust-minimized queries about the rollup's state. Currently, Rollkit light nodes are still under development.

Sequencer node

Rollups can utilize sequencer nodes. Sequencers are block producers for rollups, responsible for aggregating transactions into blocks, and typically executing transactions to produce a state root, used by the rollup's light clients.

Rollkit plans to support multiple different pluggable sequencer schemes:

Deploy in one-clickFaster soft-confirmations than L1Control over rollup's transaction orderingAtomic composability with other rollupsCensorship resistanceImplementation Status
Centralized sequencerRequires spinning up a sequencerYes ✅Yes ✅No ❌Eventual ⏳*✅ Implemented!
Decentralized sequencerRequires spinning up a sequencer setYes ✅Yes ✅No ❌Real-time ⚡️Planned
Shared decentralized sequencerYes ✅Yes ✅No ❌Yes ✅Real-time ⚡️Planned
Pure fork-choice ruleYes ✅No ❌Maybe 🟡Maybe 🟡Eventual ⏳Planned

"Pure fork-choice rule" refers to any rollup without privileged sequencers, e.g. nodes defer to the data availability layer for ordering and apply a "first-come-first-serve" fork-choice rule.

* implementation of this property is in progress.

State validity modes

Pessimistic (full nodes only)

A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup in order to check its validity. Rollkit supports pessimistic rollups by default.

Pessimistic rollups are similar to how Tether uses Bitcoin as a data availability layer via OmniLayer.

Optimistic (fraud proofs) (work in progress)

Rollkit's current design consists of a single sequencer that posts blocks to the DA layer, and multiple (optional) full nodes. Sequencers gossip block headers to full nodes and full nodes fetch posted blocks from the DA layer. Full nodes then execute transactions in these blocks to update their state, and gossip block headers over the P2P network to Rollkit light nodes.

Once state fraud proofs are enabled, when a block contains a fraudulent state transition, Rollkit full nodes can detect it by comparing intermediate state roots (ISRs) between transactions, and generate a state fraud proof that can be gossiped over the P2P network to Rollkit light nodes. These Rollkit light nodes can then use this state fraud proof to verify whether a fraudulent state transition occurred or not by themselves.

Overall, state fraud proofs will enable trust-minimization between full nodes and light nodes as long as there is at least one honest full node in the system that will generate state fraud proofs.

Note that Rollkit state fraud proofs are still a work in progress and will require new methods on top of ABCI, specifically, GenerateFraudProof, VerifyFraudProof, and GetAppHash.

You can find current detailed design and the remaining work needed to push state fraud proofs towards completion in this Architecture Decision Record (ADR).

Validity (ZK proofs)

Validity (ZK) rollups are planned, but not currently supported by Rollkit.

',54);function k(y,v,w,x,q,R){const r=i("Mermaid");return o(),n("div",null,[u,f,m,g,(o(),s(c,null,{default:a(()=>[h(r,{id:"mermaid-12",graph:"graph%20TD%0A%20%20%20%20A%5BRollkit%20Rollup%5D%0A%20%20%20%20B%5BRollkit%5D%0A%20%20%20%20C%5BData%20Availability%20Chain%5D%0A%20%20%20%20%0A%20%20%20%20A%20%3C--%3E%7CABCI%7C%20B%0A%20%20%20%20B%20%3C--%3E%7CDA%20API%7C%20C%0A"})]),fallback:a(()=>[t(" Loading... ")]),_:1})),b])}const _=l(p,[["render",k]]);export{C as __pageData,_ as default}; +import{_ as l,K as i,o,c as n,b as s,w as a,a5 as c,k as e,a as t,X as d,O as h}from"./chunks/framework.adc83686.js";const C=JSON.parse('{"title":"Rollkit stack","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit stack | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/stack.md","filePath":"learn/stack.md","lastUpdated":1713275863000}'),p={name:"learn/stack.md"},u=e("h1",{id:"rollkit-stack",tabindex:"-1"},[t("Rollkit stack "),e("a",{class:"header-anchor",href:"#rollkit-stack","aria-label":'Permalink to "Rollkit stack"'},"​")],-1),f=e("p",null,"This page will cover the main components of Rollkit.",-1),m=e("p",null,"Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.",-1),g=e("h2",{id:"application-structure",tabindex:"-1"},[t("Application structure "),e("a",{class:"header-anchor",href:"#application-structure","aria-label":'Permalink to "Application structure"'},"​")],-1),b=d('

ABCI interface

Rollkit is a fully functional Application BlockChain Interface (ABCI) client software. It can be used as a CometBFT replacement for any ABCI application. Thanks to this compatibility, you can use tools like abci-cli to test and debug your rollup.

Cosmos SDK

Would you like to change your Cosmos SDK application to a Rollkit rollup? No problem! You need to replace the Cosmos SDK Go dependency with a Rollkit-enabled version, which can be found at the rollkit/cosmos-sdk repository.

Note the rollkit/cosmos-sdk repository follows the release branches of upstream Cosmos SDK, but with the bonus of using Rollkit instead of CometBFT as the ABCI client.

And don't forget to replace another dependency, CometBFT, with rollkit/cometbft, which has an enhanced ABCI interface that includes the methods needed for state fraud proofs.

Data availability

Data availability (DA) can be accessed using generic interfaces. This design allows for seamless integration with any DA layer. New implementations can be plugged in programmatically, without a need to fork Rollkit.

The DataAvailabilityLayerClient interface includes essential lifecycle methods (Init, Start, Stop) as well as data availability methods (SubmitBlocks, RetrieveBlocks).

The BlockRetriever interface serves to enable syncing of full nodes from the data availability layer. It's important to keep in mind that there is no direct correlation between the DA layer block height and the rollup height. Each DA layer block may contain an arbitrary number of rollup blocks.

Celestia

Celestia is an example of a data availability integration implemented for Rollkit. It's using the Celestia Node API via the rollkit/celestia-da package. To deploy a Rollkit rollup on Celestia you also have to run a Celestia light node.

Use of other data availability (DA) layers is also supported by Rollkit, and research integrations for Bitcoin, Mock, gRPC are works in progress. New DA layer integrations can be added by using the go-da interface.

Node components

Mempool

The mempool is inspired by the CometBFT mempool. By default, transactions are handled in a First Come, First Served (FCFS) manner. Ordering of transactions can be implemented on the application level; currently this is possible by returning a priority on CheckTx, and once we support ABCI++ it is also possible via PrepareProposal and the application mempool.

Block manager

The block manager contains routines AggregationLoop, RetrieveLoop, and SyncLoop that communicate through Go channels. These Go routines are ran when a Rollkit node starts up (OnStart). Only the sequencer nodes run AggregationLoop which controls the frequency of block production for a rollup with a timer as per the BlockTime in BlockManager.

All nodes run SyncLoop which looks for the following operations:

  • Receive block headers: block headers are received through a channel HeaderInCh and Rollkit nodes attempt to verify the block with the corresponding block data.
  • Receive block data: block bodies are received through a channel blockInCh and Rollkit nodes attempt to verify the block.
  • Signal RetrieveLoop with timer as per the DABlockTime in BlockManager.

All nodes also run RetrieveLoop which is responsible for interacting with the data availability layer. It checks the last updated DAHeight to retrieve a block with timer DABlockTime signaled by SyncLoop. Note that the start height of the DA layer for the rollup, DAStartHeight, is configurable in BlockManager.

RPC

Rollkit's RPC fully implements the CometBFT RPC interfaces and APIs for querying:

  • Information about the rollup node: information such as node's health, status, and network info.
  • The rollup blockchain: getting information about the rollup blockchain such as blocks and block headers.
  • The rollup transactions: getting transaction information and broadcasting raw transactions, with search capabilities.
  • ABCI: rollup application information.

The following RPC protocols are currently supported:

  • URI over HTTP
  • JSON-RPC over HTTP
  • JSON-RPC over WebSockets

P2P layer

Rollkit's P2P layer enables direct communication between rollup nodes. It's used to gossip transactions, headers of newly created blocks, and state fraud proofs. The P2P layer is implemented using libp2p.

Rollkit uses DHT-based active peer discovery. Starting a node connects to pre-configured bootstrap peers, and advertises its namespace ID in the DHT. This solution is flexible, because multiple rollup networks may reuse the same DHT/bootstrap nodes, but specific rollup network might decide to use dedicated nodes as well.

Rollkit node types

Rollkit nodes are implemented in the node package.

Full node

Full nodes verify all blocks, and produce fraud proofs for optimistic rollups. Since they fully verify all rollup blocks, they don't rely on fraud or validity proofs for security.

Light node (work in progress)

Light nodes are light-weight rollup nodes that authenticate block headers, and can be secured by fraud proofs or validity proofs. They're recommended for average users on low-resource devices. Users running light nodes can make trust-minimized queries about the rollup's state. Currently, Rollkit light nodes are still under development.

Sequencer node

Rollups can utilize sequencer nodes. Sequencers are block producers for rollups, responsible for aggregating transactions into blocks, and typically executing transactions to produce a state root, used by the rollup's light clients.

Rollkit plans to support multiple different pluggable sequencer schemes:

Deploy in one-clickFaster soft-confirmations than L1Control over rollup's transaction orderingAtomic composability with other rollupsCensorship resistanceImplementation Status
Centralized sequencerRequires spinning up a sequencerYes ✅Yes ✅No ❌Eventual ⏳*✅ Implemented!
Decentralized sequencerRequires spinning up a sequencer setYes ✅Yes ✅No ❌Real-time ⚡️Planned
Shared decentralized sequencerYes ✅Yes ✅No ❌Yes ✅Real-time ⚡️Planned
Pure fork-choice ruleYes ✅No ❌Maybe 🟡Maybe 🟡Eventual ⏳Planned

"Pure fork-choice rule" refers to any rollup without privileged sequencers, e.g. nodes defer to the data availability layer for ordering and apply a "first-come-first-serve" fork-choice rule.

* implementation of this property is in progress.

State validity modes

Pessimistic (full nodes only)

A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup in order to check its validity. Rollkit supports pessimistic rollups by default.

Pessimistic rollups are similar to how Tether uses Bitcoin as a data availability layer via OmniLayer.

Optimistic (fraud proofs) (work in progress)

Rollkit's current design consists of a single sequencer that posts blocks to the DA layer, and multiple (optional) full nodes. Sequencers gossip block headers to full nodes and full nodes fetch posted blocks from the DA layer. Full nodes then execute transactions in these blocks to update their state, and gossip block headers over the P2P network to Rollkit light nodes.

Once state fraud proofs are enabled, when a block contains a fraudulent state transition, Rollkit full nodes can detect it by comparing intermediate state roots (ISRs) between transactions, and generate a state fraud proof that can be gossiped over the P2P network to Rollkit light nodes. These Rollkit light nodes can then use this state fraud proof to verify whether a fraudulent state transition occurred or not by themselves.

Overall, state fraud proofs will enable trust-minimization between full nodes and light nodes as long as there is at least one honest full node in the system that will generate state fraud proofs.

Note that Rollkit state fraud proofs are still a work in progress and will require new methods on top of ABCI, specifically, GenerateFraudProof, VerifyFraudProof, and GetAppHash.

You can find current detailed design and the remaining work needed to push state fraud proofs towards completion in this Architecture Decision Record (ADR).

Validity (ZK proofs)

Validity (ZK) rollups are planned, but not currently supported by Rollkit.

',54);function k(y,v,w,x,q,R){const r=i("Mermaid");return o(),n("div",null,[u,f,m,g,(o(),s(c,null,{default:a(()=>[h(r,{id:"mermaid-12",graph:"graph%20TD%0A%20%20%20%20A%5BRollkit%20Rollup%5D%0A%20%20%20%20B%5BRollkit%5D%0A%20%20%20%20C%5BData%20Availability%20Chain%5D%0A%20%20%20%20%0A%20%20%20%20A%20%3C--%3E%7CABCI%7C%20B%0A%20%20%20%20B%20%3C--%3E%7CDA%20API%7C%20C%0A"})]),fallback:a(()=>[t(" Loading... ")]),_:1})),b])}const _=l(p,[["render",k]]);export{C as __pageData,_ as default}; diff --git a/pr-339/assets/learn_stack.md.562d0dd6.lean.js b/pr-339/assets/learn_stack.md.b0a511cc.lean.js similarity index 96% rename from pr-339/assets/learn_stack.md.562d0dd6.lean.js rename to pr-339/assets/learn_stack.md.b0a511cc.lean.js index 05e3486e8..3f39bd5ef 100644 --- a/pr-339/assets/learn_stack.md.562d0dd6.lean.js +++ b/pr-339/assets/learn_stack.md.b0a511cc.lean.js @@ -1 +1 @@ -import{_ as l,K as i,o,c as n,b as s,w as a,a5 as c,k as e,a as t,X as d,O as h}from"./chunks/framework.adc83686.js";const C=JSON.parse('{"title":"Rollkit stack","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit stack | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/stack.md","filePath":"learn/stack.md","lastUpdated":1713200494000}'),p={name:"learn/stack.md"},u=e("h1",{id:"rollkit-stack",tabindex:"-1"},[t("Rollkit stack "),e("a",{class:"header-anchor",href:"#rollkit-stack","aria-label":'Permalink to "Rollkit stack"'},"​")],-1),f=e("p",null,"This page will cover the main components of Rollkit.",-1),m=e("p",null,"Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.",-1),g=e("h2",{id:"application-structure",tabindex:"-1"},[t("Application structure "),e("a",{class:"header-anchor",href:"#application-structure","aria-label":'Permalink to "Application structure"'},"​")],-1),b=d("",54);function k(y,v,w,x,q,R){const r=i("Mermaid");return o(),n("div",null,[u,f,m,g,(o(),s(c,null,{default:a(()=>[h(r,{id:"mermaid-12",graph:"graph%20TD%0A%20%20%20%20A%5BRollkit%20Rollup%5D%0A%20%20%20%20B%5BRollkit%5D%0A%20%20%20%20C%5BData%20Availability%20Chain%5D%0A%20%20%20%20%0A%20%20%20%20A%20%3C--%3E%7CABCI%7C%20B%0A%20%20%20%20B%20%3C--%3E%7CDA%20API%7C%20C%0A"})]),fallback:a(()=>[t(" Loading... ")]),_:1})),b])}const _=l(p,[["render",k]]);export{C as __pageData,_ as default}; +import{_ as l,K as i,o,c as n,b as s,w as a,a5 as c,k as e,a as t,X as d,O as h}from"./chunks/framework.adc83686.js";const C=JSON.parse('{"title":"Rollkit stack","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Rollkit stack | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/stack.md","filePath":"learn/stack.md","lastUpdated":1713275863000}'),p={name:"learn/stack.md"},u=e("h1",{id:"rollkit-stack",tabindex:"-1"},[t("Rollkit stack "),e("a",{class:"header-anchor",href:"#rollkit-stack","aria-label":'Permalink to "Rollkit stack"'},"​")],-1),f=e("p",null,"This page will cover the main components of Rollkit.",-1),m=e("p",null,"Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.",-1),g=e("h2",{id:"application-structure",tabindex:"-1"},[t("Application structure "),e("a",{class:"header-anchor",href:"#application-structure","aria-label":'Permalink to "Application structure"'},"​")],-1),b=d("",54);function k(y,v,w,x,q,R){const r=i("Mermaid");return o(),n("div",null,[u,f,m,g,(o(),s(c,null,{default:a(()=>[h(r,{id:"mermaid-12",graph:"graph%20TD%0A%20%20%20%20A%5BRollkit%20Rollup%5D%0A%20%20%20%20B%5BRollkit%5D%0A%20%20%20%20C%5BData%20Availability%20Chain%5D%0A%20%20%20%20%0A%20%20%20%20A%20%3C--%3E%7CABCI%7C%20B%0A%20%20%20%20B%20%3C--%3E%7CDA%20API%7C%20C%0A"})]),fallback:a(()=>[t(" Loading... ")]),_:1})),b])}const _=l(p,[["render",k]]);export{C as __pageData,_ as default}; diff --git a/pr-339/assets/learn_transaction-flow.md.07d7b7d4.js b/pr-339/assets/learn_transaction-flow.md.ee5b5079.js similarity index 98% rename from pr-339/assets/learn_transaction-flow.md.07d7b7d4.js rename to pr-339/assets/learn_transaction-flow.md.ee5b5079.js index ce51c4511..daf88363f 100644 --- a/pr-339/assets/learn_transaction-flow.md.07d7b7d4.js +++ b/pr-339/assets/learn_transaction-flow.md.ee5b5079.js @@ -1 +1 @@ -import{_ as r,K as d,o as t,c,b as n,w as o,a5 as l,X as h,k as a,a as e,O as s}from"./chunks/framework.adc83686.js";const D=JSON.parse('{"title":"Transaction flow","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Transaction flow | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/transaction-flow.md","filePath":"learn/transaction-flow.md","lastUpdated":1713200494000}'),u={name:"learn/transaction-flow.md"},p=h('

Transaction flow

Rollup users use a light node to communicate with the rollup P2P network for two primary reasons:

  • submitting transactions
  • gossipping headers and fraud proofs

WARNING

Light nodes are still a work in progress.

Here's what the typical transaction flow looks like:

Transaction submission

',6),f=a("h2",{id:"transaction-validation-and-processing",tabindex:"-1"},[e("Transaction validation and processing "),a("a",{class:"header-anchor",href:"#transaction-validation-and-processing","aria-label":'Permalink to "Transaction validation and processing"'},"​")],-1),m=a("h2",{id:"block-processing",tabindex:"-1"},[e("Block processing "),a("a",{class:"header-anchor",href:"#block-processing","aria-label":'Permalink to "Block processing"'},"​")],-1),A=a("h2",{id:"fraud-proof-gossip-and-forking",tabindex:"-1"},[e("Fraud proof gossip and forking "),a("a",{class:"header-anchor",href:"#fraud-proof-gossip-and-forking","aria-label":'Permalink to "Fraud proof gossip and forking"'},"​")],-1),g=a("p",null,"To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.",-1),b=a("p",null,"If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.",-1),k=a("p",null,"After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.",-1),_=a("p",null,[e("As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes "),a("a",{href:"/docs-preview/pr-339/learn/stack#sequencer-node"},"here"),e(".")],-1);function w(E,N,v,F,y,T){const i=d("Mermaid");return t(),c("div",null,[p,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-29",graph:"sequenceDiagram%0A%20%20%20%20participant%20User%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20%0A%20%20%20%20User-%3E%3ELightNode%3A%20Submit%20Transaction%0A%20%20%20%20LightNode-%3E%3EFullNode%3A%20Gossip%20Transaction%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Refuse%20(if%20invalid)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),f,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-33",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20Sequencer%0A%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Check%20Validity%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Add%20to%20Mempool%20(if%20valid)%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Transaction%20Processed%20(if%20valid)%0A%20%20%20%20FullNode-%3E%3ESequencer%3A%20Inform%20about%20Valid%20Transaction%0A%20%20%20%20Sequencer-%3E%3EDALayer%3A%20Add%20to%20Rollup%20Block%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),m,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-37",graph:"sequenceDiagram%0A%20%20%20%20participant%20DALayer%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20DALayer-%3E%3ERollupChain%3A%20Update%20State%0A%20%20%20%20DALayer-%3E%3EFullNode%3A%20Download%20%26%20Validate%20Block%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Generate%20Fraud%20Proofs%20(if%20invalid)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),A,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-41",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20FullNode-%3E%3ELightNode%3A%20Gossip%20Fraud%20Proofs%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3ERollupChain%3A%20Halt%20%26%20Decide%20to%20Fork%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3EDALayer%3A%20Submit%20New%20Block%20(after%20fork)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),g,b,k,_])}const P=r(u,[["render",w]]);export{D as __pageData,P as default}; +import{_ as r,K as d,o as t,c,b as n,w as o,a5 as l,X as h,k as a,a as e,O as s}from"./chunks/framework.adc83686.js";const D=JSON.parse('{"title":"Transaction flow","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Transaction flow | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/transaction-flow.md","filePath":"learn/transaction-flow.md","lastUpdated":1713275863000}'),u={name:"learn/transaction-flow.md"},p=h('

Transaction flow

Rollup users use a light node to communicate with the rollup P2P network for two primary reasons:

  • submitting transactions
  • gossipping headers and fraud proofs

WARNING

Light nodes are still a work in progress.

Here's what the typical transaction flow looks like:

Transaction submission

',6),f=a("h2",{id:"transaction-validation-and-processing",tabindex:"-1"},[e("Transaction validation and processing "),a("a",{class:"header-anchor",href:"#transaction-validation-and-processing","aria-label":'Permalink to "Transaction validation and processing"'},"​")],-1),m=a("h2",{id:"block-processing",tabindex:"-1"},[e("Block processing "),a("a",{class:"header-anchor",href:"#block-processing","aria-label":'Permalink to "Block processing"'},"​")],-1),A=a("h2",{id:"fraud-proof-gossip-and-forking",tabindex:"-1"},[e("Fraud proof gossip and forking "),a("a",{class:"header-anchor",href:"#fraud-proof-gossip-and-forking","aria-label":'Permalink to "Fraud proof gossip and forking"'},"​")],-1),g=a("p",null,"To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.",-1),b=a("p",null,"If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.",-1),k=a("p",null,"After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.",-1),_=a("p",null,[e("As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes "),a("a",{href:"/docs-preview/pr-339/learn/stack#sequencer-node"},"here"),e(".")],-1);function w(E,N,v,F,y,T){const i=d("Mermaid");return t(),c("div",null,[p,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-29",graph:"sequenceDiagram%0A%20%20%20%20participant%20User%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20%0A%20%20%20%20User-%3E%3ELightNode%3A%20Submit%20Transaction%0A%20%20%20%20LightNode-%3E%3EFullNode%3A%20Gossip%20Transaction%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Refuse%20(if%20invalid)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),f,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-33",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20Sequencer%0A%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Check%20Validity%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Add%20to%20Mempool%20(if%20valid)%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Transaction%20Processed%20(if%20valid)%0A%20%20%20%20FullNode-%3E%3ESequencer%3A%20Inform%20about%20Valid%20Transaction%0A%20%20%20%20Sequencer-%3E%3EDALayer%3A%20Add%20to%20Rollup%20Block%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),m,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-37",graph:"sequenceDiagram%0A%20%20%20%20participant%20DALayer%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20DALayer-%3E%3ERollupChain%3A%20Update%20State%0A%20%20%20%20DALayer-%3E%3EFullNode%3A%20Download%20%26%20Validate%20Block%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Generate%20Fraud%20Proofs%20(if%20invalid)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),A,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-41",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20FullNode-%3E%3ELightNode%3A%20Gossip%20Fraud%20Proofs%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3ERollupChain%3A%20Halt%20%26%20Decide%20to%20Fork%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3EDALayer%3A%20Submit%20New%20Block%20(after%20fork)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),g,b,k,_])}const P=r(u,[["render",w]]);export{D as __pageData,P as default}; diff --git a/pr-339/assets/learn_transaction-flow.md.07d7b7d4.lean.js b/pr-339/assets/learn_transaction-flow.md.ee5b5079.lean.js similarity index 98% rename from pr-339/assets/learn_transaction-flow.md.07d7b7d4.lean.js rename to pr-339/assets/learn_transaction-flow.md.ee5b5079.lean.js index 770c38e7a..700b6d283 100644 --- a/pr-339/assets/learn_transaction-flow.md.07d7b7d4.lean.js +++ b/pr-339/assets/learn_transaction-flow.md.ee5b5079.lean.js @@ -1 +1 @@ -import{_ as r,K as d,o as t,c,b as n,w as o,a5 as l,X as h,k as a,a as e,O as s}from"./chunks/framework.adc83686.js";const D=JSON.parse('{"title":"Transaction flow","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Transaction flow | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/transaction-flow.md","filePath":"learn/transaction-flow.md","lastUpdated":1713200494000}'),u={name:"learn/transaction-flow.md"},p=h("",6),f=a("h2",{id:"transaction-validation-and-processing",tabindex:"-1"},[e("Transaction validation and processing "),a("a",{class:"header-anchor",href:"#transaction-validation-and-processing","aria-label":'Permalink to "Transaction validation and processing"'},"​")],-1),m=a("h2",{id:"block-processing",tabindex:"-1"},[e("Block processing "),a("a",{class:"header-anchor",href:"#block-processing","aria-label":'Permalink to "Block processing"'},"​")],-1),A=a("h2",{id:"fraud-proof-gossip-and-forking",tabindex:"-1"},[e("Fraud proof gossip and forking "),a("a",{class:"header-anchor",href:"#fraud-proof-gossip-and-forking","aria-label":'Permalink to "Fraud proof gossip and forking"'},"​")],-1),g=a("p",null,"To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.",-1),b=a("p",null,"If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.",-1),k=a("p",null,"After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.",-1),_=a("p",null,[e("As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes "),a("a",{href:"/docs-preview/pr-339/learn/stack#sequencer-node"},"here"),e(".")],-1);function w(E,N,v,F,y,T){const i=d("Mermaid");return t(),c("div",null,[p,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-29",graph:"sequenceDiagram%0A%20%20%20%20participant%20User%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20%0A%20%20%20%20User-%3E%3ELightNode%3A%20Submit%20Transaction%0A%20%20%20%20LightNode-%3E%3EFullNode%3A%20Gossip%20Transaction%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Refuse%20(if%20invalid)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),f,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-33",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20Sequencer%0A%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Check%20Validity%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Add%20to%20Mempool%20(if%20valid)%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Transaction%20Processed%20(if%20valid)%0A%20%20%20%20FullNode-%3E%3ESequencer%3A%20Inform%20about%20Valid%20Transaction%0A%20%20%20%20Sequencer-%3E%3EDALayer%3A%20Add%20to%20Rollup%20Block%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),m,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-37",graph:"sequenceDiagram%0A%20%20%20%20participant%20DALayer%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20DALayer-%3E%3ERollupChain%3A%20Update%20State%0A%20%20%20%20DALayer-%3E%3EFullNode%3A%20Download%20%26%20Validate%20Block%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Generate%20Fraud%20Proofs%20(if%20invalid)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),A,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-41",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20FullNode-%3E%3ELightNode%3A%20Gossip%20Fraud%20Proofs%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3ERollupChain%3A%20Halt%20%26%20Decide%20to%20Fork%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3EDALayer%3A%20Submit%20New%20Block%20(after%20fork)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),g,b,k,_])}const P=r(u,[["render",w]]);export{D as __pageData,P as default}; +import{_ as r,K as d,o as t,c,b as n,w as o,a5 as l,X as h,k as a,a as e,O as s}from"./chunks/framework.adc83686.js";const D=JSON.parse('{"title":"Transaction flow","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Transaction flow | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"learn/transaction-flow.md","filePath":"learn/transaction-flow.md","lastUpdated":1713275863000}'),u={name:"learn/transaction-flow.md"},p=h("",6),f=a("h2",{id:"transaction-validation-and-processing",tabindex:"-1"},[e("Transaction validation and processing "),a("a",{class:"header-anchor",href:"#transaction-validation-and-processing","aria-label":'Permalink to "Transaction validation and processing"'},"​")],-1),m=a("h2",{id:"block-processing",tabindex:"-1"},[e("Block processing "),a("a",{class:"header-anchor",href:"#block-processing","aria-label":'Permalink to "Block processing"'},"​")],-1),A=a("h2",{id:"fraud-proof-gossip-and-forking",tabindex:"-1"},[e("Fraud proof gossip and forking "),a("a",{class:"header-anchor",href:"#fraud-proof-gossip-and-forking","aria-label":'Permalink to "Fraud proof gossip and forking"'},"​")],-1),g=a("p",null,"To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.",-1),b=a("p",null,"If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.",-1),k=a("p",null,"After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.",-1),_=a("p",null,[e("As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes "),a("a",{href:"/docs-preview/pr-339/learn/stack#sequencer-node"},"here"),e(".")],-1);function w(E,N,v,F,y,T){const i=d("Mermaid");return t(),c("div",null,[p,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-29",graph:"sequenceDiagram%0A%20%20%20%20participant%20User%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20%0A%20%20%20%20User-%3E%3ELightNode%3A%20Submit%20Transaction%0A%20%20%20%20LightNode-%3E%3EFullNode%3A%20Gossip%20Transaction%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Refuse%20(if%20invalid)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),f,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-33",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20Sequencer%0A%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Check%20Validity%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Add%20to%20Mempool%20(if%20valid)%0A%20%20%20%20FullNode--%3E%3EUser%3A%20Transaction%20Processed%20(if%20valid)%0A%20%20%20%20FullNode-%3E%3ESequencer%3A%20Inform%20about%20Valid%20Transaction%0A%20%20%20%20Sequencer-%3E%3EDALayer%3A%20Add%20to%20Rollup%20Block%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),m,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-37",graph:"sequenceDiagram%0A%20%20%20%20participant%20DALayer%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20DALayer-%3E%3ERollupChain%3A%20Update%20State%0A%20%20%20%20DALayer-%3E%3EFullNode%3A%20Download%20%26%20Validate%20Block%0A%20%20%20%20FullNode-%3E%3EFullNode%3A%20Generate%20Fraud%20Proofs%20(if%20invalid)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),A,(t(),n(l,null,{default:o(()=>[s(i,{id:"mermaid-41",graph:"sequenceDiagram%0A%20%20%20%20participant%20FullNode%0A%20%20%20%20participant%20LightNode%0A%20%20%20%20participant%20RollupChain%0A%0A%20%20%20%20FullNode-%3E%3ELightNode%3A%20Gossip%20Fraud%20Proofs%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3ERollupChain%3A%20Halt%20%26%20Decide%20to%20Fork%20(if%20invalid)%0A%20%20%20%20RollupChain-%3E%3EDALayer%3A%20Submit%20New%20Block%20(after%20fork)%0A"})]),fallback:o(()=>[e(" Loading... ")]),_:1})),g,b,k,_])}const P=r(u,[["render",w]]);export{D as __pageData,P as default}; diff --git a/pr-339/assets/networks_cosmwasm-testnet.md.1f0295ca.js b/pr-339/assets/networks_cosmwasm-testnet.md.5904b9ab.js similarity index 92% rename from pr-339/assets/networks_cosmwasm-testnet.md.1f0295ca.js rename to pr-339/assets/networks_cosmwasm-testnet.md.5904b9ab.js index 01beb51b7..e377488af 100644 --- a/pr-339/assets/networks_cosmwasm-testnet.md.1f0295ca.js +++ b/pr-339/assets/networks_cosmwasm-testnet.md.5904b9ab.js @@ -1,4 +1,4 @@ -import{_ as c,$ as r,o as p,c as t,k as e,a as l,O as F,X as y}from"./chunks/framework.adc83686.js";const C="/docs-preview/pr-339/assets/faucet.a7295624.png",A="/docs-preview/pr-339/assets/keplr.7151e633.png",i={name:"app",methods:{async addNetwork(){try{const s=await r(()=>import("./chunks/rosm.edd5b616.js"),[]);console.log("got back settings",s);try{await window.keplr.enable(s.chainId),alert(s.chainId+" already added")}catch{console.log("Unable to connect to wallet natively, so trying experimental chain");try{await window.keplr.experimentalSuggestChain(s),await window.keplr.enable(s.chainId)}catch(n){console.log("and yet there is a problem in trying to do that too",n)}}}catch(s){if(s instanceof SyntaxError)alert("There was a syntax error. Please correct it and try again: "+s.message);else throw s}}}},u=e("img",{src:A,alt:"",width:"20",height:"20"},null,-1),q=[u];function d(s,a,n,E,_,o){return p(),t("button",{onClick:a[0]||(a[0]=(...D)=>o.addNetwork&&o.addNetwork(...D))},q)}const h=c(i,[["render",d]]),m=y(`

Cosmwasm Testnet

Our cosmwasm testnet is deployed by following the cosmwasm tutorial. The rollkit/wasmd contains the code for the same.

Details of ROSM testnet

  • Chain ID: rosm
  • Address Prefix: wasm
    • e.g., wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5
  • Rollkit version: v0.13.1
  • RPC: https://rpc.rosm.rollkit.dev/
    • Example: https://rpc.rosm.rollkit.dev/block?height=1

      json
      {
      +import{_ as c,$ as r,o as p,c as t,k as e,a as l,O as F,X as y}from"./chunks/framework.adc83686.js";const C="/docs-preview/pr-339/assets/faucet.a7295624.png",A="/docs-preview/pr-339/assets/keplr.7151e633.png",i={name:"app",methods:{async addNetwork(){try{const s=await r(()=>import("./chunks/rosm.edd5b616.js"),[]);console.log("got back settings",s);try{await window.keplr.enable(s.chainId),alert(s.chainId+" already added")}catch{console.log("Unable to connect to wallet natively, so trying experimental chain");try{await window.keplr.experimentalSuggestChain(s),await window.keplr.enable(s.chainId)}catch(n){console.log("and yet there is a problem in trying to do that too",n)}}}catch(s){if(s instanceof SyntaxError)alert("There was a syntax error. Please correct it and try again: "+s.message);else throw s}}}},u=e("img",{src:A,alt:"",width:"20",height:"20"},null,-1),q=[u];function d(s,a,n,_,E,o){return p(),t("button",{onClick:a[0]||(a[0]=(...D)=>o.addNetwork&&o.addNetwork(...D))},q)}const h=c(i,[["render",d]]),m=y(`

      Cosmwasm Testnet

      Our cosmwasm testnet is deployed by following the cosmwasm tutorial. The rollkit/wasmd contains the code for the same.

      Details of ROSM testnet

      • Chain ID: rosm
      • Address Prefix: wasm
        • e.g., wasm1lysztpn74kl40w6ghfhy7xr0v44r658szuysl5
      • Rollkit version: v0.13.1
      • RPC: https://rpc.rosm.rollkit.dev/
        • Example: https://rpc.rosm.rollkit.dev/block?height=1

          json
          {
               "jsonrpc": "2.0",
               "result": {
                   "block_id": {
          @@ -69,4 +69,4 @@ import{_ as c,$ as r,o as p,c as t,k as e,a as l,O as F,X as y}from"./chunks/fra
                   "account_number": "7",
                   "sequence": "0"
               }
          -}
        • Block Explorer: https://canary.modular.cloud/rollkit-cosmwasm
        • Faucet: https://faucet.rosm.rollkit.dev/
          • You can request 1 rosm (or 1000000urosm) every 24 hours.
            Faucet
        • Mocha Namespace: 000000000000000000000000000000000000b7b24d9321578eb83626
        • DA Block Time: 15s
        • Rollup Block Time: 10s

        Add Rosm to Keplr

        Don't have the Keplr Browser extension? Add Keplr Wallet Here

        ',6),w=JSON.parse('{"title":"Cosmwasm Testnet","description":"This page provides details about Rollkit testnets.","frontmatter":{"description":"This page provides details about Rollkit testnets.","head":[["meta",{"name":"og:title","content":"Cosmwasm Testnet | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"networks/cosmwasm-testnet.md","filePath":"networks/cosmwasm-testnet.md","lastUpdated":1713200494000}'),B={name:"networks/cosmwasm-testnet.md"},g=Object.assign(B,{setup(s){return(a,n)=>(p(),t("div",null,[m,e("p",null,[l("Click "),F(h),l(" to add Rosm testnet to your Keplr wallet")])]))}});export{w as __pageData,g as default}; +}
    • Block Explorer: https://canary.modular.cloud/rollkit-cosmwasm
    • Faucet: https://faucet.rosm.rollkit.dev/
      • You can request 1 rosm (or 1000000urosm) every 24 hours.
        Faucet
    • Mocha Namespace: 000000000000000000000000000000000000b7b24d9321578eb83626
    • DA Block Time: 15s
    • Rollup Block Time: 10s

    Add Rosm to Keplr

    Don't have the Keplr Browser extension? Add Keplr Wallet Here

    ',6),g=JSON.parse('{"title":"Cosmwasm Testnet","description":"This page provides details about Rollkit testnets.","frontmatter":{"description":"This page provides details about Rollkit testnets.","head":[["meta",{"name":"og:title","content":"Cosmwasm Testnet | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"networks/cosmwasm-testnet.md","filePath":"networks/cosmwasm-testnet.md","lastUpdated":1713275863000}'),B={name:"networks/cosmwasm-testnet.md"},w=Object.assign(B,{setup(s){return(a,n)=>(p(),t("div",null,[m,e("p",null,[l("Click "),F(h),l(" to add Rosm testnet to your Keplr wallet")])]))}});export{g as __pageData,w as default}; diff --git a/pr-339/assets/networks_cosmwasm-testnet.md.1f0295ca.lean.js b/pr-339/assets/networks_cosmwasm-testnet.md.5904b9ab.lean.js similarity index 79% rename from pr-339/assets/networks_cosmwasm-testnet.md.1f0295ca.lean.js rename to pr-339/assets/networks_cosmwasm-testnet.md.5904b9ab.lean.js index c952f5c43..c29bf95bb 100644 --- a/pr-339/assets/networks_cosmwasm-testnet.md.1f0295ca.lean.js +++ b/pr-339/assets/networks_cosmwasm-testnet.md.5904b9ab.lean.js @@ -1 +1 @@ -import{_ as c,$ as r,o as p,c as t,k as e,a as l,O as F,X as y}from"./chunks/framework.adc83686.js";const C="/docs-preview/pr-339/assets/faucet.a7295624.png",A="/docs-preview/pr-339/assets/keplr.7151e633.png",i={name:"app",methods:{async addNetwork(){try{const s=await r(()=>import("./chunks/rosm.edd5b616.js"),[]);console.log("got back settings",s);try{await window.keplr.enable(s.chainId),alert(s.chainId+" already added")}catch{console.log("Unable to connect to wallet natively, so trying experimental chain");try{await window.keplr.experimentalSuggestChain(s),await window.keplr.enable(s.chainId)}catch(n){console.log("and yet there is a problem in trying to do that too",n)}}}catch(s){if(s instanceof SyntaxError)alert("There was a syntax error. Please correct it and try again: "+s.message);else throw s}}}},u=e("img",{src:A,alt:"",width:"20",height:"20"},null,-1),q=[u];function d(s,a,n,E,_,o){return p(),t("button",{onClick:a[0]||(a[0]=(...D)=>o.addNetwork&&o.addNetwork(...D))},q)}const h=c(i,[["render",d]]),m=y("",6),w=JSON.parse('{"title":"Cosmwasm Testnet","description":"This page provides details about Rollkit testnets.","frontmatter":{"description":"This page provides details about Rollkit testnets.","head":[["meta",{"name":"og:title","content":"Cosmwasm Testnet | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"networks/cosmwasm-testnet.md","filePath":"networks/cosmwasm-testnet.md","lastUpdated":1713200494000}'),B={name:"networks/cosmwasm-testnet.md"},g=Object.assign(B,{setup(s){return(a,n)=>(p(),t("div",null,[m,e("p",null,[l("Click "),F(h),l(" to add Rosm testnet to your Keplr wallet")])]))}});export{w as __pageData,g as default}; +import{_ as c,$ as r,o as p,c as t,k as e,a as l,O as F,X as y}from"./chunks/framework.adc83686.js";const C="/docs-preview/pr-339/assets/faucet.a7295624.png",A="/docs-preview/pr-339/assets/keplr.7151e633.png",i={name:"app",methods:{async addNetwork(){try{const s=await r(()=>import("./chunks/rosm.edd5b616.js"),[]);console.log("got back settings",s);try{await window.keplr.enable(s.chainId),alert(s.chainId+" already added")}catch{console.log("Unable to connect to wallet natively, so trying experimental chain");try{await window.keplr.experimentalSuggestChain(s),await window.keplr.enable(s.chainId)}catch(n){console.log("and yet there is a problem in trying to do that too",n)}}}catch(s){if(s instanceof SyntaxError)alert("There was a syntax error. Please correct it and try again: "+s.message);else throw s}}}},u=e("img",{src:A,alt:"",width:"20",height:"20"},null,-1),q=[u];function d(s,a,n,_,E,o){return p(),t("button",{onClick:a[0]||(a[0]=(...D)=>o.addNetwork&&o.addNetwork(...D))},q)}const h=c(i,[["render",d]]),m=y("",6),g=JSON.parse('{"title":"Cosmwasm Testnet","description":"This page provides details about Rollkit testnets.","frontmatter":{"description":"This page provides details about Rollkit testnets.","head":[["meta",{"name":"og:title","content":"Cosmwasm Testnet | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"networks/cosmwasm-testnet.md","filePath":"networks/cosmwasm-testnet.md","lastUpdated":1713275863000}'),B={name:"networks/cosmwasm-testnet.md"},w=Object.assign(B,{setup(s){return(a,n)=>(p(),t("div",null,[m,e("p",null,[l("Click "),F(h),l(" to add Rosm testnet to your Keplr wallet")])]))}});export{g as __pageData,w as default}; diff --git a/pr-339/assets/tutorials_bitcoin.md.9039d8f1.js b/pr-339/assets/tutorials_bitcoin.md.866ed09f.js similarity index 99% rename from pr-339/assets/tutorials_bitcoin.md.9039d8f1.js rename to pr-339/assets/tutorials_bitcoin.md.866ed09f.js index cea8c77e2..c792d6c2b 100644 --- a/pr-339/assets/tutorials_bitcoin.md.9039d8f1.js +++ b/pr-339/assets/tutorials_bitcoin.md.866ed09f.js @@ -1,4 +1,4 @@ -import{_ as s}from"./chunks/rollkit-bitcoin-1.019c5d05.js";import{_ as a,o as n,c as l,X as o}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"Bitcoin rollup tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Bitcoin rollup tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/bitcoin.md","filePath":"tutorials/bitcoin.md","lastUpdated":1713200494000}'),p={name:"tutorials/bitcoin.md"},e=o('

    Bitcoin rollup tutorial

    ☀️Introduction

    In this tutorial, we will explore how to use Rollkit to create sovereign rollups on Bitcoin. First, we will install Bitcoin Core to run a local testnet. Then, we will install and set up a Rollkit node to work with Bitcoin as a data availability layer. Lastly, we'll look at how to create a custom EVM execution environment and how to deploy a sovereign rollup on Bitcoin using Rollkit.

    By the end of this tutorial, you will have a good understanding of how Rollkit works and how to create sovereign rollups on Bitcoin using Rollkit. You will also have the knowledge and skills needed to customize Rollkit with different execution environments and data availability layers, opening up new possibilities for creating scalable and efficient blockchain applications.

    Read more in our blog post.

    rollkit-bitcoin

    📖 The stack

    Sovereign rollups on Bitcoin are made possible through a module that allows Rollkit rollups to use Bitcoin for data availability. This integration opens up possibilities for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and security guarantees.

    The Taproot upgrade and Ordinals usage of Bitcoin for publishing arbitrary data made it possible to integrate Bitcoin as a data availability layer into Rollkit. The modular design of Rollkit allows for easy integration of new data availability layers, making it possible to deploy sovereign rollups on Bitcoin.

    The goal of Rollkit is to make it easy to build and customize rollups, enabling developers to build sovereign rollups on Bitcoin or customize Rollkit with different execution environments and data availability layers.

    💻 Prerequisites

    An Ubuntu machine with:

    • 8GB RAM
    • 160 GB SSD
    • Ubuntu 22.10
    • 4 core AMD CPU

    🛠️ Dependency setup

    First, make sure to update and upgrade the OS:

    bash
    sudo apt update && sudo apt upgrade -y

    These are essential packages that are necessary to execute many tasks like downloading files, compiling, and monitoring the nodes:

    bash
    sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu snapd npm -y

    Now, we will install the remaining dependencies.

    🏃 Golang

    We will use golang to build and run our test networks. Install it for AMD with these commands:

    bash
    ver="1.19.1"
    +import{_ as s}from"./chunks/rollkit-bitcoin-1.019c5d05.js";import{_ as a,o as n,c as l,X as o}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"Bitcoin rollup tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Bitcoin rollup tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/bitcoin.md","filePath":"tutorials/bitcoin.md","lastUpdated":1713275863000}'),p={name:"tutorials/bitcoin.md"},e=o('

    Bitcoin rollup tutorial

    ☀️Introduction

    In this tutorial, we will explore how to use Rollkit to create sovereign rollups on Bitcoin. First, we will install Bitcoin Core to run a local testnet. Then, we will install and set up a Rollkit node to work with Bitcoin as a data availability layer. Lastly, we'll look at how to create a custom EVM execution environment and how to deploy a sovereign rollup on Bitcoin using Rollkit.

    By the end of this tutorial, you will have a good understanding of how Rollkit works and how to create sovereign rollups on Bitcoin using Rollkit. You will also have the knowledge and skills needed to customize Rollkit with different execution environments and data availability layers, opening up new possibilities for creating scalable and efficient blockchain applications.

    Read more in our blog post.

    rollkit-bitcoin

    📖 The stack

    Sovereign rollups on Bitcoin are made possible through a module that allows Rollkit rollups to use Bitcoin for data availability. This integration opens up possibilities for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and security guarantees.

    The Taproot upgrade and Ordinals usage of Bitcoin for publishing arbitrary data made it possible to integrate Bitcoin as a data availability layer into Rollkit. The modular design of Rollkit allows for easy integration of new data availability layers, making it possible to deploy sovereign rollups on Bitcoin.

    The goal of Rollkit is to make it easy to build and customize rollups, enabling developers to build sovereign rollups on Bitcoin or customize Rollkit with different execution environments and data availability layers.

    💻 Prerequisites

    An Ubuntu machine with:

    • 8GB RAM
    • 160 GB SSD
    • Ubuntu 22.10
    • 4 core AMD CPU

    🛠️ Dependency setup

    First, make sure to update and upgrade the OS:

    bash
    sudo apt update && sudo apt upgrade -y

    These are essential packages that are necessary to execute many tasks like downloading files, compiling, and monitoring the nodes:

    bash
    sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu snapd npm -y

    Now, we will install the remaining dependencies.

    🏃 Golang

    We will use golang to build and run our test networks. Install it for AMD with these commands:

    bash
    ver="1.19.1"
     cd $HOME
     wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
     sudo rm -rf /usr/local/go
    diff --git a/pr-339/assets/tutorials_bitcoin.md.9039d8f1.lean.js b/pr-339/assets/tutorials_bitcoin.md.866ed09f.lean.js
    similarity index 89%
    rename from pr-339/assets/tutorials_bitcoin.md.9039d8f1.lean.js
    rename to pr-339/assets/tutorials_bitcoin.md.866ed09f.lean.js
    index e019e210c..9df0ac2d6 100644
    --- a/pr-339/assets/tutorials_bitcoin.md.9039d8f1.lean.js
    +++ b/pr-339/assets/tutorials_bitcoin.md.866ed09f.lean.js
    @@ -1 +1 @@
    -import{_ as s}from"./chunks/rollkit-bitcoin-1.019c5d05.js";import{_ as a,o as n,c as l,X as o}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"Bitcoin rollup tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Bitcoin rollup tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/bitcoin.md","filePath":"tutorials/bitcoin.md","lastUpdated":1713200494000}'),p={name:"tutorials/bitcoin.md"},e=o("",138),t=[e];function c(r,i,C,y,D,A){return n(),l("div",null,t)}const u=a(p,[["render",c]]);export{h as __pageData,u as default};
    +import{_ as s}from"./chunks/rollkit-bitcoin-1.019c5d05.js";import{_ as a,o as n,c as l,X as o}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"Bitcoin rollup tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Bitcoin rollup tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/bitcoin.md","filePath":"tutorials/bitcoin.md","lastUpdated":1713275863000}'),p={name:"tutorials/bitcoin.md"},e=o("",138),t=[e];function c(r,i,C,y,D,A){return n(),l("div",null,t)}const u=a(p,[["render",c]]);export{h as __pageData,u as default};
    diff --git a/pr-339/assets/tutorials_block-times.md.89e34d16.js b/pr-339/assets/tutorials_block-times.md.68d8d789.js
    similarity index 98%
    rename from pr-339/assets/tutorials_block-times.md.89e34d16.js
    rename to pr-339/assets/tutorials_block-times.md.68d8d789.js
    index f38d6f6fc..f8b40da4d 100644
    --- a/pr-339/assets/tutorials_block-times.md.89e34d16.js
    +++ b/pr-339/assets/tutorials_block-times.md.68d8d789.js
    @@ -1,3 +1,3 @@
    -import{_ as s,o as e,c as a,X as o}from"./chunks/framework.adc83686.js";const u=JSON.parse('{"title":"How to change speed of block production","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to change speed of block production | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/block-times.md","filePath":"tutorials/block-times.md","lastUpdated":1713200494000}'),t={name:"tutorials/block-times.md"},l=o(`

    How to change speed of block production

    If you have gone through both the GM world and the Full and sequencer node rollup setup already, you're now ready to experiment with faster block times.

    In your gmd start [args...] command, you will need to add a flag and then the argument for block time.

    The flag is:

    bash
    --rollkit.block_time 1s

    Where 1s can be adjusted to the speed of your choosing.

    Here is an example:

    bash
    # start the chain
    +import{_ as s,o as e,c as a,X as o}from"./chunks/framework.adc83686.js";const u=JSON.parse('{"title":"How to change speed of block production","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to change speed of block production | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/block-times.md","filePath":"tutorials/block-times.md","lastUpdated":1713275863000}'),t={name:"tutorials/block-times.md"},l=o(`

    How to change speed of block production

    If you have gone through both the GM world and the Full and sequencer node rollup setup already, you're now ready to experiment with faster block times.

    In your gmd start [args...] command, you will need to add a flag and then the argument for block time.

    The flag is:

    bash
    --rollkit.block_time 1s

    Where 1s can be adjusted to the speed of your choosing.

    Here is an example:

    bash
    # start the chain
     gmd start [existing flags...] 
     gmd start [existing flags...] --rollkit.block_time 1s 

    In the above example, we've changed it to one second blocks. Alternatively, you could slow your rollup down to 30 seconds:

    bash
    --rollkit.block_time 30s

    Or speed it up even more, to sub-second block times (100 milliseconds):

    bash
    --rollkit.block_time 0.1ms
    `,12),n=[l];function p(c,r,i,d,h,C){return e(),a("div",null,n)}const m=s(t,[["render",p]]);export{u as __pageData,m as default}; diff --git a/pr-339/assets/tutorials_block-times.md.89e34d16.lean.js b/pr-339/assets/tutorials_block-times.md.68d8d789.lean.js similarity index 89% rename from pr-339/assets/tutorials_block-times.md.89e34d16.lean.js rename to pr-339/assets/tutorials_block-times.md.68d8d789.lean.js index 318e89f27..be12507f7 100644 --- a/pr-339/assets/tutorials_block-times.md.89e34d16.lean.js +++ b/pr-339/assets/tutorials_block-times.md.68d8d789.lean.js @@ -1 +1 @@ -import{_ as s,o as e,c as a,X as o}from"./chunks/framework.adc83686.js";const u=JSON.parse('{"title":"How to change speed of block production","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to change speed of block production | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/block-times.md","filePath":"tutorials/block-times.md","lastUpdated":1713200494000}'),t={name:"tutorials/block-times.md"},l=o("",12),n=[l];function p(c,r,i,d,h,C){return e(),a("div",null,n)}const m=s(t,[["render",p]]);export{u as __pageData,m as default}; +import{_ as s,o as e,c as a,X as o}from"./chunks/framework.adc83686.js";const u=JSON.parse('{"title":"How to change speed of block production","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to change speed of block production | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/block-times.md","filePath":"tutorials/block-times.md","lastUpdated":1713275863000}'),t={name:"tutorials/block-times.md"},l=o("",12),n=[l];function p(c,r,i,d,h,C){return e(),a("div",null,n)}const m=s(t,[["render",p]]);export{u as __pageData,m as default}; diff --git a/pr-339/assets/tutorials_cosmwasm.md.7a5ac2c7.js b/pr-339/assets/tutorials_cosmwasm.md.f840ff53.js similarity index 99% rename from pr-339/assets/tutorials_cosmwasm.md.7a5ac2c7.js rename to pr-339/assets/tutorials_cosmwasm.md.f840ff53.js index be096b9bc..e2c6ec663 100644 --- a/pr-339/assets/tutorials_cosmwasm.md.7a5ac2c7.js +++ b/pr-339/assets/tutorials_cosmwasm.md.f840ff53.js @@ -1,4 +1,4 @@ -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const d=JSON.parse('{"title":"🗞️ CosmWasm rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ CosmWasm rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/cosmwasm.md","filePath":"tutorials/cosmwasm.md","lastUpdated":1713200494000}'),l={name:"tutorials/cosmwasm.md"},e=o(`

    🗞️ CosmWasm rollup

    CosmWasm is a smart contracting platform built for the Cosmos ecosystem by making use of WebAssembly (Wasm) to build smart contracts for Cosmos-SDK. In this tutorial, we will be exploring how to integrate CosmWasm with Celestia's data availability layer using Rollkit.

    TIP

    This tutorial will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github Issue ticket or let us know in our Telegram.

    Learn how to restart your rollup.

    WARNING

    The script for this tutorial is built for Celestia's Mocha testnet.

    You can learn more about CosmWasm here.

    The smart contract we will use for this tutorial is one provided by the CosmWasm team for Nameservice purchasing.

    You can check out the contract here.

    How to write the Rust smart contract for Nameservice is outside the scope of this tutorial. In the future we will add more tutorials for writing CosmWasm smart contracts for Celestia.

    💻 CosmWasm dependency installations

    🛠️ Environment setup

    For this tutorial, we will be using curl and jq as helpful tools. You can follow the guide on installing them here.

    🏃 Golang dependency

    The Golang version used for this tutorial is v1.19+

    You can install Golang by following our tutorial here.

    🦀 Rust installation

    🔨 Rustup

    First, before installing Rust, you would need to install rustup.

    On Mac and Linux systems, here are the commands for installing it:

    bash
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

    TIP

    You will see a note similar to below after installing Rust:

    bash
    Rust is installed now. Great!
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const d=JSON.parse('{"title":"🗞️ CosmWasm rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ CosmWasm rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/cosmwasm.md","filePath":"tutorials/cosmwasm.md","lastUpdated":1713275863000}'),l={name:"tutorials/cosmwasm.md"},e=o(`

    🗞️ CosmWasm rollup

    CosmWasm is a smart contracting platform built for the Cosmos ecosystem by making use of WebAssembly (Wasm) to build smart contracts for Cosmos-SDK. In this tutorial, we will be exploring how to integrate CosmWasm with Celestia's data availability layer using Rollkit.

    TIP

    This tutorial will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github Issue ticket or let us know in our Telegram.

    Learn how to restart your rollup.

    WARNING

    The script for this tutorial is built for Celestia's Mocha testnet.

    You can learn more about CosmWasm here.

    The smart contract we will use for this tutorial is one provided by the CosmWasm team for Nameservice purchasing.

    You can check out the contract here.

    How to write the Rust smart contract for Nameservice is outside the scope of this tutorial. In the future we will add more tutorials for writing CosmWasm smart contracts for Celestia.

    💻 CosmWasm dependency installations

    🛠️ Environment setup

    For this tutorial, we will be using curl and jq as helpful tools. You can follow the guide on installing them here.

    🏃 Golang dependency

    The Golang version used for this tutorial is v1.19+

    You can install Golang by following our tutorial here.

    🦀 Rust installation

    🔨 Rustup

    First, before installing Rust, you would need to install rustup.

    On Mac and Linux systems, here are the commands for installing it:

    bash
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

    TIP

    You will see a note similar to below after installing Rust:

    bash
    Rust is installed now. Great!
     
     To get started you may need to restart your current shell.
     This would reload your PATH environment variable to include
    @@ -29,13 +29,13 @@ import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const d=
     wget https://raw.githubusercontent.com/rollkit/docs/main/scripts/cosmwasm/init.sh

    This copies over our init.sh script to initialize our CosmWasm rollup.

    You can view the contents of the script to see how we initialize the CosmWasm Rollup.

    You can initialize the script with the following command:

    bash
    bash init.sh

    With that, we have kickstarted our wasmd network!

    View your rollup by finding your namespace or account Celenium.

    View the example rollup's namespace on Celenium.

    💠 Optional: see what's inside the script

    You can skip this section, but it is important to know how Rollkit is initializing the cosmwasm rollup.

    View the script here.

    📒 Contract deployment on CosmWasm with Rollkit

    🤖 Compile the smart contract

    In a new terminal instance, we will run the following commands to pull down the Nameservice smart contract and compile it:

    bash
    git clone https://github.com/InterWasm/cw-contracts
     cd cw-contracts
     cd contracts/nameservice
    -cargo wasm

    The compiled contract is outputted to: target/wasm32-unknown-unknown/release/cw_nameservice.wasm.

    🧪 Unit tests

    If we want to run tests, we can do so with the following command in the ~/cw-contracts/contracts/nameservice directory:

    bash
    cargo unit-test

    🏎️ Optimized smart contract

    Because we are deploying the compiled smart contract to wasmd, we want it to be as small as possible.

    The CosmWasm team provides a tool called rust-optimizer, which requires Docker in order to compile.

    Run the following command in the ~/cw-contracts/contracts/nameservice directory:

    bash
    sudo docker run --rm -v "$(pwd)":/code \\
    +cargo wasm

    The compiled contract is outputted to: target/wasm32-unknown-unknown/release/cw_nameservice.wasm.

    🧪 Unit tests

    If we want to run tests, we can do so with the following command in the ~/cw-contracts/contracts/nameservice directory:

    bash
    cargo unit-test

    🏎️ Optimized smart contract

    Because we are deploying the compiled smart contract to wasmd, we want it to be as small as possible.

    The CosmWasm team provides a tool called rust-optimizer, which requires Docker in order to compile.

    Run the following command in the ~/cw-contracts/contracts/nameservice directory:

    bash
    sudo docker run --rm -v "$(pwd)":/code \\
       --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \\
       --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \\
       cosmwasm/rust-optimizer:0.12.6
    bash
    sudo docker run --platform linux/arm64 --rm -v "$(pwd)":/code \\
       --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \\
       --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \\
    -  cosmwasm/rust-optimizer-arm64:0.12.8

    This will place the optimized Wasm bytecode at artifacts/cw_nameservice.wasm.

    🚀 Contract deployment

    Let's now deploy our smart contract!

    In order to deploy a contract, you can use the command line as described below. For a better experience and to use Rust code instead of the command line to deploy/script and test your contracts, you can use cw-orchestrator.

    Run the following in the ~/cw-contracts/contracts/nameservice directory:

    bash
    TX_HASH=$(wasmd tx wasm store artifacts/cw_nameservice.wasm --from celeswasm-key --keyring-backend test --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH
    bash
    TX_HASH=$(wasmd tx wasm store artifacts/cw_nameservice-aarch64.wasm --from celeswasm-key --keyring-backend test --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH

    This will get you the transaction hash for the smart contract deployment. Given we are using Rollkit, there will be a delay on the transaction being included due to Rollkit waiting on Celestia's data availability layer to confirm the block has been included before submitting a new block.

    DANGER

    If you run into errors with variables on the previous command, or commands in the remainder of the tutorial, cross-reference the variables in the command with the variables in the init.sh script.

    🌟 Contract interaction on CosmWasm with Celestia

    In the previous steps, we have stored out contract's tx hash in an environment variable for later use.

    The following guide will show you how to deploy and interact with a contract using CLI. For scripting using Rust, you can use cw-orchestrator.

    Because of the longer time periods of submitting transactions via Rollkit due to waiting on Celestia's data availability layer to confirm block inclusion, we will need to query our tx hash directly to get information about it.

    🔎 Contract querying

    Let's start by querying our transaction hash for its code ID:

    bash
    CODE_ID=$(wasmd query tx --type=hash $TX_HASH celeswasm --node http://127.0.0.1:36657 --output json | jq -r '.events[-1].attributes[1].value')
    +  cosmwasm/rust-optimizer-arm64:0.12.8

    This will place the optimized Wasm bytecode at artifacts/cw_nameservice.wasm.

    🚀 Contract deployment

    Let's now deploy our smart contract!

    In order to deploy a contract, you can use the command line as described below. For a better experience and to use Rust code instead of the command line to deploy/script and test your contracts, you can use cw-orchestrator.

    Run the following in the ~/cw-contracts/contracts/nameservice directory:

    bash
    TX_HASH=$(wasmd tx wasm store artifacts/cw_nameservice.wasm --from celeswasm-key --keyring-backend test --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH
    bash
    TX_HASH=$(wasmd tx wasm store artifacts/cw_nameservice-aarch64.wasm --from celeswasm-key --keyring-backend test --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH

    This will get you the transaction hash for the smart contract deployment. Given we are using Rollkit, there will be a delay on the transaction being included due to Rollkit waiting on Celestia's data availability layer to confirm the block has been included before submitting a new block.

    DANGER

    If you run into errors with variables on the previous command, or commands in the remainder of the tutorial, cross-reference the variables in the command with the variables in the init.sh script.

    🌟 Contract interaction on CosmWasm with Celestia

    In the previous steps, we have stored out contract's tx hash in an environment variable for later use.

    The following guide will show you how to deploy and interact with a contract using CLI. For scripting using Rust, you can use cw-orchestrator.

    Because of the longer time periods of submitting transactions via Rollkit due to waiting on Celestia's data availability layer to confirm block inclusion, we will need to query our tx hash directly to get information about it.

    🔎 Contract querying

    Let's start by querying our transaction hash for its code ID:

    bash
    CODE_ID=$(wasmd query tx --type=hash $TX_HASH celeswasm --node http://127.0.0.1:36657 --output json | jq -r '.events[-1].attributes[1].value')
     echo $CODE_ID

    This will give us back the Code ID of the deployed contract.

    In our case, since it's the first contract deployed on our local network, the value is 1.

    Now, we can take a look at the contracts instantiated by this Code ID:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --node http://127.0.0.1:36657 --output json

    We get the following output:

    json
    {"contracts":[],"pagination":{"next_key":null,"total":"0"}}

    📃 Contract instantiation

    We start instantiating the contract by writing up the following INIT message for nameservice contract. Here, we are specifying that purchase_price of a name is 100uwasm and transfer_price is 999uwasm.

    bash
    INIT='{"purchase_price":{"amount":"100","denom":"uwasm"},"transfer_price":{"amount":"999","denom":"uwasm"}}'
     wasmd tx wasm instantiate $CODE_ID "$INIT" --from celeswasm-key --keyring-backend test --label "name service" --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 -y --no-admin --node http://127.0.0.1:36657

    📄 Contract interaction

    Now that we instantiated it, we can interact further with the contract:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657
     CONTRACT=$(wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657 | jq -r '.contracts[-1]')
    diff --git a/pr-339/assets/tutorials_cosmwasm.md.7a5ac2c7.lean.js b/pr-339/assets/tutorials_cosmwasm.md.f840ff53.lean.js
    similarity index 88%
    rename from pr-339/assets/tutorials_cosmwasm.md.7a5ac2c7.lean.js
    rename to pr-339/assets/tutorials_cosmwasm.md.f840ff53.lean.js
    index 660c82d2c..efad16b1c 100644
    --- a/pr-339/assets/tutorials_cosmwasm.md.7a5ac2c7.lean.js
    +++ b/pr-339/assets/tutorials_cosmwasm.md.f840ff53.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const d=JSON.parse('{"title":"🗞️ CosmWasm rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ CosmWasm rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/cosmwasm.md","filePath":"tutorials/cosmwasm.md","lastUpdated":1713200494000}'),l={name:"tutorials/cosmwasm.md"},e=o("",109),t=[e];function p(c,r,i,C,y,D){return a(),n("div",null,t)}const u=s(l,[["render",p]]);export{d as __pageData,u as default};
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const d=JSON.parse('{"title":"🗞️ CosmWasm rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🗞️ CosmWasm rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/cosmwasm.md","filePath":"tutorials/cosmwasm.md","lastUpdated":1713275863000}'),l={name:"tutorials/cosmwasm.md"},e=o("",109),t=[e];function p(c,r,i,C,y,D){return a(),n("div",null,t)}const u=s(l,[["render",p]]);export{d as __pageData,u as default};
    diff --git a/pr-339/assets/tutorials_cw-orch.md.4aa65fb3.js b/pr-339/assets/tutorials_cw-orch.md.eb353f96.js
    similarity index 99%
    rename from pr-339/assets/tutorials_cw-orch.md.4aa65fb3.js
    rename to pr-339/assets/tutorials_cw-orch.md.eb353f96.js
    index 9ab3aa6c1..5aebb42e7 100644
    --- a/pr-339/assets/tutorials_cw-orch.md.4aa65fb3.js
    +++ b/pr-339/assets/tutorials_cw-orch.md.eb353f96.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"Speed up your development with cw-orchestrator","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Speed up your development with cw-orchestrator | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/cw-orch.md","filePath":"tutorials/cw-orch.md","lastUpdated":1713200494000}'),e={name:"tutorials/cw-orch.md"},l=o(`

    Speed up your development with cw-orchestrator

    Introduction

    cw-orchestrator is the most advanced scripting, testing, and deployment framework for CosmWasm smart-contracts. It makes it easy to write cross-environment compatible code for cw-multi-test, Test Tube, Starship (alpha), and live networks, significantly reducing code duplication and test-writing time.

    Get ready to change the way you interact with contracts and simplify you smart-contracts journey. The following steps will allow you to integrate cw-orch and write clean code such as:

    rust
    counter.upload()?;
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"Speed up your development with cw-orchestrator","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Speed up your development with cw-orchestrator | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/cw-orch.md","filePath":"tutorials/cw-orch.md","lastUpdated":1713275863000}'),e={name:"tutorials/cw-orch.md"},l=o(`

    Speed up your development with cw-orchestrator

    Introduction

    cw-orchestrator is the most advanced scripting, testing, and deployment framework for CosmWasm smart-contracts. It makes it easy to write cross-environment compatible code for cw-multi-test, Test Tube, Starship (alpha), and live networks, significantly reducing code duplication and test-writing time.

    Get ready to change the way you interact with contracts and simplify you smart-contracts journey. The following steps will allow you to integrate cw-orch and write clean code such as:

    rust
    counter.upload()?;
     counter.instantiate(&InstantiateMsg { count: 0 }, None, None)?;
     counter.increment()?;
     let count = counter.get_count()?;
    diff --git a/pr-339/assets/tutorials_cw-orch.md.4aa65fb3.lean.js b/pr-339/assets/tutorials_cw-orch.md.eb353f96.lean.js
    similarity index 89%
    rename from pr-339/assets/tutorials_cw-orch.md.4aa65fb3.lean.js
    rename to pr-339/assets/tutorials_cw-orch.md.eb353f96.lean.js
    index 5f2ce0fe2..315d81827 100644
    --- a/pr-339/assets/tutorials_cw-orch.md.4aa65fb3.lean.js
    +++ b/pr-339/assets/tutorials_cw-orch.md.eb353f96.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"Speed up your development with cw-orchestrator","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Speed up your development with cw-orchestrator | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/cw-orch.md","filePath":"tutorials/cw-orch.md","lastUpdated":1713200494000}'),e={name:"tutorials/cw-orch.md"},l=o("",58),t=[l];function p(c,r,y,i,F,D){return a(),n("div",null,t)}const d=s(e,[["render",p]]);export{A as __pageData,d as default};
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"Speed up your development with cw-orchestrator","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Speed up your development with cw-orchestrator | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/cw-orch.md","filePath":"tutorials/cw-orch.md","lastUpdated":1713275863000}'),e={name:"tutorials/cw-orch.md"},l=o("",58),t=[l];function p(c,r,y,i,F,D){return a(),n("div",null,t)}const d=s(e,[["render",p]]);export{A as __pageData,d as default};
    diff --git a/pr-339/assets/tutorials_full-and-sequencer-node.md.098d78cb.js b/pr-339/assets/tutorials_full-and-sequencer-node.md.19d33826.js
    similarity index 99%
    rename from pr-339/assets/tutorials_full-and-sequencer-node.md.098d78cb.js
    rename to pr-339/assets/tutorials_full-and-sequencer-node.md.19d33826.js
    index 7cacad8e3..292cf64c1 100644
    --- a/pr-339/assets/tutorials_full-and-sequencer-node.md.098d78cb.js
    +++ b/pr-339/assets/tutorials_full-and-sequencer-node.md.19d33826.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as a,c as n,X as e}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"Full and sequencer node rollup setup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Full and sequencer node rollup setup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/full-and-sequencer-node.md","filePath":"tutorials/full-and-sequencer-node.md","lastUpdated":1713200494000}'),l={name:"tutorials/full-and-sequencer-node.md"},o=e(`

    Full and sequencer node rollup setup

    This guide will cover how to set up the GM world rollup example as a multi-node network using a full and sequencer node.

    About

    This guide is using a feature released in v0.10.2 that uses go-header, which uses libp2p that syncs blocks over a peer-to-peer (p2p) network.

    This is the same way that celestia-node syncs blocks over p2p.

    Prerequisites

    First, you'll need to complete the GM world tutorial.

    In this demo, we'll be using the local-celestia-devnet setup used in part 1.

    Getting started

    For running a full node, you will need to update DA_HEIGHT and P2P_ID manually. You can retrieve namespace and height from your terminal output from when you ran the init-local.sh script.

    They will be printed before your chain starts:

    txt
    ______         _  _  _     _  _
    +import{_ as s,o as a,c as n,X as e}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"Full and sequencer node rollup setup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Full and sequencer node rollup setup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/full-and-sequencer-node.md","filePath":"tutorials/full-and-sequencer-node.md","lastUpdated":1713275863000}'),l={name:"tutorials/full-and-sequencer-node.md"},o=e(`

    Full and sequencer node rollup setup

    This guide will cover how to set up the GM world rollup example as a multi-node network using a full and sequencer node.

    About

    This guide is using a feature released in v0.10.2 that uses go-header, which uses libp2p that syncs blocks over a peer-to-peer (p2p) network.

    This is the same way that celestia-node syncs blocks over p2p.

    Prerequisites

    First, you'll need to complete the GM world tutorial.

    In this demo, we'll be using the local-celestia-devnet setup used in part 1.

    Getting started

    For running a full node, you will need to update DA_HEIGHT and P2P_ID manually. You can retrieve namespace and height from your terminal output from when you ran the init-local.sh script.

    They will be printed before your chain starts:

    txt
    ______         _  _  _     _  _
     | ___ \\       | || || |   (_)| |
     | |_/ /  ___  | || || | __ _ | |_
     |    /  / _ \\ | || || |/ /| || __|
    diff --git a/pr-339/assets/tutorials_full-and-sequencer-node.md.098d78cb.lean.js b/pr-339/assets/tutorials_full-and-sequencer-node.md.19d33826.lean.js
    similarity index 90%
    rename from pr-339/assets/tutorials_full-and-sequencer-node.md.098d78cb.lean.js
    rename to pr-339/assets/tutorials_full-and-sequencer-node.md.19d33826.lean.js
    index ccae9b0cb..a0f8ba3c2 100644
    --- a/pr-339/assets/tutorials_full-and-sequencer-node.md.098d78cb.lean.js
    +++ b/pr-339/assets/tutorials_full-and-sequencer-node.md.19d33826.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as e}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"Full and sequencer node rollup setup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Full and sequencer node rollup setup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/full-and-sequencer-node.md","filePath":"tutorials/full-and-sequencer-node.md","lastUpdated":1713200494000}'),l={name:"tutorials/full-and-sequencer-node.md"},o=e("",30),p=[o];function t(r,c,C,i,y,D){return a(),n("div",null,p)}const u=s(l,[["render",t]]);export{A as __pageData,u as default};
    +import{_ as s,o as a,c as n,X as e}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"Full and sequencer node rollup setup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Full and sequencer node rollup setup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/full-and-sequencer-node.md","filePath":"tutorials/full-and-sequencer-node.md","lastUpdated":1713275863000}'),l={name:"tutorials/full-and-sequencer-node.md"},o=e("",30),p=[o];function t(r,c,C,i,y,D){return a(),n("div",null,p)}const u=s(l,[["render",t]]);export{A as __pageData,u as default};
    diff --git a/pr-339/assets/tutorials_gas-price.md.e4442fba.js b/pr-339/assets/tutorials_gas-price.md.d517561d.js
    similarity index 97%
    rename from pr-339/assets/tutorials_gas-price.md.e4442fba.js
    rename to pr-339/assets/tutorials_gas-price.md.d517561d.js
    index b6ba083b8..0e98dabc7 100644
    --- a/pr-339/assets/tutorials_gas-price.md.e4442fba.js
    +++ b/pr-339/assets/tutorials_gas-price.md.d517561d.js
    @@ -1 +1 @@
    -import{_ as e,o as a,c as s,X as t}from"./chunks/framework.adc83686.js";const _=JSON.parse('{"title":"How to configure gas price","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure gas price | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gas-price.md","filePath":"tutorials/gas-price.md","lastUpdated":1713200494000}'),o={name:"tutorials/gas-price.md"},n=t('

    How to configure gas price

    In most cases, the gas price can be left to the defaults, which ensures that the price is greater than the minimum gas price accepted by the core node.

    The gas price can also be configured manually with the flag --rollkit.da_gas_price:

    bash
    gmd start --rollkit.da_gas_price=0.1 [existing flags...]

    This configures the rollup to always use the fixed gas price of 0.1utia/gas.

    When running a rollup against a live network, the gas price may see occasional spikes during periods of high mempool congestion.

    To avoid such transient blob submission failures, the flag --rollkit.da_gas_multiplier may be used:

    bash
    gmd start --rollkit.da_gas_price=0.1 --rollkit.da_gas_multiplier=1.2 [...]

    This configures the rollup to keep increasing the gas price by a factor of 1.2x of the previous price until the transaction is accepted by the core node.

    When the blob submission transaction eventually succeeds, the gas price will gradually return to the default, decreasing by the same factor.

    The gas multiplier will only be used if the gas price has been manually configured.

    ',11),l=[n];function i(c,r,p,g,d,h){return a(),s("div",null,l)}const f=e(o,[["render",i]]);export{_ as __pageData,f as default}; +import{_ as e,o as a,c as s,X as t}from"./chunks/framework.adc83686.js";const _=JSON.parse('{"title":"How to configure gas price","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure gas price | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gas-price.md","filePath":"tutorials/gas-price.md","lastUpdated":1713275863000}'),o={name:"tutorials/gas-price.md"},n=t('

    How to configure gas price

    In most cases, the gas price can be left to the defaults, which ensures that the price is greater than the minimum gas price accepted by the core node.

    The gas price can also be configured manually with the flag --rollkit.da_gas_price:

    bash
    gmd start --rollkit.da_gas_price=0.1 [existing flags...]

    This configures the rollup to always use the fixed gas price of 0.1utia/gas.

    When running a rollup against a live network, the gas price may see occasional spikes during periods of high mempool congestion.

    To avoid such transient blob submission failures, the flag --rollkit.da_gas_multiplier may be used:

    bash
    gmd start --rollkit.da_gas_price=0.1 --rollkit.da_gas_multiplier=1.2 [...]

    This configures the rollup to keep increasing the gas price by a factor of 1.2x of the previous price until the transaction is accepted by the core node.

    When the blob submission transaction eventually succeeds, the gas price will gradually return to the default, decreasing by the same factor.

    The gas multiplier will only be used if the gas price has been manually configured.

    ',11),l=[n];function i(c,r,p,g,d,h){return a(),s("div",null,l)}const f=e(o,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/pr-339/assets/tutorials_gas-price.md.e4442fba.lean.js b/pr-339/assets/tutorials_gas-price.md.d517561d.lean.js similarity index 88% rename from pr-339/assets/tutorials_gas-price.md.e4442fba.lean.js rename to pr-339/assets/tutorials_gas-price.md.d517561d.lean.js index e9be50e4c..3dc0d3854 100644 --- a/pr-339/assets/tutorials_gas-price.md.e4442fba.lean.js +++ b/pr-339/assets/tutorials_gas-price.md.d517561d.lean.js @@ -1 +1 @@ -import{_ as e,o as a,c as s,X as t}from"./chunks/framework.adc83686.js";const _=JSON.parse('{"title":"How to configure gas price","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure gas price | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gas-price.md","filePath":"tutorials/gas-price.md","lastUpdated":1713200494000}'),o={name:"tutorials/gas-price.md"},n=t("",11),l=[n];function i(c,r,p,g,d,h){return a(),s("div",null,l)}const f=e(o,[["render",i]]);export{_ as __pageData,f as default}; +import{_ as e,o as a,c as s,X as t}from"./chunks/framework.adc83686.js";const _=JSON.parse('{"title":"How to configure gas price","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to configure gas price | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gas-price.md","filePath":"tutorials/gas-price.md","lastUpdated":1713275863000}'),o={name:"tutorials/gas-price.md"},n=t("",11),l=[n];function i(c,r,p,g,d,h){return a(),s("div",null,l)}const f=e(o,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/pr-339/assets/tutorials_gm-world-arabica-testnet.md.573595d6.js b/pr-339/assets/tutorials_gm-world-arabica-testnet.md.f2b2606a.js similarity index 99% rename from pr-339/assets/tutorials_gm-world-arabica-testnet.md.573595d6.js rename to pr-339/assets/tutorials_gm-world-arabica-testnet.md.f2b2606a.js index 3767e46a4..9393942af 100644 --- a/pr-339/assets/tutorials_gm-world-arabica-testnet.md.573595d6.js +++ b/pr-339/assets/tutorials_gm-world-arabica-testnet.md.f2b2606a.js @@ -1,4 +1,4 @@ -import{_ as s}from"./chunks/gm.e63d6f6b.js";import{_ as a,o as e,c as o,X as n}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"GM world rollup: Part 2","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 2 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-arabica-testnet.md","filePath":"tutorials/gm-world-arabica-testnet.md","lastUpdated":1713200494000}'),l={name:"tutorials/gm-world-arabica-testnet.md"},t=n(`

    GM world rollup: Part 2

    Deploying to a Celestia devnet

    This tutorial is part 2 of the GM world rollup tutorials. In this tutorial, it is expected that you've completed part 1 of the tutorial and are familiar with running a local rollup devnet.

    The script for this tutorial is built for Celestia's Arabica devnet.

    🪶 Run a Celestia light node

    Fully sync and fund a light node on Arabica devnet (arabica-11). Follow instructions to install and start your Celestia data availability layer light node selecting the Arabica network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    🟢 Start your sovereign rollup

    We have a handy init-arabica-testnet.sh found in this repo.

    We can copy it over to our directory with the following commands:

    bash
    # From inside the \`gm\` directory
    +import{_ as s}from"./chunks/gm.e63d6f6b.js";import{_ as a,o as e,c as o,X as n}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"GM world rollup: Part 2","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 2 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-arabica-testnet.md","filePath":"tutorials/gm-world-arabica-testnet.md","lastUpdated":1713275863000}'),l={name:"tutorials/gm-world-arabica-testnet.md"},t=n(`

    GM world rollup: Part 2

    Deploying to a Celestia devnet

    This tutorial is part 2 of the GM world rollup tutorials. In this tutorial, it is expected that you've completed part 1 of the tutorial and are familiar with running a local rollup devnet.

    The script for this tutorial is built for Celestia's Arabica devnet.

    🪶 Run a Celestia light node

    Fully sync and fund a light node on Arabica devnet (arabica-11). Follow instructions to install and start your Celestia data availability layer light node selecting the Arabica network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    🟢 Start your sovereign rollup

    We have a handy init-arabica-testnet.sh found in this repo.

    We can copy it over to our directory with the following commands:

    bash
    # From inside the \`gm\` directory
     wget https://raw.githubusercontent.com/rollkit/docs/main/scripts/gm/init-arabica-testnet.sh

    This copies over our init-arabica-testnet.sh script to initialize our gm rollup.

    You can view the contents of the script to see how we initialize the gm rollup.

    TIP

    init-arabica-testnet.sh script uses a default namespace 00000000000000000000000000000000000000000008e5f679bf7116cb. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 10 characters in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 characters.

    Learn more about namespaces .

    Clear previous chain history

    Before starting the rollup, we need to remove the old project folders:

    bash
    rm -r $HOME/go/bin/gmd && rm -rf $HOME/.gm

    Start the new chain

    Now, you can initialize the script with the following command:

    bash
    bash init-arabica-testnet.sh

    View your rollup by finding your namespace or account an Arabica devnet explorer.

    With that, we have kickstarted our second gmd rollup!

    Optional: Restarting your rollup

    If you'd like to stop and restart your rollup for development purposes, you're in luck!

    When you ran init-arabica-testnet.sh, the script generated a script called restart-testnet.sh in the $HOME/gm directory for you to use to restart your rollup.

    In order to do so, restart celestia-da and then run:

    bash
    bash restart-testnet.sh

    Optional: Add a "GM world" query

    💬 Say gm world

    Now, we're going to get our blockchain to say gm world! - in order to do so you need to make the following changes:

    • Modify a protocol buffer file
    • Create a keeper query function that returns data

    Protocol buffer files contain proto RPC calls that define Cosmos SDK queries and message handlers, and proto messages that define Cosmos SDK types. The RPC calls are also responsible for exposing an HTTP API.

    The Keeper is required for each Cosmos SDK module and is an abstraction for modifying the state of the blockchain. Keeper functions allow us to query or write to the state.

    ✋ Create your first query

    Open a new terminal instance that is not the same that you started the chain in.

    In your new terminal, cd into the gm directory and run this command to create the gm query:

    bash
    ignite scaffold query gm --response text

    Response:

    bash
    modify proto/gm/gm/query.proto
     modify x/gm/client/cli/query.go
     create x/gm/client/cli/query_gm.go
    diff --git a/pr-339/assets/tutorials_gm-world-arabica-testnet.md.573595d6.lean.js b/pr-339/assets/tutorials_gm-world-arabica-testnet.md.f2b2606a.lean.js
    similarity index 90%
    rename from pr-339/assets/tutorials_gm-world-arabica-testnet.md.573595d6.lean.js
    rename to pr-339/assets/tutorials_gm-world-arabica-testnet.md.f2b2606a.lean.js
    index 2d316cdab..1ade0d293 100644
    --- a/pr-339/assets/tutorials_gm-world-arabica-testnet.md.573595d6.lean.js
    +++ b/pr-339/assets/tutorials_gm-world-arabica-testnet.md.f2b2606a.lean.js
    @@ -1 +1 @@
    -import{_ as s}from"./chunks/gm.e63d6f6b.js";import{_ as a,o as e,c as o,X as n}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"GM world rollup: Part 2","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 2 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-arabica-testnet.md","filePath":"tutorials/gm-world-arabica-testnet.md","lastUpdated":1713200494000}'),l={name:"tutorials/gm-world-arabica-testnet.md"},t=n("",68),p=[t];function r(c,i,y,C,d,u){return e(),o("div",null,p)}const F=a(l,[["render",r]]);export{A as __pageData,F as default};
    +import{_ as s}from"./chunks/gm.e63d6f6b.js";import{_ as a,o as e,c as o,X as n}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"GM world rollup: Part 2","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 2 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-arabica-testnet.md","filePath":"tutorials/gm-world-arabica-testnet.md","lastUpdated":1713275863000}'),l={name:"tutorials/gm-world-arabica-testnet.md"},t=n("",68),p=[t];function r(c,i,y,C,d,u){return e(),o("div",null,p)}const F=a(l,[["render",r]]);export{A as __pageData,F as default};
    diff --git a/pr-339/assets/tutorials_gm-world-frontend.md.ba40ecc4.js b/pr-339/assets/tutorials_gm-world-frontend.md.35cacd7e.js
    similarity index 99%
    rename from pr-339/assets/tutorials_gm-world-frontend.md.ba40ecc4.js
    rename to pr-339/assets/tutorials_gm-world-frontend.md.35cacd7e.js
    index c0e1108d1..2139efe99 100644
    --- a/pr-339/assets/tutorials_gm-world-frontend.md.ba40ecc4.js
    +++ b/pr-339/assets/tutorials_gm-world-frontend.md.35cacd7e.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as n,c as a,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/gm/cca-3.png",p="/docs-preview/pr-339/gm/cca.png",e="/docs-preview/pr-339/gm/cca-2.png",h=JSON.parse('{"title":"GM world frontend tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world frontend tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-frontend.md","filePath":"tutorials/gm-world-frontend.md","lastUpdated":1713200494000}'),t={name:"tutorials/gm-world-frontend.md"},c=o(`

    GM world frontend tutorial

    In this tutorial, we'll learn how to use Cosmology to create a frontend for our GM world rollup.

    Cosmology enables developers to build web3 apps in the Interchain Ecosystem. With Cosmology, it's simple to begin building apps that communicate with Cosmos SDK and CosmWasm chains.

    We'll be using create-cosmos-app in this tutorial to scaffold a frontend and add the chain information for our rollup.

    In the end, you'll have something that looks like this demo (repo).

    Getting started

    In order to complete this tutorial you will need to have completed the GM world tutorial. This requires a running rollup on your local machine.

    Setting up the frontend

    Now that you have your rollup running, you are ready to scaffold the frontend! In your terminal, first install create-cosmos-app:

    bash
    npm install -g create-cosmos-app

    Now scaffold an app:

    bash
    create-cosmos-app

    In this tutorial, we're using the following setting and your output will look similar to this if everything is successful:

    bash
    ? [name] Enter your new app name gm-world
    +import{_ as s,o as n,c as a,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/gm/cca-3.png",p="/docs-preview/pr-339/gm/cca.png",e="/docs-preview/pr-339/gm/cca-2.png",h=JSON.parse('{"title":"GM world frontend tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world frontend tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-frontend.md","filePath":"tutorials/gm-world-frontend.md","lastUpdated":1713275863000}'),t={name:"tutorials/gm-world-frontend.md"},c=o(`

    GM world frontend tutorial

    In this tutorial, we'll learn how to use Cosmology to create a frontend for our GM world rollup.

    Cosmology enables developers to build web3 apps in the Interchain Ecosystem. With Cosmology, it's simple to begin building apps that communicate with Cosmos SDK and CosmWasm chains.

    We'll be using create-cosmos-app in this tutorial to scaffold a frontend and add the chain information for our rollup.

    In the end, you'll have something that looks like this demo (repo).

    Getting started

    In order to complete this tutorial you will need to have completed the GM world tutorial. This requires a running rollup on your local machine.

    Setting up the frontend

    Now that you have your rollup running, you are ready to scaffold the frontend! In your terminal, first install create-cosmos-app:

    bash
    npm install -g create-cosmos-app

    Now scaffold an app:

    bash
    create-cosmos-app

    In this tutorial, we're using the following setting and your output will look similar to this if everything is successful:

    bash
    ? [name] Enter your new app name gm-world
     Cloning into 'gm-world'...
     ? [template] which template connect-multi-chain
     yarn install v1.22.19
    diff --git a/pr-339/assets/tutorials_gm-world-frontend.md.ba40ecc4.lean.js b/pr-339/assets/tutorials_gm-world-frontend.md.35cacd7e.lean.js
    similarity index 91%
    rename from pr-339/assets/tutorials_gm-world-frontend.md.ba40ecc4.lean.js
    rename to pr-339/assets/tutorials_gm-world-frontend.md.35cacd7e.lean.js
    index 18ea2758f..1868fa28d 100644
    --- a/pr-339/assets/tutorials_gm-world-frontend.md.ba40ecc4.lean.js
    +++ b/pr-339/assets/tutorials_gm-world-frontend.md.35cacd7e.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as n,c as a,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/gm/cca-3.png",p="/docs-preview/pr-339/gm/cca.png",e="/docs-preview/pr-339/gm/cca-2.png",h=JSON.parse('{"title":"GM world frontend tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world frontend tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-frontend.md","filePath":"tutorials/gm-world-frontend.md","lastUpdated":1713200494000}'),t={name:"tutorials/gm-world-frontend.md"},c=o("",47),r=[c];function D(y,F,C,i,A,d){return n(),a("div",null,r)}const g=s(t,[["render",D]]);export{h as __pageData,g as default};
    +import{_ as s,o as n,c as a,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/gm/cca-3.png",p="/docs-preview/pr-339/gm/cca.png",e="/docs-preview/pr-339/gm/cca-2.png",h=JSON.parse('{"title":"GM world frontend tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world frontend tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-frontend.md","filePath":"tutorials/gm-world-frontend.md","lastUpdated":1713275863000}'),t={name:"tutorials/gm-world-frontend.md"},c=o("",47),r=[c];function D(y,F,C,i,A,d){return n(),a("div",null,r)}const g=s(t,[["render",D]]);export{h as __pageData,g as default};
    diff --git a/pr-339/assets/tutorials_gm-world-mainnet.md.a931f4de.js b/pr-339/assets/tutorials_gm-world-mainnet.md.55f3c01f.js
    similarity index 99%
    rename from pr-339/assets/tutorials_gm-world-mainnet.md.a931f4de.js
    rename to pr-339/assets/tutorials_gm-world-mainnet.md.55f3c01f.js
    index bc8333812..a14051282 100644
    --- a/pr-339/assets/tutorials_gm-world-mainnet.md.a931f4de.js
    +++ b/pr-339/assets/tutorials_gm-world-mainnet.md.55f3c01f.js
    @@ -1 +1 @@
    -import{_ as e,o as a,c as t,X as o}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"GM world rollup: Part 4","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 4 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-mainnet.md","filePath":"tutorials/gm-world-mainnet.md","lastUpdated":1713200494000}'),s={name:"tutorials/gm-world-mainnet.md"},n=o('

    GM world rollup: Part 4

    This tutorial is part 4 of the GM world rollup tutorials. In this tutorial, it is expected that you've completed part 1, part 2 or part 3 of the tutorial and are familiar with running a local rollup devnet and posting to a Celestia testnet.

    Deploying to Celestia Mainnet Beta

    🪶 Run a Celestia light node

    Fully sync and fund a light node on Mainnet beta (celestia). Follow instructions to install and start your Celestia data availability layer light node selecting the Arabica network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    Clear previous chain history

    Before starting the rollup, we need to remove the old project folders:

    bash
    rm -r $HOME/go/bin/gmd && rm -rf $HOME/.gm

    Start the rollup on mainnet

    For this portion, you will need to stop the rollup that you have running from parts 1 and 2 of the tutorial, using Control + C in the terminal.

    1. Download the script for deploying to Celestia's Mainnet Beta:

      bash
      # From inside the `gm` directory\nwget https://raw.githubusercontent.com/rollkit/docs/main/scripts/gm/init-mainnet.sh
    2. Ensure that the account for your light node is funded.

    3. Run the init-mainnet.sh script:

      bash
      bash init-mainnet.sh
    4. Watch as your rollup posts blocks to Celestia!

    5. View your rollup by finding your namespace or account Celenium.

    View the example rollup's namespace on Celenium.

    TIP

    init-mainnet.sh script uses a default namespace 00000000000000000000000000000000000000000008e5f679bf7116cb. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 10 characters in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 characters.

    Learn more about namespaces .

    Restarting your rollup

    When you ran init-mainnet.sh, the script generated a script called restart-mainnet.sh in the $HOME/gm directory for you to use to restart your rollup.

    In order to do so, restart celestia light node and then run:

    bash
    bash restart-mainnet.sh

    Next steps

    Congratulations! You have a Rollkit rollup running on Celestia's Mainnet Beta.

    If you're interested in setting up a full node alongside your sequencer, see the Full and sequencer node rollup setup tutorial.

    ',20),l=[n];function r(i,p,c,d,h,u){return a(),t("div",null,l)}const y=e(s,[["render",r]]);export{g as __pageData,y as default}; +import{_ as e,o as a,c as t,X as o}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"GM world rollup: Part 4","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 4 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-mainnet.md","filePath":"tutorials/gm-world-mainnet.md","lastUpdated":1713275863000}'),s={name:"tutorials/gm-world-mainnet.md"},n=o('

    GM world rollup: Part 4

    This tutorial is part 4 of the GM world rollup tutorials. In this tutorial, it is expected that you've completed part 1, part 2 or part 3 of the tutorial and are familiar with running a local rollup devnet and posting to a Celestia testnet.

    Deploying to Celestia Mainnet Beta

    🪶 Run a Celestia light node

    Fully sync and fund a light node on Mainnet beta (celestia). Follow instructions to install and start your Celestia data availability layer light node selecting the Arabica network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    Clear previous chain history

    Before starting the rollup, we need to remove the old project folders:

    bash
    rm -r $HOME/go/bin/gmd && rm -rf $HOME/.gm

    Start the rollup on mainnet

    For this portion, you will need to stop the rollup that you have running from parts 1 and 2 of the tutorial, using Control + C in the terminal.

    1. Download the script for deploying to Celestia's Mainnet Beta:

      bash
      # From inside the `gm` directory\nwget https://raw.githubusercontent.com/rollkit/docs/main/scripts/gm/init-mainnet.sh
    2. Ensure that the account for your light node is funded.

    3. Run the init-mainnet.sh script:

      bash
      bash init-mainnet.sh
    4. Watch as your rollup posts blocks to Celestia!

    5. View your rollup by finding your namespace or account Celenium.

    View the example rollup's namespace on Celenium.

    TIP

    init-mainnet.sh script uses a default namespace 00000000000000000000000000000000000000000008e5f679bf7116cb. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 10 characters in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 characters.

    Learn more about namespaces .

    Restarting your rollup

    When you ran init-mainnet.sh, the script generated a script called restart-mainnet.sh in the $HOME/gm directory for you to use to restart your rollup.

    In order to do so, restart celestia light node and then run:

    bash
    bash restart-mainnet.sh

    Next steps

    Congratulations! You have a Rollkit rollup running on Celestia's Mainnet Beta.

    If you're interested in setting up a full node alongside your sequencer, see the Full and sequencer node rollup setup tutorial.

    ',20),l=[n];function r(i,p,c,d,h,u){return a(),t("div",null,l)}const y=e(s,[["render",r]]);export{g as __pageData,y as default}; diff --git a/pr-339/assets/tutorials_gm-world-mainnet.md.a931f4de.lean.js b/pr-339/assets/tutorials_gm-world-mainnet.md.55f3c01f.lean.js similarity index 89% rename from pr-339/assets/tutorials_gm-world-mainnet.md.a931f4de.lean.js rename to pr-339/assets/tutorials_gm-world-mainnet.md.55f3c01f.lean.js index 965c2d39e..da2ad4c2a 100644 --- a/pr-339/assets/tutorials_gm-world-mainnet.md.a931f4de.lean.js +++ b/pr-339/assets/tutorials_gm-world-mainnet.md.55f3c01f.lean.js @@ -1 +1 @@ -import{_ as e,o as a,c as t,X as o}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"GM world rollup: Part 4","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 4 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-mainnet.md","filePath":"tutorials/gm-world-mainnet.md","lastUpdated":1713200494000}'),s={name:"tutorials/gm-world-mainnet.md"},n=o("",20),l=[n];function r(i,p,c,d,h,u){return a(),t("div",null,l)}const y=e(s,[["render",r]]);export{g as __pageData,y as default}; +import{_ as e,o as a,c as t,X as o}from"./chunks/framework.adc83686.js";const g=JSON.parse('{"title":"GM world rollup: Part 4","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 4 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-mainnet.md","filePath":"tutorials/gm-world-mainnet.md","lastUpdated":1713275863000}'),s={name:"tutorials/gm-world-mainnet.md"},n=o("",20),l=[n];function r(i,p,c,d,h,u){return a(),t("div",null,l)}const y=e(s,[["render",r]]);export{g as __pageData,y as default}; diff --git a/pr-339/assets/tutorials_gm-world-mocha-testnet.md.70d1cac9.js b/pr-339/assets/tutorials_gm-world-mocha-testnet.md.48b8adde.js similarity index 99% rename from pr-339/assets/tutorials_gm-world-mocha-testnet.md.70d1cac9.js rename to pr-339/assets/tutorials_gm-world-mocha-testnet.md.48b8adde.js index 396cab1a2..61a76f018 100644 --- a/pr-339/assets/tutorials_gm-world-mocha-testnet.md.70d1cac9.js +++ b/pr-339/assets/tutorials_gm-world-mocha-testnet.md.48b8adde.js @@ -1,4 +1,4 @@ -import{_ as s}from"./chunks/gm.e63d6f6b.js";import{_ as a,o as e,c as o,X as n}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"GM world rollup: Part 3","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 3 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-mocha-testnet.md","filePath":"tutorials/gm-world-mocha-testnet.md","lastUpdated":1713200494000}'),l={name:"tutorials/gm-world-mocha-testnet.md"},t=n(`

    GM world rollup: Part 3

    Deploying to a Celestia testnet

    This tutorial is part 3 of the GM world rollup tutorials. In this tutorial, it is expected that you've completed part 1 of the tutorial and are familiar with running a local rollup devnet.

    The script for this tutorial is built for Celestia's Mocha testnet.

    🪶 Run a Celestia light node

    Fully sync and fund a light node on Mocha testnet (mocha-4). Follow instructions to install and start your Celestia data availability layer light node selecting the Mocha network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    🟢 Start your sovereign rollup

    We have a handy init-mocha-testnet.sh found in this repo.

    We can copy it over to our directory with the following commands:

    bash
    # From inside the \`gm\` directory
    +import{_ as s}from"./chunks/gm.e63d6f6b.js";import{_ as a,o as e,c as o,X as n}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"GM world rollup: Part 3","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 3 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-mocha-testnet.md","filePath":"tutorials/gm-world-mocha-testnet.md","lastUpdated":1713275863000}'),l={name:"tutorials/gm-world-mocha-testnet.md"},t=n(`

    GM world rollup: Part 3

    Deploying to a Celestia testnet

    This tutorial is part 3 of the GM world rollup tutorials. In this tutorial, it is expected that you've completed part 1 of the tutorial and are familiar with running a local rollup devnet.

    The script for this tutorial is built for Celestia's Mocha testnet.

    🪶 Run a Celestia light node

    Fully sync and fund a light node on Mocha testnet (mocha-4). Follow instructions to install and start your Celestia data availability layer light node selecting the Mocha network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    🟢 Start your sovereign rollup

    We have a handy init-mocha-testnet.sh found in this repo.

    We can copy it over to our directory with the following commands:

    bash
    # From inside the \`gm\` directory
     wget https://raw.githubusercontent.com/rollkit/docs/main/scripts/gm/init-mocha-testnet.sh

    This copies over our init-mocha-testnet.sh script to initialize our gm rollup.

    You can view the contents of the script to see how we initialize the gm rollup.

    TIP

    init-mocha-testnet.sh script uses a default namespace 00000000000000000000000000000000000000000008e5f679bf7116cb. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 10 characters in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 characters.

    Learn more about namespaces .

    Clear previous chain history

    Before starting the rollup, we need to remove the old project folders:

    bash
    rm -r $HOME/go/bin/gmd && rm -rf $HOME/.gm

    Start the new chain

    Now, you can initialize the script with the following command:

    bash
    bash init-mocha-testnet.sh

    View your rollup by finding your namespace or account an Mocha devnet explorer.

    With that, we have kickstarted our second gmd rollup!

    Optional: Restarting your rollup

    If you'd like to stop and restart your rollup for development purposes, you're in luck!

    When you ran init-mocha-testnet.sh, the script generated a script called restart-testnet.sh in the $HOME/gm directory for you to use to restart your rollup.

    In order to do so, restart celestia-da and then run:

    bash
    bash restart-testnet.sh

    Optional: Add a "GM world" query

    💬 Say gm world

    Now, we're going to get our blockchain to say gm world! - in order to do so you need to make the following changes:

    • Modify a protocol buffer file
    • Create a keeper query function that returns data

    Protocol buffer files contain proto RPC calls that define Cosmos SDK queries and message handlers, and proto messages that define Cosmos SDK types. The RPC calls are also responsible for exposing an HTTP API.

    The Keeper is required for each Cosmos SDK module and is an abstraction for modifying the state of the blockchain. Keeper functions allow us to query or write to the state.

    ✋ Create your first query

    Open a new terminal instance that is not the same that you started the chain in.

    In your new terminal, cd into the gm directory and run this command to create the gm query:

    bash
    ignite scaffold query gm --response text

    Response:

    bash
    modify proto/gm/gm/query.proto
     modify x/gm/client/cli/query.go
     create x/gm/client/cli/query_gm.go
    diff --git a/pr-339/assets/tutorials_gm-world-mocha-testnet.md.70d1cac9.lean.js b/pr-339/assets/tutorials_gm-world-mocha-testnet.md.48b8adde.lean.js
    similarity index 90%
    rename from pr-339/assets/tutorials_gm-world-mocha-testnet.md.70d1cac9.lean.js
    rename to pr-339/assets/tutorials_gm-world-mocha-testnet.md.48b8adde.lean.js
    index 68fa5eb68..7d793d516 100644
    --- a/pr-339/assets/tutorials_gm-world-mocha-testnet.md.70d1cac9.lean.js
    +++ b/pr-339/assets/tutorials_gm-world-mocha-testnet.md.48b8adde.lean.js
    @@ -1 +1 @@
    -import{_ as s}from"./chunks/gm.e63d6f6b.js";import{_ as a,o as e,c as o,X as n}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"GM world rollup: Part 3","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 3 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-mocha-testnet.md","filePath":"tutorials/gm-world-mocha-testnet.md","lastUpdated":1713200494000}'),l={name:"tutorials/gm-world-mocha-testnet.md"},t=n("",68),p=[t];function r(c,i,y,C,d,u){return e(),o("div",null,p)}const F=a(l,[["render",r]]);export{A as __pageData,F as default};
    +import{_ as s}from"./chunks/gm.e63d6f6b.js";import{_ as a,o as e,c as o,X as n}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"GM world rollup: Part 3","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"GM world rollup: Part 3 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world-mocha-testnet.md","filePath":"tutorials/gm-world-mocha-testnet.md","lastUpdated":1713275863000}'),l={name:"tutorials/gm-world-mocha-testnet.md"},t=n("",68),p=[t];function r(c,i,y,C,d,u){return e(),o("div",null,p)}const F=a(l,[["render",r]]);export{A as __pageData,F as default};
    diff --git a/pr-339/assets/tutorials_gm-world.md.e49cb86a.js b/pr-339/assets/tutorials_gm-world.md.4d01b0f1.js
    similarity index 99%
    rename from pr-339/assets/tutorials_gm-world.md.e49cb86a.js
    rename to pr-339/assets/tutorials_gm-world.md.4d01b0f1.js
    index 8b9485cc9..8739649c5 100644
    --- a/pr-339/assets/tutorials_gm-world.md.e49cb86a.js
    +++ b/pr-339/assets/tutorials_gm-world.md.4d01b0f1.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as a,c as n,X as l}from"./chunks/framework.adc83686.js";const d=JSON.parse('{"title":"GM world rollup: Part 1","description":"Build a sovereign rollup with Ignite CLI, Celestia and Rollkit locally and on a testnet","frontmatter":{"description":"Build a sovereign rollup with Ignite CLI, Celestia and Rollkit locally and on a testnet","head":[["meta",{"name":"og:title","content":"GM world rollup: Part 1 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world.md","filePath":"tutorials/gm-world.md","lastUpdated":1713200494000}'),o={name:"tutorials/gm-world.md"},p=l(`

    GM world rollup: Part 1

    Building a rollup locally

    🌅 Introduction

    This tutorial will guide you through building a sovereign gm-world rollup using Rollkit, using Celestia’s data availability and consensus layer to submit Rollkit blocks.

    We'll cover setting up Ignite CLI, building a Cosmos-SDK application-specific rollup blockchain, and posting data to Celestia. First, we will test on a local DA network, then to a live testnet, and lastly to mainnet.

    1. Part 1 (This page): Run your rollup and post DA to a local devnet, and make sure everything works as expected.
    2. Part 2 or Part 3: Deploy the rollup, posting to a DA testnet (arabica or mocha). Confirm again that everything is functioning properly.
    3. Part 4: Deploy your rollup to the DA layer's mainnet.

    The Cosmos SDK is a framework for building blockchain applications. The Cosmos Ecosystem uses Inter-Blockchain Communication (IBC) to allow blockchains to communicate with one another.

    TIP

    This tutorial will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github Issue ticket or let us know in our Telegram.

    Learn how to restart your rollup.

    🤔 What is GM?

    GM means good morning. It's GM o'clock somewhere, so there's never a bad time to say GM, Gm, or gm. You can think of "GM" as the new version of "hello world".

    Dependencies

    Next, head either to Linux setup or MacOS setup.

    Linux setup

    🏃 Install Golang on Linux

    Celestia-App, Celestia-Node, and Cosmos-SDK are written in the Golang programming language. You will need Golang to build and run them.

    You can install Golang here.

    🔥 Install Ignite CLI on Linux

    First, you will need to create /usr/local/bin if you have not already:

    bash
    sudo mkdir -p -m 775 /usr/local/bin

    Run this command in your terminal to install Ignite CLI:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash

    TIP

    ✋ On some machines, you may run into permissions errors like the one below. You can resolve this error by following the guidance here or below.

    bash
    # Error
    +import{_ as s,o as a,c as n,X as l}from"./chunks/framework.adc83686.js";const d=JSON.parse('{"title":"GM world rollup: Part 1","description":"Build a sovereign rollup with Ignite CLI, Celestia and Rollkit locally and on a testnet","frontmatter":{"description":"Build a sovereign rollup with Ignite CLI, Celestia and Rollkit locally and on a testnet","head":[["meta",{"name":"og:title","content":"GM world rollup: Part 1 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world.md","filePath":"tutorials/gm-world.md","lastUpdated":1713275863000}'),o={name:"tutorials/gm-world.md"},p=l(`

    GM world rollup: Part 1

    Building a rollup locally

    🌅 Introduction

    This tutorial will guide you through building a sovereign gm-world rollup using Rollkit, using Celestia’s data availability and consensus layer to submit Rollkit blocks.

    We'll cover setting up Ignite CLI, building a Cosmos-SDK application-specific rollup blockchain, and posting data to Celestia. First, we will test on a local DA network, then to a live testnet, and lastly to mainnet.

    1. Part 1 (This page): Run your rollup and post DA to a local devnet, and make sure everything works as expected.
    2. Part 2 or Part 3: Deploy the rollup, posting to a DA testnet (arabica or mocha). Confirm again that everything is functioning properly.
    3. Part 4: Deploy your rollup to the DA layer's mainnet.

    The Cosmos SDK is a framework for building blockchain applications. The Cosmos Ecosystem uses Inter-Blockchain Communication (IBC) to allow blockchains to communicate with one another.

    TIP

    This tutorial will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github Issue ticket or let us know in our Telegram.

    Learn how to restart your rollup.

    🤔 What is GM?

    GM means good morning. It's GM o'clock somewhere, so there's never a bad time to say GM, Gm, or gm. You can think of "GM" as the new version of "hello world".

    Dependencies

    Next, head either to Linux setup or MacOS setup.

    Linux setup

    🏃 Install Golang on Linux

    Celestia-App, Celestia-Node, and Cosmos-SDK are written in the Golang programming language. You will need Golang to build and run them.

    You can install Golang here.

    🔥 Install Ignite CLI on Linux

    First, you will need to create /usr/local/bin if you have not already:

    bash
    sudo mkdir -p -m 775 /usr/local/bin

    Run this command in your terminal to install Ignite CLI:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash

    TIP

    ✋ On some machines, you may run into permissions errors like the one below. You can resolve this error by following the guidance here or below.

    bash
    # Error
     jcs @ ~ % curl https://get.ignite.com/cli@v28.3.0! | bash
     
     
    diff --git a/pr-339/assets/tutorials_gm-world.md.e49cb86a.lean.js b/pr-339/assets/tutorials_gm-world.md.4d01b0f1.lean.js
    similarity index 91%
    rename from pr-339/assets/tutorials_gm-world.md.e49cb86a.lean.js
    rename to pr-339/assets/tutorials_gm-world.md.4d01b0f1.lean.js
    index 5b30dcb2e..43115340d 100644
    --- a/pr-339/assets/tutorials_gm-world.md.e49cb86a.lean.js
    +++ b/pr-339/assets/tutorials_gm-world.md.4d01b0f1.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as l}from"./chunks/framework.adc83686.js";const d=JSON.parse('{"title":"GM world rollup: Part 1","description":"Build a sovereign rollup with Ignite CLI, Celestia and Rollkit locally and on a testnet","frontmatter":{"description":"Build a sovereign rollup with Ignite CLI, Celestia and Rollkit locally and on a testnet","head":[["meta",{"name":"og:title","content":"GM world rollup: Part 1 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world.md","filePath":"tutorials/gm-world.md","lastUpdated":1713200494000}'),o={name:"tutorials/gm-world.md"},p=l("",123),e=[p];function t(c,r,C,y,i,A){return a(),n("div",null,e)}const h=s(o,[["render",t]]);export{d as __pageData,h as default};
    +import{_ as s,o as a,c as n,X as l}from"./chunks/framework.adc83686.js";const d=JSON.parse('{"title":"GM world rollup: Part 1","description":"Build a sovereign rollup with Ignite CLI, Celestia and Rollkit locally and on a testnet","frontmatter":{"description":"Build a sovereign rollup with Ignite CLI, Celestia and Rollkit locally and on a testnet","head":[["meta",{"name":"og:title","content":"GM world rollup: Part 1 | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/gm-world.md","filePath":"tutorials/gm-world.md","lastUpdated":1713275863000}'),o={name:"tutorials/gm-world.md"},p=l("",123),e=[p];function t(c,r,C,y,i,A){return a(),n("div",null,e)}const h=s(o,[["render",t]]);export{d as __pageData,h as default};
    diff --git a/pr-339/assets/tutorials_ibc-connection.md.000735cb.js b/pr-339/assets/tutorials_ibc-connection.md.58b655f9.js
    similarity index 99%
    rename from pr-339/assets/tutorials_ibc-connection.md.000735cb.js
    rename to pr-339/assets/tutorials_ibc-connection.md.58b655f9.js
    index 2bbdd69af..47164cac4 100644
    --- a/pr-339/assets/tutorials_ibc-connection.md.000735cb.js
    +++ b/pr-339/assets/tutorials_ibc-connection.md.58b655f9.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const F=JSON.parse('{"title":"IBC connection tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"IBC connection tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/ibc-connection.md","filePath":"tutorials/ibc-connection.md","lastUpdated":1713200494000}'),l={name:"tutorials/ibc-connection.md"},p=o(`

    IBC connection tutorial

    In this tutorial, we'll learn how to use an Inter-Blockchain Communication (IBC) Protocol relayer to create an IBC connection between a GM world rollup and an Osmosis local testnet.

    Disclaimer

    This initial version of IBC has high trust assumptions where receiving chains only verify the signature of the single rollup sequencer. This is the initial step towards the direction of trust-minimized IBC light clients, next steps include verifying DA inclusion proofs and adding fraud/zk proof verification. Learn more on ibc-go issue 5112.

    💻 Pre-requisites

    Software requirements

    • Docker running on your machine
    • Go version ≥ 1.21.0
    • Ignite version ≥ v28.2.0

    Run a GM rollup chain

    Before you can create an IBC connection, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.13.1

    WARNING

    You will need to use Ignite v28.2.0, which you can install with:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash

    Scaffold the GM chain:

    bash
    cd $HOME
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const F=JSON.parse('{"title":"IBC connection tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"IBC connection tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/ibc-connection.md","filePath":"tutorials/ibc-connection.md","lastUpdated":1713275863000}'),l={name:"tutorials/ibc-connection.md"},p=o(`

    IBC connection tutorial

    In this tutorial, we'll learn how to use an Inter-Blockchain Communication (IBC) Protocol relayer to create an IBC connection between a GM world rollup and an Osmosis local testnet.

    Disclaimer

    This initial version of IBC has high trust assumptions where receiving chains only verify the signature of the single rollup sequencer. This is the initial step towards the direction of trust-minimized IBC light clients, next steps include verifying DA inclusion proofs and adding fraud/zk proof verification. Learn more on ibc-go issue 5112.

    💻 Pre-requisites

    Software requirements

    • Docker running on your machine
    • Go version ≥ 1.21.0
    • Ignite version ≥ v28.2.0

    Run a GM rollup chain

    Before you can create an IBC connection, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.13.1

    WARNING

    You will need to use Ignite v28.2.0, which you can install with:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash

    Scaffold the GM chain:

    bash
    cd $HOME
     ignite scaffold chain gm --address-prefix gm

    Change into the gm directory and install Rollkit with IBC compatibility:

    bash
    cd gm
     go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/rollkit/cosmos-sdk@v0.50.5-rollkit-v0.13.1-no-fraud-proofs
     go mod tidy
    diff --git a/pr-339/assets/tutorials_ibc-connection.md.000735cb.lean.js b/pr-339/assets/tutorials_ibc-connection.md.58b655f9.lean.js
    similarity index 89%
    rename from pr-339/assets/tutorials_ibc-connection.md.000735cb.lean.js
    rename to pr-339/assets/tutorials_ibc-connection.md.58b655f9.lean.js
    index ddb3ccc55..eb8dd527a 100644
    --- a/pr-339/assets/tutorials_ibc-connection.md.000735cb.lean.js
    +++ b/pr-339/assets/tutorials_ibc-connection.md.58b655f9.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const F=JSON.parse('{"title":"IBC connection tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"IBC connection tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/ibc-connection.md","filePath":"tutorials/ibc-connection.md","lastUpdated":1713200494000}'),l={name:"tutorials/ibc-connection.md"},p=o("",87),e=[p];function t(c,r,y,D,C,i){return a(),n("div",null,e)}const u=s(l,[["render",t]]);export{F as __pageData,u as default};
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const F=JSON.parse('{"title":"IBC connection tutorial","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"IBC connection tutorial | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/ibc-connection.md","filePath":"tutorials/ibc-connection.md","lastUpdated":1713275863000}'),l={name:"tutorials/ibc-connection.md"},p=o("",87),e=[p];function t(c,r,y,D,C,i){return a(),n("div",null,e)}const u=s(l,[["render",t]]);export{F as __pageData,u as default};
    diff --git a/pr-339/assets/tutorials_lazy-sequencing.md.10272bb6.js b/pr-339/assets/tutorials_lazy-sequencing.md.09c6a8ff.js
    similarity index 97%
    rename from pr-339/assets/tutorials_lazy-sequencing.md.10272bb6.js
    rename to pr-339/assets/tutorials_lazy-sequencing.md.09c6a8ff.js
    index 90fd0b330..488aeae4f 100644
    --- a/pr-339/assets/tutorials_lazy-sequencing.md.10272bb6.js
    +++ b/pr-339/assets/tutorials_lazy-sequencing.md.09c6a8ff.js
    @@ -1,3 +1,3 @@
    -import{_ as a,o as s,c as e,X as n}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"How to use lazy sequencing (aggregation)","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to use lazy sequencing (aggregation) | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/lazy-sequencing.md","filePath":"tutorials/lazy-sequencing.md","lastUpdated":1713200494000}'),t={name:"tutorials/lazy-sequencing.md"},o=n(`

    How to use lazy sequencing (aggregation)

    In this guide, we'll go over how to use lazy sequencing.

    This feature was introduced in Rollkit v0.7.0 and allows rollup operators to wait for transactions to build blocks. This prevents the rollup from building empty blocks.

    To turn on lazy sequencing, add the following flag to your start command:

    bash
    --rollkit.lazy_aggregator

    An example command would look like this:

    bash
    # start the chain
    +import{_ as a,o as s,c as e,X as n}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"How to use lazy sequencing (aggregation)","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to use lazy sequencing (aggregation) | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/lazy-sequencing.md","filePath":"tutorials/lazy-sequencing.md","lastUpdated":1713275863000}'),t={name:"tutorials/lazy-sequencing.md"},o=n(`

    How to use lazy sequencing (aggregation)

    In this guide, we'll go over how to use lazy sequencing.

    This feature was introduced in Rollkit v0.7.0 and allows rollup operators to wait for transactions to build blocks. This prevents the rollup from building empty blocks.

    To turn on lazy sequencing, add the following flag to your start command:

    bash
    --rollkit.lazy_aggregator

    An example command would look like this:

    bash
    # start the chain
     gmd start [existing flags...] 
     gmd start [existing flags...] --rollkit.lazy_aggregator 
    `,7),l=[o];function i(p,r,c,g,d,u){return s(),e("div",null,l)}const _=a(t,[["render",i]]);export{h as __pageData,_ as default}; diff --git a/pr-339/assets/tutorials_lazy-sequencing.md.10272bb6.lean.js b/pr-339/assets/tutorials_lazy-sequencing.md.09c6a8ff.lean.js similarity index 89% rename from pr-339/assets/tutorials_lazy-sequencing.md.10272bb6.lean.js rename to pr-339/assets/tutorials_lazy-sequencing.md.09c6a8ff.lean.js index d13dbca28..2dfab3811 100644 --- a/pr-339/assets/tutorials_lazy-sequencing.md.10272bb6.lean.js +++ b/pr-339/assets/tutorials_lazy-sequencing.md.09c6a8ff.lean.js @@ -1 +1 @@ -import{_ as a,o as s,c as e,X as n}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"How to use lazy sequencing (aggregation)","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to use lazy sequencing (aggregation) | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/lazy-sequencing.md","filePath":"tutorials/lazy-sequencing.md","lastUpdated":1713200494000}'),t={name:"tutorials/lazy-sequencing.md"},o=n("",7),l=[o];function i(p,r,c,g,d,u){return s(),e("div",null,l)}const _=a(t,[["render",i]]);export{h as __pageData,_ as default}; +import{_ as a,o as s,c as e,X as n}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"How to use lazy sequencing (aggregation)","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"How to use lazy sequencing (aggregation) | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/lazy-sequencing.md","filePath":"tutorials/lazy-sequencing.md","lastUpdated":1713275863000}'),t={name:"tutorials/lazy-sequencing.md"},o=n("",7),l=[o];function i(p,r,c,g,d,u){return s(),e("div",null,l)}const _=a(t,[["render",i]]);export{h as __pageData,_ as default}; diff --git a/pr-339/assets/tutorials_overview.md.400da39f.js b/pr-339/assets/tutorials_overview.md.3a60c3fe.js similarity index 98% rename from pr-339/assets/tutorials_overview.md.400da39f.js rename to pr-339/assets/tutorials_overview.md.3a60c3fe.js index b1d4b8043..13ec612e8 100644 --- a/pr-339/assets/tutorials_overview.md.400da39f.js +++ b/pr-339/assets/tutorials_overview.md.3a60c3fe.js @@ -1 +1 @@ -import{_ as e,o as r,c as o,X as t}from"./chunks/framework.adc83686.js";const w=JSON.parse('{"title":"Tutorials","description":"This page provides a comprehensive overview of tutorials and guides available for Rollkit.","frontmatter":{"description":"This page provides a comprehensive overview of tutorials and guides available for Rollkit.","head":[["meta",{"name":"og:title","content":"Tutorials | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/overview.md","filePath":"tutorials/overview.md","lastUpdated":1713200494000}'),l={name:"tutorials/overview.md"},i=t('

    Tutorials

    Welcome to the Rollkit tutorials section! Here, you'll find a wide range of tutorials and guides designed to help you understand and effectively use Rollkit, the first sovereign rollup framework.

    Whether you're a beginner just starting out, an intermediate user looking to expand your knowledge, or an advanced user seeking to delve into more complex topics, we've got you covered. Our tutorials are categorized based on the level of expertise required, so you can easily find the resources that best suit your needs.

    In this section, you'll find:

    💻 Support

    The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

    ',7),a=[i];function s(n,u,p,d,c,h){return r(),o("div",null,a)}const v=e(l,[["render",s]]);export{w as __pageData,v as default}; +import{_ as e,o as r,c as o,X as t}from"./chunks/framework.adc83686.js";const w=JSON.parse('{"title":"Tutorials","description":"This page provides a comprehensive overview of tutorials and guides available for Rollkit.","frontmatter":{"description":"This page provides a comprehensive overview of tutorials and guides available for Rollkit.","head":[["meta",{"name":"og:title","content":"Tutorials | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/overview.md","filePath":"tutorials/overview.md","lastUpdated":1713275863000}'),l={name:"tutorials/overview.md"},i=t('

    Tutorials

    Welcome to the Rollkit tutorials section! Here, you'll find a wide range of tutorials and guides designed to help you understand and effectively use Rollkit, the first sovereign rollup framework.

    Whether you're a beginner just starting out, an intermediate user looking to expand your knowledge, or an advanced user seeking to delve into more complex topics, we've got you covered. Our tutorials are categorized based on the level of expertise required, so you can easily find the resources that best suit your needs.

    In this section, you'll find:

    💻 Support

    The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

    ',7),a=[i];function s(n,u,p,d,c,h){return r(),o("div",null,a)}const v=e(l,[["render",s]]);export{w as __pageData,v as default}; diff --git a/pr-339/assets/tutorials_overview.md.400da39f.lean.js b/pr-339/assets/tutorials_overview.md.3a60c3fe.lean.js similarity index 91% rename from pr-339/assets/tutorials_overview.md.400da39f.lean.js rename to pr-339/assets/tutorials_overview.md.3a60c3fe.lean.js index dad68c054..28656f8ee 100644 --- a/pr-339/assets/tutorials_overview.md.400da39f.lean.js +++ b/pr-339/assets/tutorials_overview.md.3a60c3fe.lean.js @@ -1 +1 @@ -import{_ as e,o as r,c as o,X as t}from"./chunks/framework.adc83686.js";const w=JSON.parse('{"title":"Tutorials","description":"This page provides a comprehensive overview of tutorials and guides available for Rollkit.","frontmatter":{"description":"This page provides a comprehensive overview of tutorials and guides available for Rollkit.","head":[["meta",{"name":"og:title","content":"Tutorials | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/overview.md","filePath":"tutorials/overview.md","lastUpdated":1713200494000}'),l={name:"tutorials/overview.md"},i=t("",7),a=[i];function s(n,u,p,d,c,h){return r(),o("div",null,a)}const v=e(l,[["render",s]]);export{w as __pageData,v as default}; +import{_ as e,o as r,c as o,X as t}from"./chunks/framework.adc83686.js";const w=JSON.parse('{"title":"Tutorials","description":"This page provides a comprehensive overview of tutorials and guides available for Rollkit.","frontmatter":{"description":"This page provides a comprehensive overview of tutorials and guides available for Rollkit.","head":[["meta",{"name":"og:title","content":"Tutorials | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/overview.md","filePath":"tutorials/overview.md","lastUpdated":1713275863000}'),l={name:"tutorials/overview.md"},i=t("",7),a=[i];function s(n,u,p,d,c,h){return r(),o("div",null,a)}const v=e(l,[["render",s]]);export{w as __pageData,v as default}; diff --git a/pr-339/assets/tutorials_polaris-evm.md.c109abcf.js b/pr-339/assets/tutorials_polaris-evm.md.7c7ede96.js similarity index 99% rename from pr-339/assets/tutorials_polaris-evm.md.c109abcf.js rename to pr-339/assets/tutorials_polaris-evm.md.7c7ede96.js index 83571e351..284443723 100644 --- a/pr-339/assets/tutorials_polaris-evm.md.c109abcf.js +++ b/pr-339/assets/tutorials_polaris-evm.md.7c7ede96.js @@ -1,4 +1,4 @@ -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/polaris-evm/polaris-start-site.png",e="/docs-preview/pr-339/polaris-evm/polaris-evm.png",u=JSON.parse('{"title":"Polaris EVM and Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Polaris EVM and Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/polaris-evm.md","filePath":"tutorials/polaris-evm.md","lastUpdated":1713200494000}'),p={name:"tutorials/polaris-evm.md"},t=o(`

    Polaris EVM and Rollkit

    DANGER

    We regret to inform that Polaris V1 and Rollkit integration is not fully functional. Current issues are tracked in https://github.com/rollkit/rollkit/issues/1594. We are expecting Polaris V2 release soon and Rollkit support will be added along with update tutorial.

    This tutorial provides step-by-step instructions for running the Polaris EVM using Rollkit. Polaris EVM is a version of the Ethereum Virtual Machine (EVM) that is designed to run the Berachain network. This version has been modified to use Celestia as a data availability layer. This integration uses a local-celestia-devnet. Rollkit is used to deploy a Polaris EVM rollup without needing to set up a data availability and consensus network.

    TIP

    Learn how to restart your rollup.

    Prerequisites

    Before you can run Polaris EVM using Rollkit, you need to have the following software installed on your machine:

    • Docker running on your machine
    • Go version >= 1.21.0

    Run a local-celestia-devnet

    Before you can start Polaris EVM, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26650:26650 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.12.6

    Clone the repo

    To get started, clone the Polaris repository and switch to the Rollkit branch:

    bash
    cd $HOME
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/polaris-evm/polaris-start-site.png",e="/docs-preview/pr-339/polaris-evm/polaris-evm.png",u=JSON.parse('{"title":"Polaris EVM and Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Polaris EVM and Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/polaris-evm.md","filePath":"tutorials/polaris-evm.md","lastUpdated":1713275863000}'),p={name:"tutorials/polaris-evm.md"},t=o(`

    Polaris EVM and Rollkit

    DANGER

    We regret to inform that Polaris V1 and Rollkit integration is not fully functional. Current issues are tracked in https://github.com/rollkit/rollkit/issues/1594. We are expecting Polaris V2 release soon and Rollkit support will be added along with update tutorial.

    This tutorial provides step-by-step instructions for running the Polaris EVM using Rollkit. Polaris EVM is a version of the Ethereum Virtual Machine (EVM) that is designed to run the Berachain network. This version has been modified to use Celestia as a data availability layer. This integration uses a local-celestia-devnet. Rollkit is used to deploy a Polaris EVM rollup without needing to set up a data availability and consensus network.

    TIP

    Learn how to restart your rollup.

    Prerequisites

    Before you can run Polaris EVM using Rollkit, you need to have the following software installed on your machine:

    • Docker running on your machine
    • Go version >= 1.21.0

    Run a local-celestia-devnet

    Before you can start Polaris EVM, you need to start a local-celestia-devnet instance in a separate terminal:

    bash
    docker run -t -i --platform linux/amd64 -p 26650:26650 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 ghcr.io/rollkit/local-celestia-devnet:v0.12.6

    Clone the repo

    To get started, clone the Polaris repository and switch to the Rollkit branch:

    bash
    cd $HOME
     git clone https://github.com/berachain/polaris.git
     cd polaris && git checkout rollkit

    Install Foundry

    bash
    curl -L https://foundry.paradigm.xyz | bash

    Start the Polaris EVM using Rollkit

    Then start the chain in your first terminal:

    bash
    cd $HOME/polaris && foundryup
     make start

    Congratulations

    You now have a Polaris EVM Rollkit rollup running! The rollup logs will begin to look similar to this:

    bash
    7:58PM INF submitting block to DA layer height=11 module=BlockManager 
    diff --git a/pr-339/assets/tutorials_polaris-evm.md.c109abcf.lean.js b/pr-339/assets/tutorials_polaris-evm.md.7c7ede96.lean.js
    similarity index 81%
    rename from pr-339/assets/tutorials_polaris-evm.md.c109abcf.lean.js
    rename to pr-339/assets/tutorials_polaris-evm.md.7c7ede96.lean.js
    index bed97ad45..e81dc6e0b 100644
    --- a/pr-339/assets/tutorials_polaris-evm.md.c109abcf.lean.js
    +++ b/pr-339/assets/tutorials_polaris-evm.md.7c7ede96.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/polaris-evm/polaris-start-site.png",e="/docs-preview/pr-339/polaris-evm/polaris-evm.png",u=JSON.parse('{"title":"Polaris EVM and Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Polaris EVM and Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/polaris-evm.md","filePath":"tutorials/polaris-evm.md","lastUpdated":1713200494000}'),p={name:"tutorials/polaris-evm.md"},t=o("",75),r=[t];function c(C,i,y,D,A,d){return a(),n("div",null,r)}const g=s(p,[["render",c]]);export{u as __pageData,g as default};
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/polaris-evm/polaris-start-site.png",e="/docs-preview/pr-339/polaris-evm/polaris-evm.png",u=JSON.parse('{"title":"Polaris EVM and Rollkit","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Polaris EVM and Rollkit | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/polaris-evm.md","filePath":"tutorials/polaris-evm.md","lastUpdated":1713275863000}'),p={name:"tutorials/polaris-evm.md"},t=o("",75),r=[t];function c(C,i,y,D,A,d){return a(),n("div",null,r)}const g=s(p,[["render",c]]);export{u as __pageData,g as default};
    diff --git a/pr-339/assets/tutorials_recipe-book.md.ecc97b40.js b/pr-339/assets/tutorials_recipe-book.md.d889094b.js
    similarity index 99%
    rename from pr-339/assets/tutorials_recipe-book.md.ecc97b40.js
    rename to pr-339/assets/tutorials_recipe-book.md.d889094b.js
    index af6fe8c91..15d3d69ac 100644
    --- a/pr-339/assets/tutorials_recipe-book.md.ecc97b40.js
    +++ b/pr-339/assets/tutorials_recipe-book.md.d889094b.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as a,c as n,X as e}from"./chunks/framework.adc83686.js";const o="/docs-preview/pr-339/recipes/recipe-start.gif",p="/docs-preview/pr-339/recipes/recipes.gif",l="/docs-preview/pr-339/recipes/query.gif",h=JSON.parse('{"title":"🥗 Recipe Book rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🥗 Recipe Book rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/recipe-book.md","filePath":"tutorials/recipe-book.md","lastUpdated":1713200494000}'),t={name:"tutorials/recipe-book.md"},c=e(`

    🥗 Recipe Book rollup

    📖 Overview

    In this tutorial, we are going to build a blockchain for your favorite recipes. The goal of this tutorial is to create a Rollkit rollup with a module that allows you to write and read data to and from your application-specific blockchain. The end user will be able to submit new recipes and read them from the blockchain.

    In the GM world tutorial, we defined a new API endpoint and modified a keeper query function to return static data. In this tutorial, we will be modifying the state with transactions (Cosmos SDK messages) that are routed to a module and its message handlers, which are sent to the recipes blockchain.

    TIP

    This tutorial will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github Issue ticket or let us know in our Telegram.

    Learn how to restart your rollup.

    WARNING

    The script for this tutorial is built for Celestia's Arabica devnet.

    💻 Prerequisites

    🏗 Scaffolding your rollup

    🔥 Use Ignite CLI to scaffold a recipes rollup

    Run the following command to scaffold your recipes chain using Ignite CLI:

    bash
    ignite scaffold chain recipes --address-prefix recipes

    Your new recipes chain has been scaffolded and --address-prefix recipes allows the address prefix to be recipes instead of cosmos.

    Change into the recipes directory:

    bash
    cd recipes

    💎 Installing Rollkit

    To swap out CometBFT for Rollkit, run the following commands:

    bash
    go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/rollkit/cosmos-sdk@v0.50.5-rollkit-v0.13.1-no-fraud-proofs
    +import{_ as s,o as a,c as n,X as e}from"./chunks/framework.adc83686.js";const o="/docs-preview/pr-339/recipes/recipe-start.gif",p="/docs-preview/pr-339/recipes/recipes.gif",l="/docs-preview/pr-339/recipes/query.gif",h=JSON.parse('{"title":"🥗 Recipe Book rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🥗 Recipe Book rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/recipe-book.md","filePath":"tutorials/recipe-book.md","lastUpdated":1713275863000}'),t={name:"tutorials/recipe-book.md"},c=e(`

    🥗 Recipe Book rollup

    📖 Overview

    In this tutorial, we are going to build a blockchain for your favorite recipes. The goal of this tutorial is to create a Rollkit rollup with a module that allows you to write and read data to and from your application-specific blockchain. The end user will be able to submit new recipes and read them from the blockchain.

    In the GM world tutorial, we defined a new API endpoint and modified a keeper query function to return static data. In this tutorial, we will be modifying the state with transactions (Cosmos SDK messages) that are routed to a module and its message handlers, which are sent to the recipes blockchain.

    TIP

    This tutorial will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github Issue ticket or let us know in our Telegram.

    Learn how to restart your rollup.

    WARNING

    The script for this tutorial is built for Celestia's Arabica devnet.

    💻 Prerequisites

    🏗 Scaffolding your rollup

    🔥 Use Ignite CLI to scaffold a recipes rollup

    Run the following command to scaffold your recipes chain using Ignite CLI:

    bash
    ignite scaffold chain recipes --address-prefix recipes

    Your new recipes chain has been scaffolded and --address-prefix recipes allows the address prefix to be recipes instead of cosmos.

    Change into the recipes directory:

    bash
    cd recipes

    💎 Installing Rollkit

    To swap out CometBFT for Rollkit, run the following commands:

    bash
    go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/rollkit/cosmos-sdk@v0.50.5-rollkit-v0.13.1-no-fraud-proofs
     go mod tidy
     go mod download

    💬 Message types

    ✨ Create message types

    Create a message type and its handler with the message command:

    bash
    ignite scaffold message createRecipe dish ingredients

    Response:

    bash
    modify proto/recipes/recipes/tx.proto
     modify x/recipes/client/cli/tx.go
    diff --git a/pr-339/assets/tutorials_recipe-book.md.ecc97b40.lean.js b/pr-339/assets/tutorials_recipe-book.md.d889094b.lean.js
    similarity index 91%
    rename from pr-339/assets/tutorials_recipe-book.md.ecc97b40.lean.js
    rename to pr-339/assets/tutorials_recipe-book.md.d889094b.lean.js
    index cf52370c0..aaa4e0a35 100644
    --- a/pr-339/assets/tutorials_recipe-book.md.ecc97b40.lean.js
    +++ b/pr-339/assets/tutorials_recipe-book.md.d889094b.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as e}from"./chunks/framework.adc83686.js";const o="/docs-preview/pr-339/recipes/recipe-start.gif",p="/docs-preview/pr-339/recipes/recipes.gif",l="/docs-preview/pr-339/recipes/query.gif",h=JSON.parse('{"title":"🥗 Recipe Book rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🥗 Recipe Book rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/recipe-book.md","filePath":"tutorials/recipe-book.md","lastUpdated":1713200494000}'),t={name:"tutorials/recipe-book.md"},c=e("",93),r=[c];function i(y,D,C,A,F,d){return a(),n("div",null,r)}const g=s(t,[["render",i]]);export{h as __pageData,g as default};
    +import{_ as s,o as a,c as n,X as e}from"./chunks/framework.adc83686.js";const o="/docs-preview/pr-339/recipes/recipe-start.gif",p="/docs-preview/pr-339/recipes/recipes.gif",l="/docs-preview/pr-339/recipes/query.gif",h=JSON.parse('{"title":"🥗 Recipe Book rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🥗 Recipe Book rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/recipe-book.md","filePath":"tutorials/recipe-book.md","lastUpdated":1713275863000}'),t={name:"tutorials/recipe-book.md"},c=e("",93),r=[c];function i(y,D,C,A,F,d){return a(),n("div",null,r)}const g=s(t,[["render",i]]);export{h as __pageData,g as default};
    diff --git a/pr-339/assets/tutorials_restart-rollup.md.071cc132.js b/pr-339/assets/tutorials_restart-rollup.md.cb0d13e8.js
    similarity index 99%
    rename from pr-339/assets/tutorials_restart-rollup.md.071cc132.js
    rename to pr-339/assets/tutorials_restart-rollup.md.cb0d13e8.js
    index 4a6a9c2c1..1dda824bf 100644
    --- a/pr-339/assets/tutorials_restart-rollup.md.071cc132.js
    +++ b/pr-339/assets/tutorials_restart-rollup.md.cb0d13e8.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as a,c as o,X as e}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"🔄 How to restart your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🔄 How to restart your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/restart-rollup.md","filePath":"tutorials/restart-rollup.md","lastUpdated":1713200494000}'),l={name:"tutorials/restart-rollup.md"},n=e(`

    🔄 How to restart your rollup

    This guide will teach you how to restart your Rollkit rollup.

    Restart rollup

    This section covers the case where you need to restart your rollup.

    In order to restart your rollup, you will need to run the <your-binary>d start [...args] command for your rollup. This is the example for the GM world tutorial.

    For the GM world tutorial, you can restart the chain by running the restart-local.sh script that was generated by init-local.sh.

    Use the DA_START_HEIGHT, NAMESPACE, and AUTH_TOKEN variables from your original start command.

    Using the gmd rollup as an example, you can add something similar to your respective start script to make it easier to save variables for later use:

    bash
    # the rest of your init script
    +import{_ as s,o as a,c as o,X as e}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"🔄 How to restart your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🔄 How to restart your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/restart-rollup.md","filePath":"tutorials/restart-rollup.md","lastUpdated":1713275863000}'),l={name:"tutorials/restart-rollup.md"},n=e(`

    🔄 How to restart your rollup

    This guide will teach you how to restart your Rollkit rollup.

    Restart rollup

    This section covers the case where you need to restart your rollup.

    In order to restart your rollup, you will need to run the <your-binary>d start [...args] command for your rollup. This is the example for the GM world tutorial.

    For the GM world tutorial, you can restart the chain by running the restart-local.sh script that was generated by init-local.sh.

    Use the DA_START_HEIGHT, NAMESPACE, and AUTH_TOKEN variables from your original start command.

    Using the gmd rollup as an example, you can add something similar to your respective start script to make it easier to save variables for later use:

    bash
    # the rest of your init script
     
     # create a restart-local.sh file to restart the chain later
     rm restart-local.sh
    diff --git a/pr-339/assets/tutorials_restart-rollup.md.071cc132.lean.js b/pr-339/assets/tutorials_restart-rollup.md.cb0d13e8.lean.js
    similarity index 89%
    rename from pr-339/assets/tutorials_restart-rollup.md.071cc132.lean.js
    rename to pr-339/assets/tutorials_restart-rollup.md.cb0d13e8.lean.js
    index 25accccf6..a1abac141 100644
    --- a/pr-339/assets/tutorials_restart-rollup.md.071cc132.lean.js
    +++ b/pr-339/assets/tutorials_restart-rollup.md.cb0d13e8.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as o,X as e}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"🔄 How to restart your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🔄 How to restart your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/restart-rollup.md","filePath":"tutorials/restart-rollup.md","lastUpdated":1713200494000}'),l={name:"tutorials/restart-rollup.md"},n=e("",32),t=[n];function r(p,c,C,y,i,D){return a(),o("div",null,t)}const d=s(l,[["render",r]]);export{A as __pageData,d as default};
    +import{_ as s,o as a,c as o,X as e}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"🔄 How to restart your rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🔄 How to restart your rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/restart-rollup.md","filePath":"tutorials/restart-rollup.md","lastUpdated":1713275863000}'),l={name:"tutorials/restart-rollup.md"},n=e("",32),t=[n];function r(p,c,C,y,i,D){return a(),o("div",null,t)}const d=s(l,[["render",r]]);export{A as __pageData,d as default};
    diff --git a/pr-339/assets/tutorials_rollup-docker.md.a1613d0d.js b/pr-339/assets/tutorials_rollup-docker.md.2b92540c.js
    similarity index 96%
    rename from pr-339/assets/tutorials_rollup-docker.md.a1613d0d.js
    rename to pr-339/assets/tutorials_rollup-docker.md.2b92540c.js
    index 45ced8527..6a27958f4 100644
    --- a/pr-339/assets/tutorials_rollup-docker.md.a1613d0d.js
    +++ b/pr-339/assets/tutorials_rollup-docker.md.2b92540c.js
    @@ -1 +1 @@
    -import{_ as e,o as t,c as o,X as r}from"./chunks/framework.adc83686.js";const k=JSON.parse('{"title":"Starter Rollup with Docker","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Starter Rollup with Docker | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/rollup-docker.md","filePath":"tutorials/rollup-docker.md","lastUpdated":1713200494000}'),a={name:"tutorials/rollup-docker.md"},l=r('

    Starter Rollup with Docker

    This tutorial will guide you through starting a Rollkit rollup with Docker.

    Prerequisites

    • Docker installed on your machine

    Clone the repository

    First, clone the rollup-docker repository and change into the directory:

    bash
    git clone https://github.com/rollkit/rollup-docker.git && cd rollup-docker
    ',7),s=[l];function n(i,c,p,h,d,u){return t(),o("div",null,s)}const m=e(a,[["render",n]]);export{k as __pageData,m as default}; +import{_ as e,o as t,c as o,X as r}from"./chunks/framework.adc83686.js";const k=JSON.parse('{"title":"Starter Rollup with Docker","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Starter Rollup with Docker | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/rollup-docker.md","filePath":"tutorials/rollup-docker.md","lastUpdated":1713275863000}'),a={name:"tutorials/rollup-docker.md"},l=r('

    Starter Rollup with Docker

    This tutorial will guide you through starting a Rollkit rollup with Docker.

    Prerequisites

    • Docker installed on your machine

    Clone the repository

    First, clone the rollup-docker repository and change into the directory:

    bash
    git clone https://github.com/rollkit/rollup-docker.git && cd rollup-docker
    ',7),s=[l];function n(i,c,p,h,d,u){return t(),o("div",null,s)}const m=e(a,[["render",n]]);export{k as __pageData,m as default}; diff --git a/pr-339/assets/tutorials_rollup-docker.md.a1613d0d.lean.js b/pr-339/assets/tutorials_rollup-docker.md.2b92540c.lean.js similarity index 89% rename from pr-339/assets/tutorials_rollup-docker.md.a1613d0d.lean.js rename to pr-339/assets/tutorials_rollup-docker.md.2b92540c.lean.js index 57f3f1534..68339cd1c 100644 --- a/pr-339/assets/tutorials_rollup-docker.md.a1613d0d.lean.js +++ b/pr-339/assets/tutorials_rollup-docker.md.2b92540c.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as o,X as r}from"./chunks/framework.adc83686.js";const k=JSON.parse('{"title":"Starter Rollup with Docker","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Starter Rollup with Docker | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/rollup-docker.md","filePath":"tutorials/rollup-docker.md","lastUpdated":1713200494000}'),a={name:"tutorials/rollup-docker.md"},l=r("",7),s=[l];function n(i,c,p,h,d,u){return t(),o("div",null,s)}const m=e(a,[["render",n]]);export{k as __pageData,m as default}; +import{_ as e,o as t,c as o,X as r}from"./chunks/framework.adc83686.js";const k=JSON.parse('{"title":"Starter Rollup with Docker","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Starter Rollup with Docker | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/rollup-docker.md","filePath":"tutorials/rollup-docker.md","lastUpdated":1713275863000}'),a={name:"tutorials/rollup-docker.md"},l=r("",7),s=[l];function n(i,c,p,h,d,u){return t(),o("div",null,s)}const m=e(a,[["render",n]]);export{k as __pageData,m as default}; diff --git a/pr-339/assets/tutorials_starter-rollup.md.1dcddd78.js b/pr-339/assets/tutorials_starter-rollup.md.dfadac92.js similarity index 99% rename from pr-339/assets/tutorials_starter-rollup.md.1dcddd78.js rename to pr-339/assets/tutorials_starter-rollup.md.dfadac92.js index 796f8e9b2..77b221b37 100644 --- a/pr-339/assets/tutorials_starter-rollup.md.1dcddd78.js +++ b/pr-339/assets/tutorials_starter-rollup.md.dfadac92.js @@ -1,4 +1,4 @@ -import{_ as s,o as a,c as l,X as o}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"Starter Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Starter Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/starter-rollup.md","filePath":"tutorials/starter-rollup.md","lastUpdated":1713200494000}'),n={name:"tutorials/starter-rollup.md"},e=o(`

    Starter Rollup

    In this tutorial, you will learn how to build a Rollkit rollup that uses a local Celestia devnet for consensus and data availability. This is the first-stop for developers building on Rollkit.

    This is built for MacOS and has been tested on an M1 and M2 Mac.

    Prerequisites

    • Docker running on your machine

    Clone the repo

    First, clone the starter repository and change into the $HOME/gm-starter repository:

    bash
    git clone https://github.com/rollkit/gm-starter.git && cd gm-starter

    Run a local-celestia-devnet

    In a second terminal instance, start the local-celestia-devnet:

    bash
    docker run -i -t --platform linux/amd64 -p 26657:26657 -p 26658:26658 -p 26659:26659 ghcr.io/rollkit/local-celestia-devnet:v0.11.0

    When passing the --rollkit.da_config flag later in the tutorial, it will require \`auth_token\`\` to be passed in. The auth token with write permission is required to submit blobs and can be obtained from the logs on local-celestia-devnet before the bridge node starts.

    bash
    WARNING: Keep this auth token secret **DO NOT** log this auth token outside of development. CELESTIA_NODE_AUTH_TOKEN=
    +import{_ as s,o as a,c as l,X as o}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"Starter Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Starter Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/starter-rollup.md","filePath":"tutorials/starter-rollup.md","lastUpdated":1713275863000}'),n={name:"tutorials/starter-rollup.md"},e=o(`

    Starter Rollup

    In this tutorial, you will learn how to build a Rollkit rollup that uses a local Celestia devnet for consensus and data availability. This is the first-stop for developers building on Rollkit.

    This is built for MacOS and has been tested on an M1 and M2 Mac.

    Prerequisites

    • Docker running on your machine

    Clone the repo

    First, clone the starter repository and change into the $HOME/gm-starter repository:

    bash
    git clone https://github.com/rollkit/gm-starter.git && cd gm-starter

    Run a local-celestia-devnet

    In a second terminal instance, start the local-celestia-devnet:

    bash
    docker run -i -t --platform linux/amd64 -p 26657:26657 -p 26658:26658 -p 26659:26659 ghcr.io/rollkit/local-celestia-devnet:v0.11.0

    When passing the --rollkit.da_config flag later in the tutorial, it will require \`auth_token\`\` to be passed in. The auth token with write permission is required to submit blobs and can be obtained from the logs on local-celestia-devnet before the bridge node starts.

    bash
    WARNING: Keep this auth token secret **DO NOT** log this auth token outside of development. CELESTIA_NODE_AUTH_TOKEN=
     
     WARNING: Celestia custom network specified. Only use this option if the node is freshly created and initialized.
     **DO NOT** run a custom network over an already-existing node store!
    diff --git a/pr-339/assets/tutorials_starter-rollup.md.1dcddd78.lean.js b/pr-339/assets/tutorials_starter-rollup.md.dfadac92.lean.js
    similarity index 88%
    rename from pr-339/assets/tutorials_starter-rollup.md.1dcddd78.lean.js
    rename to pr-339/assets/tutorials_starter-rollup.md.dfadac92.lean.js
    index 1c4ff6818..ba676c7c3 100644
    --- a/pr-339/assets/tutorials_starter-rollup.md.1dcddd78.lean.js
    +++ b/pr-339/assets/tutorials_starter-rollup.md.dfadac92.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as l,X as o}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"Starter Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Starter Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/starter-rollup.md","filePath":"tutorials/starter-rollup.md","lastUpdated":1713200494000}'),n={name:"tutorials/starter-rollup.md"},e=o("",21),p=[e];function t(r,c,C,i,y,D){return a(),l("div",null,p)}const d=s(n,[["render",t]]);export{h as __pageData,d as default};
    +import{_ as s,o as a,c as l,X as o}from"./chunks/framework.adc83686.js";const h=JSON.parse('{"title":"Starter Rollup","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Starter Rollup | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/starter-rollup.md","filePath":"tutorials/starter-rollup.md","lastUpdated":1713275863000}'),n={name:"tutorials/starter-rollup.md"},e=o("",21),p=[e];function t(r,c,C,i,y,D){return a(),l("div",null,p)}const d=s(n,[["render",t]]);export{h as __pageData,d as default};
    diff --git a/pr-339/assets/tutorials_wordle.md.76ffff06.js b/pr-339/assets/tutorials_wordle.md.4e5322bc.js
    similarity index 99%
    rename from pr-339/assets/tutorials_wordle.md.76ffff06.js
    rename to pr-339/assets/tutorials_wordle.md.4e5322bc.js
    index 82f8adc5b..7c480718b 100644
    --- a/pr-339/assets/tutorials_wordle.md.76ffff06.js
    +++ b/pr-339/assets/tutorials_wordle.md.4e5322bc.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/wordle/wordle.png",d=JSON.parse('{"title":"🕹️ Wordle app","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🕹️ Wordle app | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/wordle.md","filePath":"tutorials/wordle.md","lastUpdated":1713200494000}'),e={name:"tutorials/wordle.md"},p=o('

    🕹️ Wordle app

    wordle-app

    This tutorial guide will go over building a cosmos-sdk app for Rollkit, the Sovereign-Rollup implementation of CometBFT, for the popular game Wordle.

    This tutorial will go over how to setup Rollkit in the Ignite CLI and use it to build the game. The tutorial will go over the simple design, as well as conclude with future implementations and ideas to extend this codebase.

    TIP

    This tutorial will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github Issue ticket or let us know in our Telegram.

    Learn how to restart your rollup.

    WARNING

    The script for this tutorial is built for Celestia's Arabica devnet.

    💻 Pre-requisites

    Given this tutorial is targeted for developers who are experienced in Cosmos-SDK, we recommend you go over the following tutorials in Ignite to understand all the different components in Cosmos-SDK before proceeding with this tutorial.

    You do not have to do those guides in order to follow this Wordle tutorial, but doing so helps you understand the architecture of Cosmos-SDK better.

    📖 Design implementation

    The rules of Wordle are simple: You have to guess the word of the day.

    Key Points to Consider:

    • The word is a five-letter word.
    • You have 6 guesses.
    • Every 24 hours, there’s a new word.

    The GUI for Wordle shows you a few indicators: a green highlight on a letter in a certain position means that’s the correct letter for the Wordle in the right position. A yellow highlight means it’s a correct letter for the Wordle included in the wrong position. A grey highlight means the letter isn’t part of the Wordle.

    For simplicity of the design, we will avoid those hints, although there are ways to extend this codebase to implement that, which we will show at the end.

    In this current design, we implement the following rules:

    • 1 Wordle can be submitted per day
    • Every address will have 6 tries to guess the word
    • It must be a five-letter word.
    • Whoever guesses the word correctly before their 6 tries are over gets an award of 100 WORDLE tokens.

    We will go over the architecture to achieve this further in the guide. But for now, we will get started setting up our development environment.

    ⛓️ Ignite and scaffolding the wordle chain

    🔥 Ignite

    Ignite is an amazing CLI tool to help us get started building our own blockchains for cosmos-sdk apps. It provides lots of power toolings and scaffoldings for adding messages, types, and modules with a host of cosmos-sdk libraries provided.

    You can read more about Ignite here.

    To install Ignite, you can run this command in your terminal:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/wordle/wordle.png",d=JSON.parse('{"title":"🕹️ Wordle app","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🕹️ Wordle app | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/wordle.md","filePath":"tutorials/wordle.md","lastUpdated":1713275863000}'),e={name:"tutorials/wordle.md"},p=o('

    🕹️ Wordle app

    wordle-app

    This tutorial guide will go over building a cosmos-sdk app for Rollkit, the Sovereign-Rollup implementation of CometBFT, for the popular game Wordle.

    This tutorial will go over how to setup Rollkit in the Ignite CLI and use it to build the game. The tutorial will go over the simple design, as well as conclude with future implementations and ideas to extend this codebase.

    TIP

    This tutorial will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github Issue ticket or let us know in our Telegram.

    Learn how to restart your rollup.

    WARNING

    The script for this tutorial is built for Celestia's Arabica devnet.

    💻 Pre-requisites

    Given this tutorial is targeted for developers who are experienced in Cosmos-SDK, we recommend you go over the following tutorials in Ignite to understand all the different components in Cosmos-SDK before proceeding with this tutorial.

    You do not have to do those guides in order to follow this Wordle tutorial, but doing so helps you understand the architecture of Cosmos-SDK better.

    📖 Design implementation

    The rules of Wordle are simple: You have to guess the word of the day.

    Key Points to Consider:

    • The word is a five-letter word.
    • You have 6 guesses.
    • Every 24 hours, there’s a new word.

    The GUI for Wordle shows you a few indicators: a green highlight on a letter in a certain position means that’s the correct letter for the Wordle in the right position. A yellow highlight means it’s a correct letter for the Wordle included in the wrong position. A grey highlight means the letter isn’t part of the Wordle.

    For simplicity of the design, we will avoid those hints, although there are ways to extend this codebase to implement that, which we will show at the end.

    In this current design, we implement the following rules:

    • 1 Wordle can be submitted per day
    • Every address will have 6 tries to guess the word
    • It must be a five-letter word.
    • Whoever guesses the word correctly before their 6 tries are over gets an award of 100 WORDLE tokens.

    We will go over the architecture to achieve this further in the guide. But for now, we will get started setting up our development environment.

    ⛓️ Ignite and scaffolding the wordle chain

    🔥 Ignite

    Ignite is an amazing CLI tool to help us get started building our own blockchains for cosmos-sdk apps. It provides lots of power toolings and scaffoldings for adding messages, types, and modules with a host of cosmos-sdk libraries provided.

    You can read more about Ignite here.

    To install Ignite, you can run this command in your terminal:

    bash
    curl https://get.ignite.com/cli@v28.3.0! | bash
     sudo mv ignite /usr/local/bin/

    This installs Ignite CLI in your local machine. This tutorial uses a MacOS but it should work for Windows. For Windows users, check out the Ignite docs on installation for Windows machines.

    Now, refresh your terminal using source or open a new terminal session for the change to take place.

    If you run the following:

    bash
    ignite --help

    You should see an output of help commands meaning Ignite was installed successfully!

    ⛓️ Scaffolding the wordle chain

    Now, comes the fun part, creating a new blockchain! With Ignite, the process is pretty easy and straightforward.

    Ignite CLI comes with several scaffolding commands that are designed to make development more straightforward by creating everything you need to build your blockchain.

    First, we will use Ignite CLI to build the foundation of a fresh Cosmos SDK blockchain. Ignite minimizes how much blockchain code you must write yourself. If you are coming from the EVM-world, think of Ignite as a Cosmos-SDK version of Foundry or Hardhat but specifically designed to build blockchains.

    We first run the following command to setup our project for our new blockchain, Wordle.

    bash
    ignite scaffold chain wordle --no-module

    This command scaffolds a new chain directory called wordle in your local directory from which you ran the command. Notice that we passed the --no-module flag, this is because we will be creating the module after.

    🗂️ Wordle directory

    Now, it’s time to enter the directory:

    bash
    cd wordle

    Inside you will see several directories and architecture for your cosmos-sdk blockchain.

    File/directoryPurpose
    app/Files that wire together the blockchain. The most important file is app.go that contains type definition of the blockchain and functions to create and initialize it.
    cmd/The main package responsible for the CLI of compiled binary.
    docs/Directory for project documentation. By default, an OpenAPI spec is generated.
    proto/Protocol buffer files describing the data structure.
    testutil/Helper functions for testing.
    vue/A Vue 3 web app template.
    x/Cosmos SDK modules and custom modules.
    config.ymlA configuration file for customizing a chain in development.
    readme.mdA readme file for your sovereign application-specific blockchain project.

    Going over each one is outside the scope of this guide, but we encourage you to read about it here.

    Most of the tutorial work will happen inside the x directory.

    🛠️ Setting up Rollkit

    Before we continue with building our Wordle App, we need to set up Rollkit on our codebase.

    🗞️ Installing Rollkit

    Run the following command inside the wordle directory.

    bash
    go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/rollkit/cosmos-sdk@v0.50.5-rollkit-v0.13.1-no-fraud-proofs
     go mod tidy
     go mod download

    With that, we have Rollkit changes added to the project directory. Now, let's build the Wordle app!

    ✨ Creating the wordle module

    For the Wordle module, we can add dependencies offered by Cosmos-SDK.

    From the Cosmos-SDK docs, a module is defined as the following:

    In a Cosmos SDK blockchain, application-specific logic is implemented in separate modules. Modules keep code easy to understand and reuse. Each module contains its own message and transaction processor, while the Cosmos SDK is responsible for routing each message to its respective module.

    Many modules exist for slashing, validating, auth.

    🔖 Scaffolding a module

    We will be using the bank module dependency for transactions.

    From the Cosmos-SDK docs, the bank module is defined as the following:

    The bank module is responsible for handling multi-asset coin transfers between accounts and tracking special-case pseudo-transfers which must work differently with particular kinds of accounts (notably delegating/undelegating for vesting accounts). It exposes several interfaces with varying capabilities for secure interaction with other modules which must alter user balances.

    We build the module with the bank dependency with the following command:

    bash
    ignite scaffold module wordle --dep bank

    This will scaffold the Wordle module to our Wordle Chain project.

    ✉️ Messages

    Messages allow us to process and submit information to our specific module.

    From the Cosmos-SDK docs, messages are:

    In the Cosmos SDK, messages are objects that are contained in transactions to trigger state transitions. Each Cosmos SDK module defines a list of messages and how to handle them.

    For messages for Wordle, given our initial design, we will make 2 messages with ignite.

    • The first one is: SubmitWordle and it only passes the Wordle of the Day.
    • The second one is: SubmitGuess and it attempts to guess the submitted wordle. It also passes a word as a guess.

    With these initial designs, we can start creating our messages!

    💬 Scaffolding a message

    To create the SubmitWordle message, we run the following command:

    bash
    ignite scaffold message submit-wordle word

    This creates the submit-wordle message that takes in word as a parameter.

    We now create the final message, SubmitGuess:

    bash
    ignite scaffold message submit-guess word

    Here, we are passing a word as a guess with submit-guess.

    🎨 Wordle types

    For the next steps, we will be creating types to be used by the messages we created.

    🏗️ Scaffolding wordle types

    bash
    ignite scaffold map wordle word submitter --no-message

    This type is a map called Wordle with two values of word and submitter. submitter is the address of the person that submitted the Wordle.

    The second type is the Guess type. It allows us to store the latest guess for each address that submitted a solution.

    bash
    ignite scaffold map guess word submitter count --no-message

    Here, we are also storing count to count how many guesses this address submitted.

    🔐 Keeper functions

    Now it’s time to implement the Keeper functions for each message. From the Cosmos-SDK docs, Keeper is defined as the following:

    The main core of a Cosmos SDK module is a piece called the keeper. The keeper handles interactions with the store, has references to other keepers for cross-module interactions, and contains most of the core functionality of a module.

    Keeper is an abstraction on Cosmos that allows us to interact with the Key-Value store and change the state of the blockchain.

    Here, it will help us outline the logic for each message we create.

    📤 SubmitWordle function

    We first start with the SubmitWordle function.

    Open up the following file: x/wordle/keeper/msg_server_submit_wordle.go

    Inside the following, replace the current code with the following code, which we will go over in a bit:

    go
    package keeper
    diff --git a/pr-339/assets/tutorials_wordle.md.76ffff06.lean.js b/pr-339/assets/tutorials_wordle.md.4e5322bc.lean.js
    similarity index 89%
    rename from pr-339/assets/tutorials_wordle.md.76ffff06.lean.js
    rename to pr-339/assets/tutorials_wordle.md.4e5322bc.lean.js
    index a3e37865a..24d200c12 100644
    --- a/pr-339/assets/tutorials_wordle.md.76ffff06.lean.js
    +++ b/pr-339/assets/tutorials_wordle.md.4e5322bc.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/wordle/wordle.png",d=JSON.parse('{"title":"🕹️ Wordle app","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🕹️ Wordle app | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/wordle.md","filePath":"tutorials/wordle.md","lastUpdated":1713200494000}'),e={name:"tutorials/wordle.md"},p=o("",162),t=[p];function r(c,D,i,y,C,F){return a(),n("div",null,t)}const u=s(e,[["render",r]]);export{d as __pageData,u as default};
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const l="/docs-preview/pr-339/wordle/wordle.png",d=JSON.parse('{"title":"🕹️ Wordle app","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"🕹️ Wordle app | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/wordle.md","filePath":"tutorials/wordle.md","lastUpdated":1713275863000}'),e={name:"tutorials/wordle.md"},p=o("",162),t=[p];function r(c,D,i,y,C,F){return a(),n("div",null,t)}const u=s(e,[["render",r]]);export{d as __pageData,u as default};
    diff --git a/pr-339/assets/tutorials_zkml.md.5946225a.js b/pr-339/assets/tutorials_zkml.md.88583a7e.js
    similarity index 99%
    rename from pr-339/assets/tutorials_zkml.md.5946225a.js
    rename to pr-339/assets/tutorials_zkml.md.88583a7e.js
    index ddb97467d..03ab77f54 100644
    --- a/pr-339/assets/tutorials_zkml.md.5946225a.js
    +++ b/pr-339/assets/tutorials_zkml.md.88583a7e.js
    @@ -1,4 +1,4 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"zkML Rollup Tutorial with Sindri","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"zkML Rollup Tutorial with Sindri | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/zkml.md","filePath":"tutorials/zkml.md","lastUpdated":1713200494000}'),l={name:"tutorials/zkml.md"},e=o(`

    zkML Rollup Tutorial with Sindri

    Introduction - Code Once, Verify Anywhere

    This guide will show you how to build verifiable machine learning inference into your Rollkit rollup using zero-knowledge proofs generated on Sindri. The rollup will rely on a local Celestia devnet for consensus and ensuring data availability.

    We will focus on using a ZK circuit that incorporates a compact deep neural network model to enable verifiable ML inference. In this guide, we will deploy the circuit on Sindri, obtain a smart contract verifier (automatically generated by Sindri) for that circuit, deploy it on Rollkit, create a proof of ML inference on Sindri, and verify the proof on-chain.

    This approach not only secures the verification process of machine learning models, but also leverages the decentralized security and scalability of Celestia's architecture.

    Prerequisites

    Setting Up the Polaris EVM using Rollkit

    This walkthrough assumes you started the Polaris EVM using Rollkit and should be interpreted as a direct continuation of this Polaris EVM and Rollkit guide.

    Installing the Sindri Python SDK

    Because we're working with ML, we're going to build with Sindri's Python SDK because Python is widely used in ML development. The Sindri Python SDK Quickstart Guide contains installation instructions and a high-level walkthrough of the functionality of this package, but the following will suffice if you have pip installed:

    bash
    pip install sindri

    Deploying and Proving a Cool zkML Circuit to Sindri

    For this tutorial, we'll be working with a pre-built zkML circuit built by Sindri. For a more in-depth description of this circuit and its corresponding ML model's behavior and design, please see here.

    Clone

    Clone the Sindri Resources GitHub repo.

    bash
    cd $HOME
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"zkML Rollup Tutorial with Sindri","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"zkML Rollup Tutorial with Sindri | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/zkml.md","filePath":"tutorials/zkml.md","lastUpdated":1713275863000}'),l={name:"tutorials/zkml.md"},e=o(`

    zkML Rollup Tutorial with Sindri

    Introduction - Code Once, Verify Anywhere

    This guide will show you how to build verifiable machine learning inference into your Rollkit rollup using zero-knowledge proofs generated on Sindri. The rollup will rely on a local Celestia devnet for consensus and ensuring data availability.

    We will focus on using a ZK circuit that incorporates a compact deep neural network model to enable verifiable ML inference. In this guide, we will deploy the circuit on Sindri, obtain a smart contract verifier (automatically generated by Sindri) for that circuit, deploy it on Rollkit, create a proof of ML inference on Sindri, and verify the proof on-chain.

    This approach not only secures the verification process of machine learning models, but also leverages the decentralized security and scalability of Celestia's architecture.

    Prerequisites

    Setting Up the Polaris EVM using Rollkit

    This walkthrough assumes you started the Polaris EVM using Rollkit and should be interpreted as a direct continuation of this Polaris EVM and Rollkit guide.

    Installing the Sindri Python SDK

    Because we're working with ML, we're going to build with Sindri's Python SDK because Python is widely used in ML development. The Sindri Python SDK Quickstart Guide contains installation instructions and a high-level walkthrough of the functionality of this package, but the following will suffice if you have pip installed:

    bash
    pip install sindri

    Deploying and Proving a Cool zkML Circuit to Sindri

    For this tutorial, we'll be working with a pre-built zkML circuit built by Sindri. For a more in-depth description of this circuit and its corresponding ML model's behavior and design, please see here.

    Clone

    Clone the Sindri Resources GitHub repo.

    bash
    cd $HOME
     git clone https://github.com/Sindri-Labs/sindri-resources.git

    Navigate to the food_ml circuit tutorial directory.

    bash
    cd sindri-resources/circuit_tutorials/circom/food_ml/

    Here, you will find a handful of files. The circuit/ directory contains the circuit code that we will upload to Sindri. The circuit/sindri.json file is the Sindri manifest for your upload. Within it, you can modify the circuit's "name" value to whatever you like.

    Modify

    Open the compile_and_prove.py script and append the following lines to the very bottom.

    python
    # Obtain smart contract verifier for our circuit and save it to a file
     smart_contract_code: str = sindri.get_circuit_smart_contract_verifier(circuit_id)
     verifier_code_file: str = "Verifier.sol"
    diff --git a/pr-339/assets/tutorials_zkml.md.5946225a.lean.js b/pr-339/assets/tutorials_zkml.md.88583a7e.lean.js
    similarity index 88%
    rename from pr-339/assets/tutorials_zkml.md.5946225a.lean.js
    rename to pr-339/assets/tutorials_zkml.md.88583a7e.lean.js
    index 7d29f47f1..e333e3c10 100644
    --- a/pr-339/assets/tutorials_zkml.md.5946225a.lean.js
    +++ b/pr-339/assets/tutorials_zkml.md.88583a7e.lean.js
    @@ -1 +1 @@
    -import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"zkML Rollup Tutorial with Sindri","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"zkML Rollup Tutorial with Sindri | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/zkml.md","filePath":"tutorials/zkml.md","lastUpdated":1713200494000}'),l={name:"tutorials/zkml.md"},e=o("",59),t=[e];function p(r,c,i,y,d,C){return a(),n("div",null,t)}const u=s(l,[["render",p]]);export{A as __pageData,u as default};
    +import{_ as s,o as a,c as n,X as o}from"./chunks/framework.adc83686.js";const A=JSON.parse('{"title":"zkML Rollup Tutorial with Sindri","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"zkML Rollup Tutorial with Sindri | Rollkit"},{"name":"og:description","content":false}]]},"headers":[],"relativePath":"tutorials/zkml.md","filePath":"tutorials/zkml.md","lastUpdated":1713275863000}'),l={name:"tutorials/zkml.md"},e=o("",59),t=[e];function p(r,c,i,y,d,C){return a(),n("div",null,t)}const u=s(l,[["render",p]]);export{A as __pageData,u as default};
    diff --git a/pr-339/blog/overview.html b/pr-339/blog/overview.html
    index 31b9b77fe..a87e390fd 100644
    --- a/pr-339/blog/overview.html
    +++ b/pr-339/blog/overview.html
    @@ -32,7 +32,7 @@
         
         
         
    -    
    +    
         
         
         
    @@ -58,8 +58,8 @@
     
     
    On this page

    Blog

    Welcome to our blog! Here, you'll find a variety of articles on a range of topics. Use this overview to navigate through our content.

    Table of contents

    Stay tuned for more exciting content!

    Released under the APACHE-2.0 License

    - +
    On this page

    Blog

    Welcome to our blog! Here, you'll find a variety of articles on a range of topics. Use this overview to navigate through our content.

    Table of contents

    Stay tuned for more exciting content!

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/blog/sovereign-rollups-on-bitcoin.html b/pr-339/blog/sovereign-rollups-on-bitcoin.html index 7f5536b3e..70378e415 100644 --- a/pr-339/blog/sovereign-rollups-on-bitcoin.html +++ b/pr-339/blog/sovereign-rollups-on-bitcoin.html @@ -33,7 +33,7 @@ - + @@ -62,8 +62,8 @@
    On this page

    Sovereign rollups on Bitcoin with Rollkit

    By Rollkit

    rollkit-bitcoinOriginally published on 5 March 2023

    Today, we are proud to announce that Rollkit is the first rollup framework to support sovereign rollups on Bitcoin. An early research implementation allows Rollkit rollups to use Bitcoin for data availability.

    Rollkit is opening the door for developers to create rollups with arbitrary execution environments that inherit Bitcoin’s data availability guarantees and re-org resistance. With the new integration it is now possible to run the EVM on Bitcoin as a Rollkit sovereign rollup. Sovereign rollups on Bitcoin not only expand the possibilities for rollups, but also have the potential to help bootstrap a healthy blockspace fee market on Bitcoin, enabling a more sustainable security budget.

    Tl;dr

    • Sovereign rollups using Bitcoin for data availability are now a reality with Rollkit’s new early research integration.
    • Follow along with a demo of the EVM running on Bitcoin as a sovereign Rollkit rollup.
    • The implementation was possible due to Bitcoin's Taproot upgrade and Ordinals' usage of Bitcoin for publishing arbitrary data.

    Posting data on Bitcoin with Taproot

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

    Bitcoin NFTs use Taproot witnesses to inscribe arbitrary data, enabled by Bitcoin's Taproot upgrade. Taproot witnesses provide a slightly better payload-to-data ratio than SegWit transactions. A standard transaction can include up to around 390kB of arbitrary data while still passing through the public mempool. A non-standard transaction, included by a miner directly without passing through the mempool, can include close to 4MB of arbitrary data. In short, with SegWit, it became viable to post big blobs of data to the Bitcoin blockchain.

    Since then, the usage of Ordinals for NFT inscriptions and Taproot utilization has kicked off. Eric Wall found that at the time of his tweet, posting data on Bitcoin was 7x cheaper than Ethereum. Now that there are thousands of inscriptions on Bitcoin, it has become clear that sovereign rollups and an ecosystem of dapps on Bitcoin could become a reality. The missing piece: a rollup framework for easily integrating 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 plug-in custom execution layers and data availability layers. Initially, Rollkit only supported Celestia as an option for data availability and consensus. Now, Bitcoin is an option, thanks to an early research implementation of a Bitcoin data availability module for Rollkit. In this case, sovereign rollups manage their own execution and settlement while offloading consensus and data availability to Bitcoin.

    rollkit-bitcoin-rollup

    How Rollkit posts data to Bitcoin

    To write and read data on Bitcoin, we make use of Taproot transactions. To facilitate this, we implemented a Go package called bitcoin-da that provides a reader/writer interface to Bitcoin. For details of how the interface works and how it uses Taproot, see the specs. The package can be re-used by any project that wants to read or write data on Bitcoin.

    Rollkit was built with modularity at its core. It has a data availability interface so that developers can simply implement specific methods to add a new data availability layer. 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 blocks can be synced. These interfaces live in the da package. The most important methods in these interfaces are SubmitBlock and RetrieveBlock for reading and writing the blocks.

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

    rollkit-bitcoin-rollup-2

    EVM on Bitcoin demo

    Rollkit supports custom execution layers, including EVM, CosmWasm, or the Cosmos SDK. To test the integration, we used Rollkit to run the EVM (using Ethermint) as a sovereign rollup on a local Bitcoin test network. See below for a demo.

    Conclusion

    As we move towards a future where sovereign communities will form around different applications, asking them to incur the high cost and overhead of deploying a layer 1 blockchain to be sovereign is not sustainable. Sovereign rollups fix this by making it possible to deploy a sovereign chain that inherits the data availability and consensus of another layer 1 chain such as Bitcoin.

    Our goal with Rollkit is to make it easy to build and customize rollups. We invite you to play around 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, see the instructions here. Keep in mind that the integration is an early research implementation and it is not yet production-ready!

    Modularism, not maximalism.

    Released under the APACHE-2.0 License

    - +

    Conclusion

    As we move towards a future where sovereign communities will form around different applications, asking them to incur the high cost and overhead of deploying a layer 1 blockchain to be sovereign is not sustainable. Sovereign rollups fix this by making it possible to deploy a sovereign chain that inherits the data availability and consensus of another layer 1 chain such as Bitcoin.

    Our goal with Rollkit is to make it easy to build and customize rollups. We invite you to play around 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, see the instructions here. Keep in mind that the integration is an early research implementation and it is not yet production-ready!

    Modularism, not maximalism.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/hashmap.json b/pr-339/hashmap.json index 09716a9c1..23ca24f74 100644 --- a/pr-339/hashmap.json +++ b/pr-339/hashmap.json @@ -1 +1 @@ -{"learn_building-and-deploying-a-rollup.md":"6aafdfad","blog_sovereign-rollups-on-bitcoin.md":"f05a0382","learn_basic-rollup.md":"aeb9f27e","tutorials_cosmwasm.md":"7a5ac2c7","learn_intro.md":"300774b4","index.md":"d43e98c4","learn_rollup-glossary.md":"47632137","learn_based-pessimistic-rollup.md":"d84bcc21","tutorials_gm-world-arabica-testnet.md":"573595d6","learn_overview.md":"345be122","learn_readme.md":"ce0fbcec","tutorials_gas-price.md":"e4442fba","tutorials_gm-world-mainnet.md":"a931f4de","tutorials_gm-world-mocha-testnet.md":"70d1cac9","tutorials_lazy-sequencing.md":"10272bb6","tutorials_overview.md":"400da39f","readme.md":"310c8e95","tutorials_full-and-sequencer-node.md":"098d78cb","tutorials_rollup-docker.md":"a1613d0d","blog_overview.md":"7face621","tutorials_recipe-book.md":"ecc97b40","tutorials_block-times.md":"89e34d16","tutorials_gm-world-frontend.md":"ba40ecc4","learn_transaction-flow.md":"07d7b7d4","tutorials_restart-rollup.md":"071cc132","tutorials_wordle.md":"76ffff06","networks_cosmwasm-testnet.md":"1f0295ca","tutorials_zkml.md":"5946225a","tutorials_starter-rollup.md":"1dcddd78","learn_about.md":"2153449a","tutorials_bitcoin.md":"9039d8f1","learn_pessimistic-rollup-with-a-shared-sequencer.md":"9523e182","tutorials_polaris-evm.md":"c109abcf","learn_stack.md":"562d0dd6","tutorials_ibc-connection.md":"000735cb","tutorials_cw-orch.md":"4aa65fb3","tutorials_gm-world.md":"e49cb86a"} +{"learn_overview.md":"1ebbd909","learn_about.md":"5ca41336","blog_overview.md":"3383e2a6","blog_sovereign-rollups-on-bitcoin.md":"6c903a9e","tutorials_block-times.md":"68d8d789","learn_based-pessimistic-rollup.md":"d5fe808d","tutorials_bitcoin.md":"866ed09f","tutorials_cosmwasm.md":"f840ff53","tutorials_gas-price.md":"d517561d","learn_readme.md":"180d5433","learn_stack.md":"b0a511cc","networks_cosmwasm-testnet.md":"5904b9ab","learn_pessimistic-rollup-with-a-shared-sequencer.md":"d924c589","tutorials_gm-world-frontend.md":"35cacd7e","readme.md":"baab927f","learn_building-and-deploying-a-rollup.md":"cc5573f1","learn_intro.md":"18f5fc24","index.md":"f6249348","tutorials_gm-world-arabica-testnet.md":"f2b2606a","learn_basic-rollup.md":"2a964152","learn_rollup-glossary.md":"65406fdc","tutorials_gm-world-mainnet.md":"55f3c01f","tutorials_gm-world-mocha-testnet.md":"48b8adde","tutorials_gm-world.md":"4d01b0f1","tutorials_ibc-connection.md":"58b655f9","tutorials_starter-rollup.md":"dfadac92","learn_transaction-flow.md":"ee5b5079","tutorials_lazy-sequencing.md":"09c6a8ff","tutorials_overview.md":"3a60c3fe","tutorials_full-and-sequencer-node.md":"19d33826","tutorials_cw-orch.md":"eb353f96","tutorials_zkml.md":"88583a7e","tutorials_polaris-evm.md":"7c7ede96","tutorials_recipe-book.md":"d889094b","tutorials_wordle.md":"4e5322bc","tutorials_restart-rollup.md":"cb0d13e8","tutorials_rollup-docker.md":"2b92540c"} diff --git a/pr-339/index.html b/pr-339/index.html index e17f9b467..991387297 100644 --- a/pr-339/index.html +++ b/pr-339/index.html @@ -32,7 +32,7 @@ - + @@ -59,7 +59,7 @@
- + \ No newline at end of file diff --git a/pr-339/learn/about.html b/pr-339/learn/about.html index 648405177..64baf5caf 100644 --- a/pr-339/learn/about.html +++ b/pr-339/learn/about.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

About Rollkit

Our mission is allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

TIP

In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

If you're familiar with Rollkit, you may want to skip to the tutorials section.

What is Rollkit?

Rollkit is a sovereign rollup framework that gives developers the freedom to deploy rollups throughout the modular stack, opening new possibilities for rapid experimentation and innovation.

The Rollkit framework features a modular node that can run rollups and exposes an ABCI-compatible client interface, which can be used as a substitute for CometBFT in any ABCI-compatible blockchain application. By default, the node utilizes Celestia as the data availability (DA) layer, however other data availability layers can be integrated.

Rollkit can currently be used to deploy sovereign rollups or sovereign settlement layers.

Rollkit is built as an open-source framework, so that developers can easily modify it to suit their applications.

Our goal is to empower developers to quickly innovate and create new classes of rollups with minimal trade-offs, and to make deploying a new chain as easy as deploying a smart contract.

What problems is Rollkit solving?

1. Scalability and customizability

Deploying your decentralized application as a smart contract on a shared blockchain has many limitations. Your smart contract has to share computational resources with every other application, so scalability is limited.

Plus, you're restricted to the execution environment that the shared blockchain uses, so developer flexibility is limited.

2. Security and time to market

Deploying a new chain might sound like the perfect solution for the problems listed above. While it's somewhat true, deploying a new layer 1 chain presents a complex set of challenges and trade-offs for developers looking to build blockchain products.

Deploying a new layer 1 requires significant resources, including time, capital, and expertise, which can be a barrier to entry for some developers.

In order to secure the network, developers must bootstrap a sufficiently secure set of validators, incurring the overhead of managing a full consensus network. This requires paying validators with inflationary tokens, putting the business sustainability of the network at risk. A strong community and network effect are also critical for success, but can be challenging to achieve as the network must gain widespread adoption to be secure and valuable.

In a potential future with millions of chains, it's unlikely all of those chains will be able to sustainably attract a sufficiently secure and decentralized validator set.

Why Rollkit?

Rollkit solves the challenges encountered during the deployment of a smart contract or a new layer 1, by minimizing these tradeoffs through the implementation of rollup chains (rollups).

With Rollkit, developers can benefit from:

  • Shared security: Rollups inherit security from a data availability layer, by posting blocks to it. Rollups reduce the trust assumptions placed on rollup sequencers by allowing full nodes to download and verify the transactions in the blocks posted by the sequencer. For optimistic or zk rollups, in case of fraudulent blocks, full nodes can generate fraud or zk proofs, which they can share with the rest of the network, including light nodes. Our roadmap includes the ability for light clients to receive and verify proofs, so that everyday users can enjoy high security guarantees.

  • Scalability: Rollkit rollups are deployed on specialized data availability layers like Celestia, which directly leverages the scalability of the DA layer. Additionally, rollup transactions are executed off-chain rather than the data availability layer. This means rollups have their own dedicated computational resources, rather than sharing computational resources with other applications.

  • Customizability: Rollkit is built as an open source modular framework, to make it easier for developers to reuse the four main components and customize their rollups. These components are data availability layers, execution environments, proof systems, and sequencer schemes. The components used by the Rollkit stack are customizable.

  • Faster time to market: Rollkit eliminates the need to bootstrap a validator set, manage a consensus network, incur high economic costs, and face other trade-offs that come with deploying a new layer 1. Rollkit's goal is to make deploying a rollup as easy as it is to deploy a smart contract, cutting the time it takes to bring blockchain products to market from months or even years to just minutes.

  • Sovereignty: Rollkit also enables developers to deploy sovereign rollups for cases where communities require sovereignty.

How can you use Rollkit?

As briefly mentioned above, Rollkit could be used in many different ways. From sovereign rollups, to settlement layers, and in the future even to L3s.

Rollup with any execution environment

Rollkit gives developers the flexibility to use pre-existing ABCI-compatible state machines or create a custom state machine tailored to their rollup needs. Rollkit does not restrict the use of any specific virtual machine, allowing developers to experiment and bring innovative applications to life.

Sovereign rollup with Cosmos SDK

Similarly to how developers utilize the Cosmos SDK to build a sovereign layer 1 chain, the Cosmos SDK could be utilized to create a Rollkit-compatible rollup chain. Cosmos-SDK has great documentation and tooling that developers can leverage to learn.

Another possibility is taking an existing layer 1 built with the Cosmos SDK and deploying it as a Rollkit rollup. This can provide a great opportunity for experimentation and growth.

Build a settlement layer

Settlement layers are ideal for developers who want to avoid deploying sovereign rollups. They provide a platform for rollups to verify proofs and resolve disputes. Additionally, they act as a hub for rollups to facilitate trust-minimized token transfers and liquidity sharing between rollups that share the same settlement layer. Think of settlement layers as a special type of execution layer.

When can you use Rollkit?

As of today, Rollkit is still in the MVP stages. The framework currently provides a centralized sequencer, an execution interface (ABCI or Cosmos SDK), and a connection to a data availability layer (Celestia).

We're currently working on implementing many new and exciting features such as light nodes and state fraud proofs.

Head down to the next section (Rollkit stack) to learn more about what's coming for Rollkit. If you're ready to start building, you can skip to the Tutorials section.

Spoiler alert, whichever you choose, it's going to be a great rabbit hole!

Released under the APACHE-2.0 License

- +
On this page

About Rollkit

Our mission is allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

TIP

In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

If you're familiar with Rollkit, you may want to skip to the tutorials section.

What is Rollkit?

Rollkit is a sovereign rollup framework that gives developers the freedom to deploy rollups throughout the modular stack, opening new possibilities for rapid experimentation and innovation.

The Rollkit framework features a modular node that can run rollups and exposes an ABCI-compatible client interface, which can be used as a substitute for CometBFT in any ABCI-compatible blockchain application. By default, the node utilizes Celestia as the data availability (DA) layer, however other data availability layers can be integrated.

Rollkit can currently be used to deploy sovereign rollups or sovereign settlement layers.

Rollkit is built as an open-source framework, so that developers can easily modify it to suit their applications.

Our goal is to empower developers to quickly innovate and create new classes of rollups with minimal trade-offs, and to make deploying a new chain as easy as deploying a smart contract.

What problems is Rollkit solving?

1. Scalability and customizability

Deploying your decentralized application as a smart contract on a shared blockchain has many limitations. Your smart contract has to share computational resources with every other application, so scalability is limited.

Plus, you're restricted to the execution environment that the shared blockchain uses, so developer flexibility is limited.

2. Security and time to market

Deploying a new chain might sound like the perfect solution for the problems listed above. While it's somewhat true, deploying a new layer 1 chain presents a complex set of challenges and trade-offs for developers looking to build blockchain products.

Deploying a new layer 1 requires significant resources, including time, capital, and expertise, which can be a barrier to entry for some developers.

In order to secure the network, developers must bootstrap a sufficiently secure set of validators, incurring the overhead of managing a full consensus network. This requires paying validators with inflationary tokens, putting the business sustainability of the network at risk. A strong community and network effect are also critical for success, but can be challenging to achieve as the network must gain widespread adoption to be secure and valuable.

In a potential future with millions of chains, it's unlikely all of those chains will be able to sustainably attract a sufficiently secure and decentralized validator set.

Why Rollkit?

Rollkit solves the challenges encountered during the deployment of a smart contract or a new layer 1, by minimizing these tradeoffs through the implementation of rollup chains (rollups).

With Rollkit, developers can benefit from:

  • Shared security: Rollups inherit security from a data availability layer, by posting blocks to it. Rollups reduce the trust assumptions placed on rollup sequencers by allowing full nodes to download and verify the transactions in the blocks posted by the sequencer. For optimistic or zk rollups, in case of fraudulent blocks, full nodes can generate fraud or zk proofs, which they can share with the rest of the network, including light nodes. Our roadmap includes the ability for light clients to receive and verify proofs, so that everyday users can enjoy high security guarantees.

  • Scalability: Rollkit rollups are deployed on specialized data availability layers like Celestia, which directly leverages the scalability of the DA layer. Additionally, rollup transactions are executed off-chain rather than the data availability layer. This means rollups have their own dedicated computational resources, rather than sharing computational resources with other applications.

  • Customizability: Rollkit is built as an open source modular framework, to make it easier for developers to reuse the four main components and customize their rollups. These components are data availability layers, execution environments, proof systems, and sequencer schemes. The components used by the Rollkit stack are customizable.

  • Faster time to market: Rollkit eliminates the need to bootstrap a validator set, manage a consensus network, incur high economic costs, and face other trade-offs that come with deploying a new layer 1. Rollkit's goal is to make deploying a rollup as easy as it is to deploy a smart contract, cutting the time it takes to bring blockchain products to market from months or even years to just minutes.

  • Sovereignty: Rollkit also enables developers to deploy sovereign rollups for cases where communities require sovereignty.

How can you use Rollkit?

As briefly mentioned above, Rollkit could be used in many different ways. From sovereign rollups, to settlement layers, and in the future even to L3s.

Rollup with any execution environment

Rollkit gives developers the flexibility to use pre-existing ABCI-compatible state machines or create a custom state machine tailored to their rollup needs. Rollkit does not restrict the use of any specific virtual machine, allowing developers to experiment and bring innovative applications to life.

Sovereign rollup with Cosmos SDK

Similarly to how developers utilize the Cosmos SDK to build a sovereign layer 1 chain, the Cosmos SDK could be utilized to create a Rollkit-compatible rollup chain. Cosmos-SDK has great documentation and tooling that developers can leverage to learn.

Another possibility is taking an existing layer 1 built with the Cosmos SDK and deploying it as a Rollkit rollup. This can provide a great opportunity for experimentation and growth.

Build a settlement layer

Settlement layers are ideal for developers who want to avoid deploying sovereign rollups. They provide a platform for rollups to verify proofs and resolve disputes. Additionally, they act as a hub for rollups to facilitate trust-minimized token transfers and liquidity sharing between rollups that share the same settlement layer. Think of settlement layers as a special type of execution layer.

When can you use Rollkit?

As of today, Rollkit is still in the MVP stages. The framework currently provides a centralized sequencer, an execution interface (ABCI or Cosmos SDK), and a connection to a data availability layer (Celestia).

We're currently working on implementing many new and exciting features such as light nodes and state fraud proofs.

Head down to the next section (Rollkit stack) to learn more about what's coming for Rollkit. If you're ready to start building, you can skip to the Tutorials section.

Spoiler alert, whichever you choose, it's going to be a great rabbit hole!

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/based-pessimistic-rollup.html b/pr-339/learn/based-pessimistic-rollup.html index 1972d5c2e..45aeabac8 100644 --- a/pr-339/learn/based-pessimistic-rollup.html +++ b/pr-339/learn/based-pessimistic-rollup.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Basic Rollup

Description

The simplest way to build a Rollup. You delegate Aggregation to the DA-Layer. Every Rollup node has to replay all the transactions in the rollup in order to check and update to the newest state.

Design

Here is an example of what this design could look like:

null

Aggregation

The DA-Layer is the Aggregator. It does Inclusion and Ordering.

Header Production

Each Full Node has to execute all transactions. There are no Light Nodes in this system so there is no need to produce a rollup header.

Censorship Resistance

Based rollups enjoy the same censorship resistance as the DA-Layer.

Liveness

Based rollups enjoys the same liveness guarantees as the DA-Layer (Based Rollups).

Rollup Light Nodes

This design has no Rollup Light Nodes.

Smallest Trust-Minimized Setup

DA-Layer Light Node + Rollup Full Node

Released under the APACHE-2.0 License

- +
On this page

Basic Rollup

Description

The simplest way to build a Rollup. You delegate Aggregation to the DA-Layer. Every Rollup node has to replay all the transactions in the rollup in order to check and update to the newest state.

Design

Here is an example of what this design could look like:

null

Aggregation

The DA-Layer is the Aggregator. It does Inclusion and Ordering.

Header Production

Each Full Node has to execute all transactions. There are no Light Nodes in this system so there is no need to produce a rollup header.

Censorship Resistance

Based rollups enjoy the same censorship resistance as the DA-Layer.

Liveness

Based rollups enjoys the same liveness guarantees as the DA-Layer (Based Rollups).

Rollup Light Nodes

This design has no Rollup Light Nodes.

Smallest Trust-Minimized Setup

DA-Layer Light Node + Rollup Full Node

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/basic-rollup.html b/pr-339/learn/basic-rollup.html index 7b72beb54..77b2fa510 100644 --- a/pr-339/learn/basic-rollup.html +++ b/pr-339/learn/basic-rollup.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Basic Rollup

Description

The User submits a transaction to the Aggregator. After Aggregation, the Rollup Full Node can use the Batch and apply the changes to the state.

During the Header Production, the Header is generated with some security grantees. The Rollup Light Node can consume the Header and validate those security guarantees.

Diagram

Here is an example of what this design could look like:

null

Aggregation

TBD

Header Production

TBD

Censorship Resistance

TBD

Liveness

TBD

Rollup Light Nodes

TBD

Smallest Trust-Minimized Setup

TBD

Released under the APACHE-2.0 License

- +
On this page

Basic Rollup

Description

The User submits a transaction to the Aggregator. After Aggregation, the Rollup Full Node can use the Batch and apply the changes to the state.

During the Header Production, the Header is generated with some security grantees. The Rollup Light Node can consume the Header and validate those security guarantees.

Diagram

Here is an example of what this design could look like:

null

Aggregation

TBD

Header Production

TBD

Censorship Resistance

TBD

Liveness

TBD

Rollup Light Nodes

TBD

Smallest Trust-Minimized Setup

TBD

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/building-and-deploying-a-rollup.html b/pr-339/learn/building-and-deploying-a-rollup.html index 1bccfb04f..f056809c3 100644 --- a/pr-339/learn/building-and-deploying-a-rollup.html +++ b/pr-339/learn/building-and-deploying-a-rollup.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

🗞️ Building a rollup and testnet deployment

The following tutorials will help you get started building Cosmos-SDK and EVM applications that connect to Celestia's data availability (DA) layer via Rollkit to Celestia's Mocha testnet or Arabica devnet. We call those chains Sovereign Rollups.

You can get started with the following tutorials:

1. Beginner

2️. Intermediate

3️. Advanced

💻 Support

The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

Released under the APACHE-2.0 License

- +
On this page

🗞️ Building a rollup and testnet deployment

The following tutorials will help you get started building Cosmos-SDK and EVM applications that connect to Celestia's data availability (DA) layer via Rollkit to Celestia's Mocha testnet or Arabica devnet. We call those chains Sovereign Rollups.

You can get started with the following tutorials:

1. Beginner

2️. Intermediate

3️. Advanced

💻 Support

The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/intro.html b/pr-339/learn/intro.html index 7a5811653..1e4899990 100644 --- a/pr-339/learn/intro.html +++ b/pr-339/learn/intro.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Introduction to Rollkit

Welcome to the Rollkit docs. We're happy you made it here!

Rollkit is the first sovereign rollup framework.

Our mission is allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

We're setting the bar high for developers' flexibility and ability to customize rollups however they see fit.

TIP

In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

If you're familiar with Rollkit, you may want to skip to the tutorials section.

Table of contents

Introduction

Learn

Rollup Wiki

Tutorials

Overview

Networks

Blog

Released under the APACHE-2.0 License

- +
On this page

Introduction to Rollkit

Welcome to the Rollkit docs. We're happy you made it here!

Rollkit is the first sovereign rollup framework.

Our mission is allow anyone to launch their own sovereign, customizable blockchain as easily as a smart contract by utilizing the shared security of a modular data availability network.

We're setting the bar high for developers' flexibility and ability to customize rollups however they see fit.

TIP

In order to use Rollkit, it's important to have some familiarity with Cosmos SDK. You can get up to speed on Cosmos SDK by visiting their official documentation page.

If you're familiar with Rollkit, you may want to skip to the tutorials section.

Table of contents

Introduction

Learn

Rollup Wiki

Tutorials

Overview

Networks

Blog

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/overview.html b/pr-339/learn/overview.html index 9b0ea050b..06b971874 100644 --- a/pr-339/learn/overview.html +++ b/pr-339/learn/overview.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Learn

This category provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, a glossary, and more.

Table of contents

Released under the APACHE-2.0 License

- +
On this page

Learn

This category provides an overview of the key concepts and guides related to Rollkit. It serves as a reference for understanding the Rollkit stack, transaction flow, building with Rollkit, a glossary, and more.

Table of contents

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/pessimistic-rollup-with-a-shared-sequencer.html b/pr-339/learn/pessimistic-rollup-with-a-shared-sequencer.html index 520bf4f1e..5c33dc86d 100644 --- a/pr-339/learn/pessimistic-rollup-with-a-shared-sequencer.html +++ b/pr-339/learn/pessimistic-rollup-with-a-shared-sequencer.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Pessimistic Rollup with a Shared Sequencer

Description

This is a pessimistic Rollup using a Shared Sequencer. This design follows the Forum Post originating the Shared Sequencer Design. We assume the only canonical way to order the transactions are through the Shared Sequencer. All transactions have to be ordered by the Shared Sequencer and other batches are ignored.

Design

Here is an example of what this design could look like:

null

Aggregation

The Shared Sequencer Aggregates Transactions and posts the ordered Batch to the underlying DA-Layer.

To unlock a web2 equivalent UX, the shared sequencers […] can provide fast soft commitments. These soft commitments provide some arbitrary promise of the final ordering of transactions, and can be used to create prematurely updated versions of the state. As soon as the block data has been confirmed to be posted on the base layer, the state can be considered final.

The Shared Sequencer does Inclusion and Ordering.

Header Production

Each Full Node has to execute all transactions. There are no Light Nodes in this system so there is no need to produce a rollup header.

Censorship Resistance

Lets assume $L_{ss}$ is the liveness of the Shared Sequencer and the $L_{da}$ is the liveness of the DA-Layer. Then the liveness of this scheme is $L = Min[L_{ss},L_{da}]$ saying if one of the Systems has a liveness failure the Rollup has a liveness failure. If the Shared Sequencer fails then we cannot proceed with the Rollup. If the DA-Layer fails we could continue with the Shared Sequencers Soft Commitments. We would inherit the consensuses and data-availability from the Shared Sequencer which would be worse than the original Data-Availability Layer.

Liveness

Based rollups enjoys the same liveness guarantees as the DA-Layer (Based Rollups).

Rollup Light Nodes

N/A

Smallest Trust-Minimized Setup

DA-Layer Light Node + Shared Sequencer Light Node + Rollup Full Node

We need a Shared Sequencer Light Node to validate the Headers of the Shared Sequencer. We made an assumption in the beginning that the order is fixed by the ordering of the shared sequencer. The Shared Sequencer will have a cryptographic commitment of the order of the Transaction inside the Shared Sequencer Header. This way we can confirm that the batch that we receive or read from the DA-Layer is the one created by the Shared Sequencer.

Released under the APACHE-2.0 License

- +
On this page

Pessimistic Rollup with a Shared Sequencer

Description

This is a pessimistic Rollup using a Shared Sequencer. This design follows the Forum Post originating the Shared Sequencer Design. We assume the only canonical way to order the transactions are through the Shared Sequencer. All transactions have to be ordered by the Shared Sequencer and other batches are ignored.

Design

Here is an example of what this design could look like:

null

Aggregation

The Shared Sequencer Aggregates Transactions and posts the ordered Batch to the underlying DA-Layer.

To unlock a web2 equivalent UX, the shared sequencers […] can provide fast soft commitments. These soft commitments provide some arbitrary promise of the final ordering of transactions, and can be used to create prematurely updated versions of the state. As soon as the block data has been confirmed to be posted on the base layer, the state can be considered final.

The Shared Sequencer does Inclusion and Ordering.

Header Production

Each Full Node has to execute all transactions. There are no Light Nodes in this system so there is no need to produce a rollup header.

Censorship Resistance

Lets assume $L_{ss}$ is the liveness of the Shared Sequencer and the $L_{da}$ is the liveness of the DA-Layer. Then the liveness of this scheme is $L = Min[L_{ss},L_{da}]$ saying if one of the Systems has a liveness failure the Rollup has a liveness failure. If the Shared Sequencer fails then we cannot proceed with the Rollup. If the DA-Layer fails we could continue with the Shared Sequencers Soft Commitments. We would inherit the consensuses and data-availability from the Shared Sequencer which would be worse than the original Data-Availability Layer.

Liveness

Based rollups enjoys the same liveness guarantees as the DA-Layer (Based Rollups).

Rollup Light Nodes

N/A

Smallest Trust-Minimized Setup

DA-Layer Light Node + Shared Sequencer Light Node + Rollup Full Node

We need a Shared Sequencer Light Node to validate the Headers of the Shared Sequencer. We made an assumption in the beginning that the order is fixed by the ordering of the shared sequencer. The Shared Sequencer will have a cryptographic commitment of the order of the Transaction inside the Shared Sequencer Header. This way we can confirm that the batch that we receive or read from the DA-Layer is the one created by the Shared Sequencer.

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/readme.html b/pr-339/learn/readme.html index 322df1af3..a7a2482c1 100644 --- a/pr-339/learn/readme.html +++ b/pr-339/learn/readme.html @@ -32,7 +32,7 @@ - + @@ -68,8 +68,8 @@ make lint # Lint protobuf files (requires Docker and buf) -make proto-lint

Contributing

We welcome your contributions! Everyone is welcome to contribute, whether it's in the form of code, documentation, bug reports, feature requests, or anything else.

If you're looking for issues to work on, try looking at the good first issue list. Issues with this tag are suitable for a new external contributor and is a great way to find something you can help with!

See the contributing guide for more details.

Please join our Community Discord to ask questions, discuss your ideas, and connect with other contributors.

Dependency graph

To see our progress and a possible future of Rollkit visit our Dependency Graph.

Code of Conduct

See our Code of Conduct here.

Released under the APACHE-2.0 License

- +make proto-lint

Contributing

We welcome your contributions! Everyone is welcome to contribute, whether it's in the form of code, documentation, bug reports, feature requests, or anything else.

If you're looking for issues to work on, try looking at the good first issue list. Issues with this tag are suitable for a new external contributor and is a great way to find something you can help with!

See the contributing guide for more details.

Please join our Community Discord to ask questions, discuss your ideas, and connect with other contributors.

Dependency graph

To see our progress and a possible future of Rollkit visit our Dependency Graph.

Code of Conduct

See our Code of Conduct here.

+ \ No newline at end of file diff --git a/pr-339/learn/rollup-glossary.html b/pr-339/learn/rollup-glossary.html index 978c6282e..b79cc3922 100644 --- a/pr-339/learn/rollup-glossary.html +++ b/pr-339/learn/rollup-glossary.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Rollup glossary

A wiki of terms to define different Rollup designs and terminology:

Terminology

Aggregation

Aggregation is the process of batching transactions into one batch. A batch of transactions consists of one or more transactions.

Based rollup

A based rollup is a rollup that delegates aggregation to a DA-Layer.

Execution

Execution is the process by which the transactions in the blockchain are processed and their effects are applied to the state of the blockchain.

Header production

Header production is the process of creating the Rollup header backed by specific security properties.

Inclusion

Inclusion is the process by which a transaction is accepted into the blockchain.

Ordering

Ordering is the process of arranging transactions in a specific sequence in the blockchain.

Pessimistic rollup

A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup to check its validity.

Rollup Block

A rollup block is a data structure representing the Blockchain at a certain height. It consists of Rollup Data and Rollup Headers.

Rollup Data

Rollup data is either a batch of transactions or the state difference between transaction batches.

Rollup Header

is metadata about the block which at minimum includes a commitment to the transactions in that block.

Rollups

Rollups are blockchains that post their Transaction Data to another blockchain and inherit its consensus and data availability.

Sequencing

Sequencing is the process of aggregation and header production.

Released under the APACHE-2.0 License

- +
On this page

Rollup glossary

A wiki of terms to define different Rollup designs and terminology:

Terminology

Aggregation

Aggregation is the process of batching transactions into one batch. A batch of transactions consists of one or more transactions.

Based rollup

A based rollup is a rollup that delegates aggregation to a DA-Layer.

Execution

Execution is the process by which the transactions in the blockchain are processed and their effects are applied to the state of the blockchain.

Header production

Header production is the process of creating the Rollup header backed by specific security properties.

Inclusion

Inclusion is the process by which a transaction is accepted into the blockchain.

Ordering

Ordering is the process of arranging transactions in a specific sequence in the blockchain.

Pessimistic rollup

A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup to check its validity.

Rollup Block

A rollup block is a data structure representing the Blockchain at a certain height. It consists of Rollup Data and Rollup Headers.

Rollup Data

Rollup data is either a batch of transactions or the state difference between transaction batches.

Rollup Header

is metadata about the block which at minimum includes a commitment to the transactions in that block.

Rollups

Rollups are blockchains that post their Transaction Data to another blockchain and inherit its consensus and data availability.

Sequencing

Sequencing is the process of aggregation and header production.

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/stack.html b/pr-339/learn/stack.html index 9fd452283..dc90d13e4 100644 --- a/pr-339/learn/stack.html +++ b/pr-339/learn/stack.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Rollkit stack

This page will cover the main components of Rollkit.

Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.

Application structure

null

ABCI interface

Rollkit is a fully functional Application BlockChain Interface (ABCI) client software. It can be used as a CometBFT replacement for any ABCI application. Thanks to this compatibility, you can use tools like abci-cli to test and debug your rollup.

Cosmos SDK

Would you like to change your Cosmos SDK application to a Rollkit rollup? No problem! You need to replace the Cosmos SDK Go dependency with a Rollkit-enabled version, which can be found at the rollkit/cosmos-sdk repository.

Note the rollkit/cosmos-sdk repository follows the release branches of upstream Cosmos SDK, but with the bonus of using Rollkit instead of CometBFT as the ABCI client.

And don't forget to replace another dependency, CometBFT, with rollkit/cometbft, which has an enhanced ABCI interface that includes the methods needed for state fraud proofs.

Data availability

Data availability (DA) can be accessed using generic interfaces. This design allows for seamless integration with any DA layer. New implementations can be plugged in programmatically, without a need to fork Rollkit.

The DataAvailabilityLayerClient interface includes essential lifecycle methods (Init, Start, Stop) as well as data availability methods (SubmitBlocks, RetrieveBlocks).

The BlockRetriever interface serves to enable syncing of full nodes from the data availability layer. It's important to keep in mind that there is no direct correlation between the DA layer block height and the rollup height. Each DA layer block may contain an arbitrary number of rollup blocks.

Celestia

Celestia is an example of a data availability integration implemented for Rollkit. It's using the Celestia Node API via the rollkit/celestia-da package. To deploy a Rollkit rollup on Celestia you also have to run a Celestia light node.

Use of other data availability (DA) layers is also supported by Rollkit, and research integrations for Bitcoin, Mock, gRPC are works in progress. New DA layer integrations can be added by using the go-da interface.

Node components

Mempool

The mempool is inspired by the CometBFT mempool. By default, transactions are handled in a First Come, First Served (FCFS) manner. Ordering of transactions can be implemented on the application level; currently this is possible by returning a priority on CheckTx, and once we support ABCI++ it is also possible via PrepareProposal and the application mempool.

Block manager

The block manager contains routines AggregationLoop, RetrieveLoop, and SyncLoop that communicate through Go channels. These Go routines are ran when a Rollkit node starts up (OnStart). Only the sequencer nodes run AggregationLoop which controls the frequency of block production for a rollup with a timer as per the BlockTime in BlockManager.

All nodes run SyncLoop which looks for the following operations:

  • Receive block headers: block headers are received through a channel HeaderInCh and Rollkit nodes attempt to verify the block with the corresponding block data.
  • Receive block data: block bodies are received through a channel blockInCh and Rollkit nodes attempt to verify the block.
  • Signal RetrieveLoop with timer as per the DABlockTime in BlockManager.

All nodes also run RetrieveLoop which is responsible for interacting with the data availability layer. It checks the last updated DAHeight to retrieve a block with timer DABlockTime signaled by SyncLoop. Note that the start height of the DA layer for the rollup, DAStartHeight, is configurable in BlockManager.

RPC

Rollkit's RPC fully implements the CometBFT RPC interfaces and APIs for querying:

  • Information about the rollup node: information such as node's health, status, and network info.
  • The rollup blockchain: getting information about the rollup blockchain such as blocks and block headers.
  • The rollup transactions: getting transaction information and broadcasting raw transactions, with search capabilities.
  • ABCI: rollup application information.

The following RPC protocols are currently supported:

  • URI over HTTP
  • JSON-RPC over HTTP
  • JSON-RPC over WebSockets

P2P layer

Rollkit's P2P layer enables direct communication between rollup nodes. It's used to gossip transactions, headers of newly created blocks, and state fraud proofs. The P2P layer is implemented using libp2p.

Rollkit uses DHT-based active peer discovery. Starting a node connects to pre-configured bootstrap peers, and advertises its namespace ID in the DHT. This solution is flexible, because multiple rollup networks may reuse the same DHT/bootstrap nodes, but specific rollup network might decide to use dedicated nodes as well.

Rollkit node types

Rollkit nodes are implemented in the node package.

Full node

Full nodes verify all blocks, and produce fraud proofs for optimistic rollups. Since they fully verify all rollup blocks, they don't rely on fraud or validity proofs for security.

Light node (work in progress)

Light nodes are light-weight rollup nodes that authenticate block headers, and can be secured by fraud proofs or validity proofs. They're recommended for average users on low-resource devices. Users running light nodes can make trust-minimized queries about the rollup's state. Currently, Rollkit light nodes are still under development.

Sequencer node

Rollups can utilize sequencer nodes. Sequencers are block producers for rollups, responsible for aggregating transactions into blocks, and typically executing transactions to produce a state root, used by the rollup's light clients.

Rollkit plans to support multiple different pluggable sequencer schemes:

Deploy in one-clickFaster soft-confirmations than L1Control over rollup's transaction orderingAtomic composability with other rollupsCensorship resistanceImplementation Status
Centralized sequencerRequires spinning up a sequencerYes ✅Yes ✅No ❌Eventual ⏳*✅ Implemented!
Decentralized sequencerRequires spinning up a sequencer setYes ✅Yes ✅No ❌Real-time ⚡️Planned
Shared decentralized sequencerYes ✅Yes ✅No ❌Yes ✅Real-time ⚡️Planned
Pure fork-choice ruleYes ✅No ❌Maybe 🟡Maybe 🟡Eventual ⏳Planned

"Pure fork-choice rule" refers to any rollup without privileged sequencers, e.g. nodes defer to the data availability layer for ordering and apply a "first-come-first-serve" fork-choice rule.

* implementation of this property is in progress.

State validity modes

Pessimistic (full nodes only)

A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup in order to check its validity. Rollkit supports pessimistic rollups by default.

Pessimistic rollups are similar to how Tether uses Bitcoin as a data availability layer via OmniLayer.

Optimistic (fraud proofs) (work in progress)

Rollkit's current design consists of a single sequencer that posts blocks to the DA layer, and multiple (optional) full nodes. Sequencers gossip block headers to full nodes and full nodes fetch posted blocks from the DA layer. Full nodes then execute transactions in these blocks to update their state, and gossip block headers over the P2P network to Rollkit light nodes.

Once state fraud proofs are enabled, when a block contains a fraudulent state transition, Rollkit full nodes can detect it by comparing intermediate state roots (ISRs) between transactions, and generate a state fraud proof that can be gossiped over the P2P network to Rollkit light nodes. These Rollkit light nodes can then use this state fraud proof to verify whether a fraudulent state transition occurred or not by themselves.

Overall, state fraud proofs will enable trust-minimization between full nodes and light nodes as long as there is at least one honest full node in the system that will generate state fraud proofs.

Note that Rollkit state fraud proofs are still a work in progress and will require new methods on top of ABCI, specifically, GenerateFraudProof, VerifyFraudProof, and GetAppHash.

You can find current detailed design and the remaining work needed to push state fraud proofs towards completion in this Architecture Decision Record (ADR).

Validity (ZK proofs)

Validity (ZK) rollups are planned, but not currently supported by Rollkit.

Released under the APACHE-2.0 License

- +
On this page

Rollkit stack

This page will cover the main components of Rollkit.

Rollup sequencer nodes collect transactions from users, aggregate them into blocks, and post the blocks onto a data availability (DA) layer (such as Celestia) to be ordered and finalized. Full nodes execute and verify rollup blocks, and in the case of an optimistic rollup, propagate fraud proofs when needed. Light clients will receive headers, verify proofs (fraud, zk, etc), and authenticate trust-minimized queries about the state.

Application structure

null

ABCI interface

Rollkit is a fully functional Application BlockChain Interface (ABCI) client software. It can be used as a CometBFT replacement for any ABCI application. Thanks to this compatibility, you can use tools like abci-cli to test and debug your rollup.

Cosmos SDK

Would you like to change your Cosmos SDK application to a Rollkit rollup? No problem! You need to replace the Cosmos SDK Go dependency with a Rollkit-enabled version, which can be found at the rollkit/cosmos-sdk repository.

Note the rollkit/cosmos-sdk repository follows the release branches of upstream Cosmos SDK, but with the bonus of using Rollkit instead of CometBFT as the ABCI client.

And don't forget to replace another dependency, CometBFT, with rollkit/cometbft, which has an enhanced ABCI interface that includes the methods needed for state fraud proofs.

Data availability

Data availability (DA) can be accessed using generic interfaces. This design allows for seamless integration with any DA layer. New implementations can be plugged in programmatically, without a need to fork Rollkit.

The DataAvailabilityLayerClient interface includes essential lifecycle methods (Init, Start, Stop) as well as data availability methods (SubmitBlocks, RetrieveBlocks).

The BlockRetriever interface serves to enable syncing of full nodes from the data availability layer. It's important to keep in mind that there is no direct correlation between the DA layer block height and the rollup height. Each DA layer block may contain an arbitrary number of rollup blocks.

Celestia

Celestia is an example of a data availability integration implemented for Rollkit. It's using the Celestia Node API via the rollkit/celestia-da package. To deploy a Rollkit rollup on Celestia you also have to run a Celestia light node.

Use of other data availability (DA) layers is also supported by Rollkit, and research integrations for Bitcoin, Mock, gRPC are works in progress. New DA layer integrations can be added by using the go-da interface.

Node components

Mempool

The mempool is inspired by the CometBFT mempool. By default, transactions are handled in a First Come, First Served (FCFS) manner. Ordering of transactions can be implemented on the application level; currently this is possible by returning a priority on CheckTx, and once we support ABCI++ it is also possible via PrepareProposal and the application mempool.

Block manager

The block manager contains routines AggregationLoop, RetrieveLoop, and SyncLoop that communicate through Go channels. These Go routines are ran when a Rollkit node starts up (OnStart). Only the sequencer nodes run AggregationLoop which controls the frequency of block production for a rollup with a timer as per the BlockTime in BlockManager.

All nodes run SyncLoop which looks for the following operations:

  • Receive block headers: block headers are received through a channel HeaderInCh and Rollkit nodes attempt to verify the block with the corresponding block data.
  • Receive block data: block bodies are received through a channel blockInCh and Rollkit nodes attempt to verify the block.
  • Signal RetrieveLoop with timer as per the DABlockTime in BlockManager.

All nodes also run RetrieveLoop which is responsible for interacting with the data availability layer. It checks the last updated DAHeight to retrieve a block with timer DABlockTime signaled by SyncLoop. Note that the start height of the DA layer for the rollup, DAStartHeight, is configurable in BlockManager.

RPC

Rollkit's RPC fully implements the CometBFT RPC interfaces and APIs for querying:

  • Information about the rollup node: information such as node's health, status, and network info.
  • The rollup blockchain: getting information about the rollup blockchain such as blocks and block headers.
  • The rollup transactions: getting transaction information and broadcasting raw transactions, with search capabilities.
  • ABCI: rollup application information.

The following RPC protocols are currently supported:

  • URI over HTTP
  • JSON-RPC over HTTP
  • JSON-RPC over WebSockets

P2P layer

Rollkit's P2P layer enables direct communication between rollup nodes. It's used to gossip transactions, headers of newly created blocks, and state fraud proofs. The P2P layer is implemented using libp2p.

Rollkit uses DHT-based active peer discovery. Starting a node connects to pre-configured bootstrap peers, and advertises its namespace ID in the DHT. This solution is flexible, because multiple rollup networks may reuse the same DHT/bootstrap nodes, but specific rollup network might decide to use dedicated nodes as well.

Rollkit node types

Rollkit nodes are implemented in the node package.

Full node

Full nodes verify all blocks, and produce fraud proofs for optimistic rollups. Since they fully verify all rollup blocks, they don't rely on fraud or validity proofs for security.

Light node (work in progress)

Light nodes are light-weight rollup nodes that authenticate block headers, and can be secured by fraud proofs or validity proofs. They're recommended for average users on low-resource devices. Users running light nodes can make trust-minimized queries about the rollup's state. Currently, Rollkit light nodes are still under development.

Sequencer node

Rollups can utilize sequencer nodes. Sequencers are block producers for rollups, responsible for aggregating transactions into blocks, and typically executing transactions to produce a state root, used by the rollup's light clients.

Rollkit plans to support multiple different pluggable sequencer schemes:

Deploy in one-clickFaster soft-confirmations than L1Control over rollup's transaction orderingAtomic composability with other rollupsCensorship resistanceImplementation Status
Centralized sequencerRequires spinning up a sequencerYes ✅Yes ✅No ❌Eventual ⏳*✅ Implemented!
Decentralized sequencerRequires spinning up a sequencer setYes ✅Yes ✅No ❌Real-time ⚡️Planned
Shared decentralized sequencerYes ✅Yes ✅No ❌Yes ✅Real-time ⚡️Planned
Pure fork-choice ruleYes ✅No ❌Maybe 🟡Maybe 🟡Eventual ⏳Planned

"Pure fork-choice rule" refers to any rollup without privileged sequencers, e.g. nodes defer to the data availability layer for ordering and apply a "first-come-first-serve" fork-choice rule.

* implementation of this property is in progress.

State validity modes

Pessimistic (full nodes only)

A pessimistic rollup is a rollup that only supports full nodes that replay all the transactions in the rollup in order to check its validity. Rollkit supports pessimistic rollups by default.

Pessimistic rollups are similar to how Tether uses Bitcoin as a data availability layer via OmniLayer.

Optimistic (fraud proofs) (work in progress)

Rollkit's current design consists of a single sequencer that posts blocks to the DA layer, and multiple (optional) full nodes. Sequencers gossip block headers to full nodes and full nodes fetch posted blocks from the DA layer. Full nodes then execute transactions in these blocks to update their state, and gossip block headers over the P2P network to Rollkit light nodes.

Once state fraud proofs are enabled, when a block contains a fraudulent state transition, Rollkit full nodes can detect it by comparing intermediate state roots (ISRs) between transactions, and generate a state fraud proof that can be gossiped over the P2P network to Rollkit light nodes. These Rollkit light nodes can then use this state fraud proof to verify whether a fraudulent state transition occurred or not by themselves.

Overall, state fraud proofs will enable trust-minimization between full nodes and light nodes as long as there is at least one honest full node in the system that will generate state fraud proofs.

Note that Rollkit state fraud proofs are still a work in progress and will require new methods on top of ABCI, specifically, GenerateFraudProof, VerifyFraudProof, and GetAppHash.

You can find current detailed design and the remaining work needed to push state fraud proofs towards completion in this Architecture Decision Record (ADR).

Validity (ZK proofs)

Validity (ZK) rollups are planned, but not currently supported by Rollkit.

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/learn/transaction-flow.html b/pr-339/learn/transaction-flow.html index 83a74a662..8e7310d6b 100644 --- a/pr-339/learn/transaction-flow.html +++ b/pr-339/learn/transaction-flow.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
On this page

Transaction flow

Rollup users use a light node to communicate with the rollup P2P network for two primary reasons:

  • submitting transactions
  • gossipping headers and fraud proofs

WARNING

Light nodes are still a work in progress.

Here's what the typical transaction flow looks like:

Transaction submission

null

Transaction validation and processing

null

Block processing

null

Fraud proof gossip and forking

null

To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.

If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.

After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.

As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes here.

Released under the APACHE-2.0 License

- +
On this page

Transaction flow

Rollup users use a light node to communicate with the rollup P2P network for two primary reasons:

  • submitting transactions
  • gossipping headers and fraud proofs

WARNING

Light nodes are still a work in progress.

Here's what the typical transaction flow looks like:

Transaction submission

null

Transaction validation and processing

null

Block processing

null

Fraud proof gossip and forking

null

To transact, users submit a transaction to their light node, which gossips the transaction to a full node. Before adding the transaction to their mempool, the full node checks its validity. Valid transactions are included in the mempool, while invalid ones are refused, and the user's transaction will not be processed.

If the transaction is valid and has been included in the mempool, the sequencer can add it to a rollup block, which is then submitted to the data availability (DA) layer. This results in a successful transaction flow for the user, and the state of the rollup is updated accordingly.

After the block is submitted to the DA layer, the full nodes download and validate the block. However, there is a possibility that the sequencer may maliciously submit a block to the DA layer with invalid transactions or state. In such cases, the full nodes of the rollup chain will consider the block invalid. In the case of an optimistic rollup, if they find the block invalid, they generate fraud proofs and gossip them in the P2P network among other full and light nodes.

As a result, the rollup chain will halt, and the network will decide to fork the chain through social consensus. In the future, when a decentralized sequencer scheme is in place, additional options will be available, such as slashing the sequencer or selecting another full node as the sequencer. However, in any case, a new block must be created and submitted to the DA layer. You can read more about sequencer nodes here.

Released under the APACHE-2.0 License

+ \ No newline at end of file diff --git a/pr-339/networks/cosmwasm-testnet.html b/pr-339/networks/cosmwasm-testnet.html index 215110e9d..35a6d7cc7 100644 --- a/pr-339/networks/cosmwasm-testnet.html +++ b/pr-339/networks/cosmwasm-testnet.html @@ -33,7 +33,7 @@ - + @@ -130,8 +130,8 @@ "account_number": "7", "sequence": "0" } -}
  • Block Explorer: https://canary.modular.cloud/rollkit-cosmwasm
  • Faucet: https://faucet.rosm.rollkit.dev/
    • You can request 1 rosm (or 1000000urosm) every 24 hours.
      Faucet
  • Mocha Namespace: 000000000000000000000000000000000000b7b24d9321578eb83626
  • DA Block Time: 15s
  • Rollup Block Time: 10s
  • Add Rosm to Keplr

    Don't have the Keplr Browser extension? Add Keplr Wallet Here

    Click to add Rosm testnet to your Keplr wallet

    Released under the APACHE-2.0 License

    - +}
  • Block Explorer: https://canary.modular.cloud/rollkit-cosmwasm
  • Faucet: https://faucet.rosm.rollkit.dev/
    • You can request 1 rosm (or 1000000urosm) every 24 hours.
      Faucet
  • Mocha Namespace: 000000000000000000000000000000000000b7b24d9321578eb83626
  • DA Block Time: 15s
  • Rollup Block Time: 10s
  • Add Rosm to Keplr

    Don't have the Keplr Browser extension? Add Keplr Wallet Here

    Click to add Rosm testnet to your Keplr wallet

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/sitemap.xml b/pr-339/sitemap.xml index 6caf9789e..843a635cc 100644 --- a/pr-339/sitemap.xml +++ b/pr-339/sitemap.xml @@ -1 +1 @@ -https://rollkit.dev/README2024-04-15T17:01:34.000Zhttps://rollkit.dev/blog/overview2024-04-15T17:01:34.000Zhttps://rollkit.dev/blog/sovereign-rollups-on-bitcoin2024-04-15T17:01:34.000Zhttps://rollkit.dev/2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/about2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/based-pessimistic-rollup2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/basic-rollup2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/building-and-deploying-a-rollup2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/intro2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/overview2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/pessimistic-rollup-with-a-shared-sequencer2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/readme2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/rollup-glossary2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/stack2024-04-15T17:01:34.000Zhttps://rollkit.dev/learn/transaction-flow2024-04-15T17:01:34.000Zhttps://rollkit.dev/networks/cosmwasm-testnet2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/bitcoin2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/block-times2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/cosmwasm2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/cw-orch2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/full-and-sequencer-node2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/gas-price2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/gm-world-arabica-testnet2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/gm-world-frontend2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/gm-world-mainnet2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/gm-world-mocha-testnet2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/gm-world2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/ibc-connection2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/lazy-sequencing2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/overview2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/polaris-evm2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/recipe-book2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/restart-rollup2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/rollup-docker2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/starter-rollup2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/wordle2024-04-15T17:01:34.000Zhttps://rollkit.dev/tutorials/zkml2024-04-15T17:01:34.000Z \ No newline at end of file +https://rollkit.dev/README2024-04-16T13:57:43.000Zhttps://rollkit.dev/blog/overview2024-04-16T13:57:43.000Zhttps://rollkit.dev/blog/sovereign-rollups-on-bitcoin2024-04-16T13:57:43.000Zhttps://rollkit.dev/2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/about2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/based-pessimistic-rollup2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/basic-rollup2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/building-and-deploying-a-rollup2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/intro2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/overview2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/pessimistic-rollup-with-a-shared-sequencer2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/readme2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/rollup-glossary2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/stack2024-04-16T13:57:43.000Zhttps://rollkit.dev/learn/transaction-flow2024-04-16T13:57:43.000Zhttps://rollkit.dev/networks/cosmwasm-testnet2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/bitcoin2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/block-times2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/cosmwasm2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/cw-orch2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/full-and-sequencer-node2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/gas-price2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/gm-world-arabica-testnet2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/gm-world-frontend2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/gm-world-mainnet2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/gm-world-mocha-testnet2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/gm-world2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/ibc-connection2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/lazy-sequencing2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/overview2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/polaris-evm2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/recipe-book2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/restart-rollup2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/rollup-docker2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/starter-rollup2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/wordle2024-04-16T13:57:43.000Zhttps://rollkit.dev/tutorials/zkml2024-04-16T13:57:43.000Z \ No newline at end of file diff --git a/pr-339/tutorials/bitcoin.html b/pr-339/tutorials/bitcoin.html index 8a2cb2ca7..2916b450a 100644 --- a/pr-339/tutorials/bitcoin.html +++ b/pr-339/tutorials/bitcoin.html @@ -33,7 +33,7 @@ - + @@ -179,8 +179,8 @@ $RPC_URL --private-key $ANVIL_KEY --broadcast

    Once the contract has been deployed locally, Anvil will log out the contract address.

    Next, set the contract address as an environment variable:

    bash
    export CONTRACT_ADDRESS=<contract-address>

    We can then test sending transactions to it with cast send.

    bash
    cast send $CONTRACT_ADDRESS "incrementCounter()" \
     --private-key $ANVIL_KEY --rpc-url $RPC_URL

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url $RPC_URL

    🧪 Deploying to the Ethermint sovereign rollup

    Now that we've deployed and tested locally, we can deploy to our Ethermint chain.

    First, we will need to export the private key generated by the ethermint init.sh script:

    bash
    PRIVATE_KEY=$(ethermintd keys unsafe-export-eth-key mykey --keyring-backend test)

    NOTE: Here, the key name from init.sh is mykey but you can modify the init.sh to change the name of your key.

    Now, we can start deploying the smart contract to our Ethermint chain.

    To do so, run the following script:

    bash
    forge script script/Counter.s.sol:CounterScript \
     --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast

    Set the contract address in the output as the CONTRACT_ADDRESS variable:

    bash
    export CONTRACT_ADDRESS=<new-contract-address>

    Once the contract has been deployed to the Ethermint rollup, we can use cast send to test sending transactions to it:

    bash
    cast send $CONTRACT_ADDRESS "incrementCounter()" \
    ---rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url http://127.0.0.1:8545

    Released under the APACHE-2.0 License

    - +--rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY

    We can then perform read operations with cast call:

    bash
    cast call $CONTRACT_ADDRESS "getCount()(int)" --rpc-url http://127.0.0.1:8545

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/block-times.html b/pr-339/tutorials/block-times.html index eb878362c..9ae412659 100644 --- a/pr-339/tutorials/block-times.html +++ b/pr-339/tutorials/block-times.html @@ -32,7 +32,7 @@ - + @@ -60,8 +60,8 @@
    On this page

    How to change speed of block production

    If you have gone through both the GM world and the Full and sequencer node rollup setup already, you're now ready to experiment with faster block times.

    In your gmd start [args...] command, you will need to add a flag and then the argument for block time.

    The flag is:

    bash
    --rollkit.block_time 1s

    Where 1s can be adjusted to the speed of your choosing.

    Here is an example:

    bash
    # start the chain
     gmd start [existing flags...] 
    -gmd start [existing flags...] --rollkit.block_time 1s 

    In the above example, we've changed it to one second blocks. Alternatively, you could slow your rollup down to 30 seconds:

    bash
    --rollkit.block_time 30s

    Or speed it up even more, to sub-second block times (100 milliseconds):

    bash
    --rollkit.block_time 0.1ms

    Released under the APACHE-2.0 License

    - +gmd start [existing flags...] --rollkit.block_time 1s

    In the above example, we've changed it to one second blocks. Alternatively, you could slow your rollup down to 30 seconds:

    bash
    --rollkit.block_time 30s

    Or speed it up even more, to sub-second block times (100 milliseconds):

    bash
    --rollkit.block_time 0.1ms

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/cosmwasm.html b/pr-339/tutorials/cosmwasm.html index ae5e8cc6d..78fb182b5 100644 --- a/pr-339/tutorials/cosmwasm.html +++ b/pr-339/tutorials/cosmwasm.html @@ -32,7 +32,7 @@ - + @@ -89,13 +89,13 @@ wget https://raw.githubusercontent.com/rollkit/docs/main/scripts/cosmwasm/init.sh

    This copies over our init.sh script to initialize our CosmWasm rollup.

    You can view the contents of the script to see how we initialize the CosmWasm Rollup.

    You can initialize the script with the following command:

    bash
    bash init.sh

    With that, we have kickstarted our wasmd network!

    View your rollup by finding your namespace or account Celenium.

    View the example rollup's namespace on Celenium.

    💠 Optional: see what's inside the script

    You can skip this section, but it is important to know how Rollkit is initializing the cosmwasm rollup.

    View the script here.

    📒 Contract deployment on CosmWasm with Rollkit

    🤖 Compile the smart contract

    In a new terminal instance, we will run the following commands to pull down the Nameservice smart contract and compile it:

    bash
    git clone https://github.com/InterWasm/cw-contracts
     cd cw-contracts
     cd contracts/nameservice
    -cargo wasm

    The compiled contract is outputted to: target/wasm32-unknown-unknown/release/cw_nameservice.wasm.

    🧪 Unit tests

    If we want to run tests, we can do so with the following command in the ~/cw-contracts/contracts/nameservice directory:

    bash
    cargo unit-test

    🏎️ Optimized smart contract

    Because we are deploying the compiled smart contract to wasmd, we want it to be as small as possible.

    The CosmWasm team provides a tool called rust-optimizer, which requires Docker in order to compile.

    Run the following command in the ~/cw-contracts/contracts/nameservice directory:

    bash
    sudo docker run --rm -v "$(pwd)":/code \
    +cargo wasm

    The compiled contract is outputted to: target/wasm32-unknown-unknown/release/cw_nameservice.wasm.

    🧪 Unit tests

    If we want to run tests, we can do so with the following command in the ~/cw-contracts/contracts/nameservice directory:

    bash
    cargo unit-test

    🏎️ Optimized smart contract

    Because we are deploying the compiled smart contract to wasmd, we want it to be as small as possible.

    The CosmWasm team provides a tool called rust-optimizer, which requires Docker in order to compile.

    Run the following command in the ~/cw-contracts/contracts/nameservice directory:

    bash
    sudo docker run --rm -v "$(pwd)":/code \
       --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
       --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
       cosmwasm/rust-optimizer:0.12.6
    bash
    sudo docker run --platform linux/arm64 --rm -v "$(pwd)":/code \
       --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
       --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
    -  cosmwasm/rust-optimizer-arm64:0.12.8

    This will place the optimized Wasm bytecode at artifacts/cw_nameservice.wasm.

    🚀 Contract deployment

    Let's now deploy our smart contract!

    In order to deploy a contract, you can use the command line as described below. For a better experience and to use Rust code instead of the command line to deploy/script and test your contracts, you can use cw-orchestrator.

    Run the following in the ~/cw-contracts/contracts/nameservice directory:

    bash
    TX_HASH=$(wasmd tx wasm store artifacts/cw_nameservice.wasm --from celeswasm-key --keyring-backend test --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH
    bash
    TX_HASH=$(wasmd tx wasm store artifacts/cw_nameservice-aarch64.wasm --from celeswasm-key --keyring-backend test --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH

    This will get you the transaction hash for the smart contract deployment. Given we are using Rollkit, there will be a delay on the transaction being included due to Rollkit waiting on Celestia's data availability layer to confirm the block has been included before submitting a new block.

    DANGER

    If you run into errors with variables on the previous command, or commands in the remainder of the tutorial, cross-reference the variables in the command with the variables in the init.sh script.

    🌟 Contract interaction on CosmWasm with Celestia

    In the previous steps, we have stored out contract's tx hash in an environment variable for later use.

    The following guide will show you how to deploy and interact with a contract using CLI. For scripting using Rust, you can use cw-orchestrator.

    Because of the longer time periods of submitting transactions via Rollkit due to waiting on Celestia's data availability layer to confirm block inclusion, we will need to query our tx hash directly to get information about it.

    🔎 Contract querying

    Let's start by querying our transaction hash for its code ID:

    bash
    CODE_ID=$(wasmd query tx --type=hash $TX_HASH celeswasm --node http://127.0.0.1:36657 --output json | jq -r '.events[-1].attributes[1].value')
    +  cosmwasm/rust-optimizer-arm64:0.12.8

    This will place the optimized Wasm bytecode at artifacts/cw_nameservice.wasm.

    🚀 Contract deployment

    Let's now deploy our smart contract!

    In order to deploy a contract, you can use the command line as described below. For a better experience and to use Rust code instead of the command line to deploy/script and test your contracts, you can use cw-orchestrator.

    Run the following in the ~/cw-contracts/contracts/nameservice directory:

    bash
    TX_HASH=$(wasmd tx wasm store artifacts/cw_nameservice.wasm --from celeswasm-key --keyring-backend test --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH
    bash
    TX_HASH=$(wasmd tx wasm store artifacts/cw_nameservice-aarch64.wasm --from celeswasm-key --keyring-backend test --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH

    This will get you the transaction hash for the smart contract deployment. Given we are using Rollkit, there will be a delay on the transaction being included due to Rollkit waiting on Celestia's data availability layer to confirm the block has been included before submitting a new block.

    DANGER

    If you run into errors with variables on the previous command, or commands in the remainder of the tutorial, cross-reference the variables in the command with the variables in the init.sh script.

    🌟 Contract interaction on CosmWasm with Celestia

    In the previous steps, we have stored out contract's tx hash in an environment variable for later use.

    The following guide will show you how to deploy and interact with a contract using CLI. For scripting using Rust, you can use cw-orchestrator.

    Because of the longer time periods of submitting transactions via Rollkit due to waiting on Celestia's data availability layer to confirm block inclusion, we will need to query our tx hash directly to get information about it.

    🔎 Contract querying

    Let's start by querying our transaction hash for its code ID:

    bash
    CODE_ID=$(wasmd query tx --type=hash $TX_HASH celeswasm --node http://127.0.0.1:36657 --output json | jq -r '.events[-1].attributes[1].value')
     echo $CODE_ID

    This will give us back the Code ID of the deployed contract.

    In our case, since it's the first contract deployed on our local network, the value is 1.

    Now, we can take a look at the contracts instantiated by this Code ID:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --node http://127.0.0.1:36657 --output json

    We get the following output:

    json
    {"contracts":[],"pagination":{"next_key":null,"total":"0"}}

    📃 Contract instantiation

    We start instantiating the contract by writing up the following INIT message for nameservice contract. Here, we are specifying that purchase_price of a name is 100uwasm and transfer_price is 999uwasm.

    bash
    INIT='{"purchase_price":{"amount":"100","denom":"uwasm"},"transfer_price":{"amount":"999","denom":"uwasm"}}'
     wasmd tx wasm instantiate $CODE_ID "$INIT" --from celeswasm-key --keyring-backend test --label "name service" --chain-id celeswasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 -y --no-admin --node http://127.0.0.1:36657

    📄 Contract interaction

    Now that we instantiated it, we can interact further with the contract:

    bash
    wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657
     CONTRACT=$(wasmd query wasm list-contract-by-code $CODE_ID --output json --node http://127.0.0.1:36657 | jq -r '.contracts[-1]')
    @@ -132,8 +132,8 @@
     timestamp: ""
     tx: null
     txhash: C147257485B72E7FFA5FDB943C94CE951A37817554339586FFD645AD2AA397C3

    If you try to register the same name again, you'll see an expected error:

    bash
    Error: rpc error: code = Unknown desc = rpc error: code = Unknown desc = failed to execute message; message index: 0: Name has been taken (name fred): execute wasm contract failed [CosmWasm/wasmd/x/wasm/keeper/keeper.go:364] With gas wanted: '0' and gas used: '123809' : unknown request

    Next, query the owner of the name record:

    bash
    NAME_QUERY='{"resolve_record": {"name": "fred"}}'
    -wasmd query wasm contract-state smart $CONTRACT "$NAME_QUERY" --node http://127.0.0.1:36657 --output json

    You'll see the owner's address in a JSON response:

    bash
    {"data":{"address":"wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z"}}

    With that, we have instantiated and interacted with the CosmWasm nameservice smart contract using Celestia!

    Released under the APACHE-2.0 License

    - +wasmd query wasm contract-state smart $CONTRACT "$NAME_QUERY" --node http://127.0.0.1:36657 --output json

    You'll see the owner's address in a JSON response:

    bash
    {"data":{"address":"wasm1y9ceqvnsnm9xtcdmhrjvv4rslgwfzmrzky2c5z"}}

    With that, we have instantiated and interacted with the CosmWasm nameservice smart contract using Celestia!

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/cw-orch.html b/pr-339/tutorials/cw-orch.html index 61ec7c301..97d3076b8 100644 --- a/pr-339/tutorials/cw-orch.html +++ b/pr-339/tutorials/cw-orch.html @@ -32,7 +32,7 @@ - + @@ -148,8 +148,8 @@ ├── cw20_base.rs ├── cw20_ics20.rs └── ..

    When importing your crates to get the messages types, you can use the following command in the interface folder.

    shell
    cargo add cw20-base --path ../contracts/cw20-base/
    -cargo add cw20 --path ../packages/cw20

    Integrating single contracts

    Now that you workspace is setup, you can integrate with single contracts using the above section

    More examples and scripts

    You can find more example interactions on the counter-contract example directly in the cw-orchestrator repo:

    FINAL ADVICE: Learn more and explore our full cw-orch documentation !.

    Released under the APACHE-2.0 License

    - +cargo add cw20 --path ../packages/cw20

    Integrating single contracts

    Now that you workspace is setup, you can integrate with single contracts using the above section

    More examples and scripts

    You can find more example interactions on the counter-contract example directly in the cw-orchestrator repo:

    FINAL ADVICE: Learn more and explore our full cw-orch documentation !.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/full-and-sequencer-node.html b/pr-339/tutorials/full-and-sequencer-node.html index 8e276526f..6e47b1e18 100644 --- a/pr-339/tutorials/full-and-sequencer-node.html +++ b/pr-339/tutorials/full-and-sequencer-node.html @@ -32,7 +32,7 @@ - + @@ -85,8 +85,8 @@ # if you are running a separate celestia-node for full node # use the auth token from that node AUTH_TOKEN=$(docker exec $(docker ps -q) celestia bridge auth admin --node.store /home/celestia/bridge)

    Start the full node

    Now run your full node with the script:

    bash
    # from the gm directory
    -bash init-full-node.sh

    Congratulations! You will now have a full node running alongside your Rollkit sequencer.

    Released under the APACHE-2.0 License

    - +bash init-full-node.sh

    Congratulations! You will now have a full node running alongside your Rollkit sequencer.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/gas-price.html b/pr-339/tutorials/gas-price.html index d482dc753..d46ac3de7 100644 --- a/pr-339/tutorials/gas-price.html +++ b/pr-339/tutorials/gas-price.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
    On this page

    How to configure gas price

    In most cases, the gas price can be left to the defaults, which ensures that the price is greater than the minimum gas price accepted by the core node.

    The gas price can also be configured manually with the flag --rollkit.da_gas_price:

    bash
    gmd start --rollkit.da_gas_price=0.1 [existing flags...]

    This configures the rollup to always use the fixed gas price of 0.1utia/gas.

    When running a rollup against a live network, the gas price may see occasional spikes during periods of high mempool congestion.

    To avoid such transient blob submission failures, the flag --rollkit.da_gas_multiplier may be used:

    bash
    gmd start --rollkit.da_gas_price=0.1 --rollkit.da_gas_multiplier=1.2 [...]

    This configures the rollup to keep increasing the gas price by a factor of 1.2x of the previous price until the transaction is accepted by the core node.

    When the blob submission transaction eventually succeeds, the gas price will gradually return to the default, decreasing by the same factor.

    The gas multiplier will only be used if the gas price has been manually configured.

    Released under the APACHE-2.0 License

    - +
    On this page

    How to configure gas price

    In most cases, the gas price can be left to the defaults, which ensures that the price is greater than the minimum gas price accepted by the core node.

    The gas price can also be configured manually with the flag --rollkit.da_gas_price:

    bash
    gmd start --rollkit.da_gas_price=0.1 [existing flags...]

    This configures the rollup to always use the fixed gas price of 0.1utia/gas.

    When running a rollup against a live network, the gas price may see occasional spikes during periods of high mempool congestion.

    To avoid such transient blob submission failures, the flag --rollkit.da_gas_multiplier may be used:

    bash
    gmd start --rollkit.da_gas_price=0.1 --rollkit.da_gas_multiplier=1.2 [...]

    This configures the rollup to keep increasing the gas price by a factor of 1.2x of the previous price until the transaction is accepted by the core node.

    When the blob submission transaction eventually succeeds, the gas price will gradually return to the default, decreasing by the same factor.

    The gas multiplier will only be used if the gas price has been manually configured.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/gm-world-arabica-testnet.html b/pr-339/tutorials/gm-world-arabica-testnet.html index d18c9a7d4..898ff13d3 100644 --- a/pr-339/tutorials/gm-world-arabica-testnet.html +++ b/pr-339/tutorials/gm-world-arabica-testnet.html @@ -33,7 +33,7 @@ - + @@ -91,8 +91,8 @@ ctx := sdk.UnwrapSDKContext(goCtx) _ = ctx return &types.QueryGmResponse{Text: "gm world!"}, nil -}

    The query command has also scaffolded x/gm/client/cli/query_gm.go that implements a CLI equivalent of the gm query and mounted this command in x/gm/client/cli/query.go.

    Restart your rollup

    Restart your rollup by running the init-arabica-testnet.sh script again.

    Query your rollup

    In a separate window, run the following command:

    bash
    gmd q gm gm

    We will get the following JSON response:

    bash
    text: gm world!

    gm.png

    Next steps

    Congratulations 🎉 you've successfully built your first rollup and queried it!

    In the next tutorial, you'll learn how to post data to Celestia's Mainnet Beta.

    If you're interested in setting up a full node alongside your sequencer, see the Full and sequencer node rollup setup tutorial.

    Released under the APACHE-2.0 License

    - +}

    The query command has also scaffolded x/gm/client/cli/query_gm.go that implements a CLI equivalent of the gm query and mounted this command in x/gm/client/cli/query.go.

    Restart your rollup

    Restart your rollup by running the init-arabica-testnet.sh script again.

    Query your rollup

    In a separate window, run the following command:

    bash
    gmd q gm gm

    We will get the following JSON response:

    bash
    text: gm world!

    gm.png

    Next steps

    Congratulations 🎉 you've successfully built your first rollup and queried it!

    In the next tutorial, you'll learn how to post data to Celestia's Mainnet Beta.

    If you're interested in setting up a full node alongside your sequencer, see the Full and sequencer node rollup setup tutorial.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/gm-world-frontend.html b/pr-339/tutorials/gm-world-frontend.html index d436cb120..51e1cd33e 100644 --- a/pr-339/tutorials/gm-world-frontend.html +++ b/pr-339/tutorials/gm-world-frontend.html @@ -32,7 +32,7 @@ - + @@ -186,8 +186,8 @@ wrappedWithChakra={true} signerOptions={signerOptions} >

    You may notice that we added:

    tsx
    endpointOptions={{isLazy: true}}

    This will save our localhost RPC from being overridden.

    Congratulations! You now have a frontend for your rollup. What features do you want to add now?

    You may notice that the icons for Celestia testnets are not loading, this is due to an outdated version of the chain registry.

    cca.png

    To update these, you can use your terminal:

    bash
    cd $HOME && cd gm-world
    -yarn upgrade-interactive --latest

    Use arrow keys and the spacebar to select it@cosmos-kit/core, @cosmos-kit/cosmostation, @cosmos-kit/keplr, @cosmos-kit/leap and @cosmos-kit/react.

    Now use enter to upgrade the dependencies!

    Head back to your frontend and take a look, you should see the updated icons.

    cca-2.png

    Released under the APACHE-2.0 License

    - +yarn upgrade-interactive --latest

    Use arrow keys and the spacebar to select it@cosmos-kit/core, @cosmos-kit/cosmostation, @cosmos-kit/keplr, @cosmos-kit/leap and @cosmos-kit/react.

    Now use enter to upgrade the dependencies!

    Head back to your frontend and take a look, you should see the updated icons.

    cca-2.png

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/gm-world-mainnet.html b/pr-339/tutorials/gm-world-mainnet.html index 3ea3d34d0..829302f38 100644 --- a/pr-339/tutorials/gm-world-mainnet.html +++ b/pr-339/tutorials/gm-world-mainnet.html @@ -32,7 +32,7 @@ - + @@ -59,8 +59,8 @@
    On this page

    GM world rollup: Part 4

    This tutorial is part 4 of the GM world rollup tutorials. In this tutorial, it is expected that you've completed part 1, part 2 or part 3 of the tutorial and are familiar with running a local rollup devnet and posting to a Celestia testnet.

    Deploying to Celestia Mainnet Beta

    🪶 Run a Celestia light node

    Fully sync and fund a light node on Mainnet beta (celestia). Follow instructions to install and start your Celestia data availability layer light node selecting the Arabica network. You can find instructions to install and run the node. After the node is synced, stop the light node.

    Clear previous chain history

    Before starting the rollup, we need to remove the old project folders:

    bash
    rm -r $HOME/go/bin/gmd && rm -rf $HOME/.gm

    Start the rollup on mainnet

    For this portion, you will need to stop the rollup that you have running from parts 1 and 2 of the tutorial, using Control + C in the terminal.

    1. Download the script for deploying to Celestia's Mainnet Beta:

      bash
      # From inside the `gm` directory
      -wget https://raw.githubusercontent.com/rollkit/docs/main/scripts/gm/init-mainnet.sh
    2. Ensure that the account for your light node is funded.

    3. Run the init-mainnet.sh script:

      bash
      bash init-mainnet.sh
    4. Watch as your rollup posts blocks to Celestia!

    5. View your rollup by finding your namespace or account Celenium.

    View the example rollup's namespace on Celenium.

    TIP

    init-mainnet.sh script uses a default namespace 00000000000000000000000000000000000000000008e5f679bf7116cb. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 10 characters in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 characters.

    Learn more about namespaces .

    Restarting your rollup

    When you ran init-mainnet.sh, the script generated a script called restart-mainnet.sh in the $HOME/gm directory for you to use to restart your rollup.

    In order to do so, restart celestia light node and then run:

    bash
    bash restart-mainnet.sh

    Next steps

    Congratulations! You have a Rollkit rollup running on Celestia's Mainnet Beta.

    If you're interested in setting up a full node alongside your sequencer, see the Full and sequencer node rollup setup tutorial.

    Released under the APACHE-2.0 License

    - +wget https://raw.githubusercontent.com/rollkit/docs/main/scripts/gm/init-mainnet.sh
  • Ensure that the account for your light node is funded.

  • Run the init-mainnet.sh script:

    bash
    bash init-mainnet.sh
  • Watch as your rollup posts blocks to Celestia!

  • View your rollup by finding your namespace or account Celenium.

  • View the example rollup's namespace on Celenium.

    TIP

    init-mainnet.sh script uses a default namespace 00000000000000000000000000000000000000000008e5f679bf7116cb. You can set your own by using a command similar to this (or, you could get creative 😎):

    bash
    openssl rand -hex 10

    Replace the last 10 characters in 00000000000000000000000000000000000000000008e5f679bf7116cb with the newly generated 10 characters.

    Learn more about namespaces .

    Restarting your rollup

    When you ran init-mainnet.sh, the script generated a script called restart-mainnet.sh in the $HOME/gm directory for you to use to restart your rollup.

    In order to do so, restart celestia light node and then run:

    bash
    bash restart-mainnet.sh

    Next steps

    Congratulations! You have a Rollkit rollup running on Celestia's Mainnet Beta.

    If you're interested in setting up a full node alongside your sequencer, see the Full and sequencer node rollup setup tutorial.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/gm-world-mocha-testnet.html b/pr-339/tutorials/gm-world-mocha-testnet.html index 61e3d180a..da1914567 100644 --- a/pr-339/tutorials/gm-world-mocha-testnet.html +++ b/pr-339/tutorials/gm-world-mocha-testnet.html @@ -33,7 +33,7 @@ - + @@ -91,8 +91,8 @@ ctx := sdk.UnwrapSDKContext(goCtx) _ = ctx return &types.QueryGmResponse{Text: "gm world!"}, nil -}

    The query command has also scaffolded x/gm/client/cli/query_gm.go that implements a CLI equivalent of the gm query and mounted this command in x/gm/client/cli/query.go.

    Restart your rollup

    Restart your rollup by running the init-mocha-testnet.sh script again.

    Query your rollup

    In a separate window, run the following command:

    bash
    gmd q gm gm

    We will get the following JSON response:

    bash
    text: gm world!

    gm.png

    Next steps

    Congratulations 🎉 you've successfully built your first rollup and queried it!

    In the next tutorial, you'll learn how to post data to Celestia's Mainnet Beta.

    If you're interested in setting up a full node alongside your sequencer, see the Full and sequencer node rollup setup tutorial.

    Released under the APACHE-2.0 License

    - +}

    The query command has also scaffolded x/gm/client/cli/query_gm.go that implements a CLI equivalent of the gm query and mounted this command in x/gm/client/cli/query.go.

    Restart your rollup

    Restart your rollup by running the init-mocha-testnet.sh script again.

    Query your rollup

    In a separate window, run the following command:

    bash
    gmd q gm gm

    We will get the following JSON response:

    bash
    text: gm world!

    gm.png

    Next steps

    Congratulations 🎉 you've successfully built your first rollup and queried it!

    In the next tutorial, you'll learn how to post data to Celestia's Mainnet Beta.

    If you're interested in setting up a full node alongside your sequencer, see the Full and sequencer node rollup setup tutorial.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/gm-world.html b/pr-339/tutorials/gm-world.html index 7a1a33ecf..28625db12 100644 --- a/pr-339/tutorials/gm-world.html +++ b/pr-339/tutorials/gm-world.html @@ -32,7 +32,7 @@ - + @@ -186,8 +186,8 @@ denom: stake pagination: next_key: null - total: "0"

    Next steps

    Congratulations! You've built a local rollup that posts to a local Celestia devnet. In the next tutorial, you can learn how to post data to Celestia's Arabica devnet.

    Released under the APACHE-2.0 License

    - + total: "0"

    Next steps

    Congratulations! You've built a local rollup that posts to a local Celestia devnet. In the next tutorial, you can learn how to post data to Celestia's Arabica devnet.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/ibc-connection.html b/pr-339/tutorials/ibc-connection.html index 49e098d35..729b2cd36 100644 --- a/pr-339/tutorials/ibc-connection.html +++ b/pr-339/tutorials/ibc-connection.html @@ -32,7 +32,7 @@ - + @@ -164,8 +164,8 @@ - amount: "9999999999999999999897679" denom: stake pagination: - total: "1"

    Released under the APACHE-2.0 License

    - + total: "1"

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/lazy-sequencing.html b/pr-339/tutorials/lazy-sequencing.html index d59054d40..beca4cb3a 100644 --- a/pr-339/tutorials/lazy-sequencing.html +++ b/pr-339/tutorials/lazy-sequencing.html @@ -32,7 +32,7 @@ - + @@ -60,8 +60,8 @@
    On this page

    How to use lazy sequencing (aggregation)

    In this guide, we'll go over how to use lazy sequencing.

    This feature was introduced in Rollkit v0.7.0 and allows rollup operators to wait for transactions to build blocks. This prevents the rollup from building empty blocks.

    To turn on lazy sequencing, add the following flag to your start command:

    bash
    --rollkit.lazy_aggregator

    An example command would look like this:

    bash
    # start the chain
     gmd start [existing flags...] 
    -gmd start [existing flags...] --rollkit.lazy_aggregator 

    Released under the APACHE-2.0 License

    - +gmd start [existing flags...] --rollkit.lazy_aggregator

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/overview.html b/pr-339/tutorials/overview.html index e9b3e6539..6f0fff847 100644 --- a/pr-339/tutorials/overview.html +++ b/pr-339/tutorials/overview.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
    On this page

    Tutorials

    Welcome to the Rollkit tutorials section! Here, you'll find a wide range of tutorials and guides designed to help you understand and effectively use Rollkit, the first sovereign rollup framework.

    Whether you're a beginner just starting out, an intermediate user looking to expand your knowledge, or an advanced user seeking to delve into more complex topics, we've got you covered. Our tutorials are categorized based on the level of expertise required, so you can easily find the resources that best suit your needs.

    In this section, you'll find:

    💻 Support

    The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

    Released under the APACHE-2.0 License

    - +
    On this page

    Tutorials

    Welcome to the Rollkit tutorials section! Here, you'll find a wide range of tutorials and guides designed to help you understand and effectively use Rollkit, the first sovereign rollup framework.

    Whether you're a beginner just starting out, an intermediate user looking to expand your knowledge, or an advanced user seeking to delve into more complex topics, we've got you covered. Our tutorials are categorized based on the level of expertise required, so you can easily find the resources that best suit your needs.

    In this section, you'll find:

    💻 Support

    The tutorials will explore developing with Rollkit, which is still in Alpha stage. If you run into bugs, please write a Github issue or let us know in our Telegram. Furthermore, while Rollkit allows you to build sovereign rollups on Celestia, it currently does not support fraud proofs yet and is therefore running in "pessimistic" mode, where nodes would need to re-execute the transactions to check the validity of the chain (i.e. a full node). Furthermore, Rollkit currently only supports a single sequencer.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/polaris-evm.html b/pr-339/tutorials/polaris-evm.html index afa05f059..255f2ab52 100644 --- a/pr-339/tutorials/polaris-evm.html +++ b/pr-339/tutorials/polaris-evm.html @@ -32,7 +32,7 @@ - + @@ -118,8 +118,8 @@ --gateway

    Setup Polaris script

    First, ensure you're on the correct branch of Polaris:

    bash
    cd $HOME/polaris && git checkout rollkit

    Before starting your rollup, you'll want to make a change in $HOME/polaris/e2e/testapp/entrypoint.sh to point to the right DA start height:

    bash
    # set the data availability layer's block height from local-celestia-devnet
     DA_BLOCK_HEIGHT=$(docker exec $(docker ps -q) celestia header local-head --token $AUTH_TOKEN | jq '.result.header.height' -r) 
     DA_BLOCK_HEIGHT=$(curl https://rpc-mocha.pops.one/block |jq -r '.result.block.header.height') 

    Start the EVM rollup

    Change into the Polaris directory in your terminal:

    bash
    cd $HOME/polaris
    -make start

    Congratulations! Your light node is now posting your rollup's data to Celestia's Mocha testnet.

    Find an explorer to view the default namespace in the tutorial or search for your own namespace on Celenium.

    Released under the APACHE-2.0 License

    - +make start

    Congratulations! Your light node is now posting your rollup's data to Celestia's Mocha testnet.

    Find an explorer to view the default namespace in the tutorial or search for your own namespace on Celenium.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/recipe-book.html b/pr-339/tutorials/recipe-book.html index e5d55d771..d8728e260 100644 --- a/pr-339/tutorials/recipe-book.html +++ b/pr-339/tutorials/recipe-book.html @@ -32,7 +32,7 @@ - + @@ -245,8 +245,8 @@ // Return a struct containing a list of recipes and pagination info return &types.QueryDishesResponse{Recipe: dishes, Pagination: pageRes}, nil }

    👩‍🍳 Running the recipes rollup

    ✨ Run a Celestia light node

    Follow instructions to install and start your Celestia Data Availability layer Light Node selecting the Arabica Devnet. You can find instructions to install and run the node here.

    After you have Go and Ignite CLI installed, and your Celestia Light Node running on your machine, you're ready to build, test, and launch your own sovereign rollup.

    Be sure you have initialized your node before trying to start it. Your start command should look similar to:

    bash
    celestia light start --core.ip validator-1.celestia-arabica-11.com --p2p.network arabica

    After you have Go and Ignite CLI installed, and your Celestia Light Node running on your machine, you're ready to build, test, and launch your own sovereign rollup.

    🗞️ Start the recipes rollup

    We have a handy init.sh found in this repo here.

    We can copy it over to our directory with the following commands:

    bash
    # From inside the `recipes` directory
    -wget https://raw.githubusercontent.com/rollkit/docs/main/scripts/recipes/init.sh

    This copies over our init.sh script to initialize our Recipes Rollup.

    You can view the contents of the script to see how we initialize the Recipes Rollup.

    🟢 From your project working directory (recipes/), start the chain with:

    bash
    bash init.sh

    With that, we have kickstarted our recipesd network!

    recipe-start.gif

    Find your account address on an Arabica explorer to see your PayForBlobs transactions.

    Open another teminal instance. Now, create your first recipe in the command line by sending a transaction from recipes-key, when prompted, confirm the transaction by entering y:

    bash
    recipesd tx recipes create-recipe salad "spinach, mandarin oranges, sliced almonds, smoked gouda, citrus vinaigrette" --from recipes-key --keyring-backend test

    recipes.gif

    ⌨️ Query your recipes with the CLI

    To query all of the on-chain recipes:

    bash
    recipesd q recipes dishes

    query.gif

    🎉 Congratulations, again! You have now successfully built a recipe book rollup.

    Released under the APACHE-2.0 License

    - +wget https://raw.githubusercontent.com/rollkit/docs/main/scripts/recipes/init.sh

    This copies over our init.sh script to initialize our Recipes Rollup.

    You can view the contents of the script to see how we initialize the Recipes Rollup.

    🟢 From your project working directory (recipes/), start the chain with:

    bash
    bash init.sh

    With that, we have kickstarted our recipesd network!

    recipe-start.gif

    Find your account address on an Arabica explorer to see your PayForBlobs transactions.

    Open another teminal instance. Now, create your first recipe in the command line by sending a transaction from recipes-key, when prompted, confirm the transaction by entering y:

    bash
    recipesd tx recipes create-recipe salad "spinach, mandarin oranges, sliced almonds, smoked gouda, citrus vinaigrette" --from recipes-key --keyring-backend test

    recipes.gif

    ⌨️ Query your recipes with the CLI

    To query all of the on-chain recipes:

    bash
    recipesd q recipes dishes

    query.gif

    🎉 Congratulations, again! You have now successfully built a recipe book rollup.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/restart-rollup.html b/pr-339/tutorials/restart-rollup.html index 61182109e..bc3ab5132 100644 --- a/pr-339/tutorials/restart-rollup.html +++ b/pr-339/tutorials/restart-rollup.html @@ -32,7 +32,7 @@ - + @@ -70,8 +70,8 @@ 4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=1 module=BlockManager 4:51PM ERR DA layer submission failed Error="Codespace: 'sdk', Code: 19, Message: " attempt=2 module=BlockManager 4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=3 module=BlockManager

    💰 Re-fund your account

    First, you'll need to send more tokens to the account running your Celestia node. If you didn't keep track of your key, you can run the following to get your address:

    bash
    cd $HOME && cd celestia-node
    -./cel-key list --keyring-backend test --node.type light --p2p.network <network>

    🛑 Stopping your rollup

    You can stop your gm chain (or other Rollkit rollup) by using Control + C in your terminal where the node is running.

    ⛽ Increase the gas fee

    To reiterate, before restarting the chain, you will need to increase the gas fee in order to avoid a Code: 19 error:

    bash
    gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656"

    🔁 Restarting your rollup

    Follow the restart rollup section above.

    🛢️ Reduce gas fee & restart again

    In order to save your TIA, we also recommend stopping the chain with Control + C, changing the gas fee back to the default (in our case, 8000 utia) and restarting the chain:

    bash
    gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656"

    🎊 Congrats! You've successfully restarted your Rollkit rollup after running out of TIA.

    Released under the APACHE-2.0 License

    - +./cel-key list --keyring-backend test --node.type light --p2p.network <network>

    🛑 Stopping your rollup

    You can stop your gm chain (or other Rollkit rollup) by using Control + C in your terminal where the node is running.

    ⛽ Increase the gas fee

    To reiterate, before restarting the chain, you will need to increase the gas fee in order to avoid a Code: 19 error:

    bash
    gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656"

    🔁 Restarting your rollup

    Follow the restart rollup section above.

    🛢️ Reduce gas fee & restart again

    In order to save your TIA, we also recommend stopping the chain with Control + C, changing the gas fee back to the default (in our case, 8000 utia) and restarting the chain:

    bash
    gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656"

    🎊 Congrats! You've successfully restarted your Rollkit rollup after running out of TIA.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/rollup-docker.html b/pr-339/tutorials/rollup-docker.html index 032b1f6cb..96db4611b 100644 --- a/pr-339/tutorials/rollup-docker.html +++ b/pr-339/tutorials/rollup-docker.html @@ -32,7 +32,7 @@ - + @@ -58,8 +58,8 @@
    On this page

    Starter Rollup with Docker

    This tutorial will guide you through starting a Rollkit rollup with Docker.

    Prerequisites

    • Docker installed on your machine

    Clone the repository

    First, clone the rollup-docker repository and change into the directory:

    bash
    git clone https://github.com/rollkit/rollup-docker.git && cd rollup-docker

    Released under the APACHE-2.0 License

    - +
    On this page

    Starter Rollup with Docker

    This tutorial will guide you through starting a Rollkit rollup with Docker.

    Prerequisites

    • Docker installed on your machine

    Clone the repository

    First, clone the rollup-docker repository and change into the directory:

    bash
    git clone https://github.com/rollkit/rollup-docker.git && cd rollup-docker

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/starter-rollup.html b/pr-339/tutorials/starter-rollup.html index 460c56c5c..77f5a1e20 100644 --- a/pr-339/tutorials/starter-rollup.html +++ b/pr-339/tutorials/starter-rollup.html @@ -32,7 +32,7 @@ - + @@ -66,8 +66,8 @@ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiLCJhZG1pbiJdfQ.a_-CStbScoe_ot8Z1K9YaccvhngeieiSBdgO4uObuvI

    The auth token is the last string, which you can now set as a variable. (It's long, so don't forget to copy the whole thing!):

    bash
    export AUTH_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiLCJhZG1pbiJdfQ.a_-CStbScoe_ot8Z1K9YaccvhngeieiSBdgO4uObuvI

    Start the Starter Rollup

    bash
    bash init-local.sh

    The rollup logs will begin to look similar to this:

    bash
    3:35PM INF submitting block to DA layer height=1 module=BlockManager
     3:35PM INF successfully submitted Rollkit block to DA layer daHeight=148 module=BlockManager rollkitHeight=1
     3:35PM INF commit synced commit=436F6D6D697449447B5B3230302031373020313933203836203730203334203139302031353220383220313432203133342034382032333520343920363220313720323131203133312032343720313133203634203933203134372032332031353920323435203931203133342031342031333520323138203138355D3A317D
    -3:35PM INF indexed block height=1 module=txindex

    Next steps

    In the next tutorial, you'll learn how to build the GM world rollup using Ignite CLI.

    Released under the APACHE-2.0 License

    - +3:35PM INF indexed block height=1 module=txindex

    Next steps

    In the next tutorial, you'll learn how to build the GM world rollup using Ignite CLI.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/wordle.html b/pr-339/tutorials/wordle.html index 8b7bde26b..f6daf3474 100644 --- a/pr-339/tutorials/wordle.html +++ b/pr-339/tutorials/wordle.html @@ -32,7 +32,7 @@ - + @@ -264,8 +264,8 @@ timestamp: "" tx: null txhash: F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E

    Note, this does not mean the transaction was included in the block yet. Let's query the transaction hash to check whether it has been included in the block yet or if there are any errors.

    bash
    wordled query tx --type=hash F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E --chain-id wordle --output json | jq -r '.raw_log'

    This should display an output like the following:

    json
    [{"events":[{"type":"message","attributes":[{"key":"action","value":"submit_wordle"
    -}]}]}]

    Test out a few things for fun:

    bash
    wordled tx wordle submit-guess 12345 --from wordle-key --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted integers.

    Now try:

    bash
    wordled tx wordle submit-guess ABCDEFG --from wordle-key --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted a word larger than 5 characters.

    Now try to submit another wordle even though one was already submitted

    bash
    wordled tx wordle submit-wordle meter --from wordle-key --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. You will get an error that a wordle has already been submitted for the day.

    Now let’s try to guess a five letter word:

    bash
    wordled tx wordle submit-guess least --from wordle-key --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. Given you didn’t guess the correct word, it will increment the guess count for wordle-key's account.

    We can verify this by querying the list:

    bash
    wordled q wordle list-guess --output json

    This outputs all Guess objects submitted so far, with the index being today’s date and the address of the submitter.

    With that, we implemented a basic example of Wordle using Cosmos-SDK and Ignite and Rollkit. Read on to how you can extend the code base.

    🔮 Extending in the future

    You can extend the codebase and improve this tutorial by checking out the repository here.

    There are many ways this codebase can be extended:

    1. You can improve messaging around when you guess the correct word.
    2. You can hash the word prior to submitting it to the chain, ensuring the hashing is local so that it’s not revealed via front-running by others monitoring the plaintext string when it’s submitted on-chain.
    3. You can improve the UI in terminal using a nice interface for Wordle. Some examples are here.
    4. You can improve current date to stick to a specific timezone.
    5. You can create a bot that submits a wordle every day at a specific time.
    6. You can create a vue.js front-end with Ignite using example open-source repositories here and here.

    Released under the APACHE-2.0 License

    - +}]}]}]

    Test out a few things for fun:

    bash
    wordled tx wordle submit-guess 12345 --from wordle-key --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted integers.

    Now try:

    bash
    wordled tx wordle submit-guess ABCDEFG --from wordle-key --keyring-backend test --chain-id wordle -b async -y

    After confirming the transaction, query the txhash given the same way you did above. You will see the response shows an Invalid Error because you submitted a word larger than 5 characters.

    Now try to submit another wordle even though one was already submitted

    bash
    wordled tx wordle submit-wordle meter --from wordle-key --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. You will get an error that a wordle has already been submitted for the day.

    Now let’s try to guess a five letter word:

    bash
    wordled tx wordle submit-guess least --from wordle-key --keyring-backend test --chain-id wordle -b async -y

    After submitting the transactions and confirming, query the txhash given the same way you did above. Given you didn’t guess the correct word, it will increment the guess count for wordle-key's account.

    We can verify this by querying the list:

    bash
    wordled q wordle list-guess --output json

    This outputs all Guess objects submitted so far, with the index being today’s date and the address of the submitter.

    With that, we implemented a basic example of Wordle using Cosmos-SDK and Ignite and Rollkit. Read on to how you can extend the code base.

    🔮 Extending in the future

    You can extend the codebase and improve this tutorial by checking out the repository here.

    There are many ways this codebase can be extended:

    1. You can improve messaging around when you guess the correct word.
    2. You can hash the word prior to submitting it to the chain, ensuring the hashing is local so that it’s not revealed via front-running by others monitoring the plaintext string when it’s submitted on-chain.
    3. You can improve the UI in terminal using a nice interface for Wordle. Some examples are here.
    4. You can improve current date to stick to a specific timezone.
    5. You can create a bot that submits a wordle every day at a specific time.
    6. You can create a vue.js front-end with Ignite using example open-source repositories here and here.

    Released under the APACHE-2.0 License

    + \ No newline at end of file diff --git a/pr-339/tutorials/zkml.html b/pr-339/tutorials/zkml.html index 93dbb7ff3..2fe0badb3 100644 --- a/pr-339/tutorials/zkml.html +++ b/pr-339/tutorials/zkml.html @@ -32,7 +32,7 @@ - + @@ -143,8 +143,8 @@ transactionHash 0x58096aabd3cb58bdef28501bda01b6cf4a37ed0ba482f81462bc1043bb91f996 transactionIndex 0 type 2 -to 0x5C59C83c099F72FcE832208f96a23a1E43737a14

    TIP

    Note: To see the decoded output of the contract call (to check if the proof was verified), you will need to view the call in a block explorer.

    Congratulations

    Congratulations, you've just verified a zkML circuit on Rollkit.

    For further reading, check out Sindri's blog post explaining how using Sindri + Rollkit x Celestia means verifiable ML doesn’t have to be prohibitively expensive for operators or end users.

    Released under the APACHE-2.0 License

    - +to 0x5C59C83c099F72FcE832208f96a23a1E43737a14

    TIP

    Note: To see the decoded output of the contract call (to check if the proof was verified), you will need to view the call in a block explorer.

    Congratulations

    Congratulations, you've just verified a zkML circuit on Rollkit.

    For further reading, check out Sindri's blog post explaining how using Sindri + Rollkit x Celestia means verifiable ML doesn’t have to be prohibitively expensive for operators or end users.

    Released under the APACHE-2.0 License

    + \ No newline at end of file