Skip to content

Commit 1cac380

Browse files
lexnvdmitry-markin
andcommitted
litep2p: Update litep2p to v0.8.0 (#6353)
This PR updates litep2p to the latest release. - `KademliaEvent::PutRecordSucess` is renamed to fix word typo - `KademliaEvent::GetProvidersSuccess` and `KademliaEvent::IncomingProvider` are needed for bootnodes on DHT work and will be utilized later - kad: Providers part 8: unit, e2e, and `libp2p` conformance tests ([#258](paritytech/litep2p#258)) - kad: Providers part 7: better types and public API, public addresses & known providers ([#246](paritytech/litep2p#246)) - kad: Providers part 6: stop providing ([#245](paritytech/litep2p#245)) - kad: Providers part 5: `GET_PROVIDERS` query ([#236](paritytech/litep2p#236)) - kad: Providers part 4: refresh local providers ([#235](paritytech/litep2p#235)) - kad: Providers part 3: publish provider records (start providing) ([#234](paritytech/litep2p#234)) - transport_service: Improve connection stability by downgrading connections on substream inactivity ([#260](paritytech/litep2p#260)) - transport: Abort canceled dial attempts for TCP, WebSocket and Quic ([#255](paritytech/litep2p#255)) - kad/executor: Add timeout for writting frames ([#277](paritytech/litep2p#277)) - kad: Avoid cloning the `KademliaMessage` and use reference for `RoutingTable::closest` ([#233](paritytech/litep2p#233)) - peer_state: Robust state machine transitions ([#251](paritytech/litep2p#251)) - address_store: Improve address tracking and add eviction algorithm ([#250](paritytech/litep2p#250)) - kad: Remove unused serde cfg ([#262](paritytech/litep2p#262)) - req-resp: Refactor to move functionality to dedicated methods ([#244](paritytech/litep2p#244)) - transport_service: Improve logs and move code from tokio::select macro ([#254](paritytech/litep2p#254)) - tcp/websocket/quic: Fix cancel memory leak ([#272](paritytech/litep2p#272)) - transport: Fix pending dials memory leak ([#271](paritytech/litep2p#271)) - ping: Fix memory leak of unremoved `pending_opens` ([#274](paritytech/litep2p#274)) - identify: Fix memory leak of unused `pending_opens` ([#273](paritytech/litep2p#273)) - kad: Fix not retrieving local records ([#221](paritytech/litep2p#221)) See release changelog for more details: https://github.com/paritytech/litep2p/releases/tag/v0.8.0 cc @paritytech/networking --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: Dmitry Markin <[email protected]> Signed-off-by: Alexandru Vasile <[email protected]>
1 parent e72e7f4 commit 1cac380

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ linked-hash-map = { version = "0.5.4" }
830830
linked_hash_set = { version = "0.1.4" }
831831
linregress = { version = "0.5.1" }
832832
lite-json = { version = "0.2.0", default-features = false }
833-
litep2p = { version = "0.7.0", features = ["websocket"] }
833+
litep2p = { version = "0.8.0", features = ["websocket"] }
834834
log = { version = "0.4.22", default-features = false }
835835
macro_magic = { version = "0.5.1" }
836836
maplit = { version = "1.0.2" }

prdoc/pr_6353.prdoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
title: Update litep2p network backend to version 0.8.0
2+
3+
doc:
4+
- audience: [ Node Dev, Node Operator ]
5+
description: |
6+
Release 0.8.0 of litep2p includes several improvements and memory leak fixes enhancing the stability and performance of the litep2p network backend.
7+
8+
crates:
9+
- name: sc-network
10+
bump: patch

substrate/client/network/src/litep2p/discovery.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ impl Stream for Discovery {
562562

563563
return Poll::Ready(Some(DiscoveryEvent::GetRecordSuccess { query_id, records }));
564564
},
565-
Poll::Ready(Some(KademliaEvent::PutRecordSucess { query_id, key: _ })) =>
565+
Poll::Ready(Some(KademliaEvent::PutRecordSuccess { query_id, key: _ })) =>
566566
return Poll::Ready(Some(DiscoveryEvent::PutRecordSuccess { query_id })),
567567
Poll::Ready(Some(KademliaEvent::QueryFailed { query_id })) => {
568568
match this.find_node_query_id == Some(query_id) {
@@ -585,6 +585,9 @@ impl Stream for Discovery {
585585

586586
return Poll::Ready(Some(DiscoveryEvent::IncomingRecord { record }))
587587
},
588+
// Content provider events are ignored for now.
589+
Poll::Ready(Some(KademliaEvent::GetProvidersSuccess { .. })) |
590+
Poll::Ready(Some(KademliaEvent::IncomingProvider { .. })) => {},
588591
}
589592

590593
match Pin::new(&mut this.identify_event_stream).poll_next(cx) {

0 commit comments

Comments
 (0)