Commit Graph

137 Commits

Author SHA1 Message Date
bf132cf3dd Fix import statements and improve error handling in examples 2025-09-18 02:22:31 +05:30
4dd2454a46 Update examples to use dynamic host IP instead of hardcoded localhost 2025-09-18 02:09:51 +05:30
7d364da950 Refactor: update examples to utilize new address paradigm with wildcard support
- Introduced `get_wildcard_address` function for explicit wildcard binding.
- Updated examples to use `get_available_interfaces` and `get_optimal_binding_address` for address selection.
- Ensured consistent usage of the new address paradigm across all example files.
- Added tests to verify the implementation of the new address paradigm and wildcard feature.
2025-09-09 12:10:28 +05:30
aa2a650f85 fix: update QUIC examples to use loopback address for improved security 2025-09-05 20:54:33 +05:30
030deb42b4 refactor: update examples to use available interfaces for listening addresses and improve logging configuration 2025-09-05 20:05:10 +05:30
637bd5d560 Merge branch 'libp2p:main' into fix/885-Update-default-Bind-address 2025-09-05 18:14:44 +05:30
f3976b7d2f docs: add some documentation for QUIC transport 2025-09-05 05:41:06 +00:00
c5a8f26490 Merge branch 'main' into fix/885-Update-default-Bind-address 2025-09-04 14:17:35 +05:30
69a0d3da9d Merge branch 'main' into main 2025-09-04 14:13:20 +05:30
159d2cc322 Merge remote-tracking branch 'upstream/main' 2025-09-02 16:16:21 +00:00
ade6f5c6ad Merge branch 'libp2p:main' into fix/885-Update-default-Bind-address 2025-09-02 03:23:20 +05:30
87550113a4 chore: Update network address config to use loopback (127.0.0.1) instead of wildcard (0.0.0.0) across multiple examples and utilities. 2025-09-02 03:00:18 +05:30
6742dd38f7 Merge branch 'main' into fix/cross_platform_path_tests 2025-09-02 01:00:23 +05:30
64ccce17eb fix(app): 882 Comprehensive cross-platform path handling utilities 2025-09-01 02:03:51 +05:30
9749be6574 fix: refine selection of quic transport while init 2025-08-31 16:07:41 +00:00
526b65e1d5 style: apply ruff formatting fixes 2025-08-31 01:43:27 +01:00
59e1d9ae39 address architectural refactoring discussed 2025-08-31 01:38:29 +01:00
0f64bb49b5 chore: log cleanup 2025-08-30 14:08:22 +05:30
03bf071739 chore: cleanup and near v1 quic impl 2025-08-30 14:08:22 +05:30
6c45862fe9 fix: succesfull echo example completed 2025-08-30 14:08:22 +05:30
8f0cdc9ed4 fix: succesfull echo 2025-08-30 14:08:22 +05:30
bbe632bd85 fix: initial connection succesfull 2025-08-30 14:08:21 +05:30
2689040d48 fix: handle short quic headers and compelete connection establishment 2025-08-30 14:08:06 +05:30
8263052f88 fix: peer verification successful 2025-08-30 14:08:06 +05:30
6633eb01d4 fix: add QUICTLSSecurityConfig for better security config handle 2025-08-30 14:08:06 +05:30
123c86c091 fix: duplication connection creation for same sessions 2025-08-30 14:08:06 +05:30
369f79306f chore: add logs to debug connection 2025-08-30 14:08:06 +05:30
cb6fd27626 fix: process packets received and send to quic 2025-08-30 14:08:06 +05:30
a1d1a07d4c fix: implement missing methods 2025-08-30 14:08:05 +05:30
ac01cc5038 fix: add echo example 2025-08-30 14:07:54 +05:30
9fa3afbb04 fix: format code to pass CI lint 2025-08-28 22:18:33 +01:00
c577fd2f71 feat(swarm): enhance swarm with retry backoff 2025-08-28 20:59:36 +01:00
6c6adf7459 chore(app): 804 Suggested changes - Remove the comment 2025-08-25 12:43:18 +05:30
ed91ee0c31 refactor(app): 804 refactored find_free_port() in address_validation.py 2025-08-24 23:28:02 +05:30
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
5b9bec8e28 fix: Enhance error handling in echo stream handler to manage stream closure and exceptions 2025-08-20 18:29:35 +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
69d5274891 fix: update listening address parameter in echo example to accept a list 2025-08-19 22:32:26 +05:30
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
b363d1d6d0 fix: update listening address handling to use all available interfaces 2025-08-18 12:38:04 +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
8c96c5a941 Add the periodic peer-store cleanup in all the examples 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
3a927c8419 Merge branch 'main' into feature/bootstrap 2025-07-21 06:43:34 -07:00
37e4fee9f8 feat: Add identify-push raw format support and yamux logging improvements
- Add comprehensive integration tests for identify-push protocol
- Support both raw protobuf and varint message formats
- Improve yamux logging integration with LIBP2P_DEBUG
- Fix RawConnError handling to reduce log noise
- Add Ctrl+C handling to identify examples
- Enhance identify-push listener/dialer demo

Fixes: #784
2025-07-20 20:19:18 +02:00