Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gossipsub): introduce backpressure #5595

Merged
merged 22 commits into from
Nov 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
00cde64
feat(gossipsub): implement backpressures
jxs Sep 10, 2024
cddab5a
address review
jxs Oct 2, 2024
e7b3b92
address Gui review
jxs Oct 31, 2024
887fe07
Merge branch 'master' of github.com:libp2p/rust-libp2p into impl-goss…
jxs Oct 31, 2024
7c7185c
count failed publish and forwards when not send from behaviour
jxs Oct 31, 2024
c9e6602
add tests
jxs Oct 31, 2024
6a3b59e
refactor(gossipsub): use `send_message` for all RpcOut
elenaf9 Nov 20, 2024
455edd6
refactor(gossipsub): return RpcOut in `RpcSender::send_message` Err
elenaf9 Nov 21, 2024
de1bf9f
fix(gossipsub): make clippy happy
elenaf9 Nov 21, 2024
b626118
Merge pull request #12 from elenaf9/gossipsub/sender_send_message
jxs Nov 22, 2024
b295f56
fix(gossipsub): readd lines accidently removed with jxs#12
elenaf9 Nov 22, 2024
c812627
Update protocols/gossipsub/src/behaviour.rs
jxs Nov 22, 2024
1789386
Merge pull request #13 from elenaf9/gossipsub/backpressure/readd-logs
jxs Nov 22, 2024
7665b2d
Apply suggestions from code review
jxs Nov 22, 2024
d795118
Update protocols/gossipsub/src/types.rs
jxs Nov 22, 2024
6fc1bb2
Apply suggestions from code review
jxs Nov 22, 2024
602c46f
seprate RpcSender and RpcReceiver to their own modules
jxs Nov 22, 2024
37de20c
Merge branch 'master' of github.com:libp2p/rust-libp2p into impl-goss…
jxs Nov 22, 2024
658ab16
add missing rpc module
jxs Nov 23, 2024
2789c42
replace and fix timeout messages with a field
jxs Nov 25, 2024
0ec96fa
restore priority_cap
jxs Nov 25, 2024
d8e3957
add dots to peer_score comments
jxs Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Elena Frank <elena.frank@proton.me>
jxs and elenaf9 authored Nov 22, 2024
commit 6fc1bb2af4718dc03e653c38fbfedd09ed61cdd5
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/config.rs
Original file line number Diff line number Diff line change
@@ -440,7 +440,7 @@ impl Default for ConfigBuilder {
published_message_ids_cache_time: Duration::from_secs(10),
connection_handler_queue_len: 5000,
connection_handler_publish_duration: Duration::from_secs(5),
connection_handler_forward_duration: Duration::from_millis(1000),
connection_handler_forward_duration: Duration::from_secs(1),
},
invalid_protocol: false,
}
4 changes: 2 additions & 2 deletions protocols/gossipsub/src/error.rs
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@ pub enum PublishError {
MessageTooLarge,
/// The compression algorithm failed.
TransformFailed(std::io::Error),
/// Messages could not be sent because all queues for peers were full. The usize represents the
/// number of peers that have full queues.
/// Messages could not be sent because the queues for all peers were full. The usize represents the
/// number of peers that were attempted.
AllQueuesFull(usize),
}

2 changes: 1 addition & 1 deletion protocols/gossipsub/src/types.rs
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ pub(crate) struct PeerConnections {
pub(crate) connections: Vec<ConnectionId>,
/// Subscribed topics.
pub(crate) topics: BTreeSet<TopicHash>,
/// The rpc sender to the peer.
/// The rpc sender to the connection handler(s).
pub(crate) sender: RpcSender,
}