-
Notifications
You must be signed in to change notification settings - Fork 351
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
docs: configure-v3 #4214
docs: configure-v3 #4214
Conversation
📝 WalkthroughWalkthroughThe pull request introduces a new Changes
Sequence DiagramsequenceDiagram
participant Makefile
participant Config File
Makefile->>Config File: Update configuration parameters
Note over Makefile,Config File: Set recv_rate and send_rate
Note over Makefile,Config File: Set ttl-num-blocks to 12
Note over Makefile: Use platform-specific sed syntax
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 comments (1)
Makefile (1)
Line range hint
337-349
: Add error handling and improve robustness.The target could benefit from these improvements:
- Validate config file existence
- Create a backup before modifications
- Add error handling for sed operations
- Document the rationale for ttl-num-blocks=12
Here's a suggested implementation:
## configure-v3: Modifies config file in-place to conform to v3.x recommendations. configure-v3: @echo "Using config file at: $(CONFIG_FILE)" + @if [ ! -f "$(CONFIG_FILE)" ]; then \ + echo "Error: Config file not found at $(CONFIG_FILE)"; \ + exit 1; \ + fi + @echo "Creating backup at $(CONFIG_FILE).backup" + @cp "$(CONFIG_FILE)" "$(CONFIG_FILE).backup" @if [ "$$(uname)" = "Darwin" ]; then \ - sed -i '' "s/^recv_rate = .*/recv_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE); \ - sed -i '' "s/^send_rate = .*/send_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE); \ - sed -i '' "s/ttl-num-blocks = .*/ttl-num-blocks = 12/" $(CONFIG_FILE); \ + sed -i '' "s/^recv_rate = .*/recv_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE) || { echo "Error updating recv_rate"; exit 1; }; \ + sed -i '' "s/^send_rate = .*/send_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE) || { echo "Error updating send_rate"; exit 1; }; \ + sed -i '' "s/ttl-num-blocks = .*/ttl-num-blocks = 12/" $(CONFIG_FILE) || { echo "Error updating ttl-num-blocks"; exit 1; }; \ else \ - sed -i "s/^recv_rate = .*/recv_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE); \ - sed -i "s/^send_rate = .*/send_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE); \ - sed -i "s/ttl-num-blocks = .*/ttl-num-blocks = 12/" $(CONFIG_FILE); \ + sed -i "s/^recv_rate = .*/recv_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE) || { echo "Error updating recv_rate"; exit 1; }; \ + sed -i "s/^send_rate = .*/send_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE) || { echo "Error updating send_rate"; exit 1; }; \ + sed -i "s/ttl-num-blocks = .*/ttl-num-blocks = 12/" $(CONFIG_FILE) || { echo "Error updating ttl-num-blocks"; exit 1; }; \ fi + @echo "Configuration updated successfully. Backup saved at $(CONFIG_FILE).backup" .PHONY: configure-v3Also, please add a comment explaining why ttl-num-blocks is set to 12.
🧹 Nitpick comments (1)
Makefile (1)
337-337
: Enhance the target documentation.The help text could be more descriptive about the changes being made. Consider:
-## configure-v3: Modifies config file in-place to conform to v3.x recommendations. +## configure-v3: Updates config.toml with v3.x recommended settings (creates backup): +## - Sets recv_rate and send_rate to 10 MiB for optimal network performance +## - Sets ttl-num-blocks to 12 for improved block propagation
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Makefile
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: docker-security-build / docker-build (GHCR; ghcr.io/celestiaorg/celestia-app)
- GitHub Check: docker-txsim-build / docker-build (GHCR; ghcr.io/celestiaorg/txsim)
- GitHub Check: test / test-race
- GitHub Check: test / test-coverage
- GitHub Check: test / test-fuzz
- GitHub Check: test / test-short
- GitHub Check: test / test
- GitHub Check: markdown-linter / markdown-link-check
- GitHub Check: Summary
🔇 Additional comments (1)
Makefile (1)
335-336
: Verify the configuration defaults.Please confirm:
- The default config file path
${HOME}/.celestia-app/config/config.toml
aligns with Celestia's conventions.- The send/recv rate of 10 MiB (10485760) is appropriate for the network's requirements.
✅ Verification successful
Configuration defaults are verified and correct.
The send/recv rate of 10 MiB is an officially recommended value as part of network-wide performance improvements, documented in release notes and coordinated with BBR congestion control algorithm enablement. The config file path follows standard Cosmos-SDK conventions and is consistently used across the codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if the config file path is consistent across the codebase # and if there are any other send/recv rate references. # Check for config file path patterns echo "Checking config file path patterns..." rg -l "\.celestia-app/config/config\.toml" # Check for send/recv rate references echo "Checking send/recv rate references..." rg "send_rate|recv_rate" --type tomlLength of output: 433
Script:
#!/bin/bash # Search for documentation about network configuration echo "Checking documentation..." rg -i "network|bandwidth|send.*rate|recv.*rate" --type md # Search for related comments in configuration files echo "Checking configuration comments..." rg -i "network|bandwidth|send.*rate|recv.*rate" --type toml -A 2Length of output: 40707
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.
utAck
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.
given that the help command is just a sed that gets the comments. Would it make sense to also document the other targets like disable-mptcp
?
Yes. IMO we should have docs for all the commands |
Before the `configure-v3` command didn't show up in Makefile help (cherry picked from commit 315aa86)
Before the `configure-v3` command didn't show up in Makefile help<hr>This is an automatic backport of pull request #4214 done by [Mergify](https://mergify.com). Co-authored-by: Rootul P <[email protected]>
Before the
configure-v3
command didn't show up in Makefile help