These 73 commits are when the Protocol Buffers files have changed:
| Commit: | 8d2d1a1 | |
|---|---|---|
| Author: | Sumanjeet | |
| Committer: | GitHub | |
fix(relay): circuit relay v2 + DCUtR spec compliance for go/rust interop (#1538) * feat(hole-punch): spec-compliant DCUtR with TCP simultaneous open - DCUtR: RTT/2 sync delay, 4KiB cap, single-session lock, spec Noise roles - TCP: SO_REUSEPORT listeners, source-bound dials for hole punching - Observed addresses: NAT port-remap matching, WAN:listen_port prediction, ignore relayed-connection observations * fix(identify): report circuit address as observed on relayed connections Peers that record observed addresses verbatim (e.g. nim single-slot store) would otherwise learn the relay's socket address as our external and advertise it back in DCUtR, breaking hole punching. Matches go/rust. * chore(relay): fix lint/types on spec-compliance branch, add newsfragments (#1537) - F811 shadow fix (PeerID alias), E501/D-docstring/ruff-format clean - to_proto_status boundary helper; StatusCode reads from proto values - peer_info (not get_peer_info); secured-conn remote fallback via getattr - drop spec-invalid STOP senderRecord branch; bound MsgT; fix regen .pyi - newsfragments/1537.{bugfix,feature}.rst * fix(relay): resolve review findings — double-count, pyrefly/mypy, lint - _relay_data: drop duplicate data_used accounting (track_data_transfer is the single source); lazy %s logging - pyrefly: to_proto_status at proto boundaries (lib + tests), StatusCode() reads, getattr/callable narrowing (swarm, basic_host, protocol secured-conn fallback), _BytesReader(Reader), candidates bytes normalization, bound MsgT, HopMessage-only consume_signed_record, regen .pyi Mapping args - fix F811 PeerID alias, E501, docstring/format clean * fix(relay): narrow getattr callables for pyrefly, match Reader override * fix(relay): use cast for getattr dial hook (pyrefly narrowing) * fix(relay): skip SO_REUSEPORT test where unsupported (Windows) * fix(relay): py310-plus class syntax in regen autonat grpc stub * chore(relay): remove dead code found in redundancy audit - discovery: compare StatusCode directly instead of getattr(status, 'code') which always fell back to OK (refusals treated as success); log the code instead of nonexistent .message - protocol: drop envelope computations feeding the ignored _send_status param; remove the param, dead imports, and commented-out blocks - tests: drop stale env patches for the removed envelope path * fix(tests): use SO_EXCLUSIVEADDRUSE holder on Windows for bind-failure test * fix(autonat): spec-compliant schema, server guards, and client * docs(news): bugfix fragment for AutoNAT spec compliance (#1540) * fix(autonat): INetStream annotations, loop-var shadowing * fix(autonat): pyrefly narrowing (Any addrs, str IPs) * test(autonat): restore _try_dial unit test after merge * feat(hole-punch): unilateral upgrade, QUIC spam, cancel-on-success, relay close * fix(relay): spec gaps — listener ID, refresh, TTL, addrs, limits, vouchers * fix: pyupgrade grpc stub, pyrefly test issues (getattr SO_EXCLUSIVEADDRUSE, relayed-stream mock) * fix(autonat): relative import in regen grpc stub (docs autodoc) * chore: trigger RTD rebuild * fix: address review findings (M1 cache staleness, M2 grpc types, minors m1-m6) M1 — DCUtR _direct_connections cache never invalidated on peer disconnect. Added DCUtRProtocol.on_peer_disconnected(peer_id) which discards the peer from _direct_connections and _initiate_locks. Wire it into the Swarm INotifee.disconnected() hook to evict stale entries when a connection closes (NAT mapping expiry, peer reboot, network change). M2 — autonat_pb2_grpc.py: restore type annotations lost in grpcio-tools regeneration. AutoNATStub.__init__ now typed as (channel: grpc.Channel) -> None; AutoNATServicer.Dial as (request: Message, context: ServicerContext) -> Message. m1 — _verify_direct_connection: document SwarmConn internal layout coupling in the muxed_conn.raw_conn fallback path. m2 — tcp.py: collapse 3-line debug banner into a single structured log line. m3 — _initiate_locks: evict per-peer lock in on_peer_disconnected() to prevent unbounded dict growth in long-running nodes. m4 — _is_relayed_connection: replace fragile string-repr check with Multiaddr protocol-code inspection (falls back to string check for non-Multiaddr objects such as mocks in tests). m5 — _prefer_circuit_addr: log exceptions instead of silently swallowing them. m6 — update.py: document that the private-address filter removal is intentional (filtering at dial time, not storage time). All 44 affected tests pass; ruff clean on all 6 changed files. * fix: address reviewer findings (C1-C4 resource/cache/voucher, A1-A4 autonat) C1 — active_connections never decremented on circuit teardown. Added RelayResourceManager.release_connection(peer_id) and called it in a finally block in the CONNECT handler, paired with the existing active_connections += 1. Prevents hop nodes from being DoS'd after a handful of circuits exhaust the per-reservation connection quota. C2 — DCUtRProtocol.on_peer_disconnected not wired to disconnect events. DCUtRProtocol.__init__ now registers itself on host._dcutr_protocol so BasicHost._on_notifee_disconnected can call on_peer_disconnected() automatically. Also fixed the docstring (falsely claimed 'guarded eviction'; sync method cannot await, so it unconditionally discards). Added _hole_punch_attempts.pop() so peers that reconnect can be re-punched. C3 — Circuit data limit applied per-direction, not circuit-wide. _relay_data now accepts an optional circuit_data_limit=[remaining] one-element list shared between the two nursery coroutines so both directions draw from the same counter. Matches go/rust behaviour. Falls back to the old per-direction reservation tracking when no shared budget is provided. C4 — refresh_reservation updates expires_at but does not re-sign voucher. Now calls existing._sign_voucher() after extending the expiry so the new timestamp is covered by a fresh signature; clients presenting the old voucher would otherwise fail the expiry-match check. A1 — confirmations or CONFIRMATIONS_REQUIRED treats 0 as 'use default'. Changed to explicit None check: CONFIRMATIONS_REQUIRED if confirmations is None else confirmations. A2 — IPv6 comparisons used string equality after only ::ffff: strip. _normalize_ip now calls ipaddress.ip_address() so compressed vs expanded representations of the same address compare equal. A3 — _is_relayed_stream (AutoNAT) failed open when addresses unavailable. Now fails closed (returns True = treat as relayed) when transport addresses cannot be obtained, refusing the dial-back request rather than risking acting as an amplification relay. A4 — HOP/STOP/AutoNAT varint-prefixed reads were unbounded. read_delimited_msg (circuit relay utils) and handle_stream / query_server (AutoNAT) now use read_varint_prefixed_bytes_limited with a 64 KiB cap, matching DCUtR's already-capped reads. Tests: 27 autonat+dcutr unit tests pass; 134 relay+host integration tests pass (1 autonat mock test updated for the new fail-closed semantics). Ruff clean on all 7 changed files. * style: apply ruff-format to protocol.py (pre-commit cleanup) --------- Co-authored-by: Manu Sheel Gupta <manusheel.edu@gmail.com>
The documentation is generated from this commit.
| Commit: | d068740 | |
|---|---|---|
| Author: | Barnabas Busa | |
| Committer: | GitHub | |
fix: migrate ControlIHave/ControlIWant messageIDs to bytes (#1146) * fix: ControlIHave and ControlIWant message types to bytes from string Changed types of topicID and messageIDs from string to bytes in ControlIHave and ControlIWant messages. This change is required due to this error message I saw: ``` iwant_msg.messageIDs.extend(msg_ids) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x95 ``` This happened because msg_ids contained raw binary hashes (arbitrary bytes), and when extending a repeated string field, Python's protobuf tries to decode them as UTF-8. * Change topicID type from bytes to string * fix(pubsub): migrate IHAVE/IWANT messageIDs to opaque bytes Align ControlIHave/ControlIWant with the GossipSub RPC schema and ControlIDontWant so binary message IDs no longer hit UTF-8 decode errors. Emit raw bytes on send; keep safe_bytes_from_hex on receive for hex-compat with older py peers. Fixes #1463 Co-authored-by: Cursor <cursoragent@cursor.com> * fix(anyio_service): import CancelScope/Event/Lock from anyio TYPE_CHECKING imports from anyio.abc break mypy/pyrefly under anyio 4.15+. Import these primitives from anyio instead so CI lint stays green. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: acul71 <34693171+acul71@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
| Commit: | 84bd0c5 | |
|---|---|---|
| Author: | acul71 | |
fix(relay): enforce destination reservation on Circuit Relay v2 CONNECT Fixes #1342. Reject CONNECT when the destination has no active reservation (NO_RESERVATION=204), enforce source per-reservation connection limits separately, add get_reservation() API, regression tests, and regenerate circuit protobuf with 6.x toolchain. Co-authored-by: Cursor <cursoragent@cursor.com>
| Commit: | a0dd62e | |
|---|---|---|
| Author: | yashksaini-coder | |
Merge remote-tracking branch 'upstream/main' into webrtc
| Commit: | 9b359fd | |
|---|---|---|
| Author: | sumanjeet0012 | |
feat: Implement Bitswap 1.3.0 with payment gating - Added PaymentGatedDecisionEngine to handle payment-required logic for block serving. - Introduced PaymentTerms, PaymentAuthorization, PaymentReceipt, and PaymentRejection messages in the new bitswap_1_3_0.proto. - Enhanced existing MerkleDag class to store internal nodes with a callback for payment gating. - Created BitswapPaymentClient_1_3 to manage client-side payment authorizations and receipts. - Updated balanced_layout function to support payment gating and internal node storage. - Added necessary protobuf definitions and generated Python files for Bitswap 1.3.0.
| Commit: | ea01b07 | |
|---|---|---|
| Author: | sumanjeet0012 | |
Merge remote-tracking branch 'origin/main' into improvement/bitswap
| Commit: | c7d74b0 | |
|---|---|---|
| Author: | sumanjeet0012 | |
feat: enhance DHT record handling with signing and verification for icompatibility with ipfs kubo - Added support for signed records in the DHT by introducing `make_signed_put_record` function. - Updated `ValueStore` to create signed records when storing values. - Enhanced `Envelope` class to handle raw payload types for peer records. - Introduced utility functions for signing and verifying DHT records. - Updated protobuf definitions to include author and signature fields in records. - Improved logging and debug messages for better traceability.
| Commit: | aff06d7 | |
|---|---|---|
| Author: | yashksaini-coder | |
feat(webrtc): add signaling protocol for private-to-private connections Implements /webrtc-signaling/0.0.1 for SDP and ICE candidate exchange over Circuit Relay v2 streams. Bilateral ICE_DONE mechanism (specs#585) ensures neither side closes the signaling stream before the other has received all candidates. WebRTCPrivateTransport handles /p2p-circuit/webrtc/ multiaddrs. WebRTCPrivateListener registers a stream handler for incoming signaling.
| Commit: | dca354e | |
|---|---|---|
| Author: | yashksaini-coder | |
feat(webrtc): add protobuf schema, constants and exception hierarchy Wire format for WebRTC data-channel messages per the libp2p spec: Message { Flag flag, bytes message } with FIN/STOP_SENDING/RESET/FIN_ACK. Constants include protocol codes (0x0118, 0x0119, 0x01D2), message size limits, data-channel ID allocation rules, Noise prologue prefix, and ICE/DTLS defaults matching go-libp2p.
| Commit: | 2663ad7 | |
|---|---|---|
| Author: | Manu Sheel Gupta | |
| Committer: | GitHub | |
Merge branch 'main' into enh/1231-add-gossipsub-1.3-support
| Commit: | d4cc6e7 | |
|---|---|---|
| Author: | Winter-Soren | |
added newsfragement, replaced string with hex method and protocol version check
| Commit: | 9f26915 | |
|---|---|---|
| Author: | Yash Saini | |
| Committer: | GitHub | |
Merge branch 'main' into IPNS
| Commit: | 9a3f328 | |
|---|---|---|
| Author: | Winter-Soren | |
feat: implement GossipSub v1.3 support with extensions and improved peer scoring
| Commit: | a33003f | |
|---|---|---|
| Author: | asmit27rai | |
feat(kad-dht): implement IPNS validator for DHT record validation - Add IPNS protobuf definition (IpnsEntry message) - Implement IPNSValidator class following IPNS spec - Integrate IPNS validator with DHT (apply_fallbacks, validate_config) - Add cbor2 dependency for DAG-CBOR decoding - Add comprehensive tests (19 test cases) Closes #1157 Signed-off-by: asmit27rai <raiasmit10@gmail.com>
| Commit: | 67c0720 | |
|---|---|---|
| Author: | Winter-Soren | |
feat: implement GossipSub with extensions, adaptive gossip, enhanced scoring, and rate limiting
| Commit: | fef6e77 | |
|---|---|---|
| Author: | Winter-Soren | |
implement persistent peerstore with Protocol Buffer serialization, context managers, and configurable sync
| Commit: | 882c8b4 | |
|---|---|---|
| Author: | acul71 | |
Fix flaky test: preserve empty bytes in NoiseExtensions early_data - Change proto3 early_data field to optional bytes to enable presence tracking - Update from_protobuf to use HasField() instead of empty check - Regenerate protobuf code - Fix documentation in protocol_buffer.py for create_status function
| Commit: | c8e1283 | |
|---|---|---|
| Author: | acul71 | |
Merge remote-tracking branch 'origin/main' into feat/protobuf-spec-for-noise # Conflicts: # libp2p/relay/circuit_v2/protocol_buffer.py
| Commit: | 1c7c87e | |
|---|---|---|
| Author: | Manu Sheel Gupta | |
| Committer: | GitHub | |
Merge branch 'main' into feature/file_sharing
| Commit: | 9c9250b | |
|---|---|---|
| Author: | acul71 | |
Merge origin/main and fix type error in protocol_buffer.py - Resolved merge conflict in circuit_pb2.py by regenerating from proto source - Fixed type error in protocol_buffer.py by using proper ValueType cast for protobuf enum - Updated protobuf files from proto source after merge
| Commit: | cb67ea1 | |
|---|---|---|
| Author: | Antriksh Gwal | |
| Committer: | lla-dane | |
add spr in all hop messages
| Commit: | badb069 | |
|---|---|---|
| Author: | Antriksh Gwal | |
| Committer: | lla-dane | |
Add SPR field in relayV2 protobuf
| Commit: | d9e8e46 | |
|---|---|---|
| Author: | acul71 | |
| Committer: | bomanaps | |
feat: experimental full spec-compliant Noise protocol implementation 🎯 SPEC COMPLIANCE ACHIEVED: - ✅ Added stream_muxers field to NoiseExtensions (spec requirement) - ✅ Removed legacy data field from NoiseHandshakePayload (cleanup) - ✅ Updated protobuf schema to match official libp2p/specs/noise - ✅ Maintained early_data support as Python extension 🔧 CORE CHANGES: - libp2p/security/noise/messages.py: Added stream_muxers, removed legacy fields - libp2p/security/noise/pb/noise.proto: Updated schema for spec compliance - libp2p/security/noise/patterns.py: Fixed handshake payload creation - libp2p/security/noise/transport.py: Added static key caching support 🧪 TESTING: - ✅ All 1064 tests passing - ✅ Full tox parallel execution successful - ✅ Wheel builds working correctly - ✅ Type checking and linting clean 🚀 INTEROP READY: - Compatible with Go, Rust, JavaScript implementations - Stream muxers support for spec compliance - WebTransport certificate hashes preserved - Early data maintained as Python extension Next phase: Interoperability testing with other libp2p implementations
| Commit: | 90d8ae2 | |
|---|---|---|
| Author: | bomanaps | |
| Committer: | bomanaps | |
Implement complete libp2p Noise protocol extensions
| Commit: | 8012c05 | |
|---|---|---|
| Author: | Sumanjeet | |
| Committer: | GitHub | |
Merge branch 'main' into feature/file_sharing
| Commit: | 4906e6a | |
|---|---|---|
| Author: | sumanjeet0012 | |
fixed some type errors
| Commit: | c377495 | |
|---|---|---|
| Author: | Manu Sheel Gupta | |
| Committer: | GitHub | |
Merge branch 'main' into enh/806-add-gossipsub-1.2-support
| Commit: | 5f1114e | |
|---|---|---|
| Author: | lla-dane | |
| Committer: | lla-dane | |
added record validators in kad-dht
| Commit: | 19c8063 | |
|---|---|---|
| Author: | lla-dane | |
| Committer: | lla-dane | |
Init py-peer-record module
| Commit: | 8410c9d | |
|---|---|---|
| Author: | sumanjeet0012 | |
Add integration tests for MerkleDag and DAG-PB functionality - Created `test_dag.py` to test the MerkleDag class, including methods for adding bytes and files, fetching files, and verifying file information. - Implemented tests for handling small and large data, progress tracking, and error handling. - Added `test_dag_pb.py` to test the encoding and decoding of DAG-PB structures, including file and directory nodes. - Introduced a verification script `verify_bitswap.py` to ensure the Bitswap implementation's structure and functionality, including imports, configuration, block store operations, message creation, and file structure validation.
| Commit: | 232f034 | |
|---|---|---|
| Author: | Manu Sheel Gupta | |
| Committer: | GitHub | |
Merge branch 'main' into enh/806-add-gossipsub-1.2-support
| Commit: | 4fd4da9 | |
|---|---|---|
| Author: | sumanjeet0012 | |
Initial commit for bitswap
| Commit: | b9474b1 | |
|---|---|---|
| Author: | sumanjeet0012 | |
Initial commit for rendezvous implementation
| Commit: | 6075139 | |
|---|---|---|
| Author: | Soham Bhoir | |
| Committer: | GitHub | |
Merge branch 'main' into enh/806-add-gossipsub-1.2-support
| Commit: | 56526b4 | |
|---|---|---|
| Author: | lla-dane | |
| Committer: | lla-dane | |
signed-peer-record transfer integrated with pubsub rpc message trasfer
| Commit: | 2d4d4a3 | |
|---|---|---|
| Author: | Manu Sheel Gupta | |
| Committer: | GitHub | |
Merge branch 'main' into enh/806-add-gossipsub-1.2-support
| Commit: | 53db128 | |
|---|---|---|
| Author: | lla-dane | |
| Committer: | lla-dane | |
fix typos
| Commit: | 8c097d3 | |
|---|---|---|
| Author: | Winter-Soren | |
feat: add GossipSub 1.2 support with IDONTWANT messages
| Commit: | cb11f07 | |
|---|---|---|
| Author: | Soham Bhoir | |
| Committer: | GitHub | |
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>
| Commit: | 2d335d4 | |
|---|---|---|
| Author: | lla-dane | |
| Committer: | lla-dane | |
Integrated Signed-peer-record transfer with identify/identify-push
| Commit: | 6431fb8 | |
|---|---|---|
| Author: | lla-dane | |
| Committer: | lla-dane | |
Implemented: Envelope wrapper class + linter hacks for protobuf checks
| Commit: | aa6039b | |
|---|---|---|
| Author: | lla-dane | |
| Committer: | lla-dane | |
PeerRecord class with ProtoBuff implemented
| Commit: | c486188 | |
|---|---|---|
| Author: | Mystical | |
| Committer: | Mystical | |
updated protobuf for prune message
| Commit: | 66bd027 | |
|---|---|---|
| Author: | Soham Bhoir | |
| Committer: | GitHub | |
Feat/587-circuit-relay (#611) * feat: implemented setup of circuit relay and test cases * chore: remove test files to be rewritten * added 1 test suite for protocol * added 1 test suite for discovery * fixed protocol timeouts and message types to handle reservations and stream operations. * Resolved merge conflict in libp2p/tools/utils.py by combining timeout approach with retry mechanism * fix: linting issues * docs: updated documentation with circuit-relay * chore: added enums, improved typing, security and examples * fix: created proper __init__ file to ensure importability * fix: replace transport_opt with listen_addrs in examples, fixed typing and improved code * fix type checking issues across relay module and test suite * regenerated circuit_pb2 file protobuf version 3 * fixed circuit relay example and moved imports to top in test_security_multistream * chore: moved imports to the top * chore: fixed linting of test_circuit_v2_transport.py --------- Co-authored-by: Manu Sheel Gupta <manusheel.edu@gmail.com>
| Commit: | d61bca7 | |
|---|---|---|
| Author: | Sumanjeet | |
| Committer: | GitHub | |
Kademlia DHT implementation in py-libp2p (#579) * initialise the module * added content routing * added routing module * added peer routing * added value store * added utilities functions * added main kademlia file * fixed create_key_from_binary function * example to test kademlia dht * added protocol ID and enhanced logging for peer store size in provider and consumer nodes * refactor: specify stream type in handle_stream method and add peer in routing table * removed content routing * added default value of count for finding closest peers * added functions to find close peers * refactor: remove content routing and enhance peer discovery * added put value function * added get value function * fix: improve logging and handle key encoding in get_value method * refactor: remove ContentRouting import from __init__.py * refactor: improved basic kademlia example * added protobuf files * replaced json with protobuf * refactor: enhance peer discovery and routing logic in KadDHT * refactor: enhance Kademlia routing table to use PeerInfo objects and improve peer management * refactor: enhance peer addition logic to utilize PeerInfo objects in routing table * feat: implement content provider functionality in Kademlia DHT * refactor: update value store to use datetime for validity management * refactor: update RoutingTable initialization to include host reference * refactor: enhance KBucket and RoutingTable for improved peer management and functionality * refactor: streamline peer discovery and value storage methods in KadDHT * refactor: update KadDHT and related classes for async peer management and enhanced value storage * refactor: enhance ProviderStore initialization and improve peer routing integration * test: add tests for Kademlia DHT functionality * fix linting issues * pydocstyle issues fixed * CICD pipeline issues solved * fix: update docstring format for find_peer method * refactor: improve logging and remove unused code in DHT implementation * refactor: clean up logging and remove unused imports in DHT and test files * Refactor logging setup and improve DHT stream handling with varint length prefixes * Update bootstrap peer handling in basic_dht example and refactor peer routing to accept string addresses * Enhance peer querying in Kademlia DHT by implementing parallel queries using Trio. * Enhance peer querying by adding deduplication checks * Refactor DHT implementation to use varint for length prefixes and enhance logging for better traceability * Add base58 encoding for value storage and enhance logging in basic_dht example * Refactor Kademlia DHT to support server/client modes * Added unit tests * Refactor documentation to fixsome warning * Add unit tests and remove outdated tests * Fixed precommit errora * Refactor error handling test to raise StringParseError for invalid bootstrap addresses * Add libp2p.kad_dht to the list of subpackages in documentation * Fix expiration and republish checks to use inclusive comparison * Add __init__.py file to libp2p.kad_dht.pb package * Refactor get value and put value to run in parallel with query timeout * Refactor provider message handling to use parallel processing with timeout * Add methods for provider store in KadDHT class * Refactor KadDHT and ProviderStore methods to improve type hints and enhance parallel processing * Add documentation for libp2p.kad_dht.pb module. * Update documentation for libp2p.kad_dht package to include subpackages and correct formatting * Fix formatting in documentation for libp2p.kad_dht package by correcting the subpackage reference * Fix header formatting in libp2p.kad_dht.pb documentation * Change log level from info to debug for various logging statements. * fix CICD issues (post revamp) * fixed value store unit test * Refactored kademlia example * Refactor Kademlia example: enhance logging, improve bootstrap node connection, and streamline server address handling * removed bootstrap module * Refactor Kademlia DHT example and core modules: enhance logging, remove unused code, and improve peer handling * Added docs of kad dht example * Update server address log file path to use the script's directory * Refactor: Introduce DHTMode enum for clearer mode management * moved xor_distance function to utils.py * Enhance logging in ValueStore and KadDHT: include decoded value in debug logs and update parameter description for validity * Add handling for closest peers in GET_VALUE response when value is not found * Handled failure scenario for PUT_VALUE * Remove kademlia demo from project scripts and contributing documentation * spelling and logging --------- Co-authored-by: pacrob <5199899+pacrob@users.noreply.github.com>
| Commit: | 4b18607 | |
|---|---|---|
| Author: | Paschal | |
| Committer: | GitHub | |
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>
| Commit: | e9674d2 | |
|---|---|---|
| Author: | Winter-Soren | |
| Committer: | Paul Robinson | |
refractored Peer_Info to PeerInfo as imports
| Commit: | d55c577 | |
|---|---|---|
| Author: | sumanjeet0012@gmail.com | |
| Committer: | Paul Robinson | |
Refactor: changed PeerInfo to Peer_Info in autonat.proto to avoid conflicts
| Commit: | 9655c88 | |
|---|---|---|
| Author: | Winter-Soren | |
| Committer: | Paul Robinson | |
feat/561-added autonat service
| Commit: | c770a05 | |
|---|---|---|
| Author: | pacrob | |
| Committer: | Paul Robinson | |
rebuild protobufs adding ECC_P256 to KeyType
| Commit: | 9448371 | |
|---|---|---|
| Author: | pacrob | |
| Committer: | pacrob | |
run lint and fix errors, except mypy
| Commit: | 728d9e5 | |
|---|---|---|
| Author: | mhchia | |
| Committer: | mhchia | |
Noise: update pb
| Commit: | 0324a69 | |
|---|---|---|
| Author: | mhchia | |
Noise: add `PatternXX`
| Commit: | 82dcce2 | |
|---|---|---|
| Author: | Chih Cheng Liang | |
| Committer: | GitHub | |
Remove kademlia module (#377) * Remove kademlia and routing/kademlia * cleanup * Fix routed_host test * lint mypy * fix doc * remove set_up_nodes_by_transport_and_disc_opt and fix typing
| Commit: | 08b57fa | |
|---|---|---|
| Author: | Alex Stokes | |
| Committer: | Alex Stokes | |
Add core handler for `identify` protocol
| Commit: | afb79da | |
|---|---|---|
| Author: | Dominik Muhs | |
Fix typo
| Commit: | fd08bcf | |
|---|---|---|
| Author: | Alex Stokes | |
| Committer: | Alex Stokes | |
Add `secio` protobufs
| Commit: | 59b373b | |
|---|---|---|
| Author: | mhchia | |
| Committer: | mhchia | |
Add `plaintext.proto` Update Makefile to handle the import in `plaintext.proto`. Import path is modified to be relative to the project root. And we run `protoc` from where `Makefile` locates, i.e. the project root. Reference: - plaintext.proto: https://github.com/libp2p/go-libp2p-core/blob/62b2c6c482ef265f6b975d59244fd7b2169aaabf/sec/insecure/pb/plaintext.proto
| Commit: | 61f78c8 | |
|---|---|---|
| Author: | Alex Stokes | |
| Committer: | Alex Stokes | |
Add abstraction for a cryptographic key
| Commit: | 14da7d4 | |
|---|---|---|
| Author: | ZX | |
| Committer: | GitHub | |
Merge branch 'master' into peer_routing
| Commit: | d5c7cc7 | |
|---|---|---|
| Author: | Alex Haynes | |
added changes from future commits to last passing bmuller commit
| Commit: | f1a20f1 | |
|---|---|---|
| Author: | zixuanzh | |
| Committer: | Stuckinaboot | |
update from to from_id in proto
| Commit: | f655148 | |
|---|---|---|
| Author: | zixuanzh | |
| Committer: | Stuckinaboot | |
add pubsub proto
| Commit: | 0d7b8c3 | |
|---|---|---|
| Author: | Alex Haynes | |
| Committer: | Stuckinaboot | |
added rpc.proto from go repo
| Commit: | 2b41818 | |
|---|---|---|
| Author: | zixuanzh | |
| Committer: | Stuckinaboot | |
update from to from_id in proto
| Commit: | 2aa7c4a | |
|---|---|---|
| Author: | zixuanzh | |
| Committer: | Stuckinaboot | |
add pubsub proto
| Commit: | 1c08e9e | |
|---|---|---|
| Author: | Alex Haynes | |
| Committer: | Stuckinaboot | |
added rpc.proto from go repo
| Commit: | 225bd39 | |
|---|---|---|
| Author: | zixuanzh | |
add source to rpc.proto
| Commit: | 3a52d29 | |
|---|---|---|
| Author: | zixuanzh | |
remove redundant proto file
| Commit: | 9be1214 | |
|---|---|---|
| Author: | Alex Haynes | |
Merge branch 'floodsub-rpc' of https://github.com/libp2p/py-libp2p into floodsub-rpc
| Commit: | 81d121a | |
|---|---|---|
| Author: | zixuanzh | |
update from to from_id in proto
| Commit: | 041e0fb | |
|---|---|---|
| Author: | zixuanzh | |
add pubsub proto
| Commit: | cb6b76d | |
|---|---|---|
| Author: | Alex Haynes | |
added rpc.proto from go repo