From fe845b2b323a08d47882f0890c056178aafd00ae Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:45:41 -0400 Subject: [PATCH 01/16] chore: remove Rollkit has menu section and update naming Remove GM tutorial, add language around choosing DA and Execution --- .vitepress/config.ts | 80 +++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index d8294bdda..1d83a10a2 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -218,19 +218,9 @@ function sidebarHome() { text: "Quick start guide", link: "/tutorials/quick-start", }, + { text: "Build a Rollup", link: "/tutorials/wordle" }, { - text: "Rollkit", - collapsed: true, - items: [ - { - text: "GM world rollup", - link: "/tutorials/gm-world", - }, - { text: "Wordle app", link: "/tutorials/wordle" }, - ], - }, - { - text: "DA", + text: "Connect Your DA", collapsed: true, items: [ { @@ -244,21 +234,27 @@ function sidebarHome() { ], }, { - text: "Execution", + text: "Choose You Execution", collapsed: true, items: [ - { text: "CosmWasm rollup", link: "/tutorials/cosmwasm" }, - { + { text: "CosmWasm", link: "/tutorials/cosmwasm" }, + { text: "EVM", - collapsed: true, - items: [ + collapsed: true, + items: [ { text: "Omni Octane EVM", link: "/tutorials/octane-evm" }, - { text: "BeaconKit EVM", link: "/tutorials/beaconkit" }, - { text: "Artela EVM++", link: "/tutorials/artela-evm-plus-plus" }, - { text: "Contract interaction", link: "/tutorials/evm-contract-interaction" }, - ] - }, - ], + { text: "BeaconKit EVM", link: "/tutorials/beaconkit" }, + { + text: "Artela EVM++", + link: "/tutorials/artela-evm-plus-plus", + }, + { + text: "Contract interaction", + link: "/tutorials/evm-contract-interaction", + }, + ], + }, + ], }, ], }, @@ -324,25 +320,25 @@ function sidebarHome() { text: "Integrations", collapsed: true, items: [ - { - text: "Test and deploy cosmwasm smart-contracts", - link: "/guides/cw-orch", - }, - { text: "Add zkML to your EVM rollup", link: "/guides/zkml" }, - { - text: "Add an IBC connection to your rollup", - link: "/guides/ibc-connection", - }, - { - text: "Integrate Range with your rollup", - link: "/guides/rollkit-monitoring", - }, - { - text: "Use IBC token (TIA) as gas token in your rollup", - link: "/guides/use-tia-for-gas", - }, - ], - }, + { + text: "Test and deploy cosmwasm smart-contracts", + link: "/guides/cw-orch", + }, + { text: "Add zkML to your EVM rollup", link: "/guides/zkml" }, + { + text: "Add an IBC connection to your rollup", + link: "/guides/ibc-connection", + }, + { + text: "Integrate Range with your rollup", + link: "/guides/rollkit-monitoring", + }, + { + text: "Use IBC token (TIA) as gas token in your rollup", + link: "/guides/use-tia-for-gas", + }, + ], + }, ], }, { From ef45b40986f909aedba5830e5fa5f2b62e8c650f Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:35:01 -0400 Subject: [PATCH 02/16] feat: create deploy your rollup section Remove kurtosis from wordle tutorial. Rename wordle tutorial in menu to build your rollup. Create overview for deployments sections. Create docker compose deployment tutorial. Create kurtosis deployment tutorial. Refactor tutorials to reduce duplication. --- .vitepress/config.ts | 18 ++ tutorials/deploy-overview.md | 20 ++ tutorials/docker-compose.md | 224 +++++++++++++ tutorials/kurtosis.md | 282 +++++++++++++++++ tutorials/wordle.md | 592 ++++++++--------------------------- 5 files changed, 666 insertions(+), 470 deletions(-) create mode 100644 tutorials/deploy-overview.md create mode 100644 tutorials/docker-compose.md create mode 100644 tutorials/kurtosis.md diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 1d83a10a2..2bb30e2ba 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -256,6 +256,24 @@ function sidebarHome() { }, ], }, + { + text: "Deploy Your Rollup", + collapsed: true, + items: [ + { + text: "Overview", + link: "/tutorials/deploy-overview", + }, + { + text: "Docker Compose", + link: "/tutorials/docker-compose", + }, + { + text: "Kurtosis", + link: "/tutorials/kurtosis", + }, + ], + }, ], }, { diff --git a/tutorials/deploy-overview.md b/tutorials/deploy-overview.md new file mode 100644 index 000000000..b246d93eb --- /dev/null +++ b/tutorials/deploy-overview.md @@ -0,0 +1,20 @@ +--- +description: This page provides an overview of some common ways to deploy rollups. +--- + +# Deploying Your Rollup + +One of the benefits of building rollups with Rollkit is the flexibility you have as a developer to choose things like the DA layer, the settlement scheme, and the execution environment. + +The challenge that comes with this flexibility is that there are more services that now need to be deployed and managed while running your rollup. + +In the tutorials so far, you've seen various helper scripts used to make things easier. While great for tutorials, there are better ways to deploy and manage rollups than using various bash scripts. + +In this section, you'll see a few examples of how you can deploy your rollup environment with all your services running in a more production-ready way. + +:::warning Disclaimer +These examples are for educational purposes only. Before deploying your rollup for production use you should fully understand the services you are deploying and your choice in deployment method. +::: + +* [Deploy with Docker Compose](/tutorials/docker-compose) +* [Deploy with Kurtosis](/tutorials/kurtosis) diff --git a/tutorials/docker-compose.md b/tutorials/docker-compose.md new file mode 100644 index 000000000..029ff7734 --- /dev/null +++ b/tutorials/docker-compose.md @@ -0,0 +1,224 @@ +# ๐Ÿณ Docker Compose + +This tutorial is going to show you how to deploy the [wordle rollup](/tutorials/wordle.md) using Docker Compose. + +You can learn more about Docker Compose [here](https://docs.docker.com/compose/). + + + + +:::tip + +::: + + +## ๐Ÿ’ป Pre-requisites {#prerequisites} + +Make sure you have your wordle rollup ready by completing [the Build Your Rollup tutorial](/tutorials/wordle.md). + +## ๐Ÿ› ๏ธ Dependencies {#dependencies} + +### ๐Ÿ’ป Docker Compose {#docker-compose} + +You can [install docker compose here](https://docs.docker.com/compose/install/). + +Once installed, you can verify the installation by running: + +```bash +docker compose version +``` +```bash +Docker Compose version v2.23.0-desktop.1 +``` + +## ๐Ÿ› ๏ธ Setting up Your Environment {#setting-up-your-environment} + +The wordle rollup is a relatively simple rollup in that there are just 2 nodes involved: the rollup and the data availability network (DA) node. + +We will use a local DA node for this tutorial and run it with our rollup. + +To save time, we can use the [local DA Dockerfile found here.](https://github.com/rollkit/local-da/blob/main/Dockerfile) + +This will allow us to focus on how we can run the wordle rollup with Docker Compose. + +### ๐Ÿณ Dockerfile {#dockerfile} + +First, we need to create a Dockerfile for our wordle rollup. Create a new file called `Dockerfile` in the root of the `wordle` directory and add the following code: + +```dockerfile +# Stage 1: Install ignite CLI and rollkit +FROM golang as base + +# Install dependencies +RUN apt update && \ + apt-get install -y \ + build-essential \ + ca-certificates \ + curl + +# Install rollkit +RUN curl -sSL https://rollkit.dev/install.sh | sh -s v0.13.6 + +# Install ignite +RUN curl https://get.ignite.com/cli@v28.4.0! | bash + +# Set the working directory +WORKDIR /app + +# cache dependencies. +COPY ./go.mod . +COPY ./go.sum . +RUN go mod download + +# Copy all files from the current directory to the container +COPY . . + +# Build the chain +RUN ignite chain build && ignite rollkit init --local-da + +# Initialize the rollkit.toml file +RUN rollkit toml init + +# Run rollkit command to initialize the entrypoint executable +RUN rollkit + +# Stage 2: Set up the runtime environment +FROM debian:bookworm-slim + +# Install jq +RUN apt update && \ + apt-get install -y \ + jq + +# Set the working directory +WORKDIR /root + +# Copy over the rollkit binary from the build stage +COPY --from=base /go/bin/rollkit /usr/bin + +# Copy the entrypoint and rollkit.toml files from the build stage +COPY --from=base /app/entrypoint ./entrypoint +COPY --from=base /app/rollkit.toml ./rollkit.toml + +# Copy the $HOME/.wordle directory from the build stage. +# This directory contains all your chain config. +COPY --from=base /root/.wordle /root/.wordle + +# Ensure the entrypoint script is executable +RUN chmod +x ./entrypoint + +# Keep the container running after it has been started +CMD tail -f /dev/null +``` + +This Dockerfile sets up the environment to build the rollup and run the wordle node. It then sets up the runtime environment to run the rollup. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new rollup. + +Build the docker image by running the following command: + +```bash +docker build -t wordle . +``` + +You can then see the built image by running: + +```bash +docker images +``` + +You should see the following output: + +```bash +REPOSITORY TAG IMAGE ID CREATED SIZE +wordle 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: + +```yml +version: "3" +services: + # Define the wordle rollup service + wordle: + # Set the name of the docker container for ease of use + container_name: wordle + # Use the image we just built + image: wordle + # Used for networking between the two services + network_mode: host + # The command config is used for launching the GM rollup once the Docker container is running + command: rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 + # Ensures the local-da service is up and running before starting the rollup + depends_on: + - local-da + + # Define the local DA service + local-da: + # Use the published image from rollkit + image: ghcr.io/rollkit/local-da:v0.2.1 + # Set the name of the docker container for ease of use + container_name: local-da + # Publish the ports to connect + ports: + - "7980:7980" +``` + +We now have all we need to run the wordle rollup and connect to a local DA node. + +### ๐Ÿš€ Run Wordle Rollup {#run-wordle-rollup} + +Run your wordle rollup by running the following command: + +```bash +docker compose up +``` + +You'll see logs of your rollup being output. + +Congratulations! You have successfully run the wordle rollup with Docker Compose. + +## ๐Ÿš€ Interacting with the Rollup {#interacting-with-the-rollup} + +Since we are using docker images, we can interact with the rollup by entering the docker container. + +You can see the docker containers running with the wordle rollup and the local DA node by running the following command: + +```bash +docker ps +``` + +You should see output like the following: + +```bash +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +cbf66a881cb2 wordle:latest "/bin/sh -c 'rollkitโ€ฆ" 5 seconds ago Up 4 seconds 0.0.0.0:26657->26657/tcp wordle +09bdf1e94862 ghcr.io/rollkit/local-da:v0.2.1 "local-da -listen-all" 6 seconds ago Up 5 seconds 0.0.0.0:7980->7980/tcp local-da +``` + +We can see the wordle rollup running in container `wordle` and the local DA network running in container `local-da`. + +Since our rollup 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 +``` + +Now that you are in the docker container, you can interact with the rollup using the Rollkit CLI and the example commands you used in the [Wordle tutorial](/tutorials/wordle#interacting-with-the-rollup). + +Once you are done interacting with your rollup, you can exit out of your docker container with: + +```bash +exit +``` + +Then you can shut down your rollup environment by running `CRTL+C` in your terminal. + +## ๐ŸŽ‰ Next steps + +Congratulations again! You now know how to run your rollup with docker compose and interact with it using the Rollkit CLI in the docker container. diff --git a/tutorials/kurtosis.md b/tutorials/kurtosis.md new file mode 100644 index 000000000..44a294a18 --- /dev/null +++ b/tutorials/kurtosis.md @@ -0,0 +1,282 @@ +# ๐ŸŸฉ Kurtosis + +This tutorial is going to show you how to deploy the [wordle rollup](/tutorials/wordle.md) using Kurtosis. + +You can learn more about Kurtosis [here](https://docs.kurtosis.com/). + +:::warning Disclaimer +Kurtosis currently does not fully support data persistence across runs, because of this it is not recommended for production use. +::: + + + + +:::tip + +::: + + +## ๐Ÿ’ป Pre-requisites {#prerequisites} + +Make sure you have your wordle rollup ready by completing [the Build Your Rollup tutorial](/tutorials/wordle.md). + +## ๐Ÿ› ๏ธ Dependencies {#dependencies} + +### ๐Ÿ’ป Kurtosis CLI {#kurtosis-cli} + +You can [install the kurtosis cli here](https://docs.kurtosis.com/install). + +Once installed, you can verify the installation by running: + +```bash +kurtosis version +``` +```bash +CLI Version: 1.3.1 + +To see the engine version (provided it is running): kurtosis engine status +``` + +## ๐Ÿ› ๏ธ Setting up Your Environment {#setting-up-your-environment} + +The wordle rollup is a relatively simple rollup in that there are just 2 nodes involved: the rollup and the data availability network (DA) node. + +We will use a local DA node for this tutorial and run it in the same Kurtosis enclave as our rollup. + +To save time, we can use the [local DA kurtosis package found here.](https://github.com/rollkit/local-da/blob/main/main.star) + +This will allow us to focus on how we can run the wordle rollup in Kurtosis. + +### ๐Ÿณ Dockerfile {#dockerfile} + +First, we need to create a Dockerfile for our wordle rollup. + +Create a new file called `Dockerfile` in the root of the `wordle` directory and add the following code from the [Docker Compose tutorial](/tutorials/docker-compose#dockerfile). + +This Dockerfile sets up the environment to build the rollup and run the wordle node. It then sets up the runtime environment to run the rollup. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new rollup. + +Build the docker image by running the following command: + +```bash +docker build -t wordle . +``` + +You can then see the built image by running: + +```bash +docker images +``` + +You should see the following output: + +```bash +REPOSITORY TAG IMAGE ID CREATED SIZE +wordle latest 5d3533c1ea1c 8 seconds ago 443MB +``` + +### ๐ŸŸข Kurtosis {#kurtosis-init} + +To initialize a kurtosis package, run the following command: + +```bash +kurtosis package init +``` + +This will create a `kurtosis.yml` file and a `main.star` file. The `kurtosis.yml` file is where you define your package. Open it and update it to something like the following: + +```yaml +name: github.com/rollkit/wordle +description: |- + # github.com/rollkit/wordle + A simple wordle rollup for the Rollkit tutorial. +replace: {} +``` + +You should replace `github.com/rollkit/wordle` with your own repository name. + +The `main.star` file is where we define the kurtosis package. Open it up and replace the contents with the following code: + +```python +# This Kurtosis package spins up a wordle rollup that connects to a DA node + +# Import the local da kurtosis package +da_node = import_module("github.com/rollkit/local-da/main.star@v0.3.0") + + +def run(plan): + # Start the DA node + da_address = da_node.run( + plan, + ) + plan.print("connecting to da layer via {0}".format(da_address)) + + # Define the wordle start command + wordle_start_cmd = [ + "rollkit", + "start", + "--rollkit.aggregator", + "--rollkit.da_address {0}".format(da_address), + ] + # Define the jsonrpc ports + wordle_ports = { + "jsonrpc": PortSpec( + number=26657, transport_protocol="TCP", application_protocol="http" + ), + } + # Start the wordle rollup + wordle = plan.add_service( + name="wordle", + config=ServiceConfig( + # Use the wordle image we just built + image="wordle", + # Set the command to start the wordle rollup in the docker container + cmd=["/bin/sh", "-c", " ".join(wordle_start_cmd)], + ports=wordle_ports, + public_ports=wordle_ports, + ), + ) +``` + +We now have all we need to run the wordle rollup and connect to a local DA node. + +### ๐Ÿš€ Run Wordle Rollup {#run-wordle-rollup} + +Run your wordle rollup by running the following command: + +```bash +kurtosis run . +``` + +You'll see an output like the following: + +```bash +INFO[2024-07-16T14:56:39-04:00] No Kurtosis engine was found; attempting to start one... +INFO[2024-07-16T14:56:39-04:00] Starting the centralized logs components... +INFO[2024-07-16T14:56:39-04:00] Centralized logs components started. +INFO[2024-07-16T14:56:40-04:00] Reverse proxy started. +INFO[2024-07-16T14:56:43-04:00] Successfully started Kurtosis engine +INFO[2024-07-16T14:56:43-04:00] Creating a new enclave for Starlark to run inside... +INFO[2024-07-16T14:56:46-04:00] Enclave 'yearning-bog' created successfully +INFO[2024-07-16T14:56:46-04:00] Executing Starlark package at '/Users/matt/Code/test/wordle' as the passed argument '.' looks like a directory +INFO[2024-07-16T14:56:46-04:00] Compressing package 'github.com/example-org/example-package' at '.' for upload +INFO[2024-07-16T14:56:48-04:00] Uploading and executing package 'github.com/example-org/example-package' + +Container images used in this run: +> ghcr.io/rollkit/local-da:v0.2.1 - locally cached +> wordle - locally cached + +Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1' +Service 'local-da' added with service UUID '775883b14f7f4db393addcebe3afe34d' + +Printing a message +connecting to da layer via http://172.16.0.5:7980 + +Adding service with name 'wordle' and image 'wordle' +Service 'wordle' added with service UUID '5a969765174a47ada0727bd68e087f36' + +Starlark code successfully run. No output was returned. + +โญ us on GitHub - https://github.com/kurtosis-tech/kurtosis +INFO[2024-07-16T14:56:54-04:00] ===================================================== +INFO[2024-07-16T14:56:54-04:00] || Created enclave: yearning-bog || +INFO[2024-07-16T14:56:54-04:00] ===================================================== +Name: yearning-bog +UUID: dc4026b38a60 +Status: RUNNING +Creation Time: Tue, 16 Jul 2024 14:56:43 EDT +Flags: + +========================================= Files Artifacts ========================================= +UUID Name + +========================================== User Services ========================================== +UUID Name Ports Status +775883b14f7f local-da jsonrpc: 7980/tcp -> http://127.0.0.1:7980 RUNNING +5a969765174a wordle jsonrpc: 26657/tcp -> http://127.0.0.1:26657 RUNNING +``` + +Congratulations! You have successfully run the wordle rollup in Kurtosis. + +## ๐Ÿš€ Interacting with the Rollup {#interacting-with-the-rollup} + +Since we used the docker image to run the rollup in Kurtosis, we can interact with the rollup by entering the docker container. + +You can see the docker containers running with the wordle rollup and the local DA node by running the following command: + +```bash +docker ps +``` + +You should see the following output: + +```bash +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +cbf66a881cb2 wordle:latest "/bin/sh -c 'rollkitโ€ฆ" 5 seconds ago Up 4 seconds 0.0.0.0:26657->26657/tcp wordle--5a969765174a47ada0727bd68e087f36 +09bdf1e94862 ghcr.io/rollkit/local-da:v0.2.1 "local-da -listen-all" 6 seconds ago Up 5 seconds 0.0.0.0:7980->7980/tcp local-da--775883b14f7f4db393addcebe3afe34d +2b50989f65cd kurtosistech/core:0.90.1 "/bin/sh -c ./api-coโ€ฆ" 14 seconds ago Up 13 seconds 0.0.0.0:57050->7443/tcp kurtosis-api--dc4026b38a604b82af88a0cd9bedb245 +74b6708de48e fluent/fluent-bit:1.9.7 "/fluent-bit/bin/fluโ€ฆ" 14 seconds ago Up 13 seconds 2020/tcp kurtosis-logs-collector--dc4026b38a604b82af88a0cd9bedb245 +f1a64151bd29 kurtosistech/engine:0.90.1 "/bin/sh -c ./kurtosโ€ฆ" 18 seconds ago Up 17 seconds 0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp kurtosis-engine--089b9be758464668857fa46c2187bfe3 +ce2291909a3d traefik:2.10.6 "/bin/sh -c 'mkdir -โ€ฆ" 19 seconds ago Up 18 seconds 80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp kurtosis-reverse-proxy--089b9be758464668857fa46c2187bfe3 +2e8da9bdf81f timberio/vector:0.31.0-debian "/bin/sh -c 'printf โ€ฆ" 19 seconds ago Up 18 seconds kurtosis-logs-aggregator +``` + +We can see the wordle rollup running in container `wordle--5a969765174a47ada0727bd68e087f36` and the local DA network running in container `local-da--775883b14f7f4db393addcebe3afe34d`. + +Let's hold on to the container name for the world rollup as we will need it later. + +```bash +WORDLE=$(docker ps --format '{{.Names}}' | grep wordle) +echo $WORDLE +``` + +You can verify the rollup is running by checking the logs: + +```bash +docker logs $WORDLE +``` + +You should see the following output: + +```bash +... +6:56PM INF executed block app_hash=313F7C52E30B3DEE3511D66B3E2C1B2A56DF4CDE54A90B02AC79678D822B644A height=5 module=BlockManager +6:56PM INF indexed block events height=5 module=txindex +6:56PM INF Creating and publishing block height=6 module=BlockManager +6:56PM INF finalized block block_app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager num_txs_res=0 num_val_updates=0 +6:56PM INF executed block app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager +6:56PM INF indexed block events height=6 module=txindex +6:57PM INF Creating and publishing block height=7 module=BlockManager +6:57PM INF finalized block block_app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager num_txs_res=0 num_val_updates=0 +6:57PM INF executed block app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager +6:57PM INF indexed block events height=7 module=txindex +6:57PM INF Creating and publishing block height=8 module=BlockManager +6:57PM INF finalized block block_app_hash=C93D26AEE9B611952C8122DEB67DBAD95B3604F5C9C5DFBA95A3E7A4CF0AF641 height=8 module=BlockManager num_txs_res=0 num_val_updates=0 +... +``` + +Since our rollup 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 +``` + +Now that you are in the docker container, you can interact with the rollup using the Rollkit CLI and the example commands you used in the [Wordle tutorial](/tutorials/wordle#interacting-with-the-rollup). + +Once you are done interacting with your rollup, you can exit out of your docker container with: + +```bash +exit +``` + +Then you can shut down your rollup and kurtosis by running: + +```bash +kurtosis clean -a +``` + +## ๐ŸŽ‰ Next steps + +Congratulations again! You now know how to run your rollup with Kurtosis and interact with it using the Rollkit CLI in the docker container. diff --git a/tutorials/wordle.md b/tutorials/wordle.md index 1c2884138..8e3164f8c 100644 --- a/tutorials/wordle.md +++ b/tutorials/wordle.md @@ -30,55 +30,10 @@ in the [Cosmos-SDK](https://docs.cosmos.network/). We will go through the steps Additionally, we recommend that you have gone over the [GM world](/tutorials/gm-world) tutorial first to see an example of a running rollup. -## ๐Ÿ› ๏ธ Dependencies {#dependencies} - -### ๐ŸŸฉ Kurtosis {#kurtosis} -As with the [GM Rollup](https://rollkit.dev/tutorials/gm-world), we use [kurtosis](https://docs.kurtosis.com/) to help with managing all the services we need to run. You can [install kurtosis here](https://docs.kurtosis.com/install). - -Once installed, you can verify the installation by running: - -```bash -kurtosis version -``` -```bash -CLI Version: 0.90.1 - -To see the engine version (provided it is running): kurtosis engine status -``` - -### ๐Ÿ”ฅ Ignite {#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](https://docs.ignite.com). - -To install Ignite, you can run this command in your terminal: +You also need to have Rollkit CLI installed. You can install it by running: ```bash-vue -curl https://get.ignite.com/cli@{{constants.igniteVersionTag}}! | bash -``` - -This installs Ignite CLI in your local machine. You can verify by running the `version` command and confirming it matches the version you installed. - -```bash -ignite version -``` - -You should see the following: - -```bash -Ignite CLI version: v28.4.0 -Ignite CLI build date: 2024-05-15T13:42:13Z -Ignite CLI source hash: 83ee9ba5f81f2d2104ed91808f2cb72719a23e41 -Ignite CLI config version: v1 -Cosmos SDK version: v0.50.6 -Your OS: darwin -Your arch: amd64 -Your Node.js version: v18.17.1 -Your go version: go version go1.22.4 darwin/amd64 -Your uname -a: Darwin Carl 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64 -Your cwd: /Users/matt/Code/test -Is on Gitpod: false +curl -sSL https://rollkit.dev/install.sh | sh -s {{constants.rollkitLatestTag}} ``` ## ๐Ÿ“– Design implementation {#design-implementation} @@ -115,9 +70,43 @@ 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. -## โ›“๏ธ Scaffolding the wordle chain {#scaffolding-wordle-chain} +## โ›“๏ธ Ignite and scaffolding the wordle chain {#ignite-scaffold-wordle-chain} +### ๐Ÿ”ฅ Ignite {#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](https://docs.ignite.com). + +To install Ignite, you can run this command in your terminal: + +```bash-vue +curl https://get.ignite.com/cli@{{constants.igniteVersionTag}}! | bash +``` + +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 {#scaffolding-wordle-chain} + Now, comes the fun part, creating a new blockchain! With Ignite, the process is pretty easy and straightforward. @@ -176,7 +165,7 @@ Most of the tutorial work will happen inside the `x` directory. Before we continue with building our Wordle App, we need to set up Rollkit on our codebase. -### ๐Ÿ—ž๏ธ Installing Rollkit Ignite App {#installing-rollkit-ignite-app} +### ๐Ÿ—ž๏ธ Installing Rollkit {#installing-rollkit} To install the Rollkit app to Ignite, run the following command: @@ -222,7 +211,7 @@ module is defined as the following: We build the module with the `bank` dependency with the following command: ```bash -ignite scaffold module wordle --dep bank -y +ignite scaffold module wordle --dep bank ``` This will scaffold the Wordle module to our Wordle Chain project. @@ -252,7 +241,7 @@ With these initial designs, we can start creating our messages! To create the `SubmitWordle` message, we run the following command: ```bash -ignite scaffold message submit-wordle word -y +ignite scaffold message submit-wordle word ``` This creates the `submit-wordle` message that takes in `word` as a parameter. @@ -260,7 +249,7 @@ 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 -y +ignite scaffold message submit-guess word ``` Here, we are passing a word as a guess with `submit-guess`. @@ -273,7 +262,7 @@ the messages we created. ### ๐Ÿ—๏ธ Scaffolding wordle types {#scaffolding-wordle-types} ```bash -ignite scaffold map wordle word submitter --no-message -y +ignite scaffold map wordle word submitter --no-message ``` This type is a map called `Wordle` with two values of @@ -284,7 +273,7 @@ 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 -y +ignite scaffold map guess word submitter count --no-message ``` Here, we are also storing `count` to count how many guesses @@ -554,304 +543,50 @@ compile the blockchain and take it out for a test drive. ## โ›“๏ธ Run the wordle chain -In order to run our wordle chain, we need to also run a DA node. Like in previous tutorials, we will use kurtosis to manage running all the nodes. - -### ๐Ÿณ 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: - -```dockerfile -# Stage 1: Install ignite CLI and rollkit -FROM golang as base +### ๐Ÿชถ Run a local DA node {#run-local-da-node} -# Install dependencies -RUN apt update && \ - apt-get install -y \ - build-essential \ - ca-certificates \ - curl +To set up a local data availability network node open a new terminal and run: -# Install rollkit -RUN curl -sSL https://rollkit.dev/install.sh | sh -s v0.13.6 - -# Install ignite -RUN curl https://get.ignite.com/cli@v28.4.0! | bash - -# Set the working directory -WORKDIR /app - -# cache dependencies. -COPY ./go.mod . -COPY ./go.sum . -RUN go mod download - -# Copy all files from the current directory to the container -COPY . . - -# Build the chain -RUN ignite chain build && ignite rollkit init --local-da - -# Initialize the rollkit.toml file -RUN rollkit toml init - -# Run rollkit command to initialize the entrypoint executable -RUN rollkit - -# Stage 2: Set up the runtime environment -FROM debian:bookworm-slim - -# Install jq -RUN apt update && \ - apt-get install -y \ - jq - -# Set the working directory -WORKDIR /root - -# Copy over the rollkit binary from the build stage -COPY --from=base /go/bin/rollkit /usr/bin - -# Copy the entrypoint and rollkit.toml files from the build stage -COPY --from=base /app/entrypoint ./entrypoint -COPY --from=base /app/rollkit.toml ./rollkit.toml - -# Copy the $HOME/.wordle directory from the build stage. -# This directory contains all your chain config. -COPY --from=base /root/.wordle /root/.wordle - -# Ensure the entrypoint script is executable -RUN chmod +x ./entrypoint - -# Keep the container running after it has been started -CMD tail -f /dev/null -``` - -This Dockerfile sets up the environment to build the chain and run the rollkit 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 . -``` - -You can then see the built image by running: - -```bash -docker images -``` - -You should see the following output: - -```bash -REPOSITORY TAG IMAGE ID CREATED SIZE -wordle latest 5d3533c1ea1c 8 seconds ago 443MB -``` - -### ๐ŸŸข Kurtosis {#kurtosis-init} - -To initialize a kurtosis package, run the following command: - -```bash -kurtosis package init -``` - -This will create a `kurtosis.yml` file and a `main.star` file. The `kurtosis.yml` file is where you define your package. Open it and update it to something like the following: - -```yaml -name: github.com/rollkit/wordle -description: |- - # github.com/rollkit/wordle - A simple wordle chain for the Rollkit tutorial. -replace: {} -``` - -You should replace `github.com/rollkit/wordle` with your own repository name. - -The `main.star` file is where we define the kurtosis package. Open it up and replace the contents with the following code: - -```python -# This Kurtosis package spins up a wordle rollup that connects to a DA node - -# Import the local da kurtosis package -da_node = import_module("github.com/rollkit/local-da/main.star@v0.3.0") - - -def run(plan): - # Start the DA node - da_address = da_node.run( - plan, - ) - plan.print("connecting to da layer via {0}".format(da_address)) - - # Define the wordle start command - wordle_start_cmd = [ - "rollkit", - "start", - "--rollkit.aggregator", - "--rollkit.da_address {0}".format(da_address), - ] - # Define the jsonrpc ports - wordle_ports = { - "jsonrpc": PortSpec( - number=26657, transport_protocol="TCP", application_protocol="http" - ), - } - # Start the wordle chain - wordle = plan.add_service( - name="wordle", - config=ServiceConfig( - # Use the wordle image we just built - image="wordle", - # Set the command to start the wordle chain in the docker container - cmd=["/bin/sh", "-c", " ".join(wordle_start_cmd)], - ports=wordle_ports, - public_ports=wordle_ports, - ), - ) -``` - -We now have all we need to run the wordle chain and connect to a local DA node. - -### ๐Ÿš€ Run Wordle Chain {#run-wordle-chain} - -Run your wordle chain by running the following command: - -```bash -kurtosis run . -``` - -You'll see an output like the following: - -```bash -INFO[2024-07-16T14:56:39-04:00] No Kurtosis engine was found; attempting to start one... -INFO[2024-07-16T14:56:39-04:00] Starting the centralized logs components... -INFO[2024-07-16T14:56:39-04:00] Centralized logs components started. -INFO[2024-07-16T14:56:40-04:00] Reverse proxy started. -INFO[2024-07-16T14:56:43-04:00] Successfully started Kurtosis engine -INFO[2024-07-16T14:56:43-04:00] Creating a new enclave for Starlark to run inside... -INFO[2024-07-16T14:56:46-04:00] Enclave 'yearning-bog' created successfully -INFO[2024-07-16T14:56:46-04:00] Executing Starlark package at '/Users/matt/Code/test/wordle' as the passed argument '.' looks like a directory -INFO[2024-07-16T14:56:46-04:00] Compressing package 'github.com/example-org/example-package' at '.' for upload -INFO[2024-07-16T14:56:48-04:00] Uploading and executing package 'github.com/example-org/example-package' - -Container images used in this run: -> ghcr.io/rollkit/local-da:v0.2.1 - locally cached -> wordle - locally cached - -Adding service with name 'local-da' and image 'ghcr.io/rollkit/local-da:v0.2.1' -Service 'local-da' added with service UUID '775883b14f7f4db393addcebe3afe34d' - -Printing a message -connecting to da layer via http://172.16.0.5:7980 - -Adding service with name 'wordle' and image 'wordle' -Service 'wordle' added with service UUID '5a969765174a47ada0727bd68e087f36' - -Starlark code successfully run. No output was returned. - -โญ us on GitHub - https://github.com/kurtosis-tech/kurtosis -INFO[2024-07-16T14:56:54-04:00] ===================================================== -INFO[2024-07-16T14:56:54-04:00] || Created enclave: yearning-bog || -INFO[2024-07-16T14:56:54-04:00] ===================================================== -Name: yearning-bog -UUID: dc4026b38a60 -Status: RUNNING -Creation Time: Tue, 16 Jul 2024 14:56:43 EDT -Flags: - -========================================= Files Artifacts ========================================= -UUID Name - -========================================== User Services ========================================== -UUID Name Ports Status -775883b14f7f local-da jsonrpc: 7980/tcp -> http://127.0.0.1:7980 RUNNING -5a969765174a wordle jsonrpc: 26657/tcp -> http://127.0.0.1:26657 RUNNING -``` - -You can see the docker containers running with the wordle chain and the local DA node by running the following command: - -```bash -docker ps +```bash-vue +cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s {{constants.localDALatestTag}} ``` -You should see the following output: +This script builds and runs the node, now listening on port `7980`. -```bash -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -cbf66a881cb2 wordle:latest "/bin/sh -c 'rollkitโ€ฆ" 5 seconds ago Up 4 seconds 0.0.0.0:26657->26657/tcp wordle--5a969765174a47ada0727bd68e087f36 -09bdf1e94862 ghcr.io/rollkit/local-da:v0.2.1 "local-da -listen-all" 6 seconds ago Up 5 seconds 0.0.0.0:7980->7980/tcp local-da--775883b14f7f4db393addcebe3afe34d -2b50989f65cd kurtosistech/core:0.90.1 "/bin/sh -c ./api-coโ€ฆ" 14 seconds ago Up 13 seconds 0.0.0.0:57050->7443/tcp kurtosis-api--dc4026b38a604b82af88a0cd9bedb245 -74b6708de48e fluent/fluent-bit:1.9.7 "/fluent-bit/bin/fluโ€ฆ" 14 seconds ago Up 13 seconds 2020/tcp kurtosis-logs-collector--dc4026b38a604b82af88a0cd9bedb245 -f1a64151bd29 kurtosistech/engine:0.90.1 "/bin/sh -c ./kurtosโ€ฆ" 18 seconds ago Up 17 seconds 0.0.0.0:8081->8081/tcp, 0.0.0.0:9710-9711->9710-9711/tcp, 0.0.0.0:9779->9779/tcp kurtosis-engine--089b9be758464668857fa46c2187bfe3 -ce2291909a3d traefik:2.10.6 "/bin/sh -c 'mkdir -โ€ฆ" 19 seconds ago Up 18 seconds 80/tcp, 0.0.0.0:9730-9731->9730-9731/tcp kurtosis-reverse-proxy--089b9be758464668857fa46c2187bfe3 -2e8da9bdf81f timberio/vector:0.31.0-debian "/bin/sh -c 'printf โ€ฆ" 19 seconds ago Up 18 seconds kurtosis-logs-aggregator -``` +After you have Go and Ignite CLI installed, and your local data availability node +running on your machine, you're ready to build, test, and launch your own sovereign rollup. -We can see the wordle rollup running in container `wordle--5a969765174a47ada0727bd68e087f36` and the local DA network running in container `local-da--775883b14f7f4db393addcebe3afe34d`. +### ๐ŸŸข Building and running wordle chain {#build-and-run-wordle-chain} -Let's hold on to the container name for the world rollup as we will need it later. +Initialize the Rollkit chain configuration for a local DA network with this command: ```bash -WORDLE=$(docker ps --format '{{.Names}}' | grep wordle) -echo $WORDLE +ignite chain build && ignite rollkit init --local-da ``` -You can verify the rollup is running by checking the logs: +This will create a `~/.wordle` directory with all the necessary files to run a rollup on a local DA network. -```bash -docker logs $WORDLE -``` - -You should see the following output: +Now let's initialize a `rollkit.toml` file in the `worldle` directory by running: ```bash -... -6:56PM INF executed block app_hash=313F7C52E30B3DEE3511D66B3E2C1B2A56DF4CDE54A90B02AC79678D822B644A height=5 module=BlockManager -6:56PM INF indexed block events height=5 module=txindex -6:56PM INF Creating and publishing block height=6 module=BlockManager -6:56PM INF finalized block block_app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager num_txs_res=0 num_val_updates=0 -6:56PM INF executed block app_hash=826541369149F3F8DE5A53F5B4174C51975BCC665F0E73B1DB69D9206E4F5563 height=6 module=BlockManager -6:56PM INF indexed block events height=6 module=txindex -6:57PM INF Creating and publishing block height=7 module=BlockManager -6:57PM INF finalized block block_app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager num_txs_res=0 num_val_updates=0 -6:57PM INF executed block app_hash=8C751BA9EDCFAD7F92E0E940995B0155BDC856070B876373299E7820C32F0B8B height=7 module=BlockManager -6:57PM INF indexed block events height=7 module=txindex -6:57PM INF Creating and publishing block height=8 module=BlockManager -6:57PM INF finalized block block_app_hash=C93D26AEE9B611952C8122DEB67DBAD95B3604F5C9C5DFBA95A3E7A4CF0AF641 height=8 module=BlockManager num_txs_res=0 num_val_updates=0 -... +rollkit toml init ``` -Since our rollup 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: +To start running a rollup with the Wordle chain, run the following command: ```bash -docker exec -it $WORDLE sh +rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 ``` +With that, we have kickstarted our wordle network! -You can see the two accounts that were created by running the following command: +### ๐Ÿš€ Interacting with the Rollup {#interacting-with-the-rollup} -```bash -rollkit keys list --keyring-backend test -``` - -You should see the following output: - -```bash -- address: cosmos17sdyjz0zjsefd79k8nt9uvvfk732d0w7tzxfck - name: alice - pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AkWmEZ0oYewolMY9AqJspcMDsoVPoG7t24r93rZaTuBZ"}' - type: local -- address: cosmos13uevxd5zen4ywjuqr7cz4903uyktqm0swvfjly - name: bob - pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AnqNse6cuVtx5AIUN9U3vxNq7rw9e2G0R4pCPRySqzAn"}' - type: local -``` - -Let's have Bob submit a Wordle for the day: +In another window, from the `~/wordle` directory (where rollkit.toml is located) run the following command to submit a Wordle: ```bash -rollkit tx wordle submit-wordle giant --from bob --keyring-backend test --chain-id wordle -b async +rollkit tx wordle submit-wordle giant --from wordle-key --keyring-backend test --chain-id wordle -b async -y ``` @@ -866,27 +601,43 @@ rollkit tx wordle submit-wordle giant --from bob --keyring-backend test --chain- This will ask you to confirm the transaction with the following message: +```json +{ + "body":{ + "messages":[ + { + "@type":"/YazzyYaz.wordle.wordle.MsgSubmitWordle", + "creator":"cosmos17lk3fgutf00pd5s8zwz5fmefjsdv4wvzyg7d74", + "word":"giant" + } + ], + "memo":"", + "timeout_height":"0", + "extension_options":[ + ], + "non_critical_extension_options":[ + ] + }, + "auth_info":{ + "signer_infos":[ + ], + "fee":{ + "amount":[ + ], + "gas_limit":"200000", + "payer":"", + "granter":"" + } + }, + "signatures":[ + ] +} +``` + +Cosmos-SDK will ask you to confirm the transaction here: + ```bash -auth_info: - fee: - amount: [] - gas_limit: "200000" - granter: "" - payer: "" - signer_infos: [] - tip: null -body: - extension_options: [] - memo: "" - messages: - - '@type': /wordle.wordle.MsgSubmitWordle - creator: cosmos13uevxd5zen4ywjuqr7cz4903uyktqm0swvfjly - word: giant - non_critical_extension_options: [] - timeout_height: "0" -signatures: [] - -confirm transaction before signing and broadcasting [y/N]: // [!code focus] +confirm transaction before signing and broadcasting [y/N]: ``` Confirm with a Y. @@ -909,140 +660,70 @@ tx: null txhash: F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E ``` -Let's hold onto the txhash as we will need it to query the transaction. - -```bash -TX_HASH=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 -rollkit query tx --type=hash $TX_HASH --chain-id wordle --output json | jq +rollkit 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","at{ - "height": "843", - "txhash": "2B80B61FA136132F929CB288E17E640BEFAD01548A9178CAF9809BBC9154AA4E", - "codespace": "", - "code": 0, - "data": "12280A262F776F72646C652E776F72646C652E4D73675375626D6974576F72646C65526573706F6E7365", - "raw_log": "", // [!code focus] - "logs": [], - "info": "", - "gas_wanted": "200000", - "gas_used": "84990", - "tx": { - "@type": "/cosmos.tx.v1beta1.Tx", - "body": { - "messages": [ - { - "@type": "/wordle.wordle.MsgSubmitWordle", - "creator": "cosmos13uevxd5zen4ywjuqr7cz4903uyktqm0swvfjly", - "word": "giant" - } - ], - "memo": "", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - ... - }, - "timestamp": "2024-07-16T14:24:45Z", - "events": [ - ... - ] -} -``` - -That's a lot of information! The main thing we are looking at right now is the log to see if there were any errors. We can filter the output with `-r '.raw_logs'`. Let's run the command again. - -```bash -rollkit query tx --type=hash $TX_HASH --chain-id wordle --output json | jq -r '.raw_log' +[{"events":[{"type":"message","attributes":[{"key":"action","value":"submit_wordle" +}]}]}] ``` -Now you shouldn't see any output from this because there was no error. Excellent! - -Let's test out a few things for fun. First let's try submitting an invalid guess. - -The following command as some shortcuts to auto confirm the transaction and store the txhash in a variable for you: +Test out a few things for fun: ```bash -TX_HASH=$(rollkit tx wordle submit-guess 12345 --from bob --keyring-backend test --chain-id wordle -b async -y | grep txhash | cut -d ' ' -f 2) +rollkit tx wordle submit-guess 12345 --from wordle-key --keyring-backend test --chain-id wordle -b async -y ``` -Now let's query the transaction: - -```bash -rollkit query tx --type=hash $TX_HASH --chain-id wordle --output json | jq -r '.raw_log' -``` +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. -You will see the following response because you submitted integers: - -```bash -failed to execute message; message index: 0: Guess Must Only Consist of Alphabet Letters!: invalid request -``` - -Now let's try a guess that is too long: +Now try: ```bash -TX_HASH=$(rollkit tx wordle submit-guess toolong --from bob --keyring-backend test --chain-id wordle -b async -y | grep txhash | cut -d ' ' -f 2) -``` - -And let's query the transaction: - -```bash -rollkit query tx --type=hash $TX_HASH --chain-id wordle --output json | jq -r '.raw_log' +rollkit tx wordle submit-guess ABCDEFG --from wordle-key --keyring-backend test --chain-id wordle -b async -y ``` -You will see the following response: - -```bash -failed to execute message; message index: 0: Guess Must Be A 5 Letter Word!: invalid request -``` +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 -TX_HASH=$(rollkit tx wordle submit-wordle meter --from bob --keyring-backend test --chain-id wordle -b async -y | grep txhash | cut -d ' ' -f 2) +rollkit tx wordle submit-wordle meter --from wordle-key --keyring-backend test --chain-id wordle -b async -y ``` -And let's query the transaction: +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. -```bash -rollkit query tx --type=hash $TX_HASH --chain-id wordle --output json | jq -r '.raw_log' -``` - - -You will see the following response: - -```bash -failed to execute message; message index: 0: Wordle of the Day is Already Submitted: invalid request -``` - -Alright, enough testing the error cases, letโ€™s try to guess a five letter word: +Now letโ€™s try to guess a five letter word: ```bash -TX_HASH=$(rollkit tx wordle submit-guess least --from bob --keyring-backend test --chain-id wordle -b async -y | grep txhash | cut -d ' ' -f 2) +rollkit tx wordle submit-guess least --from wordle-key --keyring-backend test --chain-id wordle -b async -y ``` -Given you didnโ€™t guess the correct word, it will increment the guess count for wordle-key's account. +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: @@ -1053,38 +734,9 @@ rollkit 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. -```json -{ - "guess": [ - { - "index": "7df4afc694ef096cb285544db57282bbdc28fcbdf75f7457d5dec4bf4367a9de", - "word": "6bab65a2bddec8af5dbc7f8b24ef22fc58acc385abcde4a6c4e34387d3b29261", - "submitter": "cosmos13uevxd5zen4ywjuqr7cz4903uyktqm0swvfjly", - "count": "1" - } - ], - "pagination": { - "total": "1" - } -} -``` - With that, we implemented a basic example of Wordle using -Cosmos-SDK and Ignite and Rollkit. - -You can exit out of your docker container with: - -```bash -exit -``` - -Then you can shut down your rollup and kurtosis by running: - -```bash -kurtosis clean -a -``` - -Read on to how you can extend the code base. +Cosmos-SDK and Ignite and Rollkit. Read on to how you can +extend the code base. ### ๐Ÿ”ฎ Extending in the future {#extending-in-the-future} From fa2ee294a42eaa0de7fb945cd25937e13a822310 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:35:12 -0500 Subject: [PATCH 03/16] chore: bump rollkit version and sha to v0.14.0 --- .vitepress/constants/constants.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vitepress/constants/constants.js b/.vitepress/constants/constants.js index 63fb6bd82..9f83446f4 100644 --- a/.vitepress/constants/constants.js +++ b/.vitepress/constants/constants.js @@ -4,8 +4,8 @@ const constants = Object.freeze({ nodeVersion: "21.7.2", yarnVersion: "1.22.19", - rollkitLatestTag: "v0.13.7", - rollkitLatestSha: "8deede4", + rollkitLatestTag: "v0.14.0", + rollkitLatestSha: "ca746d0", rollkitCosmosSDKVersion: "v0.50.6-rollkit-v0.13.3-no-fraud-proofs", rollkitIgniteAppVersion: "rollkit/v0.2.1", From 78c4cc4a3ea2186d48a00d0337fda30d7b31e75d Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:07:42 -0500 Subject: [PATCH 04/16] chore: various updates while debugging --- .vitepress/constants/constants.js | 1 + tutorials/docker-compose.md | 27 ++++++++++++++++++++------- tutorials/wordle.md | 10 +++++----- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.vitepress/constants/constants.js b/.vitepress/constants/constants.js index 9f83446f4..3525abb7c 100644 --- a/.vitepress/constants/constants.js +++ b/.vitepress/constants/constants.js @@ -10,6 +10,7 @@ const constants = Object.freeze({ rollkitIgniteAppVersion: "rollkit/v0.2.1", localDALatestTag: "v0.3.1", + localSequencerLatestTag: "v0.4.0", igniteVersionTag: "v28.5.3", }); diff --git a/tutorials/docker-compose.md b/tutorials/docker-compose.md index 029ff7734..3b0f3a713 100644 --- a/tutorials/docker-compose.md +++ b/tutorials/docker-compose.md @@ -36,11 +36,13 @@ Docker Compose version v2.23.0-desktop.1 ## ๐Ÿ› ๏ธ Setting up Your Environment {#setting-up-your-environment} -The wordle rollup is a relatively simple rollup in that there are just 2 nodes involved: the rollup and the data availability network (DA) node. +In addition to our rollup, we need to run a DA and Sequencer node. -We will use a local DA node for this tutorial and run it with our rollup. +We will use the [local-da](https://github.com/rollkit/local-da) and [local-sequencer](https://github.com/rollkit/go-sequencing) for this tutorial and run it with our rollup. -To save time, we can use the [local DA Dockerfile found here.](https://github.com/rollkit/local-da/blob/main/Dockerfile) +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 rollup with Docker Compose. @@ -60,10 +62,10 @@ RUN apt update && \ curl # Install rollkit -RUN curl -sSL https://rollkit.dev/install.sh | sh -s v0.13.6 +RUN curl -sSL https://rollkit.dev/install.sh | sh -s {{constants.rollkitLatestTag}} # Install ignite -RUN curl https://get.ignite.com/cli@v28.4.0! | bash +RUN curl https://get.ignite.com/cli@{{constants.igniteVersionTag}}! | bash # Set the working directory WORKDIR /app @@ -77,7 +79,7 @@ RUN go mod download COPY . . # Build the chain -RUN ignite chain build && ignite rollkit init --local-da +RUN ignite chain build && ignite rollkit # Initialize the rollkit.toml file RUN rollkit toml init @@ -157,16 +159,27 @@ services: # Ensures the local-da service is up and running before starting the rollup depends_on: - local-da + - local-sequencer # Define the local DA service local-da: # Use the published image from rollkit - image: ghcr.io/rollkit/local-da:v0.2.1 + image: ghcr.io/rollkit/local-da:{{constants.localDALatestTag}} # Set the name of the docker container for ease of use container_name: local-da # Publish the ports to connect ports: - "7980:7980" + + # Define the local sequencer service + local-sequencer: + # Use the published image from rollkit + image: ghcr.io/rollkit/local-sequencer:{{constants.localSequencerLatestTag}} + # Set the name of the docker container for ease of use + container_name: local-sequencer + # Publish the ports to connect + ports: + - "50051:50051" ``` We now have all we need to run the wordle rollup and connect to a local DA node. diff --git a/tutorials/wordle.md b/tutorials/wordle.md index 913772c6b..d4ec22e87 100644 --- a/tutorials/wordle.md +++ b/tutorials/wordle.md @@ -211,7 +211,7 @@ module is defined as the following: We build the module with the `bank` dependency with the following command: ```bash -ignite scaffold module wordle --dep bank +ignite scaffold module wordle --dep bank -y ``` This will scaffold the Wordle module to our Wordle Chain project. @@ -241,7 +241,7 @@ With these initial designs, we can start creating our messages! To create the `SubmitWordle` message, we run the following command: ```bash -ignite scaffold message submit-wordle word +ignite scaffold message submit-wordle word -y ``` This creates the `submit-wordle` message that takes in `word` as a parameter. @@ -249,7 +249,7 @@ 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 +ignite scaffold message submit-guess word -y ``` Here, we are passing a word as a guess with `submit-guess`. @@ -262,7 +262,7 @@ the messages we created. ### ๐Ÿ—๏ธ Scaffolding wordle types {#scaffolding-wordle-types} ```bash -ignite scaffold map wordle word submitter --no-message +ignite scaffold map wordle word submitter --no-message -y ``` This type is a map called `Wordle` with two values of @@ -273,7 +273,7 @@ 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 +ignite scaffold map guess word submitter count --no-message -y ``` Here, we are also storing `count` to count how many guesses From 51c28844b08def45187432f44e8ac0166888a3de Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:18:32 -0500 Subject: [PATCH 05/16] chore: update menu titles --- .vitepress/config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 102241fb9..15dddcc48 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -218,9 +218,9 @@ function sidebarHome() { text: "Quick start guide", link: "/tutorials/quick-start", }, - { text: "Build a Rollup", link: "/tutorials/wordle" }, + { text: "Build a chain", link: "/tutorials/wordle" }, { - text: "Connect Your DA", + text: "DA", collapsed: true, items: [ { @@ -260,7 +260,7 @@ function sidebarHome() { ], }, { - text: "Choose your execution", + text: "Execution", collapsed: true, items: [ { text: "CosmWasm", link: "/tutorials/cosmwasm" }, @@ -283,7 +283,7 @@ function sidebarHome() { ], }, { - text: "Deploy Your Rollup", + text: "Deploy your chain", collapsed: true, items: [ { From e67820a0c5d4db94576518cd184e4fdc5a05601d Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:24:24 -0500 Subject: [PATCH 06/16] chore: change rollup to chain and adjust capitalzation --- tutorials/docker-compose.md | 52 +++++++++++++++++------------------ tutorials/kurtosis.md | 54 ++++++++++++++++++------------------- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/tutorials/docker-compose.md b/tutorials/docker-compose.md index 3b0f3a713..484bd7c5d 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 rollup](/tutorials/wordle.md) using Docker Compose. +This tutorial is going to show you how to deploy the [wordle chain](/tutorials/wordle.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 rollup ready by completing [the Build Your Rollup tutorial](/tutorials/wordle.md). +Make sure you have your wordle chain ready by completing [the Build your chain tutorial](/tutorials/wordle.md). ## ๐Ÿ› ๏ธ Dependencies {#dependencies} @@ -34,21 +34,21 @@ docker compose version Docker Compose version v2.23.0-desktop.1 ``` -## ๐Ÿ› ๏ธ Setting up Your Environment {#setting-up-your-environment} +## ๐Ÿ› ๏ธ Setting up your environment {#setting-up-your-environment} -In addition to our rollup, we need to run a DA and Sequencer node. +In addition to our chain, we need to run a DA and Sequencer node. -We will use the [local-da](https://github.com/rollkit/local-da) and [local-sequencer](https://github.com/rollkit/go-sequencing) for this tutorial and run it with our rollup. +We will use the [local-da](https://github.com/rollkit/local-da) and [local-sequencer](https://github.com/rollkit/go-sequencing) for this tutorial and run it with our chain. 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 rollup with Docker Compose. +This will allow us to focus on how we can run the wordle chain with Docker Compose. ### ๐Ÿณ Dockerfile {#dockerfile} -First, we need to create a Dockerfile for our wordle rollup. 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 wordle chain. Create a new file called `Dockerfile` in the root of the `wordle` directory and add the following code: ```dockerfile # Stage 1: Install ignite CLI and rollkit @@ -116,7 +116,7 @@ RUN chmod +x ./entrypoint CMD tail -f /dev/null ``` -This Dockerfile sets up the environment to build the rollup and run the wordle node. It then sets up the runtime environment to run the rollup. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new rollup. +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. Build the docker image by running the following command: @@ -137,7 +137,7 @@ REPOSITORY TAG IMAGE ID CREATED SIZE wordle latest 5d3533c1ea1c 8 seconds ago 443MB ``` -### ๐Ÿณ Docker Compose File {#docker-compose-file} +### ๐Ÿณ Docker Compose file {#docker-compose-file} Next we need to create our `compose.yaml` file for docker compose to use. @@ -146,7 +146,7 @@ In the root of the `wordle` directory, create a new file called `compose.yaml` a ```yml version: "3" services: - # Define the wordle rollup service + # Define the wordle chain service wordle: # Set the name of the docker container for ease of use container_name: wordle @@ -154,9 +154,9 @@ services: image: wordle # Used for networking between the two services network_mode: host - # The command config is used for launching the GM rollup once the Docker container is running + # The command config is used for launching the chain once the Docker container is running command: rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 - # Ensures the local-da service is up and running before starting the rollup + # Ensures the local-da service is up and running before starting the chain depends_on: - local-da - local-sequencer @@ -182,25 +182,25 @@ services: - "50051:50051" ``` -We now have all we need to run the wordle rollup and connect to a local DA node. +We now have all we need to run the wordle chain and connect to a local DA node. -### ๐Ÿš€ Run Wordle Rollup {#run-wordle-rollup} +### ๐Ÿš€ Run Wordle chain {#run-wordle-chain} -Run your wordle rollup by running the following command: +Run your wordle chain by running the following command: ```bash docker compose up ``` -You'll see logs of your rollup being output. +You'll see logs of your chain being output. -Congratulations! You have successfully run the wordle rollup with Docker Compose. +Congratulations! You have successfully run the wordle chain with Docker Compose. -## ๐Ÿš€ Interacting with the Rollup {#interacting-with-the-rollup} +## ๐Ÿš€ Interacting with the chain {#interacting-with-the-chain} -Since we are using docker images, we can interact with the rollup by entering the docker container. +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 rollup and the local DA node by running the following command: +You can see the docker containers running with the wordle chain and the local DA node by running the following command: ```bash docker ps @@ -214,24 +214,24 @@ cbf66a881cb2 wordle:latest "/bin/sh -c 'rollkitโ€ฆ" 5 se 09bdf1e94862 ghcr.io/rollkit/local-da:v0.2.1 "local-da -listen-all" 6 seconds ago Up 5 seconds 0.0.0.0:7980->7980/tcp local-da ``` -We can see the wordle rollup running in container `wordle` and the local DA network running in container `local-da`. +We can see the wordle chain running in container `wordle` and the local DA network running in container `local-da`. -Since our rollup 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: +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 ``` -Now that you are in the docker container, you can interact with the rollup using the Rollkit CLI and the example commands you used in the [Wordle tutorial](/tutorials/wordle#interacting-with-the-rollup). +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). -Once you are done interacting with your rollup, you can exit out of your docker container with: +Once you are done interacting with your chain, you can exit out of your docker container with: ```bash exit ``` -Then you can shut down your rollup environment by running `CRTL+C` in your terminal. +Then you can shut down your chain environment by running `CRTL+C` in your terminal. ## ๐ŸŽ‰ Next steps -Congratulations again! You now know how to run your rollup with docker compose and interact with it using the Rollkit CLI in the docker container. +Congratulations again! You now know how to run your chain with docker compose and interact with it using the Rollkit CLI in the docker container. diff --git a/tutorials/kurtosis.md b/tutorials/kurtosis.md index 44a294a18..b371e2c8b 100644 --- a/tutorials/kurtosis.md +++ b/tutorials/kurtosis.md @@ -1,6 +1,6 @@ # ๐ŸŸฉ Kurtosis -This tutorial is going to show you how to deploy the [wordle rollup](/tutorials/wordle.md) using Kurtosis. +This tutorial is going to show you how to deploy the [wordle chain](/tutorials/wordle.md) using Kurtosis. You can learn more about Kurtosis [here](https://docs.kurtosis.com/). @@ -21,7 +21,7 @@ import constants from '../.vitepress/constants/constants.js' ## ๐Ÿ’ป Pre-requisites {#prerequisites} -Make sure you have your wordle rollup ready by completing [the Build Your Rollup tutorial](/tutorials/wordle.md). +Make sure you have your wordle chain ready by completing [the Build your chain tutorial](/tutorials/wordle.md). ## ๐Ÿ› ๏ธ Dependencies {#dependencies} @@ -40,23 +40,23 @@ CLI Version: 1.3.1 To see the engine version (provided it is running): kurtosis engine status ``` -## ๐Ÿ› ๏ธ Setting up Your Environment {#setting-up-your-environment} +## ๐Ÿ› ๏ธ Setting up your environment {#setting-up-your-environment} -The wordle rollup is a relatively simple rollup in that there are just 2 nodes involved: the rollup and the data availability network (DA) node. +The wordle chain is a relatively simple chain in that there are just 2 nodes involved: the chain and the data availability network (DA) node. -We will use a local DA node for this tutorial and run it in the same Kurtosis enclave as our rollup. +We will use a local DA node for this tutorial and run it in the same Kurtosis enclave as our chain. To save time, we can use the [local DA kurtosis package found here.](https://github.com/rollkit/local-da/blob/main/main.star) -This will allow us to focus on how we can run the wordle rollup in Kurtosis. +This will allow us to focus on how we can run the wordle chain in Kurtosis. ### ๐Ÿณ Dockerfile {#dockerfile} -First, we need to create a Dockerfile for our wordle rollup. +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 from the [Docker Compose tutorial](/tutorials/docker-compose#dockerfile). -This Dockerfile sets up the environment to build the rollup and run the wordle node. It then sets up the runtime environment to run the rollup. This allows you as the developer to modify any files, and then simply rebuild the Docker image to run the new rollup. +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. Build the docker image by running the following command: @@ -91,7 +91,7 @@ This will create a `kurtosis.yml` file and a `main.star` file. The `kurtosis.ym name: github.com/rollkit/wordle description: |- # github.com/rollkit/wordle - A simple wordle rollup for the Rollkit tutorial. + A simple wordle chain for the Rollkit tutorial. replace: {} ``` @@ -100,7 +100,7 @@ You should replace `github.com/rollkit/wordle` with your own repository name. The `main.star` file is where we define the kurtosis package. Open it up and replace the contents with the following code: ```python -# This Kurtosis package spins up a wordle rollup that connects to a DA node +# This Kurtosis package spins up a wordle chain that connects to a DA node # Import the local da kurtosis package da_node = import_module("github.com/rollkit/local-da/main.star@v0.3.0") @@ -126,13 +126,13 @@ def run(plan): number=26657, transport_protocol="TCP", application_protocol="http" ), } - # Start the wordle rollup + # Start the wordle chain wordle = plan.add_service( name="wordle", config=ServiceConfig( # Use the wordle image we just built image="wordle", - # Set the command to start the wordle rollup in the docker container + # Set the command to start the wordle chain in the docker container cmd=["/bin/sh", "-c", " ".join(wordle_start_cmd)], ports=wordle_ports, public_ports=wordle_ports, @@ -140,11 +140,11 @@ def run(plan): ) ``` -We now have all we need to run the wordle rollup and connect to a local DA node. +We now have all we need to run the wordle chain and connect to a local DA node. -### ๐Ÿš€ Run Wordle Rollup {#run-wordle-rollup} +### ๐Ÿš€ Run Wordle chain {#run-wordle-chain} -Run your wordle rollup by running the following command: +Run your wordle chain by running the following command: ```bash kurtosis run . @@ -198,13 +198,13 @@ UUID Name Ports Status 5a969765174a wordle jsonrpc: 26657/tcp -> http://127.0.0.1:26657 RUNNING ``` -Congratulations! You have successfully run the wordle rollup in Kurtosis. +Congratulations! You have successfully run the wordle chain in Kurtosis. -## ๐Ÿš€ Interacting with the Rollup {#interacting-with-the-rollup} +## ๐Ÿš€ Interacting with the chain {#interacting-with-the-chain} -Since we used the docker image to run the rollup in Kurtosis, we can interact with the rollup by entering the docker container. +Since we used the docker image to run the chain in Kurtosis, we can interact with the chain by entering the docker container. -You can see the docker containers running with the wordle rollup and the local DA node by running the following command: +You can see the docker containers running with the wordle chain and the local DA node by running the following command: ```bash docker ps @@ -223,16 +223,16 @@ ce2291909a3d traefik:2.10.6 "/bin/sh -c 'mkdir -โ€ฆ" 19 s 2e8da9bdf81f timberio/vector:0.31.0-debian "/bin/sh -c 'printf โ€ฆ" 19 seconds ago Up 18 seconds kurtosis-logs-aggregator ``` -We can see the wordle rollup running in container `wordle--5a969765174a47ada0727bd68e087f36` and the local DA network running in container `local-da--775883b14f7f4db393addcebe3afe34d`. +We can see the wordle chain running in container `wordle--5a969765174a47ada0727bd68e087f36` and the local DA network running in container `local-da--775883b14f7f4db393addcebe3afe34d`. -Let's hold on to the container name for the world rollup as we will need it later. +Let's hold on to the container name for the world chain as we will need it later. ```bash WORDLE=$(docker ps --format '{{.Names}}' | grep wordle) echo $WORDLE ``` -You can verify the rollup is running by checking the logs: +You can verify the chain is running by checking the logs: ```bash docker logs $WORDLE @@ -257,21 +257,21 @@ You should see the following output: ... ``` -Since our rollup 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: +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 ``` -Now that you are in the docker container, you can interact with the rollup using the Rollkit CLI and the example commands you used in the [Wordle tutorial](/tutorials/wordle#interacting-with-the-rollup). +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). -Once you are done interacting with your rollup, you can exit out of your docker container with: +Once you are done interacting with your chain, you can exit out of your docker container with: ```bash exit ``` -Then you can shut down your rollup and kurtosis by running: +Then you can shut down your chain and kurtosis by running: ```bash kurtosis clean -a @@ -279,4 +279,4 @@ kurtosis clean -a ## ๐ŸŽ‰ Next steps -Congratulations again! You now know how to run your rollup with Kurtosis and interact with it using the Rollkit CLI in the docker container. +Congratulations again! You now know how to run your chain with Kurtosis and interact with it using the Rollkit CLI in the docker container. From ae79faad4dd208f393cf4e239c3a1f8acc073489 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:27:39 -0500 Subject: [PATCH 07/16] chore: clean up rollup vs chain usage in wordle tutorial --- tutorials/wordle.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tutorials/wordle.md b/tutorials/wordle.md index d4ec22e87..ccefdcf6d 100644 --- a/tutorials/wordle.md +++ b/tutorials/wordle.md @@ -26,9 +26,9 @@ import constants from '../.vitepress/constants/constants.js' ## ๐Ÿ’ป Pre-requisites {#prerequisites} This tutorial is targeted for developers who have some experience -in the [Cosmos-SDK](https://docs.cosmos.network/). We will go through the steps to build the rollup, but for more information on how the Cosmos-SDK components work, [check out the Cosmos-SDK Docs](https://docs.cosmos.network/). +in the [Cosmos-SDK](https://docs.cosmos.network/). We will go through the steps to build the chain, but for more information on how the Cosmos-SDK components work, [check out the Cosmos-SDK Docs](https://docs.cosmos.network/). -Additionally, we recommend that you have gone over the [GM world](/tutorials/gm-world) tutorial first to see an example of a running rollup. +Additionally, we recommend that you have gone over the [quick start guide](/tutorials/quick-start) first to see an example of a running chain. You also need to have Rollkit CLI installed. You can install it by running: @@ -554,7 +554,7 @@ cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s {{constant This script builds and runs the node, now listening on port `7980`. After you have Go and Ignite CLI installed, and your local data availability node -running on your machine, you're ready to build, test, and launch your own sovereign rollup. +running on your machine, you're ready to build, test, and launch your own sovereign chain. ### ๐ŸŸข Building and running wordle chain {#build-and-run-wordle-chain} @@ -564,7 +564,7 @@ Initialize the Rollkit chain configuration for a local DA network with this comm ignite chain build && ignite rollkit init ``` -This will create a `~/.wordle` directory with all the necessary files to run a rollup on a local DA network. +This will create a `~/.wordle` directory with all the necessary files to run a chain on a local DA network. Now let's initialize a `rollkit.toml` file in the `worldle` directory by running: @@ -572,7 +572,7 @@ Now let's initialize a `rollkit.toml` file in the `worldle` directory by running rollkit toml init ``` -To start running a rollup with the Wordle chain, run the following command: +To start running the Wordle chain, run the following command: ```bash rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 @@ -580,7 +580,7 @@ rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 With that, we have kickstarted our wordle network! -### ๐Ÿš€ Interacting with the Rollup {#interacting-with-the-rollup} +### ๐Ÿš€ Interacting with the chain {#interacting-with-the-chain} In another window, from the `~/wordle` directory (where rollkit.toml is located) run the following command to submit a Wordle: @@ -756,4 +756,4 @@ There are many ways this codebase can be extended: ## ๐ŸŽ‰ Next steps -Congratulations! You've built a Wordle app using Cosmos-SDK and Rollkit. Now, explore connecting your rollup to DA networks like Celestia. +Congratulations! You've built a Wordle app using Cosmos-SDK and Rollkit. Now, explore connecting your chain to DA networks like Celestia. From b5ed00eccebdf009205444d9510aa2bcef8ba9e5 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:47:23 -0500 Subject: [PATCH 08/16] chore: bump rollkit to v0.14.1-rc.0 --- .vitepress/constants/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vitepress/constants/constants.js b/.vitepress/constants/constants.js index 66d47ac18..9b2af8c0e 100644 --- a/.vitepress/constants/constants.js +++ b/.vitepress/constants/constants.js @@ -4,7 +4,7 @@ const constants = Object.freeze({ nodeVersion: "21.7.2", yarnVersion: "1.22.19", - rollkitLatestTag: "v0.14.0", + rollkitLatestTag: "v0.14.1-rc.0", rollkitLatestSha: "ca746d0", rollkitCosmosSDKVersion: "v0.50.6-rollkit-v0.13.3-no-fraud-proofs", rollkitIgniteAppVersion: "rollkit/v0.2.1", From 06c7c58a321bc1e368e7510925f7e4dcee4536cd Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:54:38 -0500 Subject: [PATCH 09/16] feat: update ignite app how to guide --- guides/ignite-rollkit.md | 43 +++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/guides/ignite-rollkit.md b/guides/ignite-rollkit.md index 900196782..275b497d5 100644 --- a/guides/ignite-rollkit.md +++ b/guides/ignite-rollkit.md @@ -30,26 +30,6 @@ This will create the `gm` blockchain. Navigate to the blockchain directory: cd gm ``` -## Run a local Data Availability (DA) node {#run-local-da-node} - -First, set up a local data availability network node: - -```bash-vue -cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s {{constants.localDALatestTag}} -``` - -This script builds and runs a DA node, which will listen on port `7980`. - -## Run a local Sequencer node {#run-local-sequencer-node} - -First, set up a local sequencer node: - -```bash-vue -cd $HOME && curl -sSL https://rollkit.dev/install-local-sequencer.sh | sh -s {{constants.goSequencingLatestTag}} gm -``` - -This script builds and runs a local sequencer node, which will listen on port `50051`. - ## Install Ignite App Rollkit {#install-ignite-app-rollkit} In a new terminal window, you'll now install and run the Ignite App Rollkit. @@ -70,6 +50,14 @@ Enhance your blockchain by adding Rollkit features. Use the following command: ignite rollkit add ``` +## Build your chain {#build-your-chain} + +Build your chain using the following command: + +```bash +ignite chain build +``` + ## Initialize Your Blockchain {#initialize-your-blockchain} Before starting your blockchain, you need to initialize it with Rollkit support. Initialize the blockchain with Local DA as follows: @@ -88,16 +76,21 @@ rollkit toml init This will set up the Rollkit configuration file rollkit.toml, allowing you to use the Rollkit CLI for managing and running your blockchain. -## Start Your Rollup {#start-your-blockchain} +## Start your chain {#start-your-chain} + +Now you are ready to start your chain. We need to include 2 flags: + +1. `--rollkit.aggregator` to signal that this node is the block producer +2. `--rollkit.sequencer_rollup_id gm` to share the chain ID with the sequencer. -Finally, start your rollup (blockchain) using the following command: +Start your chain using the following command: ```bash -rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 +rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id gm ``` -Your rollkit app is now up and running. +Your rollkit chain is now up and running. ## Summary -By following these steps, you've successfully installed Ignite, set up Local DA, integrated Rollkit features into your blockchain, and configured the Rollkit CLI. +By following these steps, you've successfully installed Ignite, integrated Rollkit features into your blockchain, and configured the Rollkit CLI to run your chain against a mock DA and mock sequencer. From 8302edb125bc42e40915c539276b9807b9e7a8c9 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:37:53 -0500 Subject: [PATCH 10/16] fix: clean up wordle tutorial --- tutorials/wordle.md | 105 ++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 58 deletions(-) diff --git a/tutorials/wordle.md b/tutorials/wordle.md index ccefdcf6d..e88522d19 100644 --- a/tutorials/wordle.md +++ b/tutorials/wordle.md @@ -532,6 +532,8 @@ interface in order to allow sending the reward to the right guesser. ```go title="x/wordle/types/expected_keepers.go" type BankKeeper interface { + ... + // Methods imported from bank should be defined here SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error } @@ -543,28 +545,26 @@ compile the blockchain and take it out for a test drive. ## โ›“๏ธ Run the wordle chain -### ๐Ÿชถ Run a local DA node {#run-local-da-node} +### ๐ŸŸข Building and running wordle chain {#build-and-run-wordle-chain} -To set up a local data availability network node open a new terminal and run: +Initialize the Rollkit chain configuration for a local DA network with this command: -```bash-vue -cd $HOME && curl -sSL https://rollkit.dev/install-local-da.sh | sh -s {{constants.localDALatestTag}} +```bash +ignite chain build && ignite rollkit init ``` -This script builds and runs the node, now listening on port `7980`. +This will create a `~/.wordle` directory with all the necessary files to run a chain. -After you have Go and Ignite CLI installed, and your local data availability node -running on your machine, you're ready to build, test, and launch your own sovereign chain. - -### ๐ŸŸข Building and running wordle chain {#build-and-run-wordle-chain} - -Initialize the Rollkit chain configuration for a local DA network with this command: +It will also initialize 2 accounts `alice` and `bob`: ```bash -ignite chain build && ignite rollkit init +Initializing accounts... +โœ” Added account alice ... + +โœ” Added account bob ... ``` -This will create a `~/.wordle` directory with all the necessary files to run a chain on a local DA network. +We will use these accounts to submit transactions. Now let's initialize a `rollkit.toml` file in the `worldle` directory by running: @@ -575,18 +575,18 @@ rollkit toml init To start running the Wordle chain, run the following command: ```bash -rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 +rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id wordle ``` With that, we have kickstarted our wordle network! ### ๐Ÿš€ Interacting with the chain {#interacting-with-the-chain} -In another window, from the `~/wordle` directory (where rollkit.toml is located) run the following command to submit a Wordle: +In another window, from the `~/wordle` directory (where rollkit.toml is located) run the following command to submit a Wordle from `alice`: ```bash -rollkit tx wordle submit-wordle giant --from wordle-key --keyring-backend test --chain-id wordle -b async -y +rollkit tx wordle submit-wordle giant --from alice --keyring-backend test --chain-id wordle -b async ``` @@ -601,46 +601,29 @@ rollkit tx wordle submit-wordle giant --from wordle-key --keyring-backend test - This will ask you to confirm the transaction with the following message: -```json -{ - "body":{ - "messages":[ - { - "@type":"/YazzyYaz.wordle.wordle.MsgSubmitWordle", - "creator":"cosmos17lk3fgutf00pd5s8zwz5fmefjsdv4wvzyg7d74", - "word":"giant" - } - ], - "memo":"", - "timeout_height":"0", - "extension_options":[ - ], - "non_critical_extension_options":[ - ] - }, - "auth_info":{ - "signer_infos":[ - ], - "fee":{ - "amount":[ - ], - "gas_limit":"200000", - "payer":"", - "granter":"" - } - }, - "signatures":[ - ] -} -``` - -Cosmos-SDK will ask you to confirm the transaction here: - ```bash +auth_info: + fee: + amount: [] + gas_limit: "200000" + granter: "" + payer: "" + signer_infos: [] + tip: null +body: + extension_options: [] + memo: "" + messages: + - '@type': /wordle.wordle.MsgSubmitWordle + creator: cosmos1mr9p6wql4mmtp9xvsuklpw7fxx6g0qte7qd5q9 + word: giant + non_critical_extension_options: [] + timeout_height: "0" +signatures: [] confirm transaction before signing and broadcasting [y/N]: ``` -Confirm with a Y. +Confirm with a `y`. You will then get a response with a transaction hash as shown here: @@ -660,13 +643,19 @@ tx: null txhash: F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E ``` +Let's grab the `txhash` for later: + +```bash +TX_HASH=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 -rollkit query tx --type=hash F159E11116EC9505FC2C0D97E605357FEC0F3DAE06B57BFB17EA6A548905043E --chain-id wordle --output json | jq -r '.raw_log' +rollkit query tx --type=hash $TX_HASH --output json | jq -r '.raw_log' ``` @@ -681,7 +670,7 @@ Test out a few things for fun: ```bash -rollkit tx wordle submit-guess 12345 --from wordle-key --keyring-backend test --chain-id wordle -b async -y +rollkit tx wordle submit-guess 12345 --from bob --keyring-backend test --chain-id wordle -b async -y ``` @@ -693,7 +682,7 @@ Now try: ```bash -rollkit tx wordle submit-guess ABCDEFG --from wordle-key --keyring-backend test --chain-id wordle -b async -y +rollkit tx wordle submit-guess ABCDEFG --from bob --keyring-backend test --chain-id wordle -b async -y ``` @@ -705,7 +694,7 @@ Now try to submit another wordle even though one was already submitted ```bash -rollkit tx wordle submit-wordle meter --from wordle-key --keyring-backend test --chain-id wordle -b async -y +rollkit tx wordle submit-wordle meter --from bob --keyring-backend test --chain-id wordle -b async -y ``` @@ -717,13 +706,13 @@ Now letโ€™s try to guess a five letter word: ```bash -rollkit tx wordle submit-guess least --from wordle-key --keyring-backend test --chain-id wordle -b async -y +rollkit tx wordle submit-guess least --from bob --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. +word, it will increment the guess count for bob's account. We can verify this by querying the list: From 6b6c0eebf666738ba5fd7251a3faa84e82e57f7f Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:22:32 -0500 Subject: [PATCH 11/16] fix: docker compose turtorial --- tutorials/docker-compose.md | 45 +++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/tutorials/docker-compose.md b/tutorials/docker-compose.md index 484bd7c5d..51fbc7c18 100644 --- a/tutorials/docker-compose.md +++ b/tutorials/docker-compose.md @@ -50,7 +50,7 @@ This will allow us to focus on how we can run the wordle chain with Docker Compo 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: -```dockerfile +```dockerfile-vue # Stage 1: Install ignite CLI and rollkit FROM golang as base @@ -78,8 +78,11 @@ RUN go mod download # Copy all files from the current directory to the container COPY . . +# Remove the rollkit.toml and entrypoint files if they exist. This is to avoid cross OS issues. +RUN rm entrypoint rollkit.toml + # Build the chain -RUN ignite chain build && ignite rollkit +RUN ignite chain build && ignite rollkit init # Initialize the rollkit.toml file RUN rollkit toml init @@ -113,7 +116,11 @@ COPY --from=base /root/.wordle /root/.wordle RUN chmod +x ./entrypoint # Keep the container running after it has been started -CMD tail -f /dev/null +# CMD tail -f /dev/null + +ENTRYPOINT [ "rollkit" ] +CMD [ "start", "--rollkit.aggregator", "--rollkit.sequencer_rollup_id", "wordle"] + ``` 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. @@ -143,8 +150,7 @@ 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: -```yml -version: "3" +```yml-vue services: # Define the wordle chain service wordle: @@ -155,7 +161,17 @@ services: # 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 - command: rollkit start --rollkit.aggregator --rollkit.da_address http://localhost:7980 + command: + [ + "start", + "--rollkit.aggregator", + "--rollkit.da_address", + "http://0.0.0.0:7980", + "--rollkit.sequencer_address", + "0.0.0.0:50051", + "--rollkit.sequencer_rollup_id", + "wordle", + ] # Ensures the local-da service is up and running before starting the chain depends_on: - local-da @@ -164,19 +180,23 @@ services: # Define the local DA service local-da: # Use the published image from rollkit - image: ghcr.io/rollkit/local-da:{{constants.localDALatestTag}} + image: + ghcr.io/rollkit/local-da:{{constants.localDALatestTag}} # Set the name of the docker container for ease of use container_name: local-da # Publish the ports to connect ports: - "7980:7980" - + # Define the local sequencer service local-sequencer: # Use the published image from rollkit - image: ghcr.io/rollkit/local-sequencer:{{constants.localSequencerLatestTag}} + image: + 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"] # Publish the ports to connect ports: - "50051:50051" @@ -209,9 +229,10 @@ docker ps You should see output like the following: ```bash -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -cbf66a881cb2 wordle:latest "/bin/sh -c 'rollkitโ€ฆ" 5 seconds ago Up 4 seconds 0.0.0.0:26657->26657/tcp wordle -09bdf1e94862 ghcr.io/rollkit/local-da:v0.2.1 "local-da -listen-all" 6 seconds ago Up 5 seconds 0.0.0.0:7980->7980/tcp local-da +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +86f9bfa5b6d2 wordle "rollkit start --rolโ€ฆ" 7 minutes ago Up 3 seconds wordle +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`. From 4b5e1440ceefbd36aad9336a4b772ece9ea9d4d3 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:28:23 -0500 Subject: [PATCH 12/16] chore: edit kurtosis disclaimer --- tutorials/kurtosis.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tutorials/kurtosis.md b/tutorials/kurtosis.md index b371e2c8b..2b0671323 100644 --- a/tutorials/kurtosis.md +++ b/tutorials/kurtosis.md @@ -6,6 +6,8 @@ You can learn more about Kurtosis [here](https://docs.kurtosis.com/). :::warning Disclaimer Kurtosis currently does not fully support data persistence across runs, because of this it is not recommended for production use. + +This tutorial is WIP and does not currently support the new sequencing API introduced in rollkit v0.14.0 ::: From d944a0a277482c42d2f83a04e281f84f7b448db3 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:53:50 -0500 Subject: [PATCH 13/16] chore: remove kurtosis tutorial --- .vitepress/config.ts | 8 ++++---- tutorials/deploy-overview.md | 2 +- tutorials/kurtosis.md | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 15dddcc48..d89de526b 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -294,10 +294,10 @@ function sidebarHome() { text: "Docker Compose", link: "/tutorials/docker-compose", }, - { - text: "Kurtosis", - link: "/tutorials/kurtosis", - }, + // { + // text: "Kurtosis", + // link: "/tutorials/kurtosis", + // }, ], }, ], diff --git a/tutorials/deploy-overview.md b/tutorials/deploy-overview.md index b246d93eb..72f81fffe 100644 --- a/tutorials/deploy-overview.md +++ b/tutorials/deploy-overview.md @@ -17,4 +17,4 @@ These examples are for educational purposes only. Before deploying your rollup f ::: * [Deploy with Docker Compose](/tutorials/docker-compose) -* [Deploy with Kurtosis](/tutorials/kurtosis) + diff --git a/tutorials/kurtosis.md b/tutorials/kurtosis.md index 2b0671323..51d6b1660 100644 --- a/tutorials/kurtosis.md +++ b/tutorials/kurtosis.md @@ -121,6 +121,8 @@ def run(plan): "start", "--rollkit.aggregator", "--rollkit.da_address {0}".format(da_address), + "--rollkit.sequencer_address {0}".format(sequencer_address), + "--rollkit.sequencer_rollup_id wordle", ] # Define the jsonrpc ports wordle_ports = { From e1aece21688d2ab66bc536de273b4c867436d44d Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:53:59 -0500 Subject: [PATCH 14/16] chore: bump rollkit version --- .vitepress/constants/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vitepress/constants/constants.js b/.vitepress/constants/constants.js index 9b2af8c0e..3669399c1 100644 --- a/.vitepress/constants/constants.js +++ b/.vitepress/constants/constants.js @@ -4,7 +4,7 @@ const constants = Object.freeze({ nodeVersion: "21.7.2", yarnVersion: "1.22.19", - rollkitLatestTag: "v0.14.1-rc.0", + rollkitLatestTag: "v0.14.1-rc.1", rollkitLatestSha: "ca746d0", rollkitCosmosSDKVersion: "v0.50.6-rollkit-v0.13.3-no-fraud-proofs", rollkitIgniteAppVersion: "rollkit/v0.2.1", From 99f3948d5ec1e64294e009f5041c6b1576e820b1 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:16:57 -0500 Subject: [PATCH 15/16] build: bump versions --- .vitepress/constants/constants.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.vitepress/constants/constants.js b/.vitepress/constants/constants.js index 3669399c1..da60e0ca0 100644 --- a/.vitepress/constants/constants.js +++ b/.vitepress/constants/constants.js @@ -4,13 +4,13 @@ const constants = Object.freeze({ nodeVersion: "21.7.2", yarnVersion: "1.22.19", - rollkitLatestTag: "v0.14.1-rc.1", - rollkitLatestSha: "ca746d0", + rollkitLatestTag: "v0.14.1", + rollkitLatestSha: "5a8693e", rollkitCosmosSDKVersion: "v0.50.6-rollkit-v0.13.3-no-fraud-proofs", rollkitIgniteAppVersion: "rollkit/v0.2.1", localDALatestTag: "v0.3.1", - goSequencingLatestTag: "v0.4.0", + goSequencingLatestTag: "v0.4.1", igniteVersionTag: "v28.5.3", }); export default constants; From 563a320765bcd437826622fa3da7c67c2c2e0f91 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Fri, 15 Nov 2024 12:06:35 -0500 Subject: [PATCH 16/16] chore: remove cosmwasm testnet --- .vitepress/config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index d89de526b..39bc9dfc4 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -174,7 +174,7 @@ function nav() { { text: "Learn", link: "/learn/intro" }, { text: "Tutorials", link: "/tutorials/quick-start" }, { text: "How To Guides", link: "/guides/overview" }, - { text: "Testnets", link: "/testnets/cosmwasm-testnet" }, + // { text: "Testnets", link: "/testnets/cosmwasm-testnet" }, { text: "Blog", link: "/blog/overview" }, ]; } @@ -385,11 +385,11 @@ function sidebarHome() { }, ], }, - { - text: "Testnets", - collapsed: true, - items: [{ text: "CosmWasm Testnet", link: "/testnets/cosmwasm-testnet" }], - }, + // { + // text: "Testnets", + // collapsed: true, + // items: [{ text: "CosmWasm Testnet", link: "/testnets/cosmwasm-testnet" }], + // }, { text: "Blog", collapsed: true,