Commit Graph

1008 Commits

Author SHA1 Message Date
cacb3c8aca feat: add webtransport certhashes field to NoiseExtensions and implement serialization test
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-08-26 12:49:21 +05:30
05fde3ad40 Merge branch 'main' into noise-arch-change 2025-08-25 16:21:43 +05:30
fde8c8f127 Merge branch 'main' into feat/804-add-thin-waist-address 2025-08-24 23:46:17 +05:30
bc1b1ed6ae fix_gossipsub_mid_type (#859)
* fix_gossipsub_mid_type

* Fix lint and add newsfragments

* Fix mid formation

* Revert "Fix mid formation"

This reverts commit 835d4ca7af58f0716db51a00a8a7aa6cc15ac0a6.
2025-08-24 12:11:36 -06:00
63a8458d45 add import to __init__ 2025-08-24 23:40:05 +05:30
ed91ee0c31 refactor(app): 804 refactored find_free_port() in address_validation.py 2025-08-24 23:28:02 +05:30
75ffb791ac fix: Ensure newline at end of file in address_validation.py and update news fragment formatting 2025-08-24 22:06:07 +05:30
88a1f0a390 cherry pick 7a1198c8c6/libp2p/utils/address_validation.py 2025-08-24 21:17:29 +05:30
b6cbd78943 Fix multi-address listening bug in swarm.listen()
- 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
2025-08-24 01:49:42 +02:00
ed2716c1bf feat: Enhance echo example to dynamically find free ports and improve address handling
- 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.
2025-08-22 11:48:37 +05:30
8a2d1f7045 Merge branch 'main' into feat/804-add-thin-waist-address 2025-08-20 18:04:45 +05:30
94d695c6bc feat: Implement Random walk in py-libp2p (#822)
* 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>
2025-08-20 05:10:06 -06:00
905f3a5708 Merge branch 'main' into feat/804-add-thin-waist-address 2025-08-20 09:59:48 +05:30
dabb3a0962 FIXME: Make TProtocol Optional[TProtocol] to keep types consistent (#770)
* 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>
2025-08-19 19:20:37 -06:00
a1b16248d3 fix: correct listening address variable in echo example and streamline address printing 2025-08-19 20:47:18 +05:30
7f6469d5d4 Merge remote-tracking branch 'acul71/feat/804-add-thin-waist-address' into feat/804-add-thin-waist-address 2025-08-19 19:56:20 +05:30
05b372b1eb Fix linting and type checking issues for Thin Waist feature 2025-08-19 01:11:48 +02:00
e4ab3cb2c5 Add early data support to Noise protocol
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-08-19 04:41:14 +05:30
fe71c479dc Merge branch 'main' into feat/804-add-thin-waist-address 2025-08-18 21:55:02 +05:30
9378490dcb fix: ensure loopback addresses are included in available interfaces 2025-08-18 12:40:38 +05:30
9a0f224a1c Merge branch 'libp2p:main' into feat/804-add-thin-waist-address 2025-08-18 11:31:28 +05:30
13379e38d8 Merge branch 'libp2p:main' into feat/implement-listen_close-mynotifee 2025-08-17 20:54:59 +01:00
09d2110d65 Remove redundant local import of Multiaddr in close() method 2025-08-17 20:29:35 +01:00
7c2014087f Merge branch 'libp2p:main' into bugfix/kbucket_split_fix 2025-08-16 13:05:26 +05:30
37df8d679d fix: fixed kbucket splitting behavior in RoutingTable 2025-08-16 11:51:37 +05:30
5c78a41552 Implement closed_stream notification and tests 2025-08-15 16:02:58 +01:00
aa7276c863 Implement closed_stream event handling and enable related tests (#834)
* 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
2025-08-13 16:19:53 -06:00
a14c42ef73 Merge branch 'main' into feat/804-add-thin-waist-address 2025-08-10 21:35:10 +05:30
af61523c87 Merge branch 'main' into varun-r-mallya/protobuf-update 2025-08-10 16:56:10 +05:30
09cd8b37ed Merge branch 'main' into feat/804-add-thin-waist-address 2025-08-10 13:13:44 +05:30
92e79bbb3f Merge branch 'main' into varun-r-mallya/protobuf-update 2025-08-10 11:29:59 +05:30
eb3121b818 remove completed TODO task comments 2025-08-10 11:28:11 +05:30
26d0ed2d81 remove deprecated IK pattern TODO 2025-08-09 23:25:23 +00:00
618aff9368 chore: recompile protobufs
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-08-10 01:31:40 +05:30
fa174230ba Refactor echo example to use optimal binding address
- 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.
2025-08-09 01:22:17 +05:30
b840eaa7e1 Implement advanced network discovery example and address validation utilities
- 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.
2025-08-09 01:22:03 +05:30
678b920992 Remove FIXME 2025-08-08 02:01:36 +00:00
cb11f076c8 feat/606-enable-nat-traversal-via-hole-punching (#668)
* 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>
2025-08-07 19:00:16 -06:00
8c96c5a941 Add the periodic peer-store cleanup in all the examples 2025-07-26 22:38:28 +05:30
16445714f7 overwrite old_addr with new_addrs in consume_peer_record 2025-07-26 22:38:28 +05:30
64bc388b33 added peer-store cleanup task in ping example 2025-07-26 22:38:28 +05:30
2d335d4394 Integrated Signed-peer-record transfer with identify/identify-push 2025-07-26 22:38:28 +05:30
8b8b051885 batch operations for consume_peer_record 2025-07-26 22:38:28 +05:30
07c8d4cd1f added periodic cleanup task 2025-07-26 22:38:28 +05:30
09e6feea8e merge new addresses with existing ones, in consume_peer_record 2025-07-26 22:38:28 +05:30
601a8a3ef0 enforce_peer_record_limit 2025-07-26 22:38:28 +05:30
9d597012cc fixed the linter <> protobuf issues 2025-07-26 22:38:28 +05:30
8625226be8 fix merge conflicts 2025-07-26 22:38:28 +05:30
c2b1738cd9 fix sphinx/docutils bugs 2025-07-26 22:38:28 +05:30
83acc38281 fix tox bugs 2025-07-26 22:38:28 +05:30