Skip to content

align field number and naming with py-libp2p reference implementation#1

Merged
theUtkarshRaj merged 1 commit into
theUtkarshRaj:experimental/large-message-segmentationfrom
shivv23:align-field-number
May 8, 2026
Merged

align field number and naming with py-libp2p reference implementation#1
theUtkarshRaj merged 1 commit into
theUtkarshRaj:experimental/large-message-segmentationfrom
shivv23:align-field-number

Conversation

@shivv23
Copy link
Copy Markdown

@shivv23 shivv23 commented May 8, 2026

Summary

Aligns the spec draft with the py-libp2p reference implementation (libp2p/py-libp2p#1323).

Changes

  1. Field number: largeMessageSegmentation changed from 84739216492435 in both ControlExtensions and RPC. Both values are in the experimental range (>0x200000), so this is purely a coordination change. The py-libp2p implementation already uses 6492435.

  2. RPC field naming: Renamed RPC.largeSegmentationRPC.largeMessageSegmentation for consistency with ControlExtensions.largeMessageSegmentation and the py-libp2p field name.

  3. Segment size note: Added a note that the py-libp2p reference implementation defaults to 256 KiB per segment payload (under the spec's 1 MiB ceiling), under Open Question 2.

Related

- Change largeMessageSegmentation field from 8473921 to 6492435
  in both ControlExtensions and RPC to match py-libp2p (PR libp2p/py-libp2p#1323)
- Rename RPC.largeSegmentation to RPC.largeMessageSegmentation for consistency
- Note py-libp2p's 256 KiB default segment size under Open Question 2
shivv23 added a commit to shivv23/py-libp2p that referenced this pull request May 8, 2026
…field alignment

- Switch messageID from raw seqno to SHA-256(publisherID || topic || nonce)[:16]
  per spec draft recommendation (avoids cross-publisher/cross-topic collisions)
- Add compute_message_id() helper to segmentation.py
- Add reassembly_timeout config parameter (default 120s)
- Align extensions.proto field number 8473921 -> 6492435
  (coordination PR: theUtkarshRaj/specs#1)
@theUtkarshRaj theUtkarshRaj merged commit afb88e1 into theUtkarshRaj:experimental/large-message-segmentation May 8, 2026
@theUtkarshRaj
Copy link
Copy Markdown
Owner

Thanks @shivv23 — these align cleanly with what we discussed. The rename to largeMessageSegmentation is a good catch, and locking in 6492435 plus the 256 KiB implementation note in Open Question 2 keeps spec and reference implementation in lockstep.

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.

2 participants