-
Notifications
You must be signed in to change notification settings - Fork 372
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
chore: update mempool defaults #4284
Conversation
app/default_overrides.go
Outdated
cfg.Mempool.MaxTxBytes = 7_897_088 | ||
cfg.Mempool.MaxTxsBytes = 39_485_440 | ||
cfg.Mempool.Version = "v1" // prioritized mempool | ||
cfg.Mempool.MaxTxBytes = 2 * mebibyte | ||
cfg.Mempool.MaxTxsBytes = 80 * mebibyte | ||
cfg.Mempool.Version = "v2" // prioritized mempool |
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.
It shouldn't be a breaking change to set the default to 2MiB since that should already be checked by the antihandler, but there's no reason to keep this at 8
the throughput was quadrupled, and the block times were halved, so the mempool's size was increased
Warning Rate limit exceeded@evan-forbes has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 23 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis pull request introduces a new constant, Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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
|
📝 WalkthroughWalkthroughThis pull request introduces a new constant Changes
Possibly related PRs
Suggested labels
Suggested reviewers
✨ 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: 1
🔭 Outside diff range comments (2)
app/default_overrides.go (1)
301-301
: Remove duplicate constant declaration.The
mebibyte
constant is already declared at the package level (line 40). This local declaration is redundant.- const mebibyte = 1048576
app/default_overrides_test.go (1)
95-95
: Remove duplicate constant declaration.The
mebibyte
constant is already declared at the package level indefault_overrides.go
. This local declaration is redundant.- const mebibyte = 1048576
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/default_overrides.go
(2 hunks)app/default_overrides_test.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: test / test-race
- GitHub Check: test / test-fuzz
- GitHub Check: test / test
- GitHub Check: Summary
🔇 Additional comments (2)
app/default_overrides.go (2)
39-41
: LGTM! Good use of a named constant.The introduction of the
mebibyte
constant improves code readability by replacing magic numbers with a meaningful name.
270-272
: Verify the impact of increased mempool limits and version change.The changes:
- Increase MaxTxBytes to 2 MiB (from ~7.5 MiB)
- Increase MaxTxsBytes to 80 MiB (from ~37.7 MiB)
- Switch to prioritized mempool (v2)
These modifications could significantly impact memory usage and transaction processing behavior.
📝 WalkthroughWalkthroughThis pull request introduces a new constant Changes
Possibly related PRs
Suggested labels
Suggested reviewers
✨ 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: 1
🔭 Outside diff range comments (1)
app/default_overrides.go (1)
301-301
: Remove duplicate mebibyte constant.The
mebibyte
constant is already defined at the package level (line 40). Having a duplicate declaration here is redundant.-const mebibyte = 1048576
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/default_overrides.go
(2 hunks)app/default_overrides_test.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: test / test
- GitHub Check: Summary
🔇 Additional comments (2)
app/default_overrides.go (2)
281-282
: LGTM! P2P rate limits are well-balanced.The P2P SendRate and RecvRate are appropriately set to 10MB/s, which aligns well with the increased mempool sizes.
270-272
: Verify impact of increased mempool size limits.The changes significantly increase the mempool limits:
- MaxTxBytes increased to ~2MB
- MaxTxsBytes increased to ~80MB
- Version upgraded to prioritized mempool (v2)
These changes could impact memory usage and transaction processing behavior.
✅ Verification successful
Mempool configuration changes are consistent across the tests.
The updated values (2 × mebibyte for MaxTxBytes, 80 × mebibyte for MaxTxsBytes, and version set to "v2") are present in the main configuration file, and multiple test files (integration, benchmark, unit, and e2e) include references to mempool configurations. Although some tests compute effective mempool sizes (showing values different from the straightforward multiplication), this is expected if additional adjustments to the raw constants are applied during configuration processing.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for any memory-related configurations or constraints in the codebase rg -A 2 "MaxTxBytes|MaxTxsBytes|mebibyte" --type go # Look for any performance test files that might need updating fd -e go -e yaml -e json "perf|benchmark|test" --exec grep -l "mempool"Length of output: 6446
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.
[optional] in a FLUP we can add a make command that makes it easy for node operators to modify their config in-place.
Co-authored-by: Rootul P <[email protected]>
…estiaorg/celestia-app into evan/update-mempool-defaults
app/default_overrides.go
Outdated
cfg.Mempool.TTLNumBlocks = 24 | ||
cfg.Mempool.TTLDuration = 150 * time.Second |
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.
FWIW we already bumped these to account for 6 second blocks.
Ref: #3959 (comment)
Any particular reason to bump them again? I'm not opposed, just curious.
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.
ahhh good catch
sorry I was just doubling everything will revert these
updates the default mempool values --------- Co-authored-by: Rootul P <[email protected]> (cherry picked from commit abad811)
updates the default mempool values <hr>This is an automatic backport of pull request #4284 done by [Mergify](https://mergify.com). Co-authored-by: Evan Forbes <[email protected]>
updates the default mempool values