0.42.0
- Update
Transport::dialfunction signature with aDialOptsparam and removeTransport::dial_as_listener:DialOptsstruct containsPortUseandEndpoint,PortUseallows controling port allocation of new connections (defaults toPortUse::Reuse) -- Add
port_usefield toConnectedPoint - Set
endpointfield inDialOptstoEndpoint::Listenerto dial as a listener
- Remove
Transport::address_translationand relocate functionality tolibp2p_swarm
See [PR 4568].
0.41.3
- Use
web-timeinstead ofinstant. See PR 5347.
0.41.2
- Implement
std::fmt::DisplayonListenerId. See PR 4936.
0.41.1
- Implement
{In,Out}boundConnectionUpgradeforSelectUpgrade. See PR 4812.
0.41.0
- Remove blanket-impl of
{In,Out}boundUpgradefor{In,Out}boundConnectionUpgrade. See PR 4695. - Remove deprecated functions from
ListenerId. See PR 4736. - Remove
upgrade::transfermodule. See issue 4011 for details. See PR 4788.
0.40.1
- Implement
DebugforStreamMuxerEvent. See PR 4426.
0.40.0
Allow
ListenerIdto be user-controlled, i.e. to be provided onTransport::listen_on. See PR 3567.Raise MSRV to 1.65. See PR 3715.
Remove deprecated symbols related to upgrades. See PR 3867.
Enforce protocol names to be valid UTF8 strings as required by the spec. We delete the
ProtocolNametrait and replace it with a requirement forAsRef<str>. See PR 3746Remove
SingletonMuxer. See PR 3883.Add
global_only::Transportthat refuses to dial IP addresses from private ranges. See PR 3814.Remove
upgrade::{apply, apply_inbound, apply_outbound, InboundUpgradeApply, OutboundUpgradeApply}from public API. These are implementation details that should not be depended on. See PR 3915.Remove deprecated
identitymodule. Depend onlibp2p-identitydirectly instead or import it via thelibp2p::identityre-export. See PR 4040.
0.39.2
Deprecate
upgrade::from_fnwithout replacement as it is not used withinrust-libp2p. If you depend on it, we suggest you vendor it. See PR 3747.Deprecate
{In,Out}boundUpgradeExt, as they are not used in rust-libp2p. See PR 3807.Deprecate
OptionalUpgradewithout replacement. See PR 3806.
0.39.1
- Migrate from
prosttoquick-protobuf. This removesprotocdependency. See PR 3312.
0.39.0
- Move
ConnectionIdtolibp2p-swarm. See PR 3221. - Move
PendingPointtolibp2p-swarmand make it crate-private. See PR 3221.
0.38.0
Remove deprecated functions
StreamMuxerExt::next_{inbound,outbound}. See PR 3031.Hide
prost::Errorfrom public API inFromEnvelopeError::InvalidPeerRecordandsigned_envelope::DecodingError. See PR 3058.Move
Executortolibp2p-swarm. See PR 3097.Update
rust-versionto reflect the actual MSRV: 1.60.0. See PR 3090.Update
multistream-selecttov0.12.1. See PR 3090.Improve error messages in case keys cannot be decoded because of missing feature flags. See PR 2972.
Remove
EitherErrorin favor ofeither::Either. See PR 3337.Remove
EitherTransportin favor of implementingTransportoneither::Either. See PR 3338.Remove
EitherUpgradein favor of implementingUpgradeInfo,InboundUpgradeandOutboundUpgradeoneither::Either. See PR 3339.Remove
EitherFuture2in favor ofEitherFuture. See PR 3340.Remove
EitherOutputin favor offuture::Either. See PR 3341.
0.37.0
Implement
HashandOrdforPublicKey. See PR 2915.Remove default features. If you previously depended on
secp256k1orecdsayou need to enable these explicitly now. See PR 2918.Deprecate
StreamMuxerExt::next_{inbound,outbound}. See PR 3002.
0.36.0
Make RSA keypair support optional. To enable RSA support,
rsafeature should be enabled. See PR 2860.Add
ReadyUpgrade. See PR 2855.
0.35.1
- Update to
p256v0.11.0. See PR 2636.
0.35.0
- Update prost requirement from 0.10 to 0.11 which no longer installs the protoc Protobuf compiler. Thus you will need protoc installed locally. See PR 2788.
- Drop
Unpinrequirement fromSubstreamBox. See PR 2762 and PR 2776. - Drop
Syncrequirement onStreamMuxerfor constructingStreamMuxerBox. See PR 2775. - Use
Pin<&mut Self>as the receiver type for allStreamMuxerpoll functions. See PR 2765. - Change
StreamMuxerinterface to be entirely poll-based. All functions onStreamMuxernow require aContextand returnPoll. This gives callers fine-grained control over what they would like to make progress on. See PR 2724 and PR 2797.
0.34.0
Remove
{read,write,flush,shutdown,destroy}_substreamfunctions fromStreamMuxertrait in favor of forcingStreamMuxer::Substreamto implementAsyncRead + AsyncWrite. See PR 2707.Replace
Into<std::io::Error>bound onStreamMuxer::Errorwithstd::error::Error. See PR 2710.Remove the concept of individual
Transport::Listenerstreams fromTransport. Instead theTransportis polled directly viaTransport::poll. TheTransportis now responsible for driving its listeners. See PR 2652.
0.33.0
- Have methods on
Transporttake&mut selfinstead ofself. See PR 2529. - Remove
StreamMuxer::flush_all. See PR 2669. - Rename
StreamMuxer::closetoStreamMuxer::poll_close. See PR 2666. - Remove deprecated function
StreamMuxer::is_remote_acknowledged. See PR 2665.
0.32.1
- Add
PeerId::try_from_multiaddrto extract aPeerIdfrom aMultiaddrthat ends in/p2p/<peer-id>.
0.32.0 [2022-02-22]
Remove
Network.libp2p-coreis from now on an auxiliary crate only. Users that have previously usedNetworkonly, will need to useSwarminstead. See PR 2492.Update to
multiaddrv0.14.0.Update to
multihashv0.16.0.Implement
DisplayonDialError. See PR 2456.Update to
parking_lotv0.12.0. See PR 2463.Validate PeerRecord signature matching peer ID. See RUSTSEC-2022-0009.
Don't take ownership of key in
PeerRecord::newandSignedEnvelope::new. See PR 2516.Remove
SignedEnvelope::payloadin favor ofSignedEnvelope::payload_and_signing_key. The caller is expected to check that the returned signing key makes sense in the payload's context. See PR 2522.
0.31.0 [2022-01-27]
Update dependencies.
Report concrete connection IDs in
NetworkEvent::ConnectionEstablishedandNetworkEvent::ConnectionClosed(see PR 2350).Migrate to Rust edition 2021 (see PR 2339).
Add support for ECDSA identities (see PR 2352).
Add
ConnectedPoint::is_relayed(see PR 2392).Enable overriding dial concurrency factor per dial via
DialOpts::override_dial_concurrency_factor.- Introduces
libp2p_core::DialOptsmirroringlibp2p_swarm::DialOpts. Passed as an argument toNetwork::dial. - Removes
Peer::dialin favor ofNetwork::dial.
See PR 2404.
- Introduces
Implement
SerializeandDeserializeforPeerId(see PR 2408)Report negotiated and expected
PeerIdas well as remote address inDialError::WrongPeerId(see PR 2428).Allow overriding role when dialing. This option is needed for NAT and firewall hole punching.
Add
Transport::dial_as_listener. AsTransport::dialbut overrides the role of the local node on the connection . I.e. has the local node act as a listener on the outgoing connection.Add
override_roleoption toDialOpts.
See PR 2363.
0.30.1 [2021-11-16]
- Use
instantinstead ofwasm-timer(see PR 2245).
0.30.0 [2021-11-01]
Add
ConnectionLimit::with_max_established(see PR 2137).Add
Keypair::to_protobuf_encoding(see PR 2142).Change
PublicKey::into_protobuf_encodingtoPublicKey::to_protobuf_encoding(see PR 2145).Change
PublicKey::into_peer_idtoPublicKey::to_peer_id(see PR 2145).Change
PeerId::from_public_key(PublicKey)toPeerId::from_public_key(&PublicKey)(see PR 2145).Add
From<&PublicKey> for PeerId(see PR 2145).Remove
TInEventandTOutEventtrait parameters on most public types.TInEventandTOutEventare implied throughTHandlerand thus superflucious. Both are removed in favor of a derivation throughTHandler(see PR 2183).Require
ConnectionHandler::{InEvent,OutEvent,Error}to implementDebug(see PR 2183).Remove
DisconnectedPeer::set_connectedandPool::add(see PR 2195).Report
ConnectionLimiterror throughConnectionErrorand thus throughNetworkEvent::ConnectionClosedinstead of previously throughPendingConnectionErrorand thusNetworkEvent::{IncomingConnectionError, DialError}(see PR 2191).Report abortion of pending connection through
DialError,UnknownPeerDialErrororIncomingConnectionError(see PR 2191).Remove deprecated functions
upgrade::write_one,upgrade::write_with_len_prefixandupgrade::read_one(see PR 2213).Add
SignedEnvelopeandPeerRecordaccording to RFC0002 and RFC0003 (see PR 2107).Report
ListenersEvent::Closedwhen dropping a listener inListenersStream::remove_listener, returnboolinstead ofResult<(), ()>(see PR 2261).Concurrently dial address candidates within a single dial attempt (see PR 2248) configured via
Network::with_dial_concurrency_factor.On success of a single address, provide errors of the thus far failed dials via
NetworkEvent::ConnectionEstablished::outgoing.On failure of all addresses, provide the errors via
NetworkEvent::DialError.
0.29.0 [2021-07-12]
Switch from
parity-multiaddrto upstreammultiaddr.Update dependencies.
Implement
Keypair::from_protobuf_encodingfor ed25519 keys (see PR 2090).Deprecate
upgrade::write_one. Deprecateupgrade::write_with_len_prefix. Deprecateupgrade::read_one. Introduceupgrade::read_length_prefixedandupgrade::write_length_prefixed. See PR 2111.
0.28.3 [2021-04-26]
- Fix build with secp256k1 disabled PR 2057.
0.28.2 [2021-04-13]
- Update dependencies.
0.28.1 [2021-03-17]
- Update
paritytech-multiaddrto>=v0.11.2.
0.28.0 [2021-03-17]
Network::dial()understands/p2paddresses andTransport::dialgets a "fully qualified"/p2paddress when dialing a specific peer, whether through theNetwork::peer()API or viaNetwork::dial()with a/p2paddress.Network::dial()andnetwork::Peer::dial()return aDialErroron error.Shorten and unify
Debugimpls of public keys.
0.27.1 [2021-02-15]
- Update dependencies.
0.27.0 [2021-01-12]
(Re)add
Transport::address_translationto permit transport-specific translations of observed addresses onto listening addresses. PR 1887Update dependencies.
0.26.0 [2020-12-17]
- Make
PeerIdbeCopy, including smallPeerIdAPI changes. PR 1874.
0.25.2 [2020-12-02]
- Require
multistream-select-0.9.1.
0.25.1 [2020-11-25]
- Add missing multiaddr upgrade.
0.25.0 [2020-11-25]
The
NetworkConfigAPI is now a builder that movesself. PR 1848.New configurable connection limits for established connections and dedicated connection counters. Removed the connection limit dedicated to outgoing pending connection per peer. Connection limits are now represented by
u32intead ofusizetypes. PR 1848.Update
multihash.Update
multistream-select.
0.24.0 [2020-11-09]
- Remove
ConnectionInfotrait and replace it withPeerIdeverywhere. This was already effectively the case becauseConnectionInfowas implemented onPeerId.
0.23.1 [2020-10-20]
- Update dependencies.
0.23.0 [2020-10-16]
Rework transport boxing and move timeout configuration to the transport builder. PR 1794.
Update dependencies.
0.22.1 [2020-09-10]
- Require at least parity-multiaddr v0.9.2 in order to fulfill
Ordbound onMultiaddr. PR 1742.
0.22.0 [2020-09-09]
Simplify incoming connection handling. The
IncomingConnectionEventhas been removed. Instead, pass theIncomingConnectionobtained fromNetworkEvent::IncomingConnectiontoNetwork::accept(). PR 1732.Allow any closure to be passed as an executor. PR 1686
Remove
PeerIdcompatibility mode for "identity" and SHA2 hashes. Historically, before 0.12,PeerIds were incorrectly always hashed with SHA2. Starting from version 0.13, rust-libp2p accepted both hashed and non-hashed keys as input. Starting from version 0.16 rust-libp2p comparedPeerIds of "identity" and SHA2 hashes equal, which made it possible to connect through secio or noise to nodes with an identity hash for the same peer ID. Starting from version 0.17, rust-libp2p switched to not hashing the key (i.e. the correct behaviour) while retaining equality between peer IDs using the "identity" hash and SHA2. Finally, with this release, that will no longer be the case and it is assumed that peer IDs whose length is less or equal to 42 bytes always use the "identity" hash so two peer IDs are equal if and only if they use the same hash algorithm and have the same hash digest. PR 1608.Return dialer address instead of listener address as
remote_addrinMemoryTransportListenerListenerEvent::UpgradePR 1724.
0.21.0 [2020-08-18]
Remove duplicates when performing address translation PR 1697.
Add
transport::Builder::multiplex_extfor further customisation duringStreamMuxercreation. PR 1691.Refactoring of connection close and disconnect behaviour. In particular, the former
NetworkEvent::ConnectionErroris nowNetworkEvent::ConnectionClosedwith theerrorfield being anOptionandNoneindicating an active (but not necessarily orderly) close. This guarantees thatConnectionEstablishedevents are always eventually paired withConnectionClosedevents, regardless of how connections are closed. Correspondingly,EstablishedConnection::closeis nowEstablishedConnection::start_closeto reflect that an orderly close completes asynchronously in the background, with the outcome observed by continued polling of theNetwork. In contrast,disconnecting a peer takes effect immediately without an orderly connection shutdown. See PR 1619 for further details.Add
ConnectedPoint::get_remote_address(PR 1649).
0.20.1 [2020-07-17]
- Update ed25519-dalek dependency.
0.20.0 [2020-07-01]
Conditional compilation fixes for the
wasm32-wasitarget (PR 1633).Rename
StreamMuxer::poll_inboundtopoll_eventand change the return value toStreamMuxerEvent. This newStreamMuxerEventmakes it possible for the multiplexing layer to notify the upper layers of a change in the address of the underlying connection.Add
ConnectionHandler::inject_address_change.