diff --git a/guides/reset-state.md b/guides/reset-state.md index e5234bb63..5bddd3794 100644 --- a/guides/reset-state.md +++ b/guides/reset-state.md @@ -14,7 +14,7 @@ Some reason you might need to reset the state of your chain are: ## Prerequisites -In order to complete this guide, you will need to have completed either the [quick start tutorial](/tutorials/quick-start.md) or the [build our chain tutorial](/tutorials/wordle.md). +In order to complete this guide, you will need to have completed either the [quick start tutorial](/tutorials/quick-start.md) or the [build our chain tutorial](/tutorials/gm-world.md). ## Quick Start @@ -50,14 +50,14 @@ ${BINARY} unsafe-clean When you launch your chain again with `rollkit start` your `.rollkit` directory will be re-created and you will see your chain starting at block height 1 again. -## Wordle +## gm-world -When you ran your wordle chain in the [build your chain tutorial](/tutorials/wordle.md), it created a `.wordle` directory. +When you ran your gm-world chain in the [build your chain tutorial](/tutorials/gm-world.md), it created a `.gm` directory in your `$HOME` directory. This directory will look like the following: ```bash -tree $HOME/.wordle +tree $HOME/.gm ├── config │   ├── app.toml @@ -65,9 +65,10 @@ tree $HOME/.wordle │   ├── config.toml │   ├── genesis.json │   ├── gentx -│   │   └── gentx-6e46bd1f53acead98b43e63fcf2bd5435499350d.json +│   │   └── gentx-418077c64f0cf5824c24487c9cce38241de677cd.json │   ├── node_key.json -│   └── priv_validator_key.json +│   ├── priv_validator_key.json +│   └── rollkit.yaml ├── data │   ├── application.db │   │   ├── 000001.log @@ -75,6 +76,17 @@ tree $HOME/.wordle │   │   ├── LOCK │   │   ├── LOG │   │   └── MANIFEST-000000 +│   ├── cache +│   │   ├── data +│   │   │   ├── da_included.gob +│   │   │   ├── hashes.gob +│   │   │   ├── items_by_hash.gob +│   │   │   └── items_by_height.gob +│   │   └── header +│   │   ├── da_included.gob +│   │   ├── hashes.gob +│   │   ├── items_by_hash.gob +│   │   └── items_by_height.gob │   ├── priv_validator_state.json │   ├── rollkit │   │   ├── 000001.sst @@ -82,32 +94,40 @@ tree $HOME/.wordle │   │   ├── DISCARD │   │   ├── KEYREGISTRY │   │   └── MANIFEST -│   └── snapshots -│   └── metadata.db -│   ├── 000001.log -│   ├── CURRENT -│   ├── LOCK -│   ├── LOG -│   └── MANIFEST-000000 +│   ├── snapshots +│   │   └── metadata.db +│   │   ├── 000001.log +│   │   ├── CURRENT +│   │   ├── LOCK +│   │   ├── LOG +│   │   └── MANIFEST-000000 +│   └── tx_index.db +│   ├── 000001.log +│   ├── CURRENT +│   ├── LOCK +│   ├── LOG +│   └── MANIFEST-000000 └── keyring-test - ├── 4a90e750914792c2d7f98775c13a588d9d304bd0.address - ├── 53dab037ac3bd380f4a9192b2c6eedbe95fce180.address + ├── 87af99a184613860ee9563be57a9fb4e7b25acb8.address ├── alice.info - └── bob.info + ├── bob.info + └── e24d9eeca2d24193bdd98ed9116ff70f8a2e2b5e.address ``` -The directories you need to delete to reset your state are in the `.wordle/data` directory. +The directories you need to delete to reset your state are in the `./data` directory. ```bash -$HOME/.wordle/data/application.db -$HOME/.wordle/data/rollkit -$HOME/.wordle/data/snapshots +$HOME/.gm/data/application.db +$HOME/.gm/data/rollkit +$HOME/.gm/data/snapshots +$HOME/.gm/data/cache + ``` You can delete them with the following command: ```bash -rollkit tendermint unsafe-reset-all +gmd tendermint unsafe-reset-all ``` -When you launch your chain again with your `rollkit start ` command, these data directories will be re-created and you will see your chain starting at block height 1 again. +When you launch your chain again with your `gmd start ` command, these data directories will be re-created and you will see your chain starting at block height 1 again. diff --git a/learn/building-and-deploying-a-rollup.md b/learn/building-and-deploying-a-rollup.md deleted file mode 100644 index ce1ab6f45..000000000 --- a/learn/building-and-deploying-a-rollup.md +++ /dev/null @@ -1,36 +0,0 @@ -# 🗞️ 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](https://docs.celestia.org/nodes/mocha-testnet) -or [Arabica devnet](https://docs.celestia.org/nodes/arabica-devnet). We call those chains Sovereign Rollups. - -You can get started with the following tutorials: - -## 1. Beginner {#beginner} - -- [GM world](/tutorials/gm-world) -- [Restart your rollup](/guides/restart-rollup) - -## 2️. Intermediate {#intermediate} - -- [Wordle game](/tutorials/wordle) -- [CosmWasm rollup](/tutorials/cosmwasm) - -## 3️. Advanced {#advanced} - -- [Full-stack modular dapp with Celestia](https://docs.celestia.org/developers/full-stack-modular-development-guide) - -## 💻 Support {#support} - -The tutorials will explore developing with Rollkit, -which is still in Alpha stage. If you run into bugs, please write a GitHub -[issue](https://github.com/rollkit/docs/issues/new) -or let us know in our [Telegram](https://t.me/rollkit). -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. diff --git a/tutorials/da/local-da.md b/tutorials/da/local-da.md index 1e225596f..e04b98d74 100644 --- a/tutorials/da/local-da.md +++ b/tutorials/da/local-da.md @@ -9,7 +9,7 @@ import constants from '../../.vitepress/constants/constants.js' This tutorial serves as a comprehensive guide for using the [local-da](https://github.com/rollkit/local-da) with your chain. -Before proceeding, ensure that you have completed the [quick start](/tutorials/quick-start) or [build a chain](/tutorials/wordle) tutorial, which covers installing the rollkit CLI, building your chain, and running your chain. +Before proceeding, ensure that you have completed the [quick start](/tutorials/quick-start) or [build a chain](/tutorials/gm-world.md) tutorial, which covers installing the rollkit CLI, building your chain, and running your chain. ## Setting Up a Local DA Network @@ -35,11 +35,11 @@ Start your rollup node with the following command, ensuring to include the DA ad {BINARY} start --rollkit.da.address http://localhost:7980 ``` -```sh [Wordle Chain] +```sh [gm-world Chain] {BINARY} start \ --rollkit.aggregator \ --rollkit.da.address http://localhost:7980 \ - --rollkit.sequencer_rollup_id wordle + --rollkit.sequencer_rollup_id gmd ``` ::: diff --git a/tutorials/da/overview.md b/tutorials/da/overview.md index cf254bfda..3c433053c 100644 --- a/tutorials/da/overview.md +++ b/tutorials/da/overview.md @@ -19,9 +19,6 @@ The [DA interface](https://github.com/rollkit/rollkit/blob/main/core/da/da.go#L1 ```go // DA defines very generic interface for interaction with Data Availability layers. type DA interface { - // MaxBlobSize returns the max blob size - MaxBlobSize(ctx context.Context) (uint64, error) - // Get returns Blob for each given ID, or an error. // // Error should be returned if ID is not formatted properly, there is no Blob for given ID or any other client-level @@ -61,7 +58,7 @@ type DA interface { ## Mock DA {#mock-da} -You might have noticed that we did not define any DA layer during the [quick start](../quick-start.md) or [build a chain](../wordle.md) tutorials. This is because we used a mock DA layer that is built into Rollkit. +You might have noticed that we did not define any DA layer during the [quick start](../quick-start.md) or [build a chain](/tutorials/gm-world.md) tutorials. This is because we used a mock DA layer that is built into Rollkit. If you revisit the logs from those tutorials, you will see one of the first lines being: diff --git a/tutorials/docker-compose.md b/tutorials/docker-compose.md index 2555db5b7..8417d48ef 100644 --- a/tutorials/docker-compose.md +++ b/tutorials/docker-compose.md @@ -1,6 +1,6 @@ # 🐳 Docker Compose -This tutorial is going to show you how to deploy the [wordle chain](/tutorials/wordle.md) using Docker Compose. +This tutorial is going to show you how to deploy the [gm-world chain](/tutorials/gm-world.md) using Docker Compose. You can learn more about Docker Compose [here](https://docs.docker.com/compose/). @@ -17,7 +17,7 @@ import constants from '../.vitepress/constants/constants.js' ## 💻 Pre-requisites {#prerequisites} -Make sure you have your wordle chain ready by completing [the Build your chain tutorial](/tutorials/wordle.md). +Make sure you have your gm-world chain ready by completing [the Build your chain tutorial](/tutorials/gm-world.md). ## 🛠️ Dependencies {#dependencies} @@ -46,11 +46,11 @@ To save time, we can use their respective Dockerfiles: * [local-da Dockerfile](https://github.com/rollkit/local-da/blob/main/Dockerfile) * [local-sequencer Dockerfile](https://github.com/rollkit/go-sequencing/blob/main/Dockerfile) -This will allow us to focus on how we can run the wordle chain with Docker Compose. +This will allow us to focus on how we can run the gm-world chain with Docker Compose. ### 🐳 Dockerfile {#dockerfile} -First, we need to create a Dockerfile for our wordle chain. Create a new file called `Dockerfile` in the root of the `wordle` directory and add the following code: +First, we need to create a Dockerfile for our gm-world chain. Create a new file called `Dockerfile` in the root of the `gm` directory and add the following code: ```dockerfile-vue # Stage 1: Install ignite CLI and rollkit @@ -110,9 +110,9 @@ COPY --from=base /go/bin/rollkit /usr/bin COPY --from=base /app/entrypoint ./entrypoint COPY --from=base /app/rollkit.toml ./rollkit.toml -# Copy the $HOME/.wordle directory from the build stage. +# Copy the $HOME/.gm directory from the build stage. # This directory contains all your chain config. -COPY --from=base /root/.wordle /root/.wordle +COPY --from=base /root/.gm /root/.gm # Ensure the entrypoint script is executable RUN chmod +x ./entrypoint @@ -121,16 +121,16 @@ RUN chmod +x ./entrypoint # CMD tail -f /dev/null ENTRYPOINT [ "rollkit" ] -CMD [ "start", "--rollkit.aggregator", "--rollkit.sequencer_rollup_id", "wordle"] +CMD [ "start", "--rollkit.aggregator", "--rollkit.sequencer_rollup_id", "gmd"] ``` -This Dockerfile sets up the environment to build the chain and run the wordle node. It then sets up the runtime environment to run the chain. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new chain. +This Dockerfile sets up the environment to build the chain and run the gm-world node. It then sets up the runtime environment to run the chain. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new chain. Build the docker image by running the following command: ```bash -docker build -t wordle . +docker build -t gm-world . ``` You can then see the built image by running: @@ -143,23 +143,23 @@ You should see the following output: ```bash REPOSITORY TAG IMAGE ID CREATED SIZE -wordle latest 5d3533c1ea1c 8 seconds ago 443MB +gm-world latest 5d3533c1ea1c 8 seconds ago 443MB ``` ### 🐳 Docker Compose file {#docker-compose-file} Next we need to create our `compose.yaml` file for docker compose to use. -In the root of the `wordle` directory, create a new file called `compose.yaml` and add the following code: +In the root of the `gm` directory, create a new file called `compose.yaml` and add the following code: ```yml-vue services: - # Define the wordle chain service - wordle: + # Define the gm-world chain service + gm-world: # Set the name of the docker container for ease of use - container_name: wordle + container_name: gm-world # Use the image we just built - image: wordle + image: gm-world # Used for networking between the two services network_mode: host # The command config is used for launching the chain once the Docker container is running @@ -172,7 +172,7 @@ services: "--rollkit.sequencer_address", "0.0.0.0:50051", "--rollkit.sequencer_rollup_id", - "wordle", + "gm", ] # Ensures the local-da service is up and running before starting the chain depends_on: @@ -197,18 +197,18 @@ services: ghcr.io/rollkit/go-sequencing:{{constants.goSequencingLatestTag}} # Set the name of the docker container for ease of use container_name: local-sequencer - # Start the sequencer with the listen all flag and the rollup id set to wordle - command: ["-listen-all", "-rollup-id=wordle"] + # Start the sequencer with the listen all flag and the rollup id set to gm + command: ["-listen-all", "-rollup-id=gm"] # Publish the ports to connect ports: - "50051:50051" ``` -We now have all we need to run the wordle chain and connect to a local DA node. +We now have all we need to run the gm-world chain and connect to a local DA node. -### 🚀 Run Wordle chain {#run-wordle-chain} +### 🚀 Run gm-world chain {#run-gm-world-chain} -Run your wordle chain by running the following command: +Run your gm-world chain by running the following command: ```bash docker compose up @@ -216,13 +216,13 @@ docker compose up You'll see logs of your chain being output. -Congratulations! You have successfully run the wordle chain with Docker Compose. +Congratulations! You have successfully run the gm-world chain with Docker Compose. ## 🚀 Interacting with the chain {#interacting-with-the-chain} Since we are using docker images, we can interact with the chain by entering the docker container. -You can see the docker containers running with the wordle chain and the local DA node by running the following command: +You can see the docker containers running with the gm-world chain and the local DA node by running the following command: ```bash docker ps @@ -232,20 +232,20 @@ You should see output like the following: ```bash CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -86f9bfa5b6d2 wordle "rollkit start --rol…" 7 minutes ago Up 3 seconds wordle +86f9bfa5b6d2 gm-world "rollkit start --rol…" 7 minutes ago Up 3 seconds gm-world 67a2c3058e01 local-sequencer "local-sequencer -li…" 11 minutes ago Up 3 seconds 0.0.0.0:50051->50051/tcp local-sequencer dae3359665f8 local-da "local-da -listen-all" 2 hours ago Up 3 seconds 0.0.0.0:7980->7980/tcp local-da ``` -We can see the wordle chain running in container `wordle` and the local DA network running in container `local-da`. +We can see the gm-world chain running in container `gm-world` and the local DA network running in container `local-da`. Since our chain is running in a docker container, we want to enter the docker container to interact with it via the Rollkit CLI. We can do this by running: ```bash -docker exec -it wordle sh +docker exec -it gm-world sh ``` -Now that you are in the docker container, you can interact with the chain using the Rollkit CLI and the example commands you used in the [Wordle tutorial](/tutorials/wordle#interacting-with-the-chain). +Now that you are in the docker container, you can interact with the chain using the Rollkit CLI and the example commands you used in the [gm-world tutorial](/tutorials/gm-world.md). Once you are done interacting with your chain, you can exit out of your docker container with: