diff --git a/public/wordle/init.sh b/public/wordle/init.sh index 2cc12ad84..4babd29c2 100644 --- a/public/wordle/init.sh +++ b/public/wordle/init.sh @@ -8,17 +8,6 @@ CHAINFLAG="--chain-id ${CHAIN_ID}" TOKEN_AMOUNT="10000000000000000000000000stake" STAKING_AMOUNT="1000000000stake" -# query the DA Layer start height, in this case we are querying -# an RPC endpoint provided by Celestia Labs. The RPC endpoint is -# to allow users to interact with Celestia's core network by querying -# the node's state and broadcasting transactions on the Celestia -# network. This is for Arabica, if using another network, change the RPC. -DA_BLOCK_HEIGHT=$(curl https://rpc.celestia-arabica-11.com/block | jq -r '.result.block.header.height') -echo -e "\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n" - -AUTH_TOKEN=$(celestia light auth write --p2p.network arabica) -echo -e "\n Your DA AUTH_TOKEN is $AUTH_TOKEN \n" - # build the wordle chain with Rollkit ignite chain build @@ -48,10 +37,8 @@ jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS # create a restart-testnet.sh file to restart the chain later [ -f restart-wordle.sh ] && rm restart-wordle.sh -echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-wordle.sh -echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-wordle.sh -echo "wordled start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-wordle.sh +echo "wordled start --rollkit.aggregator --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices=\"0.025stake\" --rollkit.da_address \"http://localhost:7980\"" >> restart-wordle.sh # start the chain -wordled start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" +wordled start --rollkit.aggregator --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" --rollkit.da_address "http://localhost:7980" diff --git a/tutorials/gm-world-frontend.md b/tutorials/gm-world-frontend.md index fd71e253d..d222fa76b 100644 --- a/tutorials/gm-world-frontend.md +++ b/tutorials/gm-world-frontend.md @@ -60,4 +60,3 @@ If you run into any issues, make sure your Keplr wallet is updated and set to co ## ๐ŸŽ‰ Next steps Congratulations! You've experienced connecting to a rollup from the user side โ€” simple and straightforward. Now, you might consider exploring how to add more application logic to your rollup using the Cosmos SDK, as demonstrated in our Wordle App tutorial. - diff --git a/tutorials/wordle.md b/tutorials/wordle.md index 69adae7fe..a8c8d01ba 100644 --- a/tutorials/wordle.md +++ b/tutorials/wordle.md @@ -23,11 +23,6 @@ import constants from '../.vitepress/constants/constants.js' ::: -::: warning -The script for this tutorial is built for Celestia's -[Arabica devnet](https://docs.celestia.org/nodes/arabica-devnet). -::: - ## ๐Ÿ’ป Pre-requisites {#prerequisites} Given this tutorial is targeted for developers who are experienced @@ -187,7 +182,7 @@ let's build the Wordle app! For the Wordle module, we can add dependencies offered by Cosmos-SDK. -From the Cosmos-SDK docs, a [module](https://docs.ignite.com/v0.25.2/guide/nameservice#cosmos-sdk-modules) +From the Cosmos-SDK docs, a [module](https://docs.cosmos.network/main/glossary#module) is defined as the following: > In a Cosmos SDK blockchain, application-specific logic @@ -224,7 +219,7 @@ This will scaffold the Wordle module to our Wordle Chain project. Messages allow us to process and submit information to our specific module. -From the Cosmos-SDK docs, [messages](https://docs.cosmos.network/main/building-modules/messages-and-queries.html#messages) +From the Cosmos-SDK docs, [messages](https://docs.cosmos.network/main/build/building-modules/messages-and-queries) are: > In the Cosmos SDK, messages are objects that are contained @@ -287,7 +282,7 @@ this address submitted. Now itโ€™s time to implement the Keeper functions for each -message. From the Cosmos-SDK docs, [Keeper](https://docs.cosmos.network/main/building-modules/keeper.html) +message. From the Cosmos-SDK docs, [Keeper](https://docs.cosmos.network/main/build/building-modules/keeper) is defined as the following: > The main core of a Cosmos SDK module is a piece called the keeper. @@ -550,27 +545,18 @@ compile the blockchain and take it out for a test drive. ## โ›“๏ธ Run the wordle chain -### ๐Ÿชถ Run a Celestia light node {#run-celestia-light-node} - -Follow instructions to install and start your Celestia Data Availability -layer Light Node selecting the Arabica Devnet. You can -find instructions to install and run the node [here](https://docs.celestia.org/nodes/light-node). +### ๐Ÿชถ Run a mock DA node {#run-mock-da-node} -After you have Go and Ignite CLI installed, and your Celestia Light -Node running on your machine, you're ready to build, test, and launch your own -sovereign rollup. +To set up a mock data availability network node run: -Be sure you have initialized your node before trying to start it. -Your start command should look similar to: - - -```bash -celestia light start --core.ip validator-1.celestia-arabica-11.com --p2p.network arabica +```bash-vue +curl -sSL https://rollkit.dev/install-mock-da.sh | sh {{constants.mockDALatestTag}} ``` -After you have Go and Ignite CLI installed, and your Celestia -Light Node running on your machine, you're ready to build, -test, and launch your own sovereign rollup. +This script builds and runs the node, now listening on port `7980`. + +After you have Go and Ignite CLI installed, and your mock data availability node +running on your machine, you're ready to build, test, and launch your own sovereign rollup. ### ๐ŸŸข Building and running wordle chain {#build-and-run-wordle-chain} @@ -599,9 +585,6 @@ bash init.sh With that, we have kickstarted our `wordled` network! -Find -[your account address on an Arabica explorer to see your `PayForBlobs` transactions](https://explorer.modular.cloud/celestia-arabica/addresses/celestia10rdu7l3gzeuxplpnr5vxchvxxflx7ym0q6wt5v). - In another window, run the following to submit a Wordle: @@ -612,7 +595,7 @@ wordled tx wordle submit-wordle giant --from wordle-key --keyring-backend test - > NOTE: We are submitting a transaction asynchronously to avoid any timeout errors. With Rollkit as a replacement to CometBFT, we - need to wait for Celestia's Data-Availability network to ensure a block + need to wait for the data availability network to ensure a block was included from Wordle, before proceeding to the next block. Currently, in Rollkit, the single aggregator is not moving forward with the next block production as long as it is trying to submit the current block to the DA network. @@ -760,9 +743,6 @@ extend the code base. ### ๐Ÿ”ฎ Extending in the future {#extending-in-the-future} -You can extend the codebase and improve this tutorial by checking -out the repository [here](https://github.com/celestiaorg/wordle). - There are many ways this codebase can be extended: 1. You can improve messaging around when you guess the correct word. @@ -776,3 +756,7 @@ There are many ways this codebase can be extended: 5. You can create a bot that submits a wordle every day at a specific time. 6. You can create a vue.js front-end with Ignite using example open-source repositories [here](https://github.com/yyx990803/vue-wordle) and [here](https://github.com/xudafeng/wordle). + +## ๐ŸŽ‰ Next steps + +Congratulations! You've built a Wordle app using Cosmos-SDK and Rollkit. Now, explore connecting your rollup to DA networks like Celestia.