This v0.8.1 release includes key fixes that enhance the stability and performance of the litep2p library. The focus is on long-running stability and improvements to polling mechanisms.
For a full list of changes, refer to the litep2p changelog.
Long Running Stability Improvements
This issue caused long-running nodes to reject all incoming connections, impacting overall stability.
Addressed a bug in the connection limits functionality that incorrectly tracked connections due for rejection.
This issue caused an artificial increase in inbound peers, which were not being properly removed from the connection limit count.
This fix ensures more accurate tracking and management of peer connections #286.
Polling implementation fixes
This release provides multiple fixes to the polling mechanism, improving how connections and events are processed:
-
Resolved an overflow issue in
TransportContex
t’s polling index for streams, preventing potential crashes (#283). -
Fixed a delay in the manager’s
poll_next
function that prevented immediate polling of newly added futures (#287). -
Corrected an issue where the listener did not return
Poll::Ready(None)
when it was closed, ensuring proper signal handling (#285).
Dashboards
This dashboard provides a comprehensive view of litep2p’s performance compared to libp2p. Here, litep2p demonstrates a remarkable speed advantage, handling notifications with various payload sizes 10x to 30x faster than libp2p.
The next dashboard highlights the improved connection stability of a long-running node with a high connection load (500 inbound and 500 outbound connections). Litep2p is represented by the green line, showcasing its stability, while libp2p is represented by the yellow line.
Finally, the CPU consumption dashboard reveals a significant reduction in CPU usage for litep2p, using half the CPU resources compared to libp2p. Here, litep2p is represented by the yellow line, and libp2p by the magenta line.
As always, thanks @dmitry-markin for in-depth reviews and suggestions, @AndreiEres for implementing the dashboards that show a significant notification performance improvement #6455!