-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix: clean up the genesis guide and bring up to date #527
Conversation
WalkthroughThe document Changes
Assessment against linked issues
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (4)
guides/create-genesis.md (4)
5-6
: Fix typo in section headingThe word "Pre-requisities" should be "Prerequisites"
-## 0. Pre-requisities +## 0. Prerequisites🧰 Tools
🪛 LanguageTool
[typographical] ~6-~6: Use a comma after an introductory phrase.
Context: ...art the chain. ## 0. Pre-requisities For this guide you need to have a chain directory wher...(COMMA_INTRODUCTORY_WORDS_PHRASES)
27-37
: Add explanations for environment variablesThe variables are well-structured, but adding explanations would help users understand their purpose.
```sh +# Name of your validator node VALIDATOR_NAME=validator1 +# Unique identifier for your chain CHAIN_ID=gm +# Name for the key in your keyring KEY_NAME=rollup-key +# Chain ID flag used in commands CHAINFLAG="--chain-id ${CHAIN_ID}" +# Initial token amount for genesis account TOKEN_AMOUNT="10000000000000000000000000stake" +# Amount of tokens to stake for validator STAKING_AMOUNT="1000000000stake"--- `52-55`: **Use platform-agnostic path examples** The current example uses a macOS-style path. Consider using a more generic example and mentioning platform differences. ```diff ```sh [chain] - config_dir = "/Users/you/.gm" + # On Unix-like systems (Linux/macOS): $HOME/.gm + # On Windows: %USERPROFILE%\.gm + config_dir = "/path/to/your/.gm"
--- Line range hint `1-142`: **Consider adding section prerequisites and expected outcomes** While the guide is well-structured, each major section could benefit from: 1. Brief explanation of why the step is necessary 2. What the expected outcome is 3. How to verify the step was successful This would help users better understand the process and troubleshoot issues. <details> <summary>🧰 Tools</summary> <details> <summary>🪛 LanguageTool</summary> [typographical] ~6-~6: Use a comma after an introductory phrase. Context: ...art the chain. ## 0. Pre-requisities For this guide you need to have a chain directory wher... (COMMA_INTRODUCTORY_WORDS_PHRASES) </details> </details> </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 0ea3d02d39b8cd824da879f0c2f9f17ed7c4eece and 60c6d1b3c86283d78f7bf712a556eb5b47d95166. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `guides/create-genesis.md` (2 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🪛 LanguageTool</summary> <details> <summary>guides/create-genesis.md</summary> [typographical] ~6-~6: Use a comma after an introductory phrase. Context: ...art the chain. ## 0. Pre-requisities For this guide you need to have a chain directory wher... (COMMA_INTRODUCTORY_WORDS_PHRASES) </details> </details> </details> <details> <summary>🔇 Additional comments (2)</summary> <details> <summary>guides/create-genesis.md (2)</summary> `12-19`: **Verify the Ignite CLI commands and add explanatory comments** While the commands are correct, it would be helpful to add brief explanations for what each command does. Also, we should verify the rollkit version being used. Consider adding comments to explain each command: ```diff ```sh +# Initialize a new chain named 'gm' with minimal configuration ignite scaffold chain gm --address-prefix gm --minimal --skip-proto cd gm +# Install rollkit from the Ignite apps repository ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.1 +# Add rollkit support to your chain ignite rollkit add ignite chain build +# Initialize rollkit configuration ignite rollkit init rollkit toml init
<details> <summary>✅ Verification successful</summary> **Update documentation with command explanations, rollkit version is current** The rollkit version v0.2.1 used in the documentation is the latest available version, so no version update is needed. The suggested explanatory comments will help users better understand the purpose of each command. ```diff ```sh +# Initialize a new chain named 'gm' with minimal configuration ignite scaffold chain gm --address-prefix gm --minimal --skip-proto cd gm +# Install rollkit from the Ignite apps repository ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.1 +# Add rollkit support to your chain ignite rollkit add +# Build the blockchain application ignite chain build +# Initialize rollkit configuration ignite rollkit init +# Create initial rollkit TOML configuration file rollkit toml init
</details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Check if there's a newer compatible version of rollkit gh api graphql -f query=' { repository(owner: "ignite", name: "apps") { refs(refPrefix: "refs/tags/rollkit/", first: 5, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) { nodes { name } } } }'
Length of output: 328
137-137
: Verify the start command flagsThe command has been simplified to use only essential flags. Let's verify if any important flags were removed.
✅ Verification successful
Based on the search results, I can now generate the final response:
The simplified command retains the essential flags for basic functionality
The command in
create-genesis.md
uses the fundamental flags--rollkit.aggregator
and--rollkit.sequencer_rollup_id
which are consistent with other basic examples in the codebase. Additional optional flags exist for specific use cases:
--rollkit.da_address
- for custom DA endpoint configuration--rollkit.block_time
- for custom block time settings--rollkit.max_pending_blocks
- for pending block limit--rollkit.lazy_aggregator
- for lazy sequencing mode--rollkit.da_gas_price
- for custom gas pricing--minimum-gas-prices
- for minimum gas price requirementsThe simplified command is appropriate for the basic setup in the genesis guide, while other guides demonstrate how to use additional flags for specific features.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any other start command variations in the codebase rg --type md "rollkit start.*--rollkit\." -g '!{guides/create-genesis.md}'Length of output: 1318
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (5)
guides/create-genesis.md (5)
5-13
: Grammar and clarity improvements needed in prerequisites sectionA few suggestions to improve clarity:
- Line 7: Add a comma after "For this guide"
- Line 12: Add "the" before "linked guide"
-For this guide you need to have a chain directory where you have created and built your chain. +For this guide, you need to have a chain directory where you have created and built your chain. -This guide will use the simple ignite chain created in linked guide. +This guide will use the simple ignite chain created in the linked guide.🧰 Tools
🪛 LanguageTool
[typographical] ~6-~6: Use a comma after an introductory phrase.
Context: ...art the chain. ## 0. Pre-requisities For this guide you need to have a chain directory wher...(COMMA_INTRODUCTORY_WORDS_PHRASES)
[uncategorized] ~12-~12: You might be missing the article “the” here.
Context: ... use the simple ignite chain created in linked guide. Make sure to update any relevant...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
17-27
: Add explanations for configuration variablesConsider adding brief explanations for each variable to help users understand their purpose and expected values. This is especially important for values like
10000000000000000000000000stake
which might not be self-explanatory.First, set the necessary variables for your chain in the terminal, here is an example: ```sh +# Name of your validator node VALIDATOR_NAME=validator1 +# Unique identifier for your chain CHAIN_ID=gm +# Name for the key that will be created KEY_NAME=rollup-key CHAINFLAG="--chain-id ${CHAIN_ID}" +# Initial token amount for the genesis account (100M tokens) TOKEN_AMOUNT="10000000000000000000000000stake" +# Amount to stake for the validator STAKING_AMOUNT="1000000000stake"--- `124-127`: **Add explanations for rollkit flags** The start command uses flags that should be explained to help users understand their purpose. ```diff For example, start the simple ignite chain with the following command: ```sh +# Start the chain with the following flags: +# --rollkit.aggregator: Enable aggregator mode +# --rollkit.sequencer_rollup_id: Set the rollup ID to match chain ID rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id $CHAIN_ID
--- `132-132`: **Fix grammar in summary** The verb tense in the summary needs correction. ```diff -By following these steps, you will set up the genesis for your rollup, initialize the validator, add a genesis account, and started the chain. +By following these steps, you will set up the genesis for your rollup, initialize the validator, add a genesis account, and start the chain.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~132-~132: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...e validator, add a genesis account, and started the chain. This guide provides a basic ...(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)
Line range hint
1-132
: Consider adding validation steps throughout the guideTo improve reliability, consider adding validation steps after key operations. For example:
- After initializing the validator, verify the config directory structure
- After adding genesis account, verify the account exists
- After collecting gentxs, verify the genesis file structure
This would help users confirm each step completed successfully before proceeding.
🧰 Tools
🪛 LanguageTool
[typographical] ~6-~6: Use a comma after an introductory phrase.
Context: ...art the chain. ## 0. Pre-requisities For this guide you need to have a chain directory wher...(COMMA_INTRODUCTORY_WORDS_PHRASES)
[uncategorized] ~12-~12: You might be missing the article “the” here.
Context: ... use the simple ignite chain created in linked guide. Make sure to update any relevant...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
guides/create-genesis.md
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
guides/create-genesis.md
[typographical] ~6-~6: Use a comma after an introductory phrase.
Context: ...art the chain. ## 0. Pre-requisities For this guide you need to have a chain directory wher...
(COMMA_INTRODUCTORY_WORDS_PHRASES)
[uncategorized] ~12-~12: You might be missing the article “the” here.
Context: ... use the simple ignite chain created in linked guide. Make sure to update any relevant...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~132-~132: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...e validator, add a genesis account, and started the chain. This guide provides a basic ...
(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)
🔇 Additional comments (1)
guides/create-genesis.md (1)
57-68
: Add warning about permanent data loss
These commands will permanently delete chain data. A warning should be added to prevent accidental data loss.
+:::warning
+These commands will permanently delete all chain data and genesis configuration. Make sure you have backups if needed.
+:::
+
Reset any existing chain data:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Overview
Closes #518
Summary by CodeRabbit
CHAIN_ID
.