Skip to content

feat: multistream-select #297

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

Merged
merged 7 commits into from
Feb 24, 2023
Merged

Conversation

salmad3
Copy link
Member

@salmad3 salmad3 commented Jan 16, 2023

Context

Latest preview

Not against master (setting this up).

@salmad3 salmad3 marked this pull request as draft January 16, 2023 02:14
@salmad3 salmad3 marked this pull request as ready for review January 17, 2023 10:21
@salmad3 salmad3 added the ready for review PR is ready for review label Jan 17, 2023

[Multistream Select](https://github.com/multiformats/multistream-select) is
a protocol for friendly protocol multiplexing that allows for the negotiation
of a [multicodec](https://github.com/multiformats/multicodec) between two entities.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a multicoded? It's just a string, isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.. thanks!

Comment on lines 30 to 34
The header refers to the initial message sent by a peer to initiate the protocol
negotiation process. This message includes the protocol ID, `/multistream/1.0.0.`,
which indicates to the listening peer that a protocol negotiation process is about
to take place. Upon receiving this header, the listening peer responds with their
desired protocol header.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't put too much emphasis on the header. It's not terribly important. Just say: Every multistream message is prefixed with a header, /multistream/1.0.0.

Copy link
Member Author

Choose a reason for hiding this comment

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

Simplified

Comment on lines 38 to 43
protocol information and select the protocols to use for the connection, including
protocols for [security](../../secure-comm/overview.md) and
[stream multiplexing](../../multiplex/overview.md) if necessary. The
[protocol negotiation](../core-abstractions/connections#protocol-negotiation)
and [upgrade process](../core-abstractions/connections#upgrading-connections)
is explained further in the [connections document](../core-abstractions/connections.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be mentioned in the first paragraph:
libp2p uses multistream at various places:

  1. a
  2. b
  3. c

Copy link
Member Author

Choose a reason for hiding this comment

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

It should still go after Multistream is introduced.

@salmad3 salmad3 added the P1 High label Jan 26, 2023
as necessary. The [protocol negotiation](../core-abstractions/connections#protocol-negotiation)
and [upgrade process](../core-abstractions/connections#upgrading-connections) are explained
further in the [connections document](../core-abstractions/connections.md).

Copy link
Contributor

Choose a reason for hiding this comment

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

We should add a sentence saying that it's also used to select application protocols spoken on streams.

Copy link
Member

Choose a reason for hiding this comment

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

👍 done with the last 3 commits.

@p-shahi p-shahi removed P1 High ready for review PR is ready for review labels Feb 23, 2023
@mxinden
Copy link
Member

mxinden commented Feb 24, 2023

@p-shahi good to merge from my side.

@p-shahi p-shahi merged commit ea4d8be into refactor/intro Feb 24, 2023
p-shahi pushed a commit that referenced this pull request Mar 1, 2023
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.

4 participants