Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update restart guide #272

Merged
merged 3 commits into from
Nov 16, 2023
Merged

chore: update restart guide #272

merged 3 commits into from
Nov 16, 2023

Conversation

jcstein
Copy link
Member

@jcstein jcstein commented Nov 16, 2023

Overview

Resolves #198

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

Summary by CodeRabbit

  • Refactor

    • Renamed NAMESPACE_ID to NAMESPACE across various initialization scripts to standardize the variable naming convention.
  • Documentation

    • Added links to tutorials on restarting a rollup, enhancing the guidance for users on rollup management.
    • Updated the "Restart rollup" section with a new subsection on handling rollups after running out of funds, providing comprehensive instructions for users.
  • Chores

    • Updated command-line arguments to reflect the renaming of namespace variables in scripts.

Copy link
Contributor

coderabbitai bot commented Nov 16, 2023

Walkthrough

The changes across various scripts and tutorials reflect a consistent update from NAMESPACE_ID to NAMESPACE, indicating a shift in variable naming conventions. Additionally, a new tutorial on restarting a rollup has been added, with a focus on simplifying the process and including steps for funding and transaction management. These updates aim to streamline user experience and documentation clarity.

Changes

File Pattern Change Summary
scripts/.../init.sh Renamed NAMESPACE_ID to NAMESPACE and updated usage in scripts.
tutorials/... Added links to a new tutorial on restarting a rollup.
tutorials/restart-rollup.md Expanded "Restart rollup" section with detailed instructions and new subsections.

Assessment against linked issues (Beta)

Objective Addressed Explanation
#198: Simplify the restart process for the rollup tutorial to a single step.
#198: Include instructions for funding an account and sending a transaction to oneself with a higher gas fee.
#198: Update the documentation to explain how to restart a previous rollup.

🐇 In the fall of code, we hop and tweak, 🍂
Variables renamed, and new guides we seek.
With scripts now streamlined, and docs crystal clear,
We celebrate changes, as winter draws near. ❄️✨


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link
Contributor

github-actions bot commented Nov 16, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-11-16 16:19 UTC

@Manav-Aggarwal Manav-Aggarwal merged commit 9697261 into main Nov 16, 2023
2 checks passed
@Manav-Aggarwal Manav-Aggarwal deleted the jcs/restart branch November 16, 2023 16:18
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 4

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between d5a763d and 3a8d483.
Files selected for processing (15)
  • scripts/cosmwasm/init.sh (2 hunks)
  • scripts/gm/init-full-node.sh (2 hunks)
  • scripts/gm/init-local.sh (3 hunks)
  • scripts/gm/init-mainnet.sh (2 hunks)
  • scripts/gm/init-testnet.sh (2 hunks)
  • scripts/recipes/init.sh (2 hunks)
  • scripts/wordle/init.sh (2 hunks)
  • tutorials/bitcoin.md (1 hunks)
  • tutorials/cosmwasm.md (1 hunks)
  • tutorials/full-and-sequencer-node.md (4 hunks)
  • tutorials/gm-world.md (1 hunks)
  • tutorials/polaris-evm.md (1 hunks)
  • tutorials/recipe-book.md (1 hunks)
  • tutorials/restart-rollup.md (3 hunks)
  • tutorials/wordle.md (1 hunks)
Files skipped from review due to trivial changes (13)
  • scripts/cosmwasm/init.sh
  • scripts/gm/init-full-node.sh
  • scripts/gm/init-local.sh
  • scripts/gm/init-mainnet.sh
  • scripts/gm/init-testnet.sh
  • scripts/recipes/init.sh
  • scripts/wordle/init.sh
  • tutorials/cosmwasm.md
  • tutorials/full-and-sequencer-node.md
  • tutorials/gm-world.md
  • tutorials/polaris-evm.md
  • tutorials/recipe-book.md
  • tutorials/wordle.md
Additional comments: 1
tutorials/restart-rollup.md (1)
  • 1-45: The introduction and the initial steps for restarting a rollup are clear and well-documented. The use of variables like DA_START_HEIGHT, NAMESPACE, and AUTH_TOKEN is a good practice for maintainability and reusability of the scripts.

Comment on lines 329 to 341
Set variables for starting the chain:

```bash
export NAMESPACE_ID=$(openssl rand -hex 8)
export NAMESPACE=$(openssl rand -hex 8)
```

<!-- export DA_HEIGHT=$(bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser rpcpassword=rpcpass getblockcount) -->

Start the chain:

```bash
ethermintd start --rollkit.aggregator true --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace_id $NAMESPACE_ID --rollkit.da_start_height 1
ethermintd start --rollkit.aggregator true --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height 1
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable NAMESPACE_ID has been correctly updated to NAMESPACE in the export statement, but the ethermintd start command still references the old variable name --rollkit.namespace_id. This should be updated to --rollkit.namespace to reflect the new naming convention.

- ethermintd start --rollkit.aggregator true --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height 1
+ ethermintd start --rollkit.aggregator true --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace $NAMESPACE --rollkit.da_start_height 1

Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Set variables for starting the chain:
```bash
export NAMESPACE_ID=$(openssl rand -hex 8)
export NAMESPACE=$(openssl rand -hex 8)
```
<!-- export DA_HEIGHT=$(bitcoin-core.cli -regtest -rpcport=18332 -rpcuser=rpcuser rpcpassword=rpcpass getblockcount) -->
Start the chain:
```bash
ethermintd start --rollkit.aggregator true --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace_id $NAMESPACE_ID --rollkit.da_start_height 1
ethermintd start --rollkit.aggregator true --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height 1
```
Set variables for starting the chain:
```bash
export NAMESPACE=$(openssl rand -hex 8)

Start the chain:

ethermintd start --rollkit.aggregator true --rollkit.da_layer bitcoin --rollkit.da_config='{"host":"127.0.0.1:18332","user":"rpcuser","pass":"rpcpass","http_post_mode":true,"disable_tls":true}' --rollkit.namespace $NAMESPACE --rollkit.da_start_height 1

</details>
<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->

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 "gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{\"base_url\":\"http://localhost:26658\",\"timeout\":60000000000,\"fee\":600000,\"gas_limit\":6000000,\"auth_token\":\"'\$AUTH_TOKEN'\"}' --rollkit.namespace_id \$NAMESPACE --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr \"0.0.0.0:36656\"" >> restart-local.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a discrepancy in the command line argument --rollkit.namespace_id which should be updated to --rollkit.namespace as per the pull request summary. This needs to be corrected to maintain consistency across the documentation and the codebase.

- echo "gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{\"base_url\":\"http://localhost:26658\",\"timeout\":60000000000,\"fee\":600000,\"gas_limit\":6000000,\"auth_token\":\"'\$AUTH_TOKEN'\"}' --rollkit.namespace_id \$NAMESPACE --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr \"0.0.0.0:36656\"" >> restart-local.sh
+ echo "gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{\"base_url\":\"http://localhost:26658\",\"timeout\":60000000000,\"fee\":600000,\"gas_limit\":6000000,\"auth_token\":\"'\$AUTH_TOKEN'\"}' --rollkit.namespace \$NAMESPACE --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr \"0.0.0.0:36656\"" >> restart-local.sh

Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
echo "gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{\"base_url\":\"http://localhost:26658\",\"timeout\":60000000000,\"fee\":600000,\"gas_limit\":6000000,\"auth_token\":\"'\$AUTH_TOKEN'\"}' --rollkit.namespace_id \$NAMESPACE --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr \"0.0.0.0:36656\"" >> restart-local.sh
echo "gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{\"base_url\":\"http://localhost:26658\",\"timeout\":60000000000,\"fee\":600000,\"gas_limit\":6000000,\"auth_token\":\"'\$AUTH_TOKEN'\"}' --rollkit.namespace \$NAMESPACE --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr \"0.0.0.0:36656\"" >> restart-local.sh

Comment on lines 60 to 63
4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=1 module=BlockManager
4:51PM ERR DA layer submission failed Error="Codespace: 'sdk', Code: 19, Message: " attempt=2 module=BlockManager
4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=3 module=BlockManager
4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=4 module=BlockManager
4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=5 module=BlockManager
4:51PM ERR DA layer submission failed error="Codespace: 'sdk', Code: 19, Message: " attempt=6 module=BlockManager
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error messages are helpful for troubleshooting, but it would be beneficial to include the full error message for clarity. The current snippet shows an incomplete message with "Message: ". It should be completed or explained that the actual message will vary based on the context.


```bash
ethermintd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://localhost:26659","timeout":60000000000,"gas_limit":6000000,"fee":8000}' --rollkit.namespace_id 8BE3175CBF305BC2 --rollkit.da_start_height $DA_BLOCK_HEIGHT
gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://localhost:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr "0.0.0.0:36656"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commands provided for increasing and reducing the gas fee are clear and show the necessary changes. However, the --rollkit.namespace_id argument should be updated to --rollkit.namespace to reflect the new naming convention.

- gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://localhost:26658","timeout":60000000000,"fee":800000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr "0.0.0.0:36656"
+ gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://localhost:26658","timeout":60000000000,"fee":800000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr "0.0.0.0:36656"

- gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://localhost:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr "0.0.0.0:36656"
+ gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://localhost:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr "0.0.0.0:36656"

Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://localhost:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace_id $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr "0.0.0.0:36656"
gmd start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config='{"base_url":"http://localhost:26658","timeout":60000000000,"fee":600000,"gas_limit":6000000,"auth_token":"'$AUTH_TOKEN'"}' --rollkit.namespace $NAMESPACE --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr "0.0.0.0:36656"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: modify restart rollup tutorial
2 participants