-
Notifications
You must be signed in to change notification settings - Fork 288
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: replace any ttl-num-blocks
value
#4026
base: main
Are you sure you want to change the base?
Conversation
…if the value is `5`
ttl-num-blocks
valuettl-num-blocks
value
📝 WalkthroughWalkthroughThe changes in the pull request focus on the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Makefile
participant ConfigFile
User->>Makefile: Run configure-v3
Makefile->>ConfigFile: Update ttl-num-blocks using sed
ConfigFile-->>Makefile: Return updated configuration
Makefile-->>User: Configuration updated successfully
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 (1)
Makefile (1)
312-312
: Consider documenting the ttl-num-blocks value changeThe sed commands now correctly handle replacing any existing
ttl-num-blocks
value with12
. However, it would be helpful to:
- Document why
12
was chosen as the new value- Consider making this value configurable via an environment variable like
SEND_RECV_RATE
Example implementation:
CONFIG_FILE ?= ${HOME}/.celestia-app/config/config.toml SEND_RECV_RATE ?= 10485760 # 10 MiB +TTL_NUM_BLOCKS ?= 12 # Number of blocks before a message times out configure-v3: @echo "Using config file at: $(CONFIG_FILE)"; \ 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/ttl-num-blocks = .*/ttl-num-blocks = $(TTL_NUM_BLOCKS)/" $(CONFIG_FILE); \ 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/ttl-num-blocks = .*/ttl-num-blocks = $(TTL_NUM_BLOCKS)/" $(CONFIG_FILE); \ fiAlso applies to: 316-316
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
Makefile
(2 hunks)
🔇 Additional comments (1)
Makefile (1)
327-327
: LGTM!
Adding a newline at the end of the file follows good Unix file format conventions.
I also found |
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
thanks @kinrokinro !! |
Overview
On one of our node I found the default
ttl-num-blocks
value as10
instead of5
, so the default approach will not work in this case and it should be fixed with this commit.