diff --git a/docs/release_notes.rst b/docs/release_notes.rst index 804f3a1f..0e77499c 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -3,6 +3,69 @@ Release Notes .. towncrier release notes start +py-libp2p v0.2.10 (2025-08-12) +------------------------------ + +Breaking Changes +~~~~~~~~~~~~~~~~ + +- identify protocol use now prefix-length messages by default. use use_varint_format param for old raw messages (`#761 `__) + + +Bugfixes +~~~~~~~~ + +- Improved type safety in ``get_mux()`` and ``get_protocols()`` by returning properly typed values instead + of ``Any``. Also updated ``identify.py`` and ``discovery.py`` to handle ``None`` values safely and + compare protocols correctly. (`#746 `__) +- fixed malformed PeerId in test_peerinfo (`#757 `__) +- Fixed incorrect handling of raw protobuf format in identify protocol. The identify example now properly handles both raw and length-prefixed (varint) message formats, provides better error messages, and displays connection status with peer IDs. Replaced mock-based tests with comprehensive real network integration tests for both formats. (`#778 `__) +- Fixed incorrect handling of raw protobuf format in identify push protocol. The identify push example now properly handles both raw and length-prefixed (varint) message formats, provides better error messages, and displays connection status with peer IDs. Replaced mock-based tests with comprehensive real network integration tests for both formats. (`#784 `__) +- Recompiled protobufs that were out of date and added a ``make`` rule so that protobufs are always up to date. (`#818 `__) + + +Improved Documentation +~~~~~~~~~~~~~~~~~~~~~~ + +- Improve error message under the function decode_uvarint_from_stream in libp2p/utils/varint.py file (`#760 `__) +- Clarified the requirement for a trailing newline in newsfragments to pass lint checks. (`#775 `__) + + +Features +~~~~~~~~ + +- Added ``Bootstrap`` peer discovery module that allows nodes to connect to predefined bootstrap peers for network discovery. (`#711 `__) +- Add lock for read/write to avoid interleaving receiving messages in mplex_stream.py (`#748 `__) +- Add logic to clear_peerdata method in peerstore (`#750 `__) +- Added the ``Certified Addr-Book`` interface supported by ``Envelope`` and ``PeerRecord`` class. + Integrated the signed-peer-record transfer in the identify/push protocols. (`#753 `__) +- add length-prefixed support to identify protocol (`#761 `__) + + +Internal Changes - for py-libp2p Contributors +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- remove FIXME comment since it's obsolete and 32-byte prefix support is there but not enabled by default (`#592 `__) +- Add comprehensive tests for relay_discovery method in circuit_relay_v2 (`#749 `__) +- [mplex] Add timeout and error handling during stream close (`#752 `__) +- fixed a typecheck error using cast in peerinfo.py (`#757 `__) +- Fix raw format reading in identify/push protocol and add comprehensive test coverage for both varint and raw formats (`#761 `__) +- Pin py-multiaddr dependency to specific git commit db8124e2321f316d3b7d2733c7df11d6ad9c03e6 (`#766 `__) +- Replace the libp2p.peer.ID cache attributes with functools.cached_property functional decorator. (`#772 `__) +- Yamux RawConnError Logging Refactor - Improved error handling and debug logging (`#784 `__) +- The TODO IK patterns in Noise has been deprecated in specs: https://github.com/libp2p/specs/tree/master/noise#handshake-pattern (`#816 `__) +- Remove the already completed TODO tasks in Peerstore: + TODO: Set up an async task for periodic peer-store cleanup for expired addresses and records. + TODO: Make proper use of this function (`#819 `__) + + +Performance Improvements +~~~~~~~~~~~~~~~~~~~~~~~~ + +- Added throttling for async topic validators in validate_msg, enforcing a + concurrency limit to prevent resource exhaustion under heavy load. (`#755 `__) + + py-libp2p v0.2.9 (2025-07-09) ----------------------------- diff --git a/newsfragments/592.internal.rst b/newsfragments/592.internal.rst deleted file mode 100644 index 6450be85..00000000 --- a/newsfragments/592.internal.rst +++ /dev/null @@ -1 +0,0 @@ -remove FIXME comment since it's obsolete and 32-byte prefix support is there but not enabled by default diff --git a/newsfragments/711.feature.rst b/newsfragments/711.feature.rst deleted file mode 100644 index a4c4c5ff..00000000 --- a/newsfragments/711.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Added `Bootstrap` peer discovery module that allows nodes to connect to predefined bootstrap peers for network discovery. diff --git a/newsfragments/746.bugfix.rst b/newsfragments/746.bugfix.rst deleted file mode 100644 index 71970b48..00000000 --- a/newsfragments/746.bugfix.rst +++ /dev/null @@ -1,3 +0,0 @@ -Improved type safety in `get_mux()` and `get_protocols()` by returning properly typed values instead -of `Any`. Also updated `identify.py` and `discovery.py` to handle `None` values safely and -compare protocols correctly. diff --git a/newsfragments/748.feature.rst b/newsfragments/748.feature.rst deleted file mode 100644 index 199e5b3b..00000000 --- a/newsfragments/748.feature.rst +++ /dev/null @@ -1 +0,0 @@ - Add lock for read/write to avoid interleaving receiving messages in mplex_stream.py diff --git a/newsfragments/749.internal.rst b/newsfragments/749.internal.rst deleted file mode 100644 index c7316d8c..00000000 --- a/newsfragments/749.internal.rst +++ /dev/null @@ -1 +0,0 @@ -Add comprehensive tests for relay_discovery method in circuit_relay_v2 diff --git a/newsfragments/750.feature.rst b/newsfragments/750.feature.rst deleted file mode 100644 index a49c5fb7..00000000 --- a/newsfragments/750.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add logic to clear_peerdata method in peerstore diff --git a/newsfragments/752.internal.rst b/newsfragments/752.internal.rst deleted file mode 100644 index b0aed33d..00000000 --- a/newsfragments/752.internal.rst +++ /dev/null @@ -1 +0,0 @@ -[mplex] Add timeout and error handling during stream close diff --git a/newsfragments/753.feature.rst b/newsfragments/753.feature.rst deleted file mode 100644 index 9daa3c6c..00000000 --- a/newsfragments/753.feature.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added the `Certified Addr-Book` interface supported by `Envelope` and `PeerRecord` class. -Integrated the signed-peer-record transfer in the identify/push protocols. diff --git a/newsfragments/755.performance.rst b/newsfragments/755.performance.rst deleted file mode 100644 index 386e661b..00000000 --- a/newsfragments/755.performance.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added throttling for async topic validators in validate_msg, enforcing a -concurrency limit to prevent resource exhaustion under heavy load. diff --git a/newsfragments/757.bugfix.rst b/newsfragments/757.bugfix.rst deleted file mode 100644 index ff4d1619..00000000 --- a/newsfragments/757.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -fixed malformed PeerId in test_peerinfo diff --git a/newsfragments/757.internal.rst b/newsfragments/757.internal.rst deleted file mode 100644 index 5745168f..00000000 --- a/newsfragments/757.internal.rst +++ /dev/null @@ -1 +0,0 @@ -fixed a typecheck error using cast in peerinfo.py diff --git a/newsfragments/760.docs.rst b/newsfragments/760.docs.rst deleted file mode 100644 index 0cf211dd..00000000 --- a/newsfragments/760.docs.rst +++ /dev/null @@ -1 +0,0 @@ -Improve error message under the function decode_uvarint_from_stream in libp2p/utils/varint.py file diff --git a/newsfragments/761.breaking.rst b/newsfragments/761.breaking.rst deleted file mode 100644 index cd63a4e3..00000000 --- a/newsfragments/761.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -identify protocol use now prefix-length messages by default. use use_varint_format param for old raw messages diff --git a/newsfragments/761.feature.rst b/newsfragments/761.feature.rst deleted file mode 100644 index fd38866c..00000000 --- a/newsfragments/761.feature.rst +++ /dev/null @@ -1 +0,0 @@ -add length-prefixed support to identify protocol diff --git a/newsfragments/761.internal.rst b/newsfragments/761.internal.rst deleted file mode 100644 index 59496ebc..00000000 --- a/newsfragments/761.internal.rst +++ /dev/null @@ -1 +0,0 @@ -Fix raw format reading in identify/push protocol and add comprehensive test coverage for both varint and raw formats diff --git a/newsfragments/766.internal.rst b/newsfragments/766.internal.rst deleted file mode 100644 index 1ecce428..00000000 --- a/newsfragments/766.internal.rst +++ /dev/null @@ -1 +0,0 @@ -Pin py-multiaddr dependency to specific git commit db8124e2321f316d3b7d2733c7df11d6ad9c03e6 diff --git a/newsfragments/772.internal.rst b/newsfragments/772.internal.rst deleted file mode 100644 index 2c84641c..00000000 --- a/newsfragments/772.internal.rst +++ /dev/null @@ -1 +0,0 @@ -Replace the libp2p.peer.ID cache attributes with functools.cached_property functional decorator. diff --git a/newsfragments/775.docs.rst b/newsfragments/775.docs.rst deleted file mode 100644 index 300b27ca..00000000 --- a/newsfragments/775.docs.rst +++ /dev/null @@ -1 +0,0 @@ -Clarified the requirement for a trailing newline in newsfragments to pass lint checks. diff --git a/newsfragments/778.bugfix.rst b/newsfragments/778.bugfix.rst deleted file mode 100644 index a18832a4..00000000 --- a/newsfragments/778.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed incorrect handling of raw protobuf format in identify protocol. The identify example now properly handles both raw and length-prefixed (varint) message formats, provides better error messages, and displays connection status with peer IDs. Replaced mock-based tests with comprehensive real network integration tests for both formats. diff --git a/newsfragments/784.bugfix.rst b/newsfragments/784.bugfix.rst deleted file mode 100644 index be96cf2e..00000000 --- a/newsfragments/784.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed incorrect handling of raw protobuf format in identify push protocol. The identify push example now properly handles both raw and length-prefixed (varint) message formats, provides better error messages, and displays connection status with peer IDs. Replaced mock-based tests with comprehensive real network integration tests for both formats. diff --git a/newsfragments/784.internal.rst b/newsfragments/784.internal.rst deleted file mode 100644 index 9089938d..00000000 --- a/newsfragments/784.internal.rst +++ /dev/null @@ -1 +0,0 @@ -Yamux RawConnError Logging Refactor - Improved error handling and debug logging diff --git a/newsfragments/816.internal.rst b/newsfragments/816.internal.rst deleted file mode 100644 index ade49df8..00000000 --- a/newsfragments/816.internal.rst +++ /dev/null @@ -1 +0,0 @@ -The TODO IK patterns in Noise has been deprecated in specs: https://github.com/libp2p/specs/tree/master/noise#handshake-pattern diff --git a/newsfragments/818.bugfix.rst b/newsfragments/818.bugfix.rst deleted file mode 100644 index 985e3e33..00000000 --- a/newsfragments/818.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Recompiled protobufs that were out of date and added a `make` rule so that protobufs are always up to date. diff --git a/newsfragments/819.internal.rst b/newsfragments/819.internal.rst deleted file mode 100644 index 65890f5e..00000000 --- a/newsfragments/819.internal.rst +++ /dev/null @@ -1,3 +0,0 @@ -Remove the already completed TODO tasks in Peerstore: -TODO: Set up an async task for periodic peer-store cleanup for expired addresses and records. -TODO: Make proper use of this function