Skip to content

Commit 94389a9

Browse files
lexnvdmitry-markin
andauthored
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 ### Added - 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)) ### Changed - 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)) ### Fixed - 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]>
1 parent be26d62 commit 94389a9

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ linked-hash-map = { version = "0.5.4" }
848848
linked_hash_set = { version = "0.1.4" }
849849
linregress = { version = "0.5.1" }
850850
lite-json = { version = "0.2.0", default-features = false }
851-
litep2p = { version = "0.7.0", features = ["websocket"] }
851+
litep2p = { version = "0.8.0", features = ["websocket"] }
852852
log = { version = "0.4.22", default-features = false }
853853
macro_magic = { version = "0.5.1" }
854854
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
@@ -553,7 +553,7 @@ impl Stream for Discovery {
553553

554554
return Poll::Ready(Some(DiscoveryEvent::GetRecordSuccess { query_id, records }));
555555
},
556-
Poll::Ready(Some(KademliaEvent::PutRecordSucess { query_id, key: _ })) =>
556+
Poll::Ready(Some(KademliaEvent::PutRecordSuccess { query_id, key: _ })) =>
557557
return Poll::Ready(Some(DiscoveryEvent::PutRecordSuccess { query_id })),
558558
Poll::Ready(Some(KademliaEvent::QueryFailed { query_id })) => {
559559
match this.find_node_query_id == Some(query_id) {
@@ -576,6 +576,9 @@ impl Stream for Discovery {
576576

577577
return Poll::Ready(Some(DiscoveryEvent::IncomingRecord { record }))
578578
},
579+
// Content provider events are ignored for now.
580+
Poll::Ready(Some(KademliaEvent::GetProvidersSuccess { .. })) |
581+
Poll::Ready(Some(KademliaEvent::IncomingProvider { .. })) => {},
579582
}
580583

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

0 commit comments

Comments
 (0)