-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
The TCP transport layer takes 8 addresses to dial. If 1 is successful and 7 are unreachable, the 7 errors are not propagated back to the transport manager.
The downstream effect is that the address scores of the 7 unreachable addresses are not updated. This then leaves the 7 known unreachable addresses to be considered as reachable to the next "Dial attempt".
In passeo, this has been observed on a validator wrongly configured with 31 addresses:
- only one of the 31 addresses are reachable
- if the good address is picked, the rest 7 that would fail are ignored
The TransportEvent::ConnectionOpened needs to take into account the errors generated during dialing:
litep2p/src/transport/tcp/mod.rs
Lines 586 to 608 in 7e048bf
| RawConnectionResult::Connected { negotiated, errors } => { | |
| let Some(handle) = self.cancel_futures.remove(&negotiated.connection_id()) | |
| else { | |
| tracing::warn!( | |
| target: LOG_TARGET, | |
| connection_id = ?negotiated.connection_id(), | |
| address = ?negotiated.endpoint().address(), | |
| ?errors, | |
| "raw connection without a cancel handle", | |
| ); | |
| continue; | |
| }; | |
| if !handle.is_aborted() { | |
| let connection_id = negotiated.connection_id(); | |
| let address = negotiated.endpoint().address().clone(); | |
| self.opened.insert(connection_id, negotiated); | |
| return Poll::Ready(Some(TransportEvent::ConnectionOpened { | |
| connection_id, | |
| address, | |
| })); |
Part of:
Metadata
Metadata
Assignees
Labels
No labels