Skip to content

fix: configure max message size for devnet protocol#15

Merged
dirvine merged 1 commit intoWithAutonomi:mainfrom
mickvandijke:fix/configure-max-message-size
Mar 1, 2026
Merged

fix: configure max message size for devnet protocol#15
dirvine merged 1 commit intoWithAutonomi:mainfrom
mickvandijke:fix/configure-max-message-size

Conversation

@mickvandijke
Copy link
Copy Markdown
Collaborator

Summary

  • Configure max_message_size to MAX_WIRE_MESSAGE_SIZE on the saorsa-client and devnet P2P nodes so they match the protocol's expected message size limit
  • Add devnet-manifest.json to .gitignore

Test plan

  • Verify devnet nodes start successfully with the configured message size
  • Verify saorsa-client can connect and exchange messages with devnet nodes

🤖 Generated with Claude Code

Set `core_config.max_message_size` to align with the protocol's max wire message size. Update related configs and ignore `devnet-manifest.json` in `.gitignore`.
Copilot AI review requested due to automatic review settings March 1, 2026 12:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns devnet and saorsa-client transport configuration with the ANT protocol’s expected maximum wire message size, and avoids accidentally committing a generated devnet manifest.

Changes:

  • Set core_config.max_message_size to MAX_WIRE_MESSAGE_SIZE for devnet nodes.
  • Set core_config.max_message_size to MAX_WIRE_MESSAGE_SIZE for saorsa-client.
  • Add devnet-manifest.json to .gitignore.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
src/devnet.rs Configures devnet P2P nodes to use the protocol’s max wire message size.
src/bin/saorsa-client/main.rs Configures the client’s P2P node to use the protocol’s max wire message size.
.gitignore Prevents generated devnet-manifest.json from being committed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 1, 2026

Greptile Summary

Configures max_message_size to MAX_WIRE_MESSAGE_SIZE (5 MiB) for both saorsa-client and devnet P2P nodes, ensuring they can handle the protocol's maximum chunk size (4 MiB payload + serialization overhead).

  • Both client and devnet nodes now match the wire message size limit expected by the protocol
  • Adds /devnet-manifest.json to .gitignore to exclude this generated local development file from version control
  • Changes align with existing configuration patterns in src/node.rs (line 149) and E2E tests (tests/e2e/testnet.rs line 1008)

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are straightforward configuration updates that align the client and devnet nodes with the protocol's expected message size limit. No logic changes, no unsafe code patterns, and the modifications follow established patterns already present in the codebase.
  • No files require special attention

Important Files Changed

Filename Overview
.gitignore Adds devnet-manifest.json to gitignore - correct since this is a generated local development file
src/bin/saorsa-client/main.rs Configures max_message_size to match protocol's 5MB wire message limit - necessary for client to handle max-size chunks
src/devnet.rs Configures max_message_size for devnet P2P nodes to match protocol expectations - ensures compatibility with client and other nodes

Last reviewed commit: 05be836

Copy link
Copy Markdown
Collaborator

@dirvine dirvine left a comment

Choose a reason for hiding this comment

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

Looks great — thanks Mick for the clean fix and for aligning client/devnet message-size limits with protocol expectations.

@dirvine dirvine merged commit de6030d into WithAutonomi:main Mar 1, 2026
16 of 17 checks passed
@mickvandijke mickvandijke deleted the fix/configure-max-message-size branch March 1, 2026 14:03
mickvandijke added a commit that referenced this pull request Apr 1, 2026
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>
mickvandijke added a commit that referenced this pull request Apr 1, 2026
- #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>
mickvandijke added a commit that referenced this pull request Apr 1, 2026
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>
mickvandijke added a commit that referenced this pull request Apr 1, 2026
- #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>
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.

3 participants