-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Populate the ConnState field for connections #1851
Conversation
We should also do this for TLS and Noise, when talking to a node that doesn't support early muxer negotiation. It would be really nice if this didn't require any changes to the security implementation, but could be done only in the upgrader. |
There are some data race on upgrader. Need to think about it more. putting this on draft mde |
Sure we could add the same for TLS and Noise, but please note that the integration test we are building will not cover the TLS or Noise case for this scenario. We can provide the feature for future use though. |
It's probably easiest if you implement the |
dc9950f
to
cbb0761
Compare
… in parallel connections
The leverage of upgrader.transportConn is not an issue. The awkward part is to export the ms-muxer negotiation result so that it can be plugged in the upgrader.transportConn. Because libp2p employs parallel negotiation with multiple threads, there is potential for data race. I don't want to resort to locking. So I went through a couple of approaches and got one that works without locking. @marten-seemann please take a look and glad to discuss any other / better options if possible. Thanks! |
I think we should just remove the Instead, the The result of the negotiation then can be exposed on the @julian88110, does that make sense to you? |
@julian88110 : followup work is happening in #1854 right? |
Discussed offline on the solution, and the effort is tracked by #1854 |
Populate the NextProto / ConnState field in the case of Insecure transport.
This simplifies testing