Commit Graph

1180 Commits

Author SHA1 Message Date
17c1ced408 Merge branch 'main' into refactor/replace-magic-numbers-with-named-constants 2025-09-23 21:26:19 +05:30
d64f9e10fd Fix: lint error 2025-09-23 17:29:15 +05:30
93c2d5002f fix: GossipSub peer propagation to include FloodSub peers 2025-09-23 17:29:15 +05:30
721da9364e Fixed variable imports 2025-09-23 17:29:15 +05:30
02ff688b5a Added timeout passing in muxermultistream. Updated the usages. Tested the params are passed correctly 2025-09-23 17:29:15 +05:30
5e2840d5b5 Merge branch 'main' into enhancement/yamuxstream-lock 2025-09-23 00:43:22 +05:30
43bb36338c Merge branch 'main' into fix/885-Update-default-Bind-address 2025-09-22 22:07:12 +05:30
6a1b955a4e fix: implement lazy initialization for global transport registry
- Change global registry from immediate to lazy initialization
- Fix doctest failure caused by debug logging during MultiError import
- Update all functions to use get_transport_registry() instead of direct access
- Resolves CI/CD doctest failure in libp2p.rst
2025-09-21 19:29:48 -04:00
87429eb2e9 Merge branch 'main' into add-ws-transport 2025-09-22 02:36:01 +05:30
321bb86ea4 Merge branch 'main' into enhancement/yamuxstream-lock 2025-09-22 02:03:11 +05:30
c3c8d8ccb9 Merge branch 'main' into fix/885-Update-default-Bind-address 2025-09-22 02:02:56 +05:30
db2f3a64ea Merge branch 'main' into keyerror-fix 2025-09-22 01:56:52 +05:30
a0cb6e3a30 Complete WebSocket transport implementation with TLS support
- Add TLS configuration support to new_host and new_swarm functions
- Fix WebSocket transport tests (test_wss_host_pair_data_exchange, test_wss_listen_without_tls_config)
- Integrate TLS configuration with transport registry for proper WebSocket WSS support
- Move debug files to downloads directory for future reference
- All 47 WebSocket tests now passing including WSS functionality
- Maintain backward compatibility with existing code
- Resolve all type checking and linting issues
2025-09-17 03:08:24 -04:00
cdbd80eeba Merge remote changes with local WebSocket improvements
- Combined yashksaini-coder's flow control improvements with luca's WSS features
- Preserved comprehensive WSS support, TLS configuration, and handshake timeout
- Added production-ready buffer management and connection limits
- Maintained backward compatibility with existing WebSocket functionality
- Integrated both approaches for optimal WebSocket transport implementation
2025-09-17 01:00:15 -04:00
284eee78d7 Merge branch 'main' into add-ws-transport 2025-09-16 01:04:16 +05:30
6e8960b383 Merge branch 'main' into enhancement/yamuxstream-lock 2025-09-16 01:03:02 +05:30
1250b2ec12 Merge branch 'main' into fix/885-Update-default-Bind-address 2025-09-16 01:02:18 +05:30
c5a2836829 stream_muxer(yamux): add ReadWriteLock to YamuxStream to prevent concurrent read/write corruption
Introduce a read/write lock abstraction and integrate it into `YamuxStream` so that simultaneous
reads and writes do not interleave, eliminating potential data corruption and race conditions.

Major changes:
- Abstract `ReadWriteLock` into its own util module
- Integrate locking into YamuxStream for `write` operations
- Ensure tests pass for lock correctness
- Fix lint & type issues discovered during review

Closes #793
2025-09-13 09:11:07 +01:00
4fdfdae9fb Refactor P2PWebSocketConnection and WebsocketTransport constructors for improved readability. Clean up whitespace and enhance logging for connection management. 2025-09-12 03:11:43 +05:30
0271a36316 Update the flow control, buffer management, and connection limits. Implement proper error handling and cleanup in P2PWebSocketConnection. Update tests for improved connection handling. 2025-09-12 03:04:38 +05:30
8793667503 Updated config & minor changes 2025-09-11 14:18:40 +05:30
771b837916 app{websocket): Refactor transport type annotations and improve event handling in QUIC connection 2025-09-10 04:15:56 +05:30
93db588b9e Merge branch 'main' into add-ws-transport 2025-09-10 02:49:52 +05:30
4a36d6efeb Replace magic number with named constants 2025-09-09 13:24:07 +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
4e8ebf707a Merge branch 'main' into fix_expose_timeout_muxer_multistream 2025-09-09 00:43:38 +05:30
f4d5a44521 Fix type errors and linting issues
- Fix type annotation errors in transport_registry.py and __init__.py
- Fix line length violations in test files (E501 errors)
- Fix missing return type annotations
- Fix cryptography NameAttribute type errors with type: ignore
- Fix ExceptionGroup import for cross-version compatibility
- Fix test failure in test_wss_listen_without_tls_config by handling ExceptionGroup
- Fix len() calls with None arguments in test_tcp_data_transfer.py
- Fix missing attribute access errors on interface types
- Fix boolean type expectation errors in test_js_ws_ping.py
- Fix nursery context manager type errors

All tests now pass and linting is clean.
2025-09-08 04:18:10 +02:00
afe6da5db2 Merge upstream/main into add-ws-transport
Resolved conflicts in:
- .gitignore: Combined JavaScript interop and Sphinx build ignores
- libp2p/__init__.py: Integrated QUIC transport support with WebSocket transport
- libp2p/network/swarm.py: Used upstream's improved listener handling
- pyproject.toml: Kept both WebSocket and QUIC dependencies

This merge brings in:
- QUIC transport implementation
- Enhanced swarm functionality
- Improved peer discovery
- Better error handling
- Updated dependencies and documentation

WebSocket transport implementation remains intact and functional.
2025-09-07 23:47:41 +02:00
396812e84a Experimental: Add comprehensive WebSocket and WSS implementation with tests
- Implemented full WSS support with TLS configuration
- Added handshake timeout and connection state tracking
- Created comprehensive test suite with 13+ WSS unit tests
- Added Python-to-Python WebSocket peer-to-peer tests
- Implemented multiaddr parsing for /ws, /wss, /tls/ws formats
- Added connection state tracking and concurrent close handling
- Created standalone WebSocket client for testing
- Fixed circular import issues with multiaddr utilities
- Added debug tools for WebSocket URL testing

All WebSocket transport functionality is complete and working.
Tests demonstrate WebSocket transport works correctly at the transport layer.
Higher-level libp2p protocol compatibility issues remain (same as JS interop).
2025-09-07 23:44:17 +02:00
a69db8a716 refactor(app): 885 Add ignore comment since SO attr not supported to Win 2025-09-06 02:00:19 +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
09c9709a3e Merge remote-tracking branch 'upstream/main' 2025-09-04 21:27:51 +00:00
f0b05b8307 Merge branch 'main' into fix_expose_timeout_muxer_multistream 2025-09-05 02:57:29 +05:30
9fdb36ed03 Merge branch 'main' into keyerror-fix 2025-09-05 02:57:04 +05:30
31191cbfae Merge branch 'main' into fix/885-Update-default-Bind-address 2025-09-05 02:56:39 +05:30
2fe5882013 fix: add quic utils test and improve connection performance 2025-09-04 21:25:37 +00:00
bffabd1070 Merge branch 'main' into add-ws-transport 2025-09-05 02:54:03 +05:30
56732a1506 Merge branch 'main' into fix_pubsub_msg_id_type_inconsistency 2025-09-04 16:26:01 +05:30
68cb54ee0f Merge branch 'main' into add-ws-transport 2025-09-04 16:22:16 +05:30
f80101c4eb Merge branch 'main' into keyerror-fix 2025-09-04 16:18:41 +05:30
4786b48364 Merge branch 'main' into fix/885-Update-default-Bind-address 2025-09-04 16:13:43 +05:30
2ee3e0b054 Merge branch 'main' into main 2025-09-04 16:13:06 +05:30
c693cd9bb9 Merge branch 'main' into add-ws-transport 2025-09-04 15:19:11 +05:30
25d7706047 Added timeout passing in muxermultistream. Updated the usages. Tested the params are passed correctly 2025-09-04 14:58:22 +05:30
c5a8f26490 Merge branch 'main' into fix/885-Update-default-Bind-address 2025-09-04 14:17:35 +05:30
31c65274c3 Merge branch 'main' into keyerror-fix 2025-09-04 14:15:54 +05:30
5ec1671608 Merge branch 'main' into issue-798 2025-09-04 14:14:31 +05:30
69a0d3da9d Merge branch 'main' into main 2025-09-04 14:13:20 +05:30
f54a14b713 Merge branch 'main' into issue-798 2025-09-04 13:41:45 +05:30