Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[0.7.0] - 2024-09-05
This release introduces several new features, improvements, and fixes to the litep2p library. Key updates include enhanced error handling, configurable connection limits, and a new API for managing public addresses.
Exposing Public Addresses API
A new
PublicAddresses
API has been added, enabling users to manage the node's public addresses. This API allows developers to add, remove, and retrieve public addresses, which are shared with peers through the Identify protocol.Breaking Change: The Identify protocol no longer includes public addresses in its configuration. Instead, use the new
PublicAddresses
API.Migration Guide:
Dial Error and List Dial Failures Event
The
DialFailure
event has been enhanced with a newDialError
enum for more precise error reporting when a dial attempt fails. Additionally, aListDialFailures
event has been introduced, listing all dialed addresses and their corresponding errors when multiple addresses are involved.Other litep2p errors, such as
ParseError
,AddressError
, andNegotiationError
, have been refactored for improved error propagation.Immediate Dial Error and Request-Response Rejection Reasons
This new feature paves the way for better error handling in the
litep2p
library and moves away from the overarchinglitep2p::error::Error
enum.The newly added
ImmediateDialError
enum captures errors occurring before a dial request is sent (e.g., missing peer IDs). It also enhances theRejectReason
enum for request-response protocols, offering more detailed rejection reasons.Connection Limits
Developers can now set limits on the number of inbound and outbound connections to manage resources and optimize performance.
Feature Flags for Optional Transports
The library now supports feature flags to selectively enable or disable transport protocols. By default, only the
TCP
transport is enabled. Optional transports include:quic
- Enables QUIC transport.websocket
- Enables WebSocket transport.webrtc
- Enables WebRTC transport.Configurable Keep-Alive Timeout
The keep-alive timeout for connections is now configurable, providing more control over connection lifecycles.
Thanks for contributing to this @Ma233!
Added
PublicAddresses
(#212)TransportService::local_peer_id()
(#224)ADD_PROVIDER
&GET_PROVIDERS
network requests (#213)DialError
error andListDialFailures
event for better error reporting (#206)MemoryStore
(#200)Changed
Fixed
websocket
feature (#215)reject()
(#198)GetRecordSuccess
(#190)Testing Done
cc @paritytech/networking