Skip to content

feat(p2p-02): add master policy protocol primitives (#671)#761

Closed
jlon wants to merge 6 commits intoCurvineIO:mainfrom
jlon:p2p-02-master-policy-protocol
Closed

feat(p2p-02): add master policy protocol primitives (#671)#761
jlon wants to merge 6 commits intoCurvineIO:mainfrom
jlon:p2p-02-master-policy-protocol

Conversation

@jlon
Copy link
Copy Markdown
Contributor

@jlon jlon commented Mar 26, 2026

Summary

  • Add wire-level P2P policy fields and a dedicated GetP2pPolicy response shape.
  • Add signing helpers without introducing client sync or runtime policy application yet.

Design

  • Keep backward compatibility by extending existing master info payloads with defaulted fields.
  • Use stable HMAC input framing and accept comma-separated transition signatures for key rotation.

Implementation

  • Extend master proto/state/proto-utils mappings with policy version and allowlists.
  • Add sign_p2p_policy and signature verification helpers plus compatibility tests.

Verification

  • cargo test -p curvine-common p2p_policy_signature_roundtrip_verifies
  • cargo test -p curvine-common p2p_policy_signature_decoder_accepts_transition_list
  • cargo test -p curvine-common master_info_proto_decodes_legacy_payload_without_p2p_policy_version

@jlon
Copy link
Copy Markdown
Contributor Author

jlon commented Mar 26, 2026

Part 2/17 of the split P2P series that supersedes #671.

This PR targets , so the visible diff is cumulative. Review the slice described in this PR body instead of treating the whole diff as new.

Intended review delta is p2p-02 on top of #762.

@jlon
Copy link
Copy Markdown
Contributor Author

jlon commented Mar 26, 2026

Review note: this is part 2/17 of the split P2P series that supersedes #671.

This PR targets main, so the visible diff is cumulative. Please review the slice described in this PR body.

Review after #762.

@jlon jlon force-pushed the p2p-02-master-policy-protocol branch from f8eb686 to 519b1ca Compare March 26, 2026 10:24
@jlon jlon force-pushed the p2p-02-master-policy-protocol branch from 519b1ca to 5cff052 Compare March 27, 2026 09:32
@jlon jlon force-pushed the p2p-02-master-policy-protocol branch from 5cff052 to 10fe96e Compare March 30, 2026 00:54
@jlon jlon closed this Apr 7, 2026
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.

1 participant