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(swarm): introduce ConnectionId::new_unchecked constructor #3652

Merged
merged 7 commits into from
Mar 21, 2023

Conversation

thomaseizinger
Copy link
Contributor

Description

In earlier iterations of the design for generic connection management, we removed the ConnectionId::new constructor because it would have allowed users to create ConnectionIds that are already taken, thus breaking invariants that NetworkBehaviours rely on. Later, we incorporated the creation of ConnectionId in DialOpts which mitigates this risk altogether.

Thus, it is reasonably safe to introduce a public, non-deprecated constructor for ConnectionId that can be used for tests.

Related #3327 (comment).

Notes & open questions

cc @melekes

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

swarm/CHANGELOG.md Outdated Show resolved Hide resolved
@thomaseizinger
Copy link
Contributor Author

I am going to directly release this after it merges to unblock @melekes. This is trivial in my eyes, hence I am merging this right away.

@mergify
Copy link
Contributor

mergify bot commented Mar 21, 2023

This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏

@mergify mergify bot merged commit 3fa10be into master Mar 21, 2023
@mergify mergify bot deleted the tmp-connection-id-ctor branch March 21, 2023 19:28
@melekes
Copy link
Contributor

melekes commented Mar 27, 2023

@thomaseizinger @mxinden what is the timeline for the next patch release (0.51.2)? we're (Parity) interested in this change specifically. I can create a PR if necessary.

@mxinden
Copy link
Member

mxinden commented Mar 28, 2023

I will try tomorrow. No promises @melekes.

@mxinden mxinden mentioned this pull request Mar 29, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants