-
Notifications
You must be signed in to change notification settings - Fork 348
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: increase max-recv-msg-size default to 20 MiB #4205
feat: increase max-recv-msg-size default to 20 MiB #4205
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the default gRPC configuration in the application by increasing the maximum receive message size from 10 MiB to 20 MiB. This change is implemented in both the main configuration file and its corresponding test file, addressing the issue of message size limitations when fetching blocks from community APIs. Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Finishing Touches
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
🧹 Nitpick comments (1)
app/default_overrides.go (1)
297-299
: Consider reusing the existing mebibyte constant.The
mebibyte
constant is already defined at line 282 for P2P configuration. To maintain DRY principles and avoid potential inconsistencies, consider reusing the existing constant.- const mebibyte = 1048576 cfg.GRPC.MaxRecvMsgSize = 20 * mebibyte
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/default_overrides.go
(1 hunks)app/default_overrides_test.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (2)
app/default_overrides_test.go (1)
67-69
: LGTM! Test coverage added for max-recv-msg-size configuration.The test correctly verifies that the GRPC.MaxRecvMsgSize is set to 20 MiB (20971520 bytes).
app/default_overrides.go (1)
299-299
: LGTM! Configuration value aligns with PR objectives.Setting GRPC.MaxRecvMsgSize to 20 MiB is appropriate and matches the PR requirements to increase the limit from 10 MiB.
@@ -294,5 +294,8 @@ func DefaultAppConfig() *serverconfig.Config { | |||
cfg.StateSync.SnapshotInterval = 1500 | |||
cfg.StateSync.SnapshotKeepRecent = 2 | |||
cfg.MinGasPrices = fmt.Sprintf("%v%s", appconsts.DefaultMinGasPrice, BondDenom) | |||
|
|||
const mebibyte = 1048576 |
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.
a super tiny nit for a follow up issue would be to extract the mebibyte
constant and export it somewhere. We have a lot of redefinitions of it, so it would be good to use the same one to avoid any mistakes
Closes #4204 Note this won't modify already existing `app.toml` files so node operators need to modify their local `app.toml`. Example command: ```shell sed -i.bak 's/^max-recv-msg-size = "10485760"/max-recv-msg-size = "20971520"/' ~/.celestia-app/config/app.toml ``` ## Testing ```shell # Before $ cat ~/.celestia-app/config/app.toml | grep max-recv max-recv-msg-size = "10485760" # After $ ./scripts/single-node.sh $ cat ~/.celestia-app/config/app.toml | grep max-recv max-recv-msg-size = "20971520" ``` (cherry picked from commit c620c12)
…4221) Closes #4204 Note this won't modify already existing `app.toml` files so node operators need to modify their local `app.toml`. Example command: ```shell sed -i.bak 's/^max-recv-msg-size = "10485760"/max-recv-msg-size = "20971520"/' ~/.celestia-app/config/app.toml ``` ## Testing ```shell # Before $ cat ~/.celestia-app/config/app.toml | grep max-recv max-recv-msg-size = "10485760" # After $ ./scripts/single-node.sh $ cat ~/.celestia-app/config/app.toml | grep max-recv max-recv-msg-size = "20971520" ```<hr>This is an automatic backport of pull request #4205 done by [Mergify](https://mergify.com). Co-authored-by: Rootul P <[email protected]>
Closes #4204
Note this won't modify already existing
app.toml
files so node operators need to modify their localapp.toml
. Example command:Testing