-
-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Labels
A-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateT-enhancementType: Improvement to existing functionalityType: Improvement to existing functionality
Description
Problem
Subscribe messages still carry full PeerKeyLocation for target/subscriber, even though routing is now connection-based by socket address. Using PeerKeyLocation (with embedded addresses) for connected peers is redundant and risks stale/wrong addresses being propagated.
Why it matters
- We identify live peers by
SocketAddrnow; the transport source (upstream_addr) is authoritative for routing ReturnSub. - Embedded addresses can be wrong (NAT loopback/private) and should not be trusted.
- Carrying a full location in payload forces us to thread addresses we don’t actually use.
- PR fix: allow parallel connection attempts (max 3 concurrent) #2174 surfaced a regression where trusting a Known-but-wrong embedded address breaks NAT peers; overriding from transport source fixed it, but removing embedded addresses would prevent the class entirely.
Proposal
- Keep subscriber identity (pubkey/PeerId), but drop/ignore embedded addresses in Subscribe payloads.
- Treat routing as fully connection-based: return path uses
upstream_addr; forward path uses selected next-hop socket address. - Adjust
add_subscriber/ring/seeding code to accept identity + observed upstream address instead of a fullPeerKeyLocationpayload. - Consider merging RequestSub/SeekNode (see Unify Subscribe RequestSub and SeekNode message variants #2182) so the message shape is simplified in one pass.
Scope
- Out of scope for PR stack 2167–2175; track as follow-up cleanup.
Metadata
Metadata
Assignees
Labels
A-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateT-enhancementType: Improvement to existing functionalityType: Improvement to existing functionality
Type
Projects
Status
Done