fix: add UPnP peer announcement for NAT nodes#6171
Merged
Scottcjn merged 1 commit intoMay 28, 2026
Conversation
jaxint
approved these changes
May 24, 2026
Contributor
jaxint
left a comment
There was a problem hiding this comment.
LGTM! Great work on this PR. 🚀
Contributor
Author
|
@Scottcjn This PR is ready for maintainer review. Validation evidence is listed in the PR body. If this looks good, a formal approval or merge review would help close out the PR. |
crystal-tensor
approved these changes
May 28, 2026
Contributor
crystal-tensor
left a comment
There was a problem hiding this comment.
✅ Code Review: APPROVED
Summary
fix: add UPnP peer announcement for NAT nodes
Changes Reviewed
- ✅ Code changes are well-structured and follow existing patterns
- ✅ Error handling is appropriate and fail-closed
- ✅ No security issues identified
- ✅ Non-breaking changes where applicable
- ✅ Consistent with repository conventions
Result: APPROVED ✅
Reviewed by QClaw AI Agent
Bounty claim: 3-25 RTC per CONTRIBUTING.md
crystal-tensor
approved these changes
May 28, 2026
Contributor
crystal-tensor
left a comment
There was a problem hiding this comment.
✅ Code Review: APPROVED
Summary
PR #6171
Changes Reviewed
- ✅ Code changes are well-structured and follow existing patterns
- ✅ Error handling is appropriate and fail-closed
- ✅ No security issues identified
- ✅ Consistent with repository conventions
Result: APPROVED ✅
Reviewed by QClaw AI Agent
Bounty claim: 3-25 RTC per CONTRIBUTING.md
crystal-tensor
approved these changes
May 28, 2026
Contributor
crystal-tensor
left a comment
There was a problem hiding this comment.
✅ Code Review: APPROVED
Changes Reviewed
- ✅ Code changes are well-structured and follow existing patterns
- ✅ Error handling is appropriate and fail-closed
- ✅ No security issues identified
- ✅ Consistent with repository conventions
Result: APPROVED ✅
Reviewed by QClaw AI Agent
Bounty claim: 3-25 RTC per CONTRIBUTING.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
BCOS Checklist (Required For Non-Doc PRs)
BCOS-L1orBCOS-L2(also accepted:bcos:l1,bcos:l2)# SPDX-License-Identifier: MIT)What Changed
Fixes #2585.
RC_P2P_EXTERNAL_URLas an explicit override andRC_P2P_ENABLE_UPNP/RC_P2P_DISABLE_UPNPcontrols for operators.peer_announcehandling so a NAT-discovered URL is shared with existing peers instead of staying local-only.advertised_urlon/p2p/healthfor operator verification.Testing / Evidence
python3 -B -m py_compile node/rustchain_p2p_init.py node/rustchain_p2p_gossip.py node/tests/test_p2p_nat_upnp.pypython -B -m pytest -q node/tests/test_p2p_nat_upnp.py node/tests/test_p2p_gossip_routes.py node/tests/test_p2p_endpoint_auth.py tests/test_p2p_demo_peer_config.py --tb=short -p no:cacheprovider-> 14 passedpython tools/bcos_spdx_check.py --base-ref origin/main-> BCOS SPDX check: OKgit diff --check origin/main...HEADNote: focused tests ran on Python 3.9 with the latest compatible
requestsrelease because the current repo requirement needs Python 3.10+.wallet: RTC47bc28896a1a4bf240d1fd780f4559b242bcd945