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

feat: update gm tutorial parts 2 testnet and 3 mainnet #290

Merged
merged 13 commits into from
Jan 10, 2024

Conversation

jcstein
Copy link
Member

@jcstein jcstein commented Jan 6, 2024

Overview

Resolves #282

PREVIEW ARABICA

PREVIEW MAINNET

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

Summary by CodeRabbit

  • Documentation
    • Updated numbering format in tutorial links for consistency.
    • Added warning messages indicating that the "CosmWasm," "Polaris EVM," "Recipe Book," and "Wordle" tutorials are under construction.
    • Added a warning message and adjusted section titles in the "Full and Sequencer Node" tutorial.
  • New Features
    • Enhanced initialization and restart scripts for local, mainnet, and testnet environments.

Copy link
Contributor

coderabbitai bot commented Jan 6, 2024

Walkthrough

The updates across various scripts and tutorials reflect a shift towards numeric consistency, improved command structures for initializing and starting blockchain networks, and refined instructions for deploying to Celestia's ecosystems. Modifications include changes in numbering formats, enhanced genesis account management, the introduction of restart scripts, and the addition of a warning message in tutorials.

Changes

File(s) Change Summary
.vitepress/config.ts,
tutorials/full-and-sequencer-node.md,
tutorials/gm-world-mainnet.md
Changed numbering format from words to digits in tutorial links, added warning messages, and updated deployment instructions.
scripts/gm/init-local.sh,
scripts/gm/init-mainnet.sh,
scripts/gm/init-testnet.sh
Added flags to gmd start, updated genesis account commands, introduced restart scripts, and altered DA Layer querying and sequencer address handling.

Assessment against linked issues

Objective Addressed Explanation
Improve the documentation for deploying a sequencer to the mocha testnet. (#282) The changes in tutorials/full-and-sequencer-node.md include updated deployment instructions.
Clarify the process of selecting a namespace by providing a helper similar to `NAMESPACE_ID=$(echo -n $NAMESPACE_NAME openssl dgst -sha256 -binary head -c 8
Add a link to the testnet faucet [1] with a copy-paste $request <addr> command to facilitate easier access for developers. (#282) The addition of the testnet faucet link and copy-paste command is not explicitly mentioned in the changes.
Suggest using an explorer to validate the functionality of the deployed namespace on the mocha testnet. (#282) The changes in tutorials/full-and-sequencer-node.md suggest using an explorer for validation.

🐇✨
In scripts and prose, numbers align,
As celestial nodes in the sky combine.
A rabbit's touch, so deft and fine,
We hop to the future, with code divine. 🌌🚀

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

github-actions bot commented Jan 6, 2024

PR Preview Action v1.4.6
Preview removed because the pull request was closed.
2024-01-10 04:54 UTC

@jcstein jcstein marked this pull request as ready for review January 9, 2024 18:25
@jcstein jcstein requested a review from Manav-Aggarwal January 9, 2024 18:26
@jcstein jcstein self-assigned this Jan 9, 2024
@jcstein jcstein added the documentation Improvements or additions to documentation label Jan 9, 2024
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: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a1cf409 and a5a3597.
Files selected for processing (8)
  • .vitepress/config.ts (1 hunks)
  • scripts/gm/init-local.sh (1 hunks)
  • scripts/gm/init-mainnet.sh (2 hunks)
  • scripts/gm/init-testnet.sh (2 hunks)
  • tutorials/full-and-sequencer-node.md (2 hunks)
  • tutorials/gm-world-mainnet.md (2 hunks)
  • tutorials/gm-world-testnet.md (6 hunks)
  • tutorials/gm-world.md (4 hunks)
Files skipped from review due to trivial changes (5)
  • .vitepress/config.ts
  • tutorials/full-and-sequencer-node.md
  • tutorials/gm-world-mainnet.md
  • tutorials/gm-world-testnet.md
  • tutorials/gm-world.md
Additional comments: 11
scripts/gm/init-testnet.sh (5)
  • 17-18: Ensure that the RPC endpoint URL is correct and accessible. If the endpoint changes, this script will need to be updated accordingly.
Verification successful

The output from the curl --head command indicates that the RPC endpoint https://rpc.celestia-arabica-11.com/block is accessible and returns a 200 OK status, which means the endpoint is currently operational and the script should be able to retrieve the DA Layer block height from this endpoint.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify the accessibility of the RPC endpoint.
curl --head https://rpc.celestia-arabica-11.com/block

Length of output: 939

* 34-35: The commands for adding genesis accounts have been updated to the new format. Confirm that the `gmd genesis add-genesis-account` command works as expected with the `--keyring-backend test` flag.
  • 38-38: The gmd genesis gentx command has been updated. Ensure that the genesis transaction is created correctly with the new command.

  • 47-47: The script now includes a command to add the centralized sequencer address to genesis.json. Verify that the jq command correctly formats the JSON and that the mv command successfully replaces the original file without errors.

Verification successful

The verification script successfully created a mock genesis.json file and used a placeholder for the $PUB_KEY variable. The jq command was then executed with these mock values, and the output was verified to be correctly formatted JSON. Additionally, the mv command was used to replace the mock genesis.json with temp.json, and the final output confirms that the mv command worked as expected.

Based on the output provided, the jq command correctly formats the JSON, and the mv command successfully replaces the original file without errors.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify the jq command formats the JSON correctly and mv command works.
jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json
cat temp.json # This should show the correct JSON format.

Length of output: 354



Script:

#!/bin/bash
# Create a mock genesis.json file
echo '{"consensus": {"validators": []}}' > genesis.json

# Define a placeholder JSON object for $PUB_KEY
PUB_KEY='{"type":"tendermint/PubKeyEd25519","value":"sOmEeNcOdEdPuBlIcKeY=="}'

# Execute the jq command with the mock values
jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "some_address", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' genesis.json > temp.json

# Output the result to verify correct JSON formatting
cat temp.json

# Verify the mv command by replacing the mock genesis.json with temp.json
mv temp.json genesis.json

# Output the new genesis.json to verify the mv command worked
cat genesis.json

Length of output: 985

* 56-56: The `gmd start` command has been updated with new parameters. Confirm that the chain starts correctly with these parameters and that there are no errors in the console output.
scripts/gm/init-mainnet.sh (5)
  • 17-18: Confirm that the RPC endpoint for the mainnet is correct and that the curl command successfully retrieves the DA Layer start height.
Verification successful

The output from the curl --head https://rpc.lunaroasis.net/block command indicates that the RPC endpoint is accessible and returns a 200 OK status, which means the request has succeeded. The headers also show standard response fields and no errors, suggesting that the endpoint is functioning correctly.

Based on this information, the RPC endpoint for the mainnet is correct, and the curl command in the init-mainnet.sh script should successfully retrieve the DA Layer start height.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify the accessibility of the mainnet RPC endpoint.
curl --head https://rpc.lunaroasis.net/block

Length of output: 1377

* 34-35: The commands for adding genesis accounts have been updated. Verify that the `gmd genesis add-genesis-account` command functions correctly with the `--keyring-backend test` flag.
  • 38-38: The gmd genesis gentx command has been updated. Ensure that the genesis transaction is created correctly with the new command.

  • 47-47: The script now includes a command to add the centralized sequencer address to genesis.json. Verify that the jq command correctly formats the JSON and that the mv command successfully replaces the original file without errors.

Verification successful

The verification script successfully created the necessary directories and dummy genesis.json file. It then executed the jq command with dummy values for $PUB_KEY and $ADDRESS, which formatted the JSON as intended. The output confirms that the jq command produced the correct JSON structure in temp.json. Following this, the mv command successfully replaced the original genesis.json file with temp.json, as indicated by the message "mv command executed successfully."

Based on the output, we can conclude that the jq command correctly formats the JSON and that the mv command successfully replaces the original file without errors.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify the jq command formats the JSON correctly and mv command works.
jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json
cat temp.json # This should show the correct JSON format.

Length of output: 354



Script:

#!/bin/bash
# Set dummy but valid values for PUB_KEY and ADDRESS
PUB_KEY='{"type":"tendermint/PubKeyEd25519","value":"sOmEdUmMyKeY=="}'
ADDRESS='sOmEdUmMyAdDrEsS'

# Verify the jq command formats the JSON correctly and mv command works.
jq --argjson pubKey "$PUB_KEY" --arg address "$ADDRESS" '.consensus["validators"]=[{"address": $address, "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json

# Check if the jq command was successful by checking the existence and content of temp.json
if [ -s temp.json ]; then
  echo "jq command executed successfully. Content of temp.json:"
  cat temp.json
  # Now verify if the mv command can replace the original file without errors
  mv temp.json ~/.gm/config/genesis.json && echo "mv command executed successfully."
else
  echo "jq command failed to produce output."
fi

Length of output: 574



Script:

#!/bin/bash
# Create a dummy genesis.json file with a basic structure
echo '{"consensus": {"validators": []}}' > ~/.gm/config/genesis.json

# Set dummy but valid values for PUB_KEY and ADDRESS
PUB_KEY='{"type":"tendermint/PubKeyEd25519","value":"sOmEdUmMyKeY=="}'
ADDRESS='sOmEdUmMyAdDrEsS'

# Verify the jq command formats the JSON correctly and mv command works.
jq --argjson pubKey "$PUB_KEY" --arg address "$ADDRESS" '.consensus["validators"]=[{"address": $address, "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json

# Check if the jq command was successful by checking the existence and content of temp.json
if [ -s temp.json ]; then
  echo "jq command executed successfully. Content of temp.json:"
  cat temp.json
  # Now verify if the mv command can replace the original file without errors
  mv temp.json ~/.gm/config/genesis.json && echo "mv command executed successfully."
else
  echo "jq command failed to produce output."
fi

Length of output: 731



Script:

#!/bin/bash
# Create the necessary directories for the genesis.json file
mkdir -p ~/.gm/config/

# Create a dummy genesis.json file with a basic structure
echo '{"consensus": {"validators": []}}' > ~/.gm/config/genesis.json

# Set dummy but valid values for PUB_KEY and ADDRESS
PUB_KEY='{"type":"tendermint/PubKeyEd25519","value":"sOmEdUmMyKeY=="}'
ADDRESS='sOmEdUmMyAdDrEsS'

# Verify the jq command formats the JSON correctly and mv command works.
jq --argjson pubKey "$PUB_KEY" --arg address "$ADDRESS" '.consensus["validators"]=[{"address": $address, "pub_key": $pubKey, "power": "1000", "name": "Rollkit Sequencer"}]' ~/.gm/config/genesis.json > temp.json

# Check if the jq command was successful by checking the existence and content of temp.json
if [ -s temp.json ]; then
  echo "jq command executed successfully. Content of temp.json:"
  cat temp.json
  # Now verify if the mv command can replace the original file without errors
  mv temp.json ~/.gm/config/genesis.json && echo "mv command executed successfully."
else
  echo "jq command failed to produce output."
fi

Length of output: 1024

* 49-53: The creation of `restart-mainnet.sh` is a new addition. Ensure that the file is created correctly and that the `gmd start` command within it includes all necessary flags and parameters.
scripts/gm/init-local.sh (1)
  • 87-87: The gmd start command in the restart-local.sh script now includes the --minimum-gas-prices="0.025stake" flag. Verify that the chain starts correctly with this new parameter.

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: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a5a3597 and 5f2c83d.
Files selected for processing (5)
  • tutorials/cosmwasm.md (1 hunks)
  • tutorials/full-and-sequencer-node.md (2 hunks)
  • tutorials/polaris-evm.md (1 hunks)
  • tutorials/recipe-book.md (1 hunks)
  • tutorials/wordle.md (1 hunks)
Files skipped from review due to trivial changes (3)
  • tutorials/cosmwasm.md
  • tutorials/polaris-evm.md
  • tutorials/wordle.md
Files skipped from review as they are similar to previous changes (1)
  • tutorials/full-and-sequencer-node.md
Additional comments: 2
tutorials/recipe-book.md (2)
  • 3-5: The addition of the warning message at the beginning of the tutorial is clear and visible. This is a good practice to inform users about the current state of the documentation.

  • 3-5: Please ensure that the warning message is accurate and reflects the current state of the tutorial. If the tutorial is no longer under construction, the warning should be updated or removed to avoid confusion.

Verification successful

To verify the current state of the "Recipe Book rollup" tutorial and whether it is still under construction, we can check the most recent commits to the tutorials/recipe-book.md file. This will help us determine if there have been any updates that might indicate the tutorial's completion.


The most recent commit to the tutorials/recipe-book.md file is titled "feat: add construction signs" and was made by joshcs.eth ᵍᵐ 2 minutes ago. This suggests that the warning message about the tutorial being under construction was recently added, which implies that the tutorial is indeed still under construction.

Based on this information, the warning message in the tutorials/recipe-book.md file is accurate and reflects the current state of the tutorial.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify if the tutorial is still under construction or if it can be considered complete.
# This would typically involve checking with the documentation team or the latest commits related to this file.
# Since we cannot execute such actions, this is a placeholder for the verification process.
echo "Verify the current state of the 'Recipe Book rollup' tutorial with the documentation team."

Length of output: 196



Script:

#!/bin/bash
# Check the most recent commits to the tutorials/recipe-book.md file
git log -n 5 --pretty=format:"%h - %s (%an, %ar)" -- tutorials/recipe-book.md

Length of output: 483

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: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 5f2c83d and 681cbbd.
Files selected for processing (1)
  • tutorials/gm-world-mainnet.md (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • tutorials/gm-world-mainnet.md

and context to what they are in docs
resolves remainder of #282

Co-Authored-By: Daniel Olshansky <[email protected]>
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: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 681cbbd and 3dbe0bd.
Files selected for processing (2)
  • tutorials/gm-world-mainnet.md (2 hunks)
  • tutorials/gm-world-testnet.md (6 hunks)
Files skipped from review as they are similar to previous changes (2)
  • tutorials/gm-world-mainnet.md
  • tutorials/gm-world-testnet.md

@jcstein jcstein changed the title feat: begin updating for testnet / mainnet versions of gm world feat: update gm tutorial parts 2 testnet and 3 mainnet Jan 9, 2024
@jcstein jcstein merged commit d023474 into main Jan 10, 2024
2 checks passed
@jcstein jcstein deleted the jcs/testnet-updates branch January 10, 2024 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Poktroll Feedback] Umbrella ticket for feedback from the Pocket Network Protocol team at GROVE
2 participants