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 [WIP DO NOT MERGE]: make blocks go brrr #83

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ celestia-appd collect-gentxs
# 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
Comment on lines 33 to 48
Copy link

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.

Comment on lines 35 to 48
Copy link

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.


Comment on lines 33 to 49
Copy link

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.

Expand Down