-
Notifications
You must be signed in to change notification settings - Fork 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
feat(identify): immediately run identify protocol on new connections #3545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me. Will give @thomaseizinger a chance to review as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of comments, otherwise LGTM.
I think technically, a deprecation should not change behaviour. I don't mind in this case though as I think there is no harm in removing the delay.
This pull request has merge conflicts. Could you please resolve them @PopBogdan97? 🙏 |
Co-authored-by: Max Inden <[email protected]>
Co-authored-by: Max Inden <[email protected]>
Co-authored-by: Thomas Eizinger <[email protected]>
Co-authored-by: Thomas Eizinger <[email protected]>
Co-authored-by: Thomas Eizinger <[email protected]>
Co-authored-by: Thomas Eizinger <[email protected]>
Co-authored-by: Thomas Eizinger <[email protected]>
This pull request has merge conflicts. Could you please resolve them @PopBogdan97? 🙏 |
@mxinden What should we do about the test that is mentioned in the PR description? I think we should be able to work around that by perhaps adding the |
You'll need to sprinkle some |
Sounds good. I am also fine with merging here without a dedicated test. I consider this pull request removing functionality (that is the delay) instead of adding functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK with nits
Friendly ping @PopBogdan97. |
Sorry for the delay, I had some issues, I will commit the last changes ASAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
No problem, sorry for the delay |
Description
Previously, and for unknown legacy reasons, we waited for a configurable delay (default 500ms) upon new connections before we ran the identify protocol. This unnecessarily slows down applications that wait for the identify handshake to complete before performing further actions.
Resolves #3485.
Notes
Please check if the description in the deprecation notes is correct.
Links to any relevant issues
Related issue #3485
Open Questions
@thomaseizinger @mxinden In the related issues #3485 you mentioned also removing completely the initial delay, but here
rust-libp2p/protocols/identify/src/behaviour.rs
Lines 742 to 749 in 12b785e
Please let me know if you have any comments on the PR, as I am still a beginner in contributing to open source software any comment is valuable for me :)
Change checklist