Skip to content

Conversation

@etorreborre
Copy link
Contributor

@etorreborre etorreborre commented Jan 28, 2026

According to the network specification.

Summary by CodeRabbit

  • Chores
    • Adjusted network buffer limits for block fetching and transaction submission to optimize memory usage and improve data transmission stability and throughput during syncing and submission.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

Adjusts buffer limits in two protocol modules: BlockFetch reduces max_buffer from 25,000,000 to 2,500,000 bytes for both initiator and responder registrations; TxSubmission increases max_buffer from 5,760 to 2,500,000 bytes. No other logic or public signatures changed.

Changes

Cohort / File(s) Summary
BlockFetch buffer reduction
crates/amaru-protocols/src/blockfetch/mod.rs
Lowers max_buffer in register_blockfetch_initiator and register_blockfetch_responder from 25,000,000 → 2,500,000 bytes.
TxSubmission buffer increase
crates/amaru-protocols/src/tx_submission/mod.rs
Raises max_buffer in register_tx_submission from 5,760 → 2,500,000 bytes.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

Buffers trimmed and buffed like a retro arcade sprite,
One goes small, the other roars into the night,
Code stays neat, no drama in sight,
Merge it, ship it — press Start and take flight ✨🎮

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adjusting max buffer sizes for blockfetch and txsubmission protocols, which is exactly what the changeset implements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@etorreborre etorreborre requested a review from rkuhn January 28, 2026 11:17
@etorreborre etorreborre self-assigned this Jan 28, 2026
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
crates/amaru-protocols/src/blockfetch/mod.rs 88.73% <ø> (ø)
crates/amaru-protocols/src/tx_submission/mod.rs 89.18% <100.00%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…on protocols

Signed-off-by: etorreborre <etorreborre@yahoo.com>
@etorreborre etorreborre force-pushed the etorreborre/fix/network-message-size branch from 530a7d4 to fa55d4e Compare January 28, 2026 13:24
@etorreborre etorreborre requested a review from jeluard January 29, 2026 08:35
Copy link
Contributor

@rkuhn rkuhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can set this limit, it is the one written in the network spec, but ultimately this limit depends on how many blocks are in the range that we request. The pessimistic assumption is that we get all the blocks from the server before we can start processing them, meaning that they must fit into the muxer buffer. It was my understanding that blocks are currently smaller than 100kB and will get bigger with Leios. We’ll have to update this limit once we settle on our block fetching strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants