mwc-libp2p-floodsub
CHANGELOGmwc-libp2p-gossipsub
CHANGELOGmwc-libp2p-identify
CHANGELOGmwc-libp2p-kad
CHANGELOGmwc-libp2p-mdns
CHANGELOGmwc-libp2p-ping
CHANGELOGmwc-libp2p-request-response
CHANGELOG
mwc-libp2p-deflate
CHANGELOGmwc-libp2p-dns
CHANGELOGmwc-libp2p-noise
CHANGELOGmwc-libp2p-plaintext
CHANGELOGmwc-libp2p-pnet
CHANGELOGmwc-libp2p-tcp
CHANGELOGmwc-libp2p-uds
CHANGELOGmwc-libp2p-wasm-ext
CHANGELOGmwc-libp2p-websocket
CHANGELOG
- Update
mwc-libp2p-yamux
to latest patch version.
-
Use
mwc-libp2p-swarm-derivee
, the formermwc-libp2p-core-derive
. -
Update
mwc-libp2p-deflate
,mwc-libp2p-gossipsub
,mwc-libp2p-mdns
,mwc-libp2p-request-response
,mwc-libp2p-swarm
andmwc-libp2p-tcp
.
-
Update
mwc-libp2p-core
and all dependent crates. -
The
tcp-async-std
feature is nowtcp-async-io
, still enabled by default.
- Update
mwc-libp2p-core
and all dependent crates.
- Update
mwc-libp2p-websocket
.
- Update minimum patch version of
mwc-libp2p-websocket
.
-
Update
mwc-libp2p-request-response
. -
Update to
mwc-libp2p-mdns-0.26
. -
Update
mwc-libp2p-websocket
minimum patch version.
- Bump minimum
mwc-libp2p-core
patch version.
- Bump minimum
mwc-libp2p-tcp
patch version.
- Update
multistream-select
and all dependent crates.
- Update
mwc-libp2p-plaintext
.
- Update
mwc-libp2p-mdns
,mwc-libp2p-tcp
andmwc-libp2p-uds
as well asmwc-libp2p-core
and all its dependers.
- Update
mwc-libp2p-core
.
- Update
mwc-libp2p-core
,mwc-libp2p-floodsub
,mwc-libp2p-gossipsub
,mwc-libp2p-mplex
,mwc-libp2p-noise
,mwc-libp2p-plaintext
,mwc-libp2p-pnet
,mwc-libp2p-request-response
,mwc-libp2p-swarm
,mwc-libp2p-tcp
,mwc-libp2p-websocket
andparity-multiaddr
.
- Update to
mwc-libp2p-core
0.22.1
.
- Update
mwc-libp2p-yamux
to0.25.0
. Step 4 of 4 in a multi-release upgrade process. See themwc-libp2p-yamux
CHANGELOG for details.
- Update
mwc-libp2p-yamux
to0.24.0
. Step 3 of 4 in a multi-release upgrade process. See themwc-libp2p-yamux
CHANGELOG for details.
- Update
mwc-libp2p-yamux
to0.23.0
. Step 2 of 4 in a multi-release upgrade process. See themwc-libp2p-yamux
CHANGELOG for details.
-
Remove the deprecated
libp2p-secio
dependency. To continue to use SECIO, add an explicit dependency onlibp2p-secio
. However, transitioning tomwc-libp2p-noise
is strongly recommended. -
Update
mwc-libp2p-yamux
to0.22.0
. This version starts a multi-release upgrade process. See themwc-libp2p-yamux
CHANGELOG for details. -
Bump
mwc-libp2p-noise
to0.24
. See themwc-libp2p-noise
changelog for details about theLegacyConfig
. -
The
ProtocolsHandler
inmwc-libp2p-swarm
has a new associated typeInboundOpenInfo
(PR 1714).
- Update
mwc-libp2p-core
,mwc-libp2p-gossipsub
,mwc-libp2p-kad
,mwc-libp2p-mdns
,mwc-libp2p-ping
,mwc-libp2p-request-response
,mwc-libp2p-swarm
and dependent crates.
NOTE: For a smooth upgrade path from 0.21
to > 0.22
on an existing deployment, this version must not be skipped
or the provided legacy configuration for mwc-libp2p-noise
used!
-
Bump
mwc-libp2p-noise
dependency to0.22
. See themwc-libp2p-noise
changelog for details about theLegacyConfig
. -
Refactored bandwidth logging (PR 1670).
NOTE: For a smooth upgrade path from 0.21
to > 0.22
on an existing deployment using mwc-libp2p-noise
, this version
must not be skipped!
- Bump
mwc-libp2p-noise
dependency to0.21
.
- Bump
mwc-libp2p-websockets
lower bound.
-
Conditional compilation fixes for the
wasm32-wasi
target (PR 1633). -
New
mwc-libp2p-request-response
crate (PR 1596). -
Updated libp2p dependencies.
-
Temporarily pin all
async-std
dependencies to< 1.6
. PR 1589 -
mwc-libp2p-core-derive
: Fully qualified std::result::Result in macro PR 1587
-
mwc-libp2p-core
,mwc-libp2p-swarm
: Added support for multiple dialing attempts per peer, with a configurable limit. PR 1506 -
mwc-libp2p-core
:PeerId
s that use the identity hashing will now be properly displayed using the string representation of an identity multihash, rather than the canonical SHA 256 representation. PR 1576 -
mwc-libp2p-core
: Updated to multihash 0.11.0. PR 1566 -
mwc-libp2p-core
: Make the number of events buffered to/from tasks configurable. PR 1574 -
mwc-libp2p-dns
,parity-multiaddr
: Added support for the/dns
multiaddr protocol. Additionally, themultiaddr::from_url
function will now use/dns
instead of/dns4
. PR 1575 -
mwc-libp2p-noise
: Added theX25519Spec
protocol suite which uses mwc-libp2p-noise-spec compliant signatures on static keys as well as the/noise
protocol upgrade, hence providing a mwc-libp2p-noise-spec compliantXX
handshake.IK
andIX
are still supported withX25519Spec
though not guaranteed to be interoperable with other libp2p implementations as these handshake patterns are not currently included in the mwc-libp2p-noise-spec. TheX25519Spec
implementation will eventually replace the currentX25519
implementation, with the former being removed. To upgrade without interruptions, you may temporarily includeNoiseConfig
s for both implementations as alternatives in your transport upgrade pipeline. -
mwc-libp2p-kad
: Consider fixed (K_VALUE) amount of peers at closest query initialization. UnlessKademliaConfig::set_replication_factor
is used change has no effect. PR 1536 -
mwc-libp2p-kad
: Provide more insight into, and control of, the execution of queries. All query results are now wrapped inKademliaEvent::QueryResult
. As a side-effect of these changes and for as long as the record storage API is not asynchronous, local storage errors onput_record
are reported synchronously in aResult
, instead of being reported asynchronously by an event. PR 1567 -
mwc-libp2p-tcp
,libp2p
: Made themwc-libp2p-tcp/async-std
feature flag disabled by default, and split thelibp2p/tcp
feature in two:tcp-async-std
andtcp-tokio
.tcp-async-std
is still enabled by default. PR 1471 -
mwc-libp2p-tcp
: On listeners started with an IPv6 multi-address the socket optionIPV6_V6ONLY
is set to true. Instead of relying on IPv4-mapped IPv6 address support, two listeners can be started if IPv4 and IPv6 should both be supported. IPv4 listener addresses are not affected by this change. PR 1555
mwc-libp2p-swarm
: Make sure inject_dial_failure is called in all situations. PR 1549
-
mwc-libp2p-core
: Treat connection limit errors as pending connection errors. PR 1546 -
mwc-libp2p-core-derive
: Disambiguate calls toNetworkBehaviour::inject_event
. PR 1543 -
mwc-libp2p-floodsub
: Allow sent messages seen as subscribed. PR 1520 -
mwc-libp2p-kad
: Return peers independent of record existence. PR 1544 -
mwc-libp2p-wasm-ext
: Fix "parsed is null" errors being thrown. PR 1535
-
mwc-libp2p-core
: Finished "identity hashing" for peer IDs migration. PR 1460 -
mwc-libp2p-core
: Removepoll_broadcast
. PR 1527 -
mwc-libp2p-core
,mwc-libp2p-swarm
: Report addresses of closed listeners. PR 1485 -
mwc-libp2p-core
: Support for multiple connections per peer and configurable connection limits. See PR #1440, PR #1519 and issue #912 for details. -
mwc-libp2p-swarm
: Pass the cause of closing a listener toinject_listener_closed
. PR 1517 -
mwc-libp2p-swarm
: Support for multiple connections per peer and configurable connection limits. See PR #1440, PR #1519 and issue #912 for details. -
mwc-libp2p-swarm
: TheSwarmEvent
now returns more events. PR 1515 -
mwc-libp2p-swarm
: Newprotocols_handler::multi
module. PR 1497 -
mwc-libp2p-swarm
: Allow configuration of outbound substreams. PR 1521 -
mwc-libp2p-kad
: Providers returned from a lookup are now deduplicated. PR 1528 -
mwc-libp2p-kad
: Allow customising the maximum packet size. PR 1502 -
mwc-libp2p-kad
: Allow customising the (libp2p) connection keep-alive timeout. PR 1477 -
mwc-libp2p-kad
: Avoid storing records that are expired upon receipt (optimisation). PR 1496 -
mwc-libp2p-kad
: Fixed potential panic on computing record expiry. PR 1492 -
mwc-libp2p-mplex
: Guard against use of underlyingSink
upon error or connection close. PR 1529 -
multistream-select
: Upgrade to stable futures. PR 1484 -
multihash
: Removed the crate in favour of the upstream crate. PR 1472
- Fixed yamux connections not properly closing and being stuck in the
CLOSE_WAIT
state. - Added a
websocket_transport()
function inmwc-libp2p-wasm-ext
, behind a Cargo feature. - Fixed ambiguity in
IntoProtocolsHandler::select
vsProtocolsHandler::select
in theNetworkBehaviour
custom derive.
- Fixed wrong representation of
PeerId
s being used inKademlia::get_closest_peers
. - Implemented
FusedStream
forSwarm
.
- Removed the
Substream
associated type from theProtocolsHandler
trait. The type of the substream is now alwayslibp2p::swarm::NegotiatedSubstream
. - As a consequence of the previous change, most of the implementations of the
NetworkBehaviour
trait provided by libp2p (Ping
,Identify
,Kademlia
,Floodsub
,Gossipsub
) have lost a generic parameter. - Removed the first generic parameter (the transport) from
Swarm
andExpandedSwarm
. The transport is now abstracted away in the internals of the swarm. - The
Send
and'static
bounds are now enforced directly on theProtocolsHandler
trait and its associatedInboundUpgrade
andOutboundUpgrade
implementations. - Modified
PeerId
s to compare equal across the identity and SHA256 hashes. As a consequence, theBorrow
implementation ofPeerId
now always returns the bytes representation of a multihash with a SHA256 hash. - Modified mwc-libp2p-floodsub to no longer hash the topic. The new behaviour is now compatible with go-libp2p and js-libp2p, but is a breaking change with regards to rust-libp2p.
- Added mwc-libp2p-pnet. It makes it possible to protect networks with a pre-shared key (PSK).
- Modified the
poll_method
parameter of theNetworkBehaviour
custom derive. The expected method now takes an additional parameter of typeimpl PollParameters
to be consistent with theNetworkBehaviour::poll
method. - mwc-libp2p-noise now compiles for WASM targets.
- Changed mwc-libp2p-noise to grow its memory buffers dynamically. This should reduce the overall memory usage of connections that use the noise encryption.
- Fixed mwc-libp2p-gossipsub to no longer close the connection if the inbound substream is closed by the remote.
- All crates prefixed with
libp2p-
now use the same version number. - Added a new variant
ListenerEvent::Error
for listeners to report non-fatal errors.mwc-libp2p-tcp
uses this variant to report errors that happen on remote sockets before they have been accepted and errors when trying to determine the local machine's IP address.
- Added
mwc-libp2p-gossipsub
. - Added
SwarmBuilder::executor
to allow configuring which tasks executor to use. - Added
TokioTcpConfig
inmwc-libp2p-tcp
andTokioUdsConfig
inmwc-libp2p-uds
behindtokio
features. These structs usetokio
and require atokio
runtime executor to be configured viaSwarmBuilder::executor
. - Changed the
OutboundUpgrade
andInboundUpgrade
traits to no longer be passed aNegotiated<C>
but just aC
. TheNegotiated
is now in the trait bounds requirements ofProtocolsHandler
. - Fixed
mwc-libp2p-wasm-ext
returningErr(WouldBlock)
rather thanPending
. - Fixed
mwc-libp2p-dns
not segregating DNS4 and DNS6. - Removed some unnecessary
Unpin
requirements on futures. - Changed
Mdns::new
to no longer beasync
. - Fixed
mwc-libp2p-kad
keeping connections alive when it shouldn't. - Fixed
InboundUpgrade
not always properly implemented onNoiseConfig
.
- Upgraded the crate to stable futures.
- Use varints instead of fixed sized (4 byte) integers to delimit plaintext 2.0 messages to align implementation with the specification.
- Refactored the
core::upgrade
module to provide async functions. - Changed the
Stream
trait implementation ofSwarm
to no longer return aResult
. - Added the
Swarm::next
andSwarm::next_event
functions and theSwarmEvent
enum. - Changed
ProtocolsHandler::poll
to no longer return an error. Instead,ProtocolsHandlerEvent
has a newClose
variant which corresponds to what an error represented before. - Changed all the traits that have a
poll
function (i.e.NetworkBehaviour
,ProtocolsHandler
,NodeHandler
) to have an additional&mut Context
parameter, to reflect the changes in theFuture
trait. - Revamped the API of
mwc_libp2p_websockets::framed
. - Added protocol string to
Error::UnknownProtocolString
.
- Fixed the
mwc-libp2p-noise
handshake not flushing the underlying stream before waiting for a response. - Fixed semver issue with the
protobuf
crate.
- Maintenance release to bump dependencies and deal with an accidental breaking change in multihash 0.1.4.
- Reworked the transport upgrade API. See libp2p#1240 for more information.
- Added a parameter allowing to choose the protocol negotiation protocol when upgrading a connection or a substream. See libp2p#1245 for more information.
- Added an alternative
multistream-select
protocol calledV1Lazy
. - Added
PlainText2Config
that implements the/plaintext/2.0.0
protocol. - Refactored
mwc-libp2p-identify
. Some items have been renamed. - Now accepting
PeerId
s using theidentity
hashing algorithm as valid. - Removed
libp2p-observed
andlibp2p-ratelimit
. - Fixed mDNS long peer IDs not being transmitted properly.
- Added some
Debug
trait implementations. - Fixed potential arithmetic overflows in
mwc-libp2p-kad
andmultistream-select
.
- In some situations,
multistream-select
will now assume that protocol negotiation immediately succeeds. If it turns out that it failed, an error is generated when reading or writing from/to the stream. - Replaced
listen_addr
withlocal_addr
in events related to incoming connections. The address no longer has to match a previously-reported address. - Listeners now have an identifier and can be stopped.
- Added
NetworkBehaviour::inject_listener_error
andNetworkBehaviour::inject_listener_closed
. For diagnostic purposes, listeners can now report errors on incoming connections, such as when callingaccept(2)
fails. - Fixed tasks sometimes not being notified when a network event happens in
mwc-libp2p-mplex
. - Fixed a memory leak in
mwc-libp2p-kad
. - Added
Toggle::is_enabled()
. - Removed
IdentifyTransport
.
mwc-libp2p-kad
: Completed the core functionality of the record storage API, thereby extending theRecordStore
for provider records. All records expire by default and are subject to regular republication and caching as per the Kademlia spec(s). Expiration and publication intervals are configurable through theKademliaConfig
.mwc-libp2p-kad
: The routing table now never stores peers without a known (listen) address. In particular, on receiving a new inbound connection, the Kademlia behaviour now emitsKademliaEvent::UnroutablePeer
to indicate that in order for the peer to be added to the routing table and hence considered a reachable node in the DHT, a listen address of the peer must be discovered and reported viaKademlia::add_address
. This is usually achieved through the use of theIdentify
protocol on the same connection(s).mwc-libp2p-kad
: Documentation updates.- Extracted the
swarm
andprotocols_handler
-related contents frommwc-libp2p-core
to a newmwc-libp2p-swarm
crate. - Renamed
RawSwarm
toNetwork
. - Added
Floodsub::publish_any
. - Replaced unbounded channels with bounded ones at the boundary between the
Network
(formerlyRawSwarm
) andNodeHandler
. The node handlers will now wait if the main task is busy, instead of continuing to push events to the channel. - Fixed the
address_translation
function ignoring/dns
addresses.
PollParameters
is now a trait instead of a struct.- The
Swarm
can now be customized with connection information. - Fixed write-only substreams now delivering data properly.
- Fixed the TCP listener accidentally shutting down if an incoming socket was closed too quickly.
- Improved the heuristics for determining external multiaddresses based on reports.
- Various fixes to Kademlia iterative queries and the WebSockets transport.
EitherOutput
now implementsStream
andSink
if their variants also implement these traits.libp2p::websocket::error::Error
now implementsSync
.
- Major fixes and performance improvements to mwc-libp2p-kad.
- Initial prototype for record storage in mwc-libp2p-kad.
- Rewrote the implementation of WebSockets. It now properly supports WebSockets Secure (WSS).
- Removed
BrowserWsConfig
. Please uselibp2p::wasm_ext::ExtTransport
instead. - Added a
Path
parameter tomultiaddr::Protocol::WS
andWSS
. The string representation when a path is present is respectivelyx-parity-ws/<path>
andx-parity-wss/<path>
where<path>
is percent-encoded. - Fixed an issue with
mwc-libp2p-tcp
where the wrong listened address was returned, if the actual address was loopback. - Added
core::upgrade::OptionalUpgrade
. - Added some utility functions in
core::identity::secp256k1
. - It is now possible to inject an artificial connection in the
RawSwarm
.
- Fixed a vulnerability in ED25519 signatures verification in mwc-libp2p-core.
- Crate now successfully runs from within the browser when compiled to WASM.
- Modified the constructors of
NoiseConfig
to accept any type of public key. The Noise handshake has consequently been modified. - Changed the
StreamMuxer
trait to have anError
associated type. - The
Swarm
now ranks externally-visible multiaddresses by how often they have been reported, ensuring that weird or malicious reports don't affect connectivity too much. - Added
IntoProtocolsHandler::inbound_protocol
. Must return the same value as whatProtocolsHandler::listen_protocol
would return. IntoProtocolsHandler::into_handler
now takes a second parameter with the&ConnectedPoint
to the node we are connected to.- Replaced the
secp256k1
crate withlibsecp256k1
. - Fixed
Kademlia::add_providing
taking aPeerId
instead of aMultihash
. - Fixed various bugs in the implementation of
Kademlia
. - Added
OneSubstreamMuxer
. - Added the
mwc-libp2p-wasm-ext
crate. - Added
multiaddr::from_url
. - Added
OptionalTransport
.
- Fixed a vulnerability in ED25519 signatures verification in mwc-libp2p-core.
- Fixed the inactive connections shutdown mechanism not working.
Transport::listen_on
must now return aStream
that producesListenEvent
s. This makes it possible to notify about listened addresses at a later point in time.Transport::listen_on
no longer returns an address we're listening on. This is done throughListenEvent
s. All otherlisten_on
methods have been updated accordingly.- Added
NetworkBehaviour::inject_new_listen_addr
,NetworkBehaviour::inject_expired_listen_addr
andNetworkBehaviour::inject_new_external_addr
. ProtocolsHandler::listen_protocol
andProtocolsHandlerEvent::OutboundSubstreamRequest
must now return aSubstreamProtocol
struct containing a timeout for the upgrade.Ping::new
now requires aPingConfig
, which can be created withPingConfig::new
.- Removed
Transport::nat_traversal
in favour of a stand-aloneaddress_translation
function inmwc-libp2p-core
. - Reworked the API of
Multiaddr
. - Removed the
ToMultiaddr
trait in favour ofTryFrom
. - Added
Swarm::ban_peer_id
andSwarm::unban_peer_id
. - The
TPeerId
generic parameter ofRawSwarm
is nowTConnInfo
and must now implement aConnectionInfo
trait. - Reworked the
PingEvent
. - Renamed
KeepAlive::Forever
toYes
andKeepAlive::Now
toNo
.
- Replaced
NetworkBehaviour::inject_dial_failure
withinject_dial_failure
andinject_addr_reach_failure
. The former is called when we have finished trying to dial a node without success, while the latter is called when we have failed to reach a specific address. - Fixed Kademlia storing a different hash than the reference implementation.
- Lots of bugfixes in Kademlia.
- Modified the
InboundUpgrade
andOutboundUpgrade
trait to take aNegotiated<TSocket>
instead ofTSocket
. PollParameters::external_addresses
now returnsMultiaddr
es as reference instead of by value.- Added
Swarm::external_addresses
. - Added a
core::swarm::toggle::Toggle
that allows having a disabledNetworkBehaviour
.
- Moved the
SecioKeypair
struct incore/identity
and renamed it toKeypair
. - mplex now supports half-closed substreams.
- Renamed
StreamMuxer::shutdown()
toclose()
. - Closing a muxer with the
close()
method (formerlyshutdown
) now "destroys" all the existing substreams. Afterclose()
as been called, they all return either EOF or an error. - The
shutdown_substream()
method now closes only the writing side of the substream, and you can continue reading from it until EOF or until you delete it. This was actually already more or less the case before, but it wasn't properly reflected in the API or the documentation. poll_inbound()
andpoll_outbound()
no longer return anOption
, asNone
was the same as returning an error.- Removed the
NodeClosed
events and renamedNodeError
toNodeClosed
. From the API's point of view, a connection now always closes with an error. - Added the
NodeHandlerWrapperError
enum that describes an error generated by the protocols handlers grouped together. It is eitherUselessTimeout
orHandler
. This allows properly reporting closing a connection because it is useless. - Removed
NodeHandler::inject_inbound_closed
,NodeHandler::inject_outbound_closed
,NodeHandler::shutdown
, andProtocolsHandler::shutdown
. The handler is now dropped when a shutdown process starts. This should greatly simplify writing a handler. StreamMuxer::close
now impliesflush_all
.- Removed the
Shutdown
enum fromstream_muxer
. - Removed
ProtocolsHandler::fuse()
. - Reworked some API of
core/nodes/node.rs
andcore/nodes/handled_node.rs
. - The core now works even outside of a tokio context.
- Fixed periodic pinging not working.
- Fixed wrong version of mwc-libp2p-noise.
- The
multiaddr!
macro has been moved to themultiaddr
crate and is now reexported under the namebuild_multiaddr!
. - Modified the functions in
upgrade::transfer
to be more convenient to use. - Now properly sending external addresses in the identify protocol.
- Fixed duplicate addresses being reported in identify and Kademlia.
- Fixed infinite looping in the functions in
upgrade::transfer
. - Fixed infinite loop on graceful node shutdown with the
ProtocolsHandlerSelect
. - Fixed various issues with nodes dialing each other simultaneously.
- Added the
StreamMuxer::is_remote_acknowledged()
method. - Added a
BandwidthLogging
transport wrapper that logs the bandwidth consumption. - The addresses to try dialing when dialing a node is now refreshed by the
Swarm
when necessary. - Lots of modifications to the semi-private structs in
core/nodes
. - Added
IdentifyEvent::SendBack
, when we send back our information. - Rewrote the
MemoryTransport
to be similar to theTcpConfig
.
- Added
NetworkBehaviour::inject_replaced
that is called whenever we replace a connection with a different connection to the same peer. - Fixed various issues with Kademlia.
- Removed the
topology
module and everything it contained, including theTopology
trait. - Added
mwc-libp2p-noise
that supports Noise handshakes, as an alternative tolibp2p-secio
. - Updated
ring
to version 0.14. - Creating a
Swarm
now expects thePeerId
of the local node, instead of aTopology
. - Added
NetworkBehaviour::addresses_of_peer
that returns the addresses aNetworkBehaviour
knows about a given peer. This exists as a replacement for the topology. - The
Kademlia
andMdns
behaviours now report and store the list of addresses they discover. - You must now call
Floodsub::add_node_to_partial_view()
andFloodsub::remove_node_from_partial_view
to add/remove nodes from the list of nodes that floodsub must send messages to. - Added
NetworkBehaviour::inject_dial_failure
that is called when we fail to dial an address. ProtocolsHandler::connection_keep_alive()
now returns aKeepAlive
enum that provides more fine grained control.- The
NodeHandlerWrapper
no longer has a 5 seconds inactivity timeout. This is now handled entirely byProtocolsHandler::connection_keep_alive()
. - Now properly denying connections incoming from the same
PeerId
as ours. - Added a
SwarmBuilder
. Theincoming_limit
method lets you configure the number of simultaneous incoming connections. - Removed
FloodsubHandler
,PingListenHandler
andPeriodicPingHandler
. - The structs in
core::nodes
are now generic over thePeerId
. - Added
SecioKeypair::ed25519_raw_key()
. - Fix improper connection shutdown in
ProtocolsHandler
.
- Fixed improper dependencies versions causing deriving
NetworkBehaviour
to generate an error.
- Added the
IntoNodeHandler
andIntoProtocolsHandler
traits, allowing node handlers and protocol handlers to know thePeerId
of the node they are interacting with.
- The
Transport
trait now has anError
associated type instead of always usingstd::io::Error
. - Merged
PeriodicPing
andPingListen
into onePing
behaviour. Floodsub
now generatesFloodsubEvent
s instead of direct floodsub messages.- Added
ProtocolsHandler::connection_keep_alive
. If all the handlers returnfalse
, then the connection to the remote node will automatically be gracefully closed after a few seconds. - The crate now successfuly compiles for the
wasm32-unknown-unknown
target. - Updated
ring
to version 0.13. - Updated
secp256k1
to version 0.12. - The enum returned by
RawSwarm::peer()
can now returnLocalNode
. This makes it impossible to accidentally attempt to dial the local node. - Removed
Transport::map_err_dial
. - Removed the
Result
from some connection-related methods in theRawSwarm
, as they could never error. - If a node doesn't respond to pings, we now generate an error on the connection instead of trying to gracefully close it.