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

multistream/negotiated: Propagate poll_close on unreceived protocol messages #62

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

lexnv
Copy link
Collaborator

@lexnv lexnv commented Mar 18, 2024

This PR ensures that lazily negotiated protocols can be closed before the specific protocol message has been received.

Closes: #60

cc @paritytech/networking

lexnv added 11 commits March 18, 2024 15:05
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv self-assigned this Mar 18, 2024
Comment on lines 550 to 552
// However, for the Litep2p the negotation must conclude before closing the
// lazy negotation of protocol. We'll wait for the close until the
// server has produced a message, in this test that means forever.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why it was implemented like this in the first place. Aren't we in a Chesterton's fence situation here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep indeed, I wonder if this affects something in substrate. Proly would be good to have it running in versi for a while. I'll wait a bit for that and group this PR with the clippy PR (and any others) for testing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @altonen would love to get your feedback on this if you remember why the change was needed 🙏

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't even remember touching the multistream-select code. Did you check the behavior in this test against the latest multistream-select that libp2p uses or some other version? I wonder if it could be related to this: paritytech/substrate#14691

Base automatically changed from lexnv/awaitheader-once to master April 24, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants