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 a policy to bind mini-protocol threads to a capability #5069

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

coot
Copy link
Contributor

@coot coot commented Feb 6, 2025

Description

  • network-mux: provide a way to run bind a mini-protocol to a capability
  • ouroboros-network-framework: added ForkPolicy

Temporarly this PR targets #5016. Once it's is merged, it will target main branch.

Checklist

Quality

  • Commit sequence makes sense and have useful messages, see ref.
  • New tests are added and existing tests are updated.
  • Self-reviewed the PR.

Maintenance

  • Linked an issue or added the PR to the current sprint of ouroboros-network project.
  • Added labels.
  • Updated changelog files.
  • The documentation has been properly updated, see ref.

@coot coot added the mux issues related to network-mux label Feb 6, 2025
@coot coot self-assigned this Feb 6, 2025
Copy link
Contributor

@karknu karknu left a comment

Choose a reason for hiding this comment

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

I like the move add it to MiniProtocolInfo .

There are still comments and whitesspace changes from the first commit that no longer applies.

@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch 3 times, most recently from 1e6f14a to 87bd453 Compare February 11, 2025 15:01
@coot coot force-pushed the coot/network-mux-fork-on-policy branch 2 times, most recently from 487b4d1 to 774d96e Compare February 13, 2025 09:33
@coot
Copy link
Contributor Author

coot commented Feb 13, 2025

@karknu I removed the stale haddock.

@bolt12 bolt12 force-pushed the bolt12/reusable-diffusion-3 branch 8 times, most recently from 79955d2 to e01e06e Compare February 19, 2025 12:56
Base automatically changed from bolt12/reusable-diffusion-3 to main February 19, 2025 17:16
coot added 2 commits February 19, 2025 18:55
Co-authored-by: Karl Knutsson (@karknu)
Co-authored-by: Marcin Szamotulski (@coot)
Adding `ForkPolicy` callback rather than extending `MiniProtocol` type
(as it is done in `network-mux`'s `MiniProtocolInfo`).  This way we'll
be able to hide the policy inside `ouroboros-network` and not leak it to
`ouroboros-consensus` where the list of `MiniProtocol`s is constructed.
@coot coot force-pushed the coot/network-mux-fork-on-policy branch from 774d96e to b54fbc0 Compare February 19, 2025 18:00
@coot coot marked this pull request as ready for review February 19, 2025 18:02
@coot coot requested a review from a team as a code owner February 19, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mux issues related to network-mux
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants