From 664f6fa7b1025bd95de2a88e3989c454d22239d9 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:08:38 -0400 Subject: [PATCH] chore: remove gm tutorial reference from restart guide and clean up --- guides/restart-rollup.md | 56 +++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/guides/restart-rollup.md b/guides/restart-rollup.md index 7defb7cb3..2633c2724 100644 --- a/guides/restart-rollup.md +++ b/guides/restart-rollup.md @@ -6,30 +6,40 @@ This guide will teach you how to restart your Rollkit rollup. This section covers the case where you need to restart your rollup. -In order to restart your rollup, you will need to run the `d start [...args]` +In order to restart your rollup, you simply need to run the `d start [...args]` command for your rollup. -This [is the example for the GM world tutorial](https://github.com/rollkit/docs/blob/8c69bfc1a545b758a260198feecb39806e9794a7/scripts/gm/init-local.sh#L94). -For the GM world tutorial, you can restart the chain by -[running the `restart-local.sh` script that was generated by `init-local.sh`](https://github.com/rollkit/docs/blob/8c69bfc1a545b758a260198feecb39806e9794a7/scripts/gm/init-local.sh#L85-L91). +For example, if you ran the [quick start](../tutorials/quick-start.md) tutorial, you started your rollup with: -Use the `DA_START_HEIGHT`, `NAMESPACE`, and `AUTH_TOKEN` variables from your original -start command. +```bash +rollkit start +``` + +You would have see output similar to: + +```bash +I[2024-10-17|14:52:12.845] Creating and publishing block module=BlockManager height=7 +I[2024-10-17|14:52:12.845] finalized block module=BlockManager height=7 num_txs_res=0 num_val_updates=0 block_app_hash= +I[2024-10-17|14:52:12.845] executed block module=BlockManager height=7 app_hash= +I[2024-10-17|14:52:12.846] indexed block events module=txindex height=7 +``` + +If you need to restart your rollup, you can run the same command again: + +```bash +rollkit start +``` -Using the `rollkit` rollup as an example, you can add something similar to your -respective start script to make it easier to save variables for later use: +You will see that the block height will continue from where it left off: ```bash -# the rest of your init script - -# create a restart-local.sh file to restart the chain later -rm restart-local.sh -echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-local.sh -echo "NAMESPACE=$NAMESPACE" >> restart-local.sh -echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-local.sh -echo "rollkit start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace \$NAMESPACE --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\"" >> restart-local.sh +I[2024-10-17|14:52:13.845] Creating and publishing block module=BlockManager height=8 +I[2024-10-17|14:52:13.845] finalized block module=BlockManager height=8 num_txs_res=0 num_val_updates=0 block_app_hash= +I[2024-10-17|14:52:13.845] executed block module=BlockManager height=8 app_hash= +I[2024-10-17|14:52:13.845] indexed block events module=txindex height=8 ``` +It is important to include any additional flags that you used when you first started your rollup. For example, if you used the `--rollkit.da_namespace` flag, you will need to include that flag when restarting your rollup to ensure your rollup continues to publish blobs to the same namespace. ## Restart rollup after running out of funds @@ -38,7 +48,7 @@ you are using to post blocks to your DA and consensus layer runs out of funds (t and you need to restart your rollup. In this example, we're using Celestia's [Mocha testnet](https://docs.celestia.org/nodes/mocha-testnet/) -and running a [GM world rollup](./gm-world.md). In this example, our Celestia DA light node +and running the [quick start](../tutorials/quick-start.md). In this example, our Celestia DA light node ran out of Mocha testnet TIA and we are unable to post new blocks to Celestia due to a [`Code: 19`](https://github.com/cosmos/cosmos-sdk/blob/main/types/errors/errors.go#L95) error. This error is defined by Cosmos SDK as: @@ -74,15 +84,11 @@ cd $HOME && cd celestia-node ### 🛑 Stopping your rollup {#stopping-your-rollup} -You can stop your gm chain (or other Rollkit rollup) by using `Control + C` in your terminal where the node is running. +You can stop your rollup by using `Control + C` in your terminal where the node is running. ### ⛽ Increase the gas fee {#increase-gas-fee} -To reiterate, before restarting the chain, you will need to increase the gas fee in order to avoid a `Code: 19` error: - -```bash -rollkit start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" -``` +To reiterate, before restarting the chain, you will need to increase the gas fee in order to avoid a `Code: 19` error. See the [How to configure gas price](./gas-price.md) guide for more information. ### 🔁 Restarting your rollup {#restarting-your-rollup} @@ -92,8 +98,4 @@ Follow the [restart rollup](#restart-rollup) section above. In order to save your TIA, we also recommend stopping the chain with `Control + C`, changing the gas fee back to the default (in our case, 8000 utia) and restarting the chain: -```bash -rollkit start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" -``` - 🎊 Congrats! You've successfully restarted your Rollkit rollup after running out of TIA.