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

feat(relay): hide internals of Connection #3829

Merged
merged 15 commits into from
May 2, 2023

Conversation

tcoratger
Copy link
Contributor

@tcoratger tcoratger commented Apr 25, 2023

Description

Relayed connections to other peers are created from streams to the relay itself. Internally, such a connection has different states. These however are not relevant to the user and should be encapsulated to allow for more backwards-compatible changes. The only interface exposed is AsyncRead and AsyncWrite.

Resolves: #3255.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • A changelog entry has been made in the appropriate crates

@thomaseizinger thomaseizinger changed the title feat(relay): new type client::Connection with AsyncRead and AsyncWrite feat(relay): hide internals of Connection Apr 25, 2023
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Thanks!

This looks good. Unfortunately, it is a breaking change so I'll add it to the milestone. We are looking at cutting a new breaking release soon though so we will hopefully be able to merge this in the next couple of weeks.

protocols/relay/src/priv_client.rs Outdated Show resolved Hide resolved
protocols/relay/src/v2.rs Outdated Show resolved Hide resolved
protocols/relay/src/priv_client.rs Outdated Show resolved Hide resolved
protocols/relay/src/priv_client.rs Show resolved Hide resolved
@thomaseizinger thomaseizinger added this to the v0.52.0 milestone Apr 25, 2023
@thomaseizinger thomaseizinger marked this pull request as draft April 25, 2023 13:05
@thomaseizinger
Copy link
Contributor

I've converted it to a draft. We do this for all PRs that are queued to only be merged for the next breaking release.

@tcoratger
Copy link
Contributor Author

@thomaseizinger Is there anything left to do here or is it just waiting for the next release?

@thomaseizinger
Copy link
Contributor

thomaseizinger commented Apr 28, 2023

@thomaseizinger Is there anything left to do here or is it just waiting for the next release?

Nothing to do, we are just waiting for the next breaking change which will very likely happen next week!

See #3532 for some context on the strategy we are following.

@thomaseizinger thomaseizinger marked this pull request as ready for review May 2, 2023 09:25
@thomaseizinger
Copy link
Contributor

Can you add a changelog entry for this please? We can then queue it for merging!

@tcoratger
Copy link
Contributor Author

Can you add a changelog entry for this please? We can then queue it for merging!

@thomaseizinger Done

Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Solid, thank you! 🚀

@mergify mergify bot merged commit c728824 into libp2p:master May 2, 2023
@tcoratger tcoratger deleted the relay-connection branch May 17, 2023 15:58