fix: configure max message size for 4 MiB chunk transport#12
fix: configure max message size for 4 MiB chunk transport#12mickvandijke merged 2 commits intomainfrom
Conversation
Bump saorsa-core to 0.12.0 which exposes max_message_size on CoreConfig, then wire it through NodeConfig so the QUIC receive window accommodates full-size (4 MiB) chunks plus serialization overhead (5 MiB wire). Update e2e tests to exercise max-size chunk round-trips. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryConfigures QUIC transport layer to handle maximum-size (4 MiB) chunk transfers by setting Key changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| Cargo.toml | Bumps saorsa-core from 0.11.1 to 0.12.0 to access max_message_size configuration |
| src/ant_protocol/mod.rs | Exports MAX_WIRE_MESSAGE_SIZE constant for use in node configuration |
| src/config.rs | Adds max_message_size field to NodeConfig with default of 5 MiB for 4 MiB chunks plus overhead |
| src/node.rs | Forwards max_message_size from NodeConfig to CoreConfig for QUIC transport tuning |
| tests/e2e/data_types/chunk.rs | Updates cross-node test to use max-size 4 MiB chunks, exercising QUIC flow control limits |
| tests/e2e/testnet.rs | Configures test network nodes with MAX_WIRE_MESSAGE_SIZE to support max-size chunk tests |
Last reviewed commit: 07e85df
There was a problem hiding this comment.
Pull request overview
This PR configures the QUIC transport layer to properly handle maximum-size (4 MiB) data chunks by bumping the saorsa-core dependency and adding a configurable max_message_size setting. The change ensures that QUIC stream receive windows accommodate full-size chunks plus serialization overhead, preventing potential message truncation issues during transmission.
Changes:
- Bump
saorsa-corefrom 0.11.1 to 0.12.0 which exposesmax_message_sizeconfiguration option - Add
max_message_sizefield toNodeConfigwith a default of 5 MiB (MAX_WIRE_MESSAGE_SIZE) - Forward the setting from
NodeConfigto saorsa-core'sCoreNodeConfigin both production code and tests - Update end-to-end test to use 4 MiB chunks instead of small chunks to exercise QUIC flow-control limits
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Bump saorsa-core dependency from 0.11.1 to 0.12.0 |
| src/ant_protocol/mod.rs | Export MAX_WIRE_MESSAGE_SIZE constant for external use |
| src/config.rs | Add max_message_size field to NodeConfig with default implementation |
| src/node.rs | Forward max_message_size from NodeConfig to CoreNodeConfig |
| tests/e2e/testnet.rs | Configure max_message_size in test setup to accommodate max-size chunks |
| tests/e2e/data_types/chunk.rs | Update test to use 4 MiB chunks instead of small chunks to validate QUIC stream limits |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Complete the Section 18 test matrix with the remaining scenarios: - #3: Fresh replication stores chunk + updates PaidForList on remote nodes - #9: Fetch retry rotates to alternate source - #10: Fetch retry exhaustion with single source - #11: Repeated ApplicationFailure events decrease peer trust score - #12: Bootstrap node discovers keys stored on multiple peers - #14: Hint construction covers all locally stored keys - #15: Data and PaidForList survive node shutdown (partition) - #17: Neighbor sync request returns valid response (admission test) - #21: Paid-list majority confirmed from multiple peers via verification - #24: PaidNotify propagates paid-list entries after fresh replication - #25: Paid-list convergence verified via majority peer queries - #44: PaidForList persists across restart (cold-start recovery) - #45: PaidForList lost in fresh directory (unrecoverable scenario) All 56 Section 18 scenarios now have test coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- #3: Add proper unit test in scheduling.rs exercising full pipeline (PendingVerify → QueuedForFetch → Fetching → Stored); rename mislabeled e2e test to scenario_1_and_24 - #12: Rewrite e2e test to send verification requests to 4 holders and assert quorum-level presence + paid confirmations - #13: Rename mislabeled bootstrap drain test in types.rs; add proper unit test in paid_list.rs covering range shrink, hysteresis retention, and new key acceptance - #14: Rewrite e2e test to send NeighborSyncRequest and assert response hints cover all locally stored keys - #15: Rewrite e2e test to store on 2 nodes, partition one, then verify paid-list authorization confirmable via verification request - #17: Rewrite e2e test to store data on receiver, send sync, and assert outbound replica hints returned (proving bidirectional exchange) - #55: Replace weak enum-distinctness check with full audit failure flow: compute digests, identify mismatches, filter by responsibility, verify empty confirmed failure set produces no evidence Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Complete the Section 18 test matrix with the remaining scenarios: - #3: Fresh replication stores chunk + updates PaidForList on remote nodes - #9: Fetch retry rotates to alternate source - #10: Fetch retry exhaustion with single source - #11: Repeated ApplicationFailure events decrease peer trust score - #12: Bootstrap node discovers keys stored on multiple peers - #14: Hint construction covers all locally stored keys - #15: Data and PaidForList survive node shutdown (partition) - #17: Neighbor sync request returns valid response (admission test) - #21: Paid-list majority confirmed from multiple peers via verification - #24: PaidNotify propagates paid-list entries after fresh replication - #25: Paid-list convergence verified via majority peer queries - #44: PaidForList persists across restart (cold-start recovery) - #45: PaidForList lost in fresh directory (unrecoverable scenario) All 56 Section 18 scenarios now have test coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- #3: Add proper unit test in scheduling.rs exercising full pipeline (PendingVerify → QueuedForFetch → Fetching → Stored); rename mislabeled e2e test to scenario_1_and_24 - #12: Rewrite e2e test to send verification requests to 4 holders and assert quorum-level presence + paid confirmations - #13: Rename mislabeled bootstrap drain test in types.rs; add proper unit test in paid_list.rs covering range shrink, hysteresis retention, and new key acceptance - #14: Rewrite e2e test to send NeighborSyncRequest and assert response hints cover all locally stored keys - #15: Rewrite e2e test to store on 2 nodes, partition one, then verify paid-list authorization confirmable via verification request - #17: Rewrite e2e test to store data on receiver, send sync, and assert outbound replica hints returned (proving bidirectional exchange) - #55: Replace weak enum-distinctness check with full audit failure flow: compute digests, identify mismatches, filter by responsibility, verify empty confirmed failure set produces no evidence Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
saorsa-coreto 0.12.0 which exposesmax_message_sizeonCoreConfigmax_message_sizetoNodeConfig(default: 5 MiB viaMAX_WIRE_MESSAGE_SIZE)Test plan
cargo testpasses (including the updatedtest_chunk_store_on_remote_nodewith 4 MiB payloads)cargo clippy --all-features -- -D clippy::panic -D clippy::unwrap_used -D clippy::expect_usedclean🤖 Generated with Claude Code