- Fix early return in swarm.listen() that prevented listening on all addresses
- Add comprehensive tests for multi-address listening functionality
- Ensure all available interfaces are properly bound and connectable
- Added a function to find a free port on localhost.
- Updated the run function to use the new port finding logic when a non-positive port is provided.
- Modified address printing to handle multiple listen addresses correctly.
- Improved the get_available_interfaces function to ensure the IPv4 loopback address is included.
* Implementing random walk in py libp2p
* Add documentation for Random Walk module implementation in py-libp2p
* Add Random Walk example for py-libp2p Kademlia DHT
* refactor: peer eviction from routing table stopped
* refactored location of random walk
* add nodesin routing table from peerstore
* random walk working as expected
* removed extra functions
* Removed all manual triggers
* added newsfragments
* fix linting issues
* refacored logs and cleaned example file
* refactor: update RandomWalk and RTRefreshManager to use query function for peer discovery
* docs: added Random Walk example docs
* added optional argument to use random walk in kademlia DHT
* enabled random walk in example file
* Added tests for RandomWalk module
* fixed lint issues
* Update refresh interval and some more tests are added.
* Removed Random Walk module documentation file
* Extra parentheses have been removed from the random walk logs.
Co-authored-by: Paul Robinson <5199899+pacrob@users.noreply.github.com>
---------
Co-authored-by: Manu Sheel Gupta <manusheel.edu@gmail.com>
Co-authored-by: Paul Robinson <5199899+pacrob@users.noreply.github.com>
* FIXME: Make TProtocol Optional[TProtocol] to keep types consistent
* correct test case of test_protocol_muxer
* add newsfragment
* unit test added
---------
Co-authored-by: Manu Sheel Gupta <manusheel.edu@gmail.com>
* Implement closed_stream event handling and enable related tests
* Fix linting issues and ensure all tests pass
* Add logging for exception in SwarmConn and create newsfragment for closed_stream feature
- Replaced hardcoded listen address with `get_optimal_binding_address` for improved flexibility.
- Imported address validation utilities in `echo.py` and updated `__init__.py` to include new functions.
- Added `network_discover.py` to demonstrate Thin Waist address handling.
- Introduced `address_validation.py` with functions for discovering available network interfaces, expanding wildcard addresses, and determining optimal binding addresses.
- Included fallback mechanisms for environments lacking Thin Waist support.
* feat: base implementation of dcutr for hole-punching
* chore: removed circuit-relay imports from __init__
* feat: implemented dcutr protocol
* added test suite with mock setup
* Fix pre-commit hook issues in DCUtR implementation
* usages of CONNECT_TYPE and SYNC_TYPE have been replaced with HolePunch.Type.CONNECT and HolePunch.Type.SYNC
* added unit tests for dcutr and nat module and
* added multiaddr.get_peer_id() with proper DNS address handling and fixed method signature inconsistencies
* added assertions to verify DCUtR hole punch result in integration test
---------
Co-authored-by: Manu Sheel Gupta <manusheel.edu@gmail.com>