Closed lexnv closed 3 months ago
The issue could be that after receiving an unknown unknown connection, TransportManager
wants to discard it: https://github.com/paritytech/litep2p/blob/a27d0072913be67cce904e2e8c465cc37ec5223a/src/transport/manager/mod.rs#L980-L987
but that branch actually doesn't return early with ConnectionEstablishedResult::Reject
but instead drops down to the default case at the end of the function which returns ConnectionEstablishedResult::Accept
for all cases. This would explain why later on when the connection is closed, TransportManager
doesn't recognize it.
Its been a tricky edge-case, will keep an eye for triaging since we might have other minor gaps causing this state reset
// This is where the state was wrongfully overwritten
T3: Dial address B connection ID 2 -> State: Dialing { in-flight-2 }
T4: Connection is established by remote address C connection ID 3 -> State : Connected { in-flight-dial 2 }
// The issue was detected here
Investigate the following errors:
Data collected from a long running litep2p substrate node in kusama