diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 1f02318b8..fbd4c286f 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -157,6 +157,7 @@ function sidebarHome() { items: [ { text: 'Introduction to Rollkit', link: '/learn/intro'}, { text: 'About Rollkit', link: '/learn/about' }, + { text: 'Readme', link: '/learn/readme' }, ] }, { @@ -166,7 +167,6 @@ function sidebarHome() { { text: 'Overview', link: '/learn/overview'}, { text: 'Rollkit stack', link: '/learn/stack' }, { text: 'Transaction flow', link: '/learn/transaction-flow' }, - { text: 'Building with Rollkit', link: '/learn/building-with-rollkit'}, { text: 'Rollup Wiki', collapsed: true, diff --git a/blog/introducing-rollkit.md b/blog/introducing-rollkit.md index c5a6e88b8..f5c2c64be 100644 --- a/blog/introducing-rollkit.md +++ b/blog/introducing-rollkit.md @@ -77,7 +77,7 @@ Rollkit will support a multitude of proof schemes to ensure the execution of you Rollkit will allow you to build a diverse range of rollups, including sovereign rollups, settlement rollups and settled rollups. -Rollkit is in an early stage of development and many features remain to be built to reach this vision. In its [current state](/learn/stack), Rollkit rollups are [sovereign rollups](https://blog.celestia.org/sovereign-rollup-chains) with single sequencers, with support for a pessimistic mode and a [work-in-progress optimistic mode](https://github.com/rollkit/rollkit/blob/manav/state_fraud_proofs_adr/docs/lazy-adr/adr-009-state-fraud-proofs.md). [Integration tutorials](/learn/building-with-rollkit) are ready and available with Cosmos SDK, Ethermint, and CosmWasm. +Rollkit is in an early stage of development and many features remain to be built to reach this vision. In its [current state](/learn/stack), Rollkit rollups are [sovereign rollups](https://blog.celestia.org/sovereign-rollup-chains) with single sequencers, with support for a pessimistic mode and a [work-in-progress optimistic mode](https://github.com/rollkit/rollkit/blob/manav/state_fraud_proofs_adr/docs/lazy-adr/adr-009-state-fraud-proofs.md). [Integration tutorials](/learn/intro) are ready and available with Cosmos SDK, Ethermint, and CosmWasm. We invite the community to collaborate with us to build new features. Each new team that joins the growing Rollkit community brings more firepower to ship new features that we all benefit from. This is the power of modularity in action. diff --git a/importReadme.mjs b/importReadme.mjs new file mode 100644 index 000000000..adf09143e --- /dev/null +++ b/importReadme.mjs @@ -0,0 +1,26 @@ +import fs from 'fs'; +import fetch from 'node-fetch'; + +const filesToImport = [ + { + url: 'https://raw.githubusercontent.com/rollkit/rollkit/main/README.md', + fileName: 'readme.md', + }, +]; + +async function importReadme(file) { + try { + const response = await fetch(file.url); + if (response.ok) { + const markdown = await response.text(); + fs.writeFileSync(`./learn/${file.fileName}`, markdown); + console.log(`Markdown file '${file.fileName}' successfully imported!`); + } else { + console.error(`Error fetching the markdown file: ${response.statusText}`); + } + } catch (error) { + console.error(`Error importing the markdown file: ${error.message}`); + } +} + +filesToImport.forEach(importReadme); diff --git a/index.md b/index.md index fcd62ec5a..c9661c336 100644 --- a/index.md +++ b/index.md @@ -29,7 +29,7 @@ features: icon: 📈 - title: Flexible details: Freedom to configure the execution environment and other components - link: /learn/building-with-rollkit + link: /learn/intro icon: ⚙️ - title: Easy to deploy details: Deploy a rollup with only a few command lines diff --git a/learn/building-with-rollkit.md b/learn/building-with-rollkit.md deleted file mode 100644 index 542bc71ca..000000000 --- a/learn/building-with-rollkit.md +++ /dev/null @@ -1,111 +0,0 @@ -# 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 from source - -### Dependencies - -* Requires Go version >= 1.19 - -To build: - -```sh -git clone https://github.com/rollkit/rollkit.git -cd rollkit -go build -v ./... -``` - -## Building on Celestia - -There are currently 2 ways to build on Celestia: - -1. Using a local development environment with [local-celestia-devnet](https://github.com/rollkit/local-celestia-devnet) -2. Using the Arabica or Mocha Celestia testnets* - -### Compatibility - -| network | rollkit | celestia-node | celestia-app | -|-----------------------|------------|---------------|--------------| -| local-celestia-devnet | v0.10.2 | v0.11.0-rc8 | v1.0.0-rc7 | -| arabica | v0.10.2 | v0.11.0-rc8 | v1.0.0-rc7 | - -| rollkit/cosmos-sdk | rollkit/cometbft | rollkit | -|---------------------------------------------|------------------------------------|------------| -| v0.47.3-rollkit-v0.10.2-no-fraud-proofs | v0.37.2 | v0.10.2 | -| v0.45.16-rollkit-v0.9.0-no-fraud-proofs | v0.0.0-20230524013001-2968c8b8b121 | v0.9.0 | - -### Local Development Environment - -The Rollkit v0.10.2 release is compatible with the -[local-celestia-devnet](https://github.com/rollkit/local-celestia-devnet) [oolong](https://github.com/rollkit/local-celestia-devnet/releases/tag/v0.11.0-rc8) -release. This version combination is compatible with celestia-app -[v1.0.0-rc7](https://github.com/celestiaorg/celestia-app/releases/tag/v1.0.0-rc7) -and celestia-node -[v0.11.0-rc8](https://github.com/celestiaorg/celestia-node/releases/tag/v0.11.0-rc8). - -### Arabica devnet and Mocha testnet - -::: warning -**Rollkit v0.10.2 is not compatible with latest release of Mocha.** -::: - -The Rollkit v0.10.2 release is compatible with Arabica devnet which is -running celestia-app -[v1.0.0-rc7](https://github.com/celestiaorg/celestia-app/releases/tag/v1.0.0-rc7) -and celestia-node -[v0.11.0-rc8](https://github.com/celestiaorg/celestia-node/releases/tag/v0.11.0-rc8). - -## Testing - -1. Install [golangci-lint](https://golangci-lint.run/usage/install/) -2. Install [markdownlint](https://github.com/DavidAnson/markdownlint) -3. Install [hadolint](https://github.com/hadolint/hadolint) -4. Install [yamllint](https://yamllint.readthedocs.io/en/stable/quickstart.html) - -### Helpful Commands - -```sh -# Run unit tests -make test-unit - -# Run unit tests with the data race detector -make test-unit-race - -# Run tests with and without the data race detector -make test-all - -# Generate protobuf files (requires Docker) -make proto-gen - -# Run linters (requires golangci-lint, markdownlint, hadolint, and yamllint) -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 Issues](https://github.com/rollkit/rollkit/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) on GitHub. -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](https://github.com/rollkit/rollkit/tree/main/CONTRIBUTING.md) for more details. - -Please join our [Community Telegram](https://t.me/rollkit) -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](https://github.com/rollkit/rollkit/tree/main/docs/specification/rollkit-dependency-graph.md). diff --git a/learn/overview.md b/learn/overview.md index 4e9182529..f289451e5 100644 --- a/learn/overview.md +++ b/learn/overview.md @@ -12,6 +12,5 @@ transaction flow, building with Rollkit, a glossary, and more. - [Rollkit Stack](/learn/stack) - [Transaction Flow](/learn/transaction-flow) -- [Building with Rollkit](/learn/building-with-rollkit) - Rollup Wiki - [A-Z Glossary](/learn/rollup-glossary) diff --git a/learn/readme.md b/learn/readme.md new file mode 100644 index 000000000..647b943c9 --- /dev/null +++ b/learn/readme.md @@ -0,0 +1,129 @@ +# Rollkit + +A modular framework for rollups, with an ABCI-compatible client interface. For more in-depth information about Rollkit, please visit our [website](https://rollkit.dev). + + +[![build-and-test](https://github.com/rollkit/rollkit/actions/workflows/test.yml/badge.svg)](https://github.com/rollkit/rollkit/actions/workflows/test.yml) +[![golangci-lint](https://github.com/rollkit/rollkit/actions/workflows/lint.yml/badge.svg)](https://github.com/rollkit/rollkit/actions/workflows/lint.yml) +[![Go Report Card](https://goreportcard.com/badge/github.com/rollkit/rollkit)](https://goreportcard.com/report/github.com/rollkit/rollkit) +[![codecov](https://codecov.io/gh/rollkit/rollkit/branch/main/graph/badge.svg?token=CWGA4RLDS9)](https://codecov.io/gh/rollkit/rollkit) +[![GoDoc](https://godoc.org/github.com/rollkit/rollkit?status.svg)](https://godoc.org/github.com/rollkit/rollkit) + + +## Building from source + +Requires Go version >= 1.20. + +To build: + +```sh +git clone https://github.com/rollkit/rollkit.git +cd rollkit +go build -v ./... +``` + +## 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 + +There are currently 2 ways to build on Celestia: + +1. Using a local development environment with [local-celestia-devnet](https://github.com/rollkit/local-celestia-devnet) +1. Using the Arabica or Mocha Celestia testnet + +#### Compatibility + +| network | rollkit | celestia-node | celestia-app | +| --------------------- | ------- | ------------- | ------------ | +| local-celestia-devnet | v0.10.5 | v0.11.0 | v1.1.0 | +| arabica | v0.10.5 | v0.11.0 | v1.1.0 | + + +| rollkit/cosmos-sdk | rollkit/cometbft | rollkit | +|-|-|-| +| [v0.47.3-rollkit-v0.10.5-no-fraud-proofs](https://github.com/rollkit/cosmos-sdk/releases/tag/v0.47.3-rollkit-v0.10.5-no-fraud-proofs)| v0.37.2 | [v0.10.5](https://github.com/rollkit/rollkit/releases/tag/v0.10.5)| +| [v0.50.0-rc.0-rollkit-v0.11.0-rc1-no-fraud-proofs](https://github.com/rollkit/cosmos-sdk/releases/tag/v0.50.0-rc.0-rollkit-v0.11.0-rc1-no-fraud-proofs) | v0.38.0-rc3| [v0.11.0-rc1](https://github.com/rollkit/rollkit/releases/tag/v0.11.0-rc1) | + + +#### Local development environment + +The Rollkit v0.10.5 release is compatible with the +[local-celestia-devnet](https://github.com/rollkit/local-celestia-devnet) [v0.11.0](https://github.com/rollkit/local-celestia-devnet/releases/tag/v0.11.0) +release. This version combination is compatible with celestia-app +[v1.1.0](https://github.com/celestiaorg/celestia-app/releases/tag/v1.1.0) +and celestia-node +[v0.11.0](https://github.com/celestiaorg/celestia-node/releases/tag/v0.11.0). + +#### Arabica devnet and Mocha testnet + +The Rollkit v0.10.5 release is compatible with +[arabica-10](https://docs.celestia.org/nodes/arabica-devnet/) devnet +[mocha-4](https://docs.celestia.org/nodes/mocha-testnet/) testnet which are running +celestia-app +[v1.1.0](https://github.com/celestiaorg/celestia-app/releases/tag/v1.1.0) +and celestia-node +[v0.11.0](https://github.com/celestiaorg/celestia-node/releases/tag/v0.11.0). + +#### Cometbft v0.38.x and Cosmos-SDK v0.50.x + +The Rollkit v0.11.0-rc1 release is compatible with Cometbft v0.38.0-rc3 and Cosmos-SDK +v0.50.0-rc.0. However, there is no support by ignite for launching a compatible app +(e.g. gm app) and Rollkit is working on building a gm app for testing this +release (WIP). + +### Tools + +1. Install [golangci-lint](https://golangci-lint.run/usage/install/) +1. Install [markdownlint](https://github.com/DavidAnson/markdownlint) +1. Install [hadolint](https://github.com/hadolint/hadolint) +1. Install [yamllint](https://yamllint.readthedocs.io/en/stable/quickstart.html) + +## Helpful commands + +```sh +# Run unit tests +make test + +# Generate protobuf files (requires Docker) +make proto-gen + +# Run linters (requires golangci-lint, markdownlint, hadolint, and yamllint) +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](https://github.com/rollkit/rollkit/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). +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](https://github.com/rollkit/rollkit/blob/main/CONTRIBUTING.md) +for more details. + +Please join our +[Community Discord](https://discord.com/invite/YsnTPcSfWQ) +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](https://github.com/rollkit/rollkit/blob/main/specs/src/specs/rollkit-dependency-graph.md). + +## Code of Conduct + +See our Code of Conduct [here](https://docs.celestia.org/community/coc). diff --git a/package.json b/package.json index 316567e90..51c08b306 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,16 @@ "scripts": { "docs:dev": "vitepress dev", "docs:build": "vitepress build", - "docs:preview": "vitepress preview" + "docs:preview": "vitepress preview", + "import-readme": "node importReadme.mjs" }, "devDependencies": { "i": "^0.3.7", "mermaid": "^10.3.0", "vitepress": "1.0.0-rc.4", "vitepress-plugin-mermaid": "^2.0.13" + }, + "dependencies": { + "node-fetch": "^3.3.2" } } diff --git a/yarn.lock b/yarn.lock index 5bab1af20..e83739859 100644 --- a/yarn.lock +++ b/yarn.lock @@ -831,6 +831,11 @@ dagre-d3-es@7.0.10: d3 "^7.8.2" lodash-es "^4.17.21" +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + dayjs@^1.11.7: version "1.11.9" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.9.tgz#9ca491933fadd0a60a2c19f6c237c03517d71d1a" @@ -910,6 +915,14 @@ estree-walker@^2.0.2: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + focus-trap@^7.5.2: version "7.5.2" resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-7.5.2.tgz#e5ee678d10a18651f2591ffb66c949fb098d57cf" @@ -917,6 +930,13 @@ focus-trap@^7.5.2: dependencies: tabbable "^6.2.0" +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" @@ -1261,6 +1281,20 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + non-layered-tidy-tree-layout@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/non-layered-tidy-tree-layout/-/non-layered-tidy-tree-layout-2.0.2.tgz#57d35d13c356643fc296a55fb11ac15e74da7804" @@ -1429,6 +1463,11 @@ vue@^3.3.4: "@vue/server-renderer" "3.3.4" "@vue/shared" "3.3.4" +web-streams-polyfill@^3.0.3: + version "3.2.1" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" + integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== + web-worker@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.2.0.tgz#5d85a04a7fbc1e7db58f66595d7a3ac7c9c180da"