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

core/: Concurrent connection attempts #2248

Merged
merged 74 commits into from
Oct 14, 2021
Merged
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
75292bb
*: Implement concurrent dialing
mxinden Aug 30, 2021
10d941b
core/: Track pending connection via Endpoint
mxinden Sep 6, 2021
f01b323
core/: Add PendingPoint
mxinden Sep 6, 2021
d6da039
swarm/src/lib: Adjust
mxinden Sep 7, 2021
5887d69
*: Associate Multiaddr with transport error
mxinden Sep 8, 2021
08c196f
protocols: Update
mxinden Sep 8, 2021
6c1ce85
core/src/: Remove printlns
mxinden Sep 9, 2021
9070bd2
misc/metrics: Update
mxinden Sep 9, 2021
4043970
core/: Remove printlns
mxinden Sep 9, 2021
d594208
core/src/network/concurrent: Catch address error
mxinden Sep 9, 2021
bdfd5d1
Merge branch 'libp2p/master' into concurrent-dial
mxinden Sep 9, 2021
a705bb0
core/src/connection: Remove meta file
mxinden Sep 26, 2021
436b876
Merge branch 'libp2p/master' into concurrent-dial
mxinden Sep 26, 2021
db3fba7
Merge branch 'master' into concurrent-dial
mxinden Sep 28, 2021
63c4a32
core/: Stage connection task in pending and established
mxinden Sep 28, 2021
eb86b41
core/src/connection: Send pending result through events channel
mxinden Sep 30, 2021
ae21f9e
core/src/connection: Handle connection error
mxinden Sep 30, 2021
7d3114b
core/src/connection: Use oneshot Void for pending connection
mxinden Sep 30, 2021
c43496d
core/src/connection: Remove task
mxinden Sep 30, 2021
e06131c
core/: Bubble dial errors on success up
mxinden Sep 30, 2021
7c6a0fe
*: Pass dial success errors to behaviours
mxinden Sep 30, 2021
752bb70
core/src/network/concurrent_dial: Limit concurrency factor
mxinden Oct 1, 2021
0dcd1cf
core/src/network/concurrent_dial: Remove bound on Debug
mxinden Oct 1, 2021
2392249
core/src/connection: Remove task module
mxinden Oct 4, 2021
b27c735
core/src/connection: Revive Pool::disconnect
mxinden Oct 4, 2021
1703d40
core/src/connection: Fold manager into pool
mxinden Oct 5, 2021
794ca73
core/src/connection: Use different channel for pending and established
mxinden Oct 5, 2021
036c433
core/: Fix lints
mxinden Oct 5, 2021
6eda209
*: Adjust to changes in core
mxinden Oct 5, 2021
999b481
core/src/connection/pool: Take care of events before triggering more
mxinden Oct 5, 2021
9994a90
core/src/connection: Document PendingPoint
mxinden Oct 6, 2021
8eb278d
core/src/connection: Wrap listener error in task.rs not network.rs
mxinden Oct 6, 2021
73ffc76
core/src/connection/pool: Clean up trait bounds
mxinden Oct 6, 2021
1a97d9b
core/src/connection: Move ConnectionId to connection.rs
mxinden Oct 6, 2021
f5d0e91
protocols/rendezvous/tests: Await events sequentially to prevent race
mxinden Oct 6, 2021
62ed126
swarm/src/lib: Return dial errors in SwarmEvent::EstablishedConnection
mxinden Oct 6, 2021
42ef7f5
core/src/network: Lazily call Transport dial on concurrent dialing
mxinden Oct 6, 2021
520c4ec
core/src: Move ConcurrentDial into pool/
mxinden Oct 6, 2021
f76cf2b
core/src/connection: Only bound poll to TMuxer
mxinden Oct 8, 2021
0ba84ab
core/src/connection: Split PendingConnectionError
mxinden Oct 8, 2021
30401cb
core/src/network: Remove Network::dialing
mxinden Oct 8, 2021
2147b07
core/src/network/peer: Remove DialingAttempt::address
mxinden Oct 8, 2021
c1491aa
*: Adjust to changes in libp2p-core
mxinden Oct 8, 2021
77e36e9
core/src/connection: Log muxer closing error
mxinden Oct 8, 2021
a80fe6c
core/src/connection: Return handler on incoming connection limit
mxinden Oct 8, 2021
095e081
swarm/: Return handler on dial failure to unknown peer
mxinden Oct 8, 2021
b621ff0
Merge branch 'libp2p/master' into concurrent-dial
mxinden Oct 8, 2021
2c24542
*: Address minor TODOs
mxinden Oct 8, 2021
07ed888
swarm/src/behaviour: Fix doc example
mxinden Oct 10, 2021
dd49cfc
core/src/connection: Address clippy suggestions
mxinden Oct 10, 2021
a725fbf
swarm/src/lib: Fix doc comment
mxinden Oct 10, 2021
386f231
Merge branch 'libp2p/master' into concurrent-dial
mxinden Oct 10, 2021
66cb2be
*: Minor rewording on doc comments
mxinden Oct 10, 2021
4dba4c8
core/tests: Use MemoryTransport
mxinden Oct 10, 2021
dc3c46d
protocols/rendezvous: Implement assert_behaviour_events for single swarm
mxinden Oct 10, 2021
559bb31
core/src/connection: Move dial concurrency factor to constant
mxinden Oct 10, 2021
8547941
*: Add changelog entries
mxinden Oct 10, 2021
3aca8d0
{core,swarm}/: Make concurrent dialing configurable
mxinden Oct 13, 2021
ef36c5e
core/tests/: Test concurrent dialing
mxinden Oct 13, 2021
0fea620
core/src/connection: Revert Stream impl for Connection
mxinden Oct 13, 2021
d25c95b
core/: Replace "Stack of protocols" with "Address"
mxinden Oct 13, 2021
ecdb812
core/src/connection: Fix doc comment on to_pending_point
mxinden Oct 13, 2021
2a6dc54
core/src/connection: Rename trait bound TransportError to TTransErr
mxinden Oct 13, 2021
e7beec4
core/src/connection/pool: Impl start_close on EstablishedConnInfo
mxinden Oct 13, 2021
34daf90
core/src/network: Fix trait bounds on DialingOpts
mxinden Oct 13, 2021
d099106
core/src/network/peer: Fix doc comment on DialingAttempt
mxinden Oct 13, 2021
d5e06b6
core/src/network/peer: Remove outdated comment on DialingAttempt::abort
mxinden Oct 13, 2021
7331d90
{core,swarm}/: Rename outgoing to concurrent_dial_errors
mxinden Oct 13, 2021
9fc5870
core/src/connection/pool: Implement expect_occupied for hash_map::Entry
mxinden Oct 13, 2021
e840d65
Merge branch 'libp2p/master' into concurrent-dial
mxinden Oct 13, 2021
c35992a
Merge branch 'master' into concurrent-dial
mxinden Oct 14, 2021
cb553cf
{core,swarm}/CHANGELOG: Update now that concurrency is configurable
mxinden Oct 14, 2021
04c694f
protocols/src/identify: Update to changed address failure reporting
mxinden Oct 14, 2021
7aafc52
core/CHANGELOG.md: Fix typo
mxinden Oct 14, 2021
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
core/src/connection: Rename trait bound TransportError to TTransErr
  • Loading branch information
mxinden committed Oct 13, 2021
commit 2a6dc5485edd35b14af2f0f6aa90295f8287b37a
12 changes: 6 additions & 6 deletions core/src/connection/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ pub type PendingInboundConnectionError<TTransErr> =

/// Errors that can occur in the context of a pending `Connection`.
#[derive(Debug)]
pub enum PendingConnectionError<TransportError> {
pub enum PendingConnectionError<TTransErr> {
/// An error occurred while negotiating the transport protocol(s) on a connection.
Transport(TransportError),
Transport(TTransErr),

/// The connection was dropped because the connection limit
/// for a peer has been reached.
Expand All @@ -92,9 +92,9 @@ pub enum PendingConnectionError<TransportError> {
IO(io::Error),
}

impl<TransportError> fmt::Display for PendingConnectionError<TransportError>
impl<TTransErr> fmt::Display for PendingConnectionError<TTransErr>
where
TransportError: fmt::Display + fmt::Debug,
TTransErr: fmt::Display + fmt::Debug,
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Expand All @@ -117,9 +117,9 @@ where
}
}

impl<TransportError> std::error::Error for PendingConnectionError<TransportError>
impl<TTransErr> std::error::Error for PendingConnectionError<TTransErr>
where
TransportError: std::error::Error + 'static,
TTransErr: std::error::Error + 'static,
{
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
Expand Down