refactor: wire protocol cleanup and NAT routing improvements #2191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The previous stacked PRs (#2169 → #2171 → #2172 → #2174 → #2175) ran into git history divergence issues after squash-merging #2167. This made it impossible to cleanly merge the subsequent approved changes.
This Solution
This PR consolidates the approved changes from PRs #2169 and #2171 (both approved by Nacho) into a single clean PR against main:
Changes from PR #2169 (wire protocol cleanup):
ObservedAddrin favor ofstd::net::SocketAddrtransient_managermoduleChanges from PR #2171 (NAT routing improvements):
PeerAddrenum to explicitly represent known/unknown addressesPeerKeyLocationto usePeerAddrfor NAT scenariosContext
This is part of issue #2164 (peer identity simplification). The original stacked PR approach was blocked because:
This PR recreates the approved changes by applying the diff from the intermediate branch to a fresh branch based on main.
Testing
Related
[AI-assisted - Claude]