-
Notifications
You must be signed in to change notification settings - Fork 191
Tracking: Transport, Relay, and Discovery Enhancements #996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
71ea513 to
271cdd6
Compare
|
@codemaestro64 : Thank you so much for opening the PR for completing all the required enhancements and todos in circuit relay. Appreciate your efforts. Updated the branch and re-run CI/CD pipeline. You will get immediate results on CI/CD test cases. |
|
@codemaestro64 : Appreciate your efforts. Wish to invite @acul71 , @lla-dane, @Winter-Soren for sharing feedback points on the PR. |
|
Hey @codemaestro64, |
libp2p/relay/circuit_v2/transport.py
Outdated
| # Prefer stored /p2p-circuit addrs from peerstore | ||
| # Try first to read addresses from peerstore | ||
| peer_store = self.host.get_peerstore() | ||
| stored_addrs = peer_store.addrs(peer_info.peer_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peer_store.addrs will raise a PeerStoreError if the peer we're dialing isn't already in the peerstore, making dialing new peers impossible. Maybe wrap in a try/except or similar?
add pymock to test depenencies
…nnects and discovery
174dc7f to
a34f3b4
Compare
473066e to
968dfff
Compare
|
@codemaestro64 : Great work. Appreciate the progress. Please reply to @pacrob so that he can review and mark the feedback as resolved. There is one CI/CD failure, which can be ignored for now (not related to the PR): =========================== short test summary info ============================ |
|
@codemaestro64 : Wonderful efforts indeed. Appreciate your contribution. Wish if you could mark the todos at #691 completed in your PR. We are reviewing the PR in details, once again. It is indeed heading towards final review + merge. Great progress. On the same note, wish if you could open up a discussion page sharing more details on the implementation steps and test suite. CCing @pacrob, @Winter-Soren, who are reviewing this PR. Looking forward to their pointers and feedback. |
pyproject.toml
Outdated
| [tool.ruff.per-file-ignores] | ||
| "tests/*.py" = ["F821"] # undefined name (e.g., pytest fixtures like mocker) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not getting an error with this. Is it necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed. Removed
libp2p/relay/circuit_v2/transport.py
Outdated
| async def handle_incoming_connection( | ||
| self, | ||
| stream: INetStream, | ||
| remote_peer_id: ID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This arg is never used in the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. It's been removed
| voucher=b"", # We don't use vouchers yet | ||
| signature=b"", # We don't use signatures yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be updated? It looks like we are checking against these values in RelayResourceManager->verify_reservation, but they are always empty strings here.
What was wrong?
Issue #691
The libp2p stack lacked robust relay support, secure resource validation, and dynamic peer discovery, impacting reliability in NATed or firewalled environments.
Description
This PR enhances the py-libp2p networking layer with improvements to relay functionality and security, advancing the library toward production-grade reliability for decentralized applications.
TODOs
resources.pytransport.pyrun()method inCircuitV2Listenercloses #691