fix: set blockfetch recv queue size to under the limit#547
Conversation
Signed-off-by: Aurora Gaffney <aurora@blinklabs.io>
📝 WalkthroughWalkthroughA configuration parameter in the BlockFetch setup was adjusted, reducing the receive queue size from 1000 to 512 blocks. The accompanying comment was updated to clarify the relationship between the queue size and batch size. No functional logic or control flow modifications were made. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
input/chainsync/chainsync.go (1)
243-249: Recv queue size change looks correct; consider clarifying the external limit in the commentSetting
WithRecvQueueSize(512)keeps the queue comfortably aboveblockBatchSize(500) while addressing the need to stay under the BlockFetch limit, so the behavior here looks good. To help future changes, consider updating the comment to also mention that this value must not exceed the BlockFetch recv-queue limit (and ideally point to where that limit is defined), so someone doesn’t “helpfully” bump it above the allowed maximum later.For example:
- // Set the recv queue size to larger than our block batch size - blockfetch.WithRecvQueueSize(512), + // Set recv queue size > blockBatchSize but <= BlockFetch's max allowed size + blockfetch.WithRecvQueueSize(512),Please double-check that
512is indeed at or below the current maximum recv queue size supported byblockfetch.WithRecvQueueSizein the version ofgouroborosused by this project.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
input/chainsync/chainsync.go(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: Analyze (go)
Summary by cubic
Set the blockfetch receive queue size to 512 to stay under the limit. It’s still larger than our batch size to keep throughput steady.
Written for commit 02abf0c. Summary will update automatically on new commits.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.