forked from libp2p/rust-libp2p
-
Notifications
You must be signed in to change notification settings - Fork 0
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
transports/quic: Refactor Muxer and Connection #23
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ibp2p#2752) Document that the `ConnectionHandler` implementation has to enforce a limit on the number of inbound substreams.
…ibp2p#2734) * misc/metrics: Explicitly delegate event recording to each recorder This allows delegating a single event to multiple `Recorder`s. That enables e.g. the `identify::Metrics` `Recorder` to act both on `IdentifyEvent` and `SwarmEvent`. The latter enables it to garbage collect per peer data on disconnects. * protocols/dcutr: Expose PROTOCOL_NAME * protocols/identify: Expose PROTOCOL_NAME and PUSH_PROTOCOL_NAME * protocols/ping: Expose PROTOCOL_NAME * protocols/relay: Expose HOP_PROTOCOL_NAME and STOP_PROTOCOL_NAME * misc/metrics: Track # connected nodes supporting specific protocol An example metric exposed with this patch: ``` libp2p_identify_protocols{protocol="/ipfs/ping/1.0.0"} 10 ``` This implies that 10 of the currently connected nodes support the ping protocol.
…nd,address_change,close}` (libp2p#2724) Instead of having a mix of `poll_event`, `poll_outbound` and `poll_close`, we flatten the entire interface of `StreamMuxer` into 4 individual functions: - `poll_inbound` - `poll_outbound` - `poll_address_change` - `poll_close` This design is closer to the design of other async traits like `AsyncRead` and `AsyncWrite`. It also allows us to delete the `StreamMuxerEvent`.
* build(deps): Bump Swatinem/rust-cache from 1.4.0 to 2.0.0 Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 1.4.0 to 2.0.0. - [Release notes](https://github.com/Swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](Swatinem/rust-cache@cb2cf0c...6720f05) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Follow up on libp2p#2724. Given that libp2p-core is bumped to v0.35.0, libp2p-tcp needs to be bumped as well.
….0 (libp2p#2761) * build(deps): Update prometheus-client requirement from 0.16.0 to 0.17.0 Updates the requirements on [prometheus-client](https://github.com/prometheus/client_rust) to permit the latest version. - [Release notes](https://github.com/prometheus/client_rust/releases) - [Changelog](https://github.com/prometheus/client_rust/blob/master/CHANGELOG.md) - [Commits](prometheus/client_rust@v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: prometheus-client dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
We are already boxing the given object so we might as well pin to to avoid the `Unpin` trait bound.
…rBox` (libp2p#2775) `StreamMuxerBox` is never shared across threads but owned by a single connection. Restricting it to be `Sync` unnecessarily limits the design space around the `StreamMuxer` trait and its implementations.
…ibp2p#2765) Co-authored-by: Elena Frank <[email protected]> Co-authored-by: Max Inden <[email protected]>
Discussed in libp2p#2722.
Generate `NetworkBehaviour::OutEvent` if not provided through `#[behaviour(out_event = "MyOutEvent")]` and event processing is disabled (default).
With if-watch `2.0.0` `IfWatcher::new` is not async anymore, hence the `IfWatch` wrapping logic is obsolete. Co-authored-by: Thomas Eizinger <[email protected]>
In case we accidentally generate the same port twice, we will try to issue two dial attempts to the same address but also expect two dial errors which is exactly what this test is trying to catch. Unfortunately, the assertion is badly written and does not catch duplicate inputs.
…X25519 DH key exchange (libp2p#2887) Co-authored-by: Max Inden <[email protected]>
This patch fixes an issue where we couldn't use type parameters on a behaviour with a custom out event that had different type parameters.
The existing implementation was based on an old API of the quinn_proto Endpoint which by now has changed. In particular we can not explicitly `accept` new connections on the endpoint anymore. Instead if there is a new connections and our channel for new connections is full because the endpoint is too busy, we now simply drop the connection to backpressure the remote.
elenaf9
changed the title
transports/quic: Muxer and Connection
transports/quic: Refactor Muxer and Connection
Sep 22, 2022
15 tasks
🎉 |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Replaces elenaf9#6, which targeted an outdated branch. See that PR for more info.
Links to any relevant issues
Part of libp2p#2883.