-
Notifications
You must be signed in to change notification settings - Fork 22
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 [WIP DO NOT MERGE]: make blocks go brrr #83
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes involve tweaking the configuration of 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 X ? TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 6
Configuration used: CodeRabbit UI
Files selected for processing (1)
- entrypoint.sh (1 hunks)
Additional comments: 1
entrypoint.sh (1)
- 33-48: The changes to the
config.toml
file are significant and could impact the stability and security of the consensus process. Reducing timeouts too much may lead to increased network instability, especially in a distributed network where nodes have varying response times.
- Verify the impact of these new timeout settings on the network's stability and performance.
- Ensure that the changes are tested under realistic network conditions to prevent potential consensus issues.
# If you encounter: `sed: -I or -i may not be used with stdin` on MacOS you can mitigate by installing gnu-sed | ||
# https://gist.github.com/andre3k1/e3a1a7133fded5de5a9ee99c87c6fa0d?permalink_comment_id=3082272#gistcomment-3082272 | ||
sed -i'.bak' 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_commit\s*=.*/timeout_commit = "1s"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose\s*=.*/timeout_propose = "1s"/g' ~/.celestia-app/config/config.toml | ||
|
||
# Adjusting consensus timeouts for faster block times | ||
sed -i'.bak' 's/^timeout_commit\s*=.*/timeout_commit = "100ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose\s*=.*/timeout_propose = "100ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose_delta\s*=.*/timeout_propose_delta = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_prevote\s*=.*/timeout_prevote = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_prevote_delta\s*=.*/timeout_prevote_delta = "25ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_precommit\s*=.*/timeout_precommit = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_precommit_delta\s*=.*/timeout_precommit_delta = "25ms"/g' ~/.celestia-app/config/config.toml | ||
|
||
# Other configurations | ||
sed -i'.bak' 's/index_all_keys = false/index_all_keys = true/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/mode = "full"/mode = "validator"/g' ~/.celestia-app/config/config.toml |
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.
Consider replacing hardcoded paths and values with environment variables or configuration files to increase the script's flexibility and maintainability.
# If you encounter: `sed: -I or -i may not be used with stdin` on MacOS you can mitigate by installing gnu-sed | ||
# https://gist.github.com/andre3k1/e3a1a7133fded5de5a9ee99c87c6fa0d?permalink_comment_id=3082272#gistcomment-3082272 | ||
sed -i'.bak' 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_commit\s*=.*/timeout_commit = "1s"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose\s*=.*/timeout_propose = "1s"/g' ~/.celestia-app/config/config.toml | ||
|
||
# Adjusting consensus timeouts for faster block times | ||
sed -i'.bak' 's/^timeout_commit\s*=.*/timeout_commit = "100ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose\s*=.*/timeout_propose = "100ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose_delta\s*=.*/timeout_propose_delta = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_prevote\s*=.*/timeout_prevote = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_prevote_delta\s*=.*/timeout_prevote_delta = "25ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_precommit\s*=.*/timeout_precommit = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_precommit_delta\s*=.*/timeout_precommit_delta = "25ms"/g' ~/.celestia-app/config/config.toml | ||
|
||
# Other configurations | ||
sed -i'.bak' 's/index_all_keys = false/index_all_keys = true/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/mode = "full"/mode = "validator"/g' ~/.celestia-app/config/config.toml | ||
|
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.
Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [9-14]
Deleting the $APP_PATH
directory is a destructive operation. It's recommended to either back up this directory before deletion or add a confirmation prompt to prevent accidental data loss.
Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [50-58]
Hardcoding a private key in the script poses a significant security risk. It's crucial to remove this and instead use a secure method for handling keys, such as environment variables or a secure key management system.
Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [70-85]
The loop that waits for the genesis block lacks error handling. If the genesis block isn't found within the maximum number of attempts, the script should handle this case gracefully, possibly with a descriptive error message and a non-zero exit status.
Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [87-91]
The script conditionally sets the CELESTIA_NAMESPACE
variable but does not explain its purpose or expected values. Adding comments to document this would improve code clarity and maintainability.
sed -i'.bak' 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_commit\s*=.*/timeout_commit = "1s"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose\s*=.*/timeout_propose = "1s"/g' ~/.celestia-app/config/config.toml | ||
|
||
# Adjusting consensus timeouts for faster block times | ||
sed -i'.bak' 's/^timeout_commit\s*=.*/timeout_commit = "100ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose\s*=.*/timeout_propose = "100ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_propose_delta\s*=.*/timeout_propose_delta = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_prevote\s*=.*/timeout_prevote = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_prevote_delta\s*=.*/timeout_prevote_delta = "25ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_precommit\s*=.*/timeout_precommit = "50ms"/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/^timeout_precommit_delta\s*=.*/timeout_precommit_delta = "25ms"/g' ~/.celestia-app/config/config.toml | ||
|
||
# Other configurations | ||
sed -i'.bak' 's/index_all_keys = false/index_all_keys = true/g' ~/.celestia-app/config/config.toml | ||
sed -i'.bak' 's/mode = "full"/mode = "validator"/g' ~/.celestia-app/config/config.toml |
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.
The script creates backup files with the .bak
extension but does not include logic to clean them up. Consider adding a cleanup step to remove these files after successful execution to avoid cluttering the filesystem.
Overview
Loom demonstration
Checklist
Summary by CodeRabbit
New Features
Configuration Changes