-
Notifications
You must be signed in to change notification settings - Fork 289
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(scripts): mainnet v2 upgrade height #3868
chore(scripts): mainnet v2 upgrade height #3868
Conversation
WalkthroughWalkthroughThe changes involve updates to the Changes
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
Documentation and Community
|
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: 0
Outside diff range and nitpick comments (2)
scripts/mainnet.sh (2)
42-44
: Consider a more dynamic approach for calculating the trust height.The code segment correctly retrieves the latest block height and trust hash from the RPC endpoint. However, the trust height is calculated by subtracting a fixed value of 2000 from the latest height, which may not always be optimal.
Consider implementing a more dynamic approach for calculating the trust height based on the network conditions or configuration settings. This could help ensure that the trust height is always set to an appropriate value, improving the reliability and performance of the state sync process.
57-58
: Consider a more flexible approach for specifying the upgrade height.The code segment correctly starts the
celestia-appd
process with thestart
command and includes the--v2-upgrade-height
flag to specify the block height at which the network upgrades to version 2.Consider implementing a more flexible approach for specifying the upgrade height, such as reading it from a configuration file or environment variable. This would make it easier to update the upgrade height for future network upgrades without modifying the script itself.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- scripts/mainnet.sh (3 hunks)
Additional comments not posted (3)
scripts/mainnet.sh (3)
3-5
: LGTM!The comments provide a clear and concise description of the script's purpose.
16-16
: LGTM!The
RPC
variable is correctly declared and assigned a valid RPC endpoint URL. It will be used later in the script to retrieve the latest block height and trust hash.
46-52
: LGTM!The code segment correctly modifies the
config.toml
file to enable state sync and set the required parameters using the values obtained earlier. These changes are crucial for ensuring that the node starts with the correct trust height and trust hash, enabling a smooth state sync process.
Modify the mainnet.sh script to provide the `--v2-upgrade-height` and use state sync. (cherry picked from commit 3aeb3c5)
Modify the mainnet.sh script to provide the `--v2-upgrade-height` and use state sync. <hr>This is an automatic backport of pull request #3868 done by [Mergify](https://mergify.com). Co-authored-by: Rootul P <[email protected]>
Modify the mainnet.sh script to provide the
--v2-upgrade-height
and use state sync.