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

Add yamux specification #519

Merged
merged 6 commits into from
Feb 26, 2023
Merged

Conversation

thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented Feb 17, 2023

cc @marten-seemann @mxinden @wemeetagain

The specification itself is a verbatim copy from https://github.com/hashicorp/yamux/blob/master/spec.md modulo formatting changes.

The only addition is the "Implementation considerations" section at the bottom where we document the ACK backlog of 256. To my knowledge, only go-libp2p implements this at the moment. rust-yamux still needs to implement this: libp2p/rust-yamux#150. I am not sure about the status of this in js-libp2p-yamux?

TODO

  • Include yamux protocol string in spec
  • add @ianopolous to interest group

yamux/README.md Outdated Show resolved Hide resolved
yamux/README.md Outdated Show resolved Hide resolved
@marten-seemann
Copy link
Contributor

The only addition is the "Implementation considerations" section at the bottom where we document the ACK backlog of 256. To my knowledge, only go-libp2p implements this at the moment. rust-yamux still needs to implement this: libp2p/rust-yamux#150. I am not sure about the status of this in js-libp2p-yamux?

That's fine. Doesn't block the spec, as it's a SHOULD anyway.

@thomaseizinger
Copy link
Contributor Author

Just remembered that this is missing the protocol identifier that we use. Will add.

@thomaseizinger
Copy link
Contributor Author

thomaseizinger commented Feb 17, 2023

The only addition is the "Implementation considerations" section at the bottom where we document the ACK backlog of 256. To my knowledge, only go-libp2p implements this at the moment. rust-yamux still needs to implement this: libp2p/rust-yamux#150. I am not sure about the status of this in js-libp2p-yamux?

That's fine. Doesn't block the spec, as it's a SHOULD anyway.

Agreed. I only mentioned it for visibility.

@thomaseizinger
Copy link
Contributor Author

Any other people I should add to the interest group?

@Menduist
Copy link
Contributor

Does it really make sense to copy the yamux spec here? It's not like we copied the quic spec in this repo for instance, we just specified how it's used inside libp2p
Maybe just point to a specific hash of the upstream spec, and add libp2p specifics

@thomaseizinger
Copy link
Contributor Author

Does it really make sense to copy the yamux spec here? It's not like we copied the quic spec in this repo for instance, we just specified how it's used inside libp2p
Maybe just point to a specific hash of the upstream spec, and add libp2p specifics

I see your point. The QUIC spec is hosted by the IETF though which I'd consider more trustworthy and I am sure there are other copies of it around too.

The yamux spec is owned by an unrelated GitHub account so I figured copying is better. It is also not too long and copying it allows us to improve wording or structure in the future if we want to.

I don't feel super strongly though. Curious to hear more opinions.

@marten-seemann
Copy link
Contributor

#479 will require us to make some (backwards-compatible) changes to yamux to encode errors, so having a spec in this repo that we can modify makes sense.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thanks @thomaseizinger.

I am in favor of copying.

@thomaseizinger
Copy link
Contributor Author

This is ready to merge from my end.

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