Commit Graph

1864 Commits

Author SHA1 Message Date
e868f77f93 added: logs 2025-06-06 15:04:13 +05:30
b3137aa159 interop utilities for mplex ping 2025-06-06 15:04:12 +05:30
5ca6f26933 feat: Add blacklisting of peers (#651)
* init

* remove blacklist validation after hello packet

* add docs and newsfragment
2025-06-05 09:10:04 -06:00
a3c9ac61e6 Improve performance of read from daemon test (#646)
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-06-05 07:25:59 -06:00
67ab6e27d8 feat: implement AsyncContextManager for IMuxedStream to support async… (#629)
* feat: implement AsyncContextManager for IMuxedStream to support async with

* doc: add newsfragment
2025-05-30 08:44:33 -06:00
67ca1d7769 todo: handled ls command in multiselect.py (#622) 2025-05-27 20:18:37 -06:00
5496b2709a Resolved type-checking error in PubSub example test. (#627) 2025-05-25 19:14:58 -06:00
481be5d63d todo: parse listen_addrs to set transport in SwarmBuilder (#616) 2025-05-25 18:57:30 -06:00
386f0a2299 Bump version: 0.2.6 → 0.2.7 2025-05-22 15:27:03 -06:00
76f17cf133 Compile release notes for v0.2.7 2025-05-22 15:26:20 -06:00
276b9b7339 Implemented multi-error handling in MultiError() class (#614)
* Implemented multi-error handling in MultiError() class

* Added newsfragement file and test

* updated doc-string and list-struct

* updating docstring
2025-05-22 15:22:38 -06:00
4b1860766d Feat: Adding Yamux as default multiplexer, keeping Mplex as fallback (#538)
* feat: Replace mplex with yamux as default multiplexer in py-libp2p

* Retain Mplex alongside Yamux in new_swarm with messaging that Yamux is preferred

* moved !BBHII to a constant YAMUX_HEADER_FORMAT at the top of yamux.py with a comment explaining its structure

* renamed the news fragment to 534.feature.rst and updated the description

* renamed the news fragment to 534.feature.rst and updated the description

* added a docstring to clarify that Yamux does not support deadlines natively

* Remove the __main__ block entirely from test_yamux.py

* Replaced the print statements in test_yamux.py with logging.debug

* Added a comment linking to the spec for clarity

* Raise NotImplementedError in YamuxStream.set_deadline per review

* Add muxed_conn to YamuxStream and test deadline NotImplementedError

* Fix Yamux implementation to meet libp2p spec

* Fix None handling in YamuxStream.read and Yamux.read_stream

* Fix test_connected_peers.py to correctly handle peer connections

* fix: Ensure StreamReset is raised on read after local reset in yamux

* fix: Map MuxedStreamError to StreamClosed in NetStream.write for Yamux

* fix: Raise MuxedStreamReset in Yamux.read_stream for closed streams

* fix: Correct Yamux stream read behavior for NetStream tests

Fixed 	est_net_stream_read_after_remote_closed by updating NetStream.read to raise StreamEOF when the stream is remotely closed and no data is available, aligning with test expectations and Fixed 	est_net_stream_read_until_eof by modifying YamuxStream.read to block until the stream is closed (
ecv_closed=True) for
=-1 reads, ensuring data is only returned after remote closure.

* fix: Correct Yamux stream read behavior for NetStream tests

Fixed 	est_net_stream_read_after_remote_closed by updating NetStream.read to raise StreamEOF when the stream is remotely closed and no data is available, aligning with test expectations and Fixed 	est_net_stream_read_until_eof by modifying YamuxStream.read to block until the stream is closed (
ecv_closed=True) for
=-1 reads, ensuring data is only returned after remote closure.

* fix: raise StreamEOF when reading from closed stream with empty buffer

* fix: prioritize returning buffered data even after stream reset

* fix: prioritize returning buffered data even after stream reset

* fix: Ensure test_net_stream_read_after_remote_closed_and_reset passes in full suite

* fix: Add __init__.py to yamux module to fix documentation build

* fix: Add __init__.py to yamux module to fix documentation build

* fix: Add libp2p.stream_muxer.yamux to libp2p.stream_muxer.rst toctree

* fix: Correct title underline length in libp2p.stream_muxer.yamux.rst

* fix: Add a = so that is matches the libp2p.stream\_muxer.yamux length

* fix(tests): Resolve race condition in network notification test

* fix: fixing failing tests and examples with yamux and noise

* refactor: remove debug logging and improve x25519 tests

* fix: Add functionality for users to choose between Yamux and Mplex

* fix: increased trio sleep to 0.1 sec for slow environment

* feat: Add test for switching between Yamux and mplex

* refactor: move host fixtures to interop tests

* chore: Update __init__.py removing unused import

removed unused
```python
import os
import logging
```

* lint: fix import order

* fix: Resolve conftest.py conflict by removing trio test support

* fix: Resolve test skipping by keeping trio test support

* Fix: add a newline at end of the file

---------

Co-authored-by: acul71 <luca.pisani@birdo.net>
Co-authored-by: acul71 <34693171+acul71@users.noreply.github.com>
2025-05-22 14:01:51 -06:00
18c6f529c6 Feat/issue 605 debug logging via env variable (#608)
* feat: Debug Logging via Environment Variable

* refactor: deleted libp2p/utils.py

* fix: double messages logging fix

* doc: add logging info to getting_started.rst
2025-05-20 14:07:22 -06:00
4a53fc3111 Direct Peers : Gossipsub V1.1 (#594)
* added basic structure for direct peers

* added direct connect heartbeat

* added logic to reject GRAFT from direct peers

* added invocation of direct_connect_heartbeat

* updated _get_peers_to_send to include direct peers

* fixed failing gossipsub core and demo tests

* fixed failing test_examples.py

* add tests for peer management

* fix lint

* update tests

* fixed direct_peers type and peer_records test

* fixed failing gossipsub direct peers test

* added reject graft test

* updated reconnection test

* added newsfragment

* improved reject graft test

* updated default value for direct peers

* renamed direct_connect_init_delay parameter

* reverted back to direct_connect_initial_delay param name

---------

Co-authored-by: Khwahish Patel <khwahish.p1@ahduni.edu.in>
2025-05-20 07:31:57 -06:00
5b40e2551d doc: fix discord server link (#609)
* fix-discord-server-link
2025-05-16 10:38:49 -06:00
d34d6df1c5 Update 586.bugfix.rst
Remove extra `
2025-05-15 13:49:02 -06:00
eba4805a76 Add news fragment 2025-05-15 13:49:02 -06:00
e56974078a Fix exception handling 2025-05-15 13:49:02 -06:00
745458cdff Reduce logging level to debug in TCPListener.listen() 2025-05-15 13:49:02 -06:00
bb21af7694 Adds exception handling in TCPListener.listen() 2025-05-15 13:49:02 -06:00
e076a038bc Bump version: 0.2.5 → 0.2.6 2025-05-12 13:46:14 -06:00
ede850d943 Compile release notes for v0.2.6 2025-05-12 13:45:35 -06:00
9798db3932 fix towncrier config and correct links in release_notes 2025-05-12 13:22:12 -06:00
0430ad397f doc: fix broken newsfragment link in contributing 2025-05-11 16:57:14 -06:00
dc2f77ccbd Fix check-rst-files hook to work cross-platform 2025-05-09 19:21:42 -06:00
6064c96563 feat(autonat): add make targets for autonat protobuf generation and formatting 2025-05-09 17:31:15 -06:00
05d89cb20e added all and docs dependencies in tox.ini for testenv:docs 2025-05-09 17:31:15 -06:00
171b2a26e3 removed grpcio dependency from setup.py 2025-05-09 17:31:15 -06:00
e9674d2bca refractored Peer_Info to PeerInfo as imports 2025-05-09 17:31:15 -06:00
99238403dd added logger in test file and added dependency in tox.ini 2025-05-09 17:31:15 -06:00
04da30b7fe refractor: remove suppress warning in conf.py 2025-05-09 17:31:15 -06:00
8d98e93c27 refractor: remove suppress warning in conf.py 2025-05-09 17:31:15 -06:00
d55c57769f Refactor: changed PeerInfo to Peer_Info in autonat.proto to avoid conflicts 2025-05-09 17:31:15 -06:00
627c2cfe8e removed unused imports from conf.py 2025-05-09 17:31:15 -06:00
317eaeda93 fix: add grpcio dependency to extras_require and install_requires 2025-05-09 17:31:15 -06:00
244cc0c42a refactor: update documentation structure for libp2p.host and autonat packages 2025-05-09 17:31:15 -06:00
1bed3304c7 fixed autonat file for pre-commit hook issues 2025-05-09 17:31:15 -06:00
86dce72ae0 fix: regenerate protobuf files to match runtime version 2025-05-09 17:31:15 -06:00
1730999e38 fixed pre commit hook issues in autonat 2025-05-09 17:31:15 -06:00
9655c88788 feat/561-added autonat service 2025-05-09 17:31:15 -06:00
fd893afba6 delete old interop, turn on with placeholders, add py312 and py313 to CI testing 2025-05-08 13:30:00 -06:00
4c02c4ea02 doc: add TODO for limit concurrency 2025-05-01 09:14:46 -06:00
4ad6975ef1 feat: push identify-push info in pararrel 2025-05-01 09:14:46 -06:00
1213710af3 lint: resolved lint issues 2025-05-01 09:14:46 -06:00
e928e6a8cd Refactor: Update test_identify_push.py removing duplicated import 2025-05-01 09:14:46 -06:00
5a05ca0124 Update identify_push_listener_dialer.py debug config lint 2025-05-01 09:14:46 -06:00
95a9bf6c53 Update identify_push_demo.py for double print and debug msgs 2025-05-01 09:14:46 -06:00
c40a1476ac Update docs/examples.identify_push.rst
Co-authored-by: Paul Robinson <5199899+pacrob@users.noreply.github.com>
2025-05-01 09:14:46 -06:00
35905909b5 Update docs/examples.identify_push.rst
Co-authored-by: Paul Robinson <5199899+pacrob@users.noreply.github.com>
2025-05-01 09:14:46 -06:00
6850907a32 Update docs/examples.identify_push.rst
Co-authored-by: Paul Robinson <5199899+pacrob@users.noreply.github.com>
2025-05-01 09:14:46 -06:00