Vendor patched libp2p-stream instead of forking libp2p - #217
Open
kalabukdima wants to merge 2 commits into
Open
Conversation
The kalabukdima/rust-libp2p fork patched nothing but protocols/stream: an unbounded dial channel and Control::accept_with_capacity, both fixing streams that upstream silently drops under concurrency. Carrying them as a fork of the whole workspace also forced a [patch.crates-io] for libp2p-identity on every downstream crate. Copy the one patched crate into the transport crate instead and take the rest of libp2p from crates.io at the version the fork is based on. - Add crates/transport/src/libp2p_stream: upstream rust-libp2p aefbfbdc (MIT) plus the two patches, and upstream's tests for them; unchanged apart from module paths, rand::rng() and this repo's rustfmt - Point libp2p and friends at crates.io 0.56.0, drop the identity patch - Drop the now-unreachable OpenStreamError arm and derive ClientBehaviour's Default: #[non_exhaustive] and clippy treat the types as local now The fork branched 26 commits past the v0.56.0 release, so the released crates are not identical to its tree: libp2p-core 0.43.1 -> 0.43.2, libp2p-swarm 0.47.0 -> 0.47.1, libp2p-quic 0.13.0 -> 0.13.1, and libp2p-kad and libp2p-gossipsub back to the released 0.48.0 and 0.49.5. That picks up the fixes for GHSA-5hq8-qhww-jm7q (quic panicking on certificate validation failure) and for three gossipsub advisories published after the fork's base, at the cost of the unreleased gossipsub 0.50.0 changes the fork carried. The one behavioural delta that reaches us: pubsub builds gossipsub with the default subscription filter, which is now capped at 2000 topics. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Propagate terminal dial failures, deduplicate queued dials, clean up closed connection senders, and add regression coverage for the local concurrency patches. Co-Authored-By: Codex <codex@openai.com>
This file contains hidden or 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
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.
The
kalabukdima/rust-libp2pfork patched onlyprotocols/stream.Copy the one patched crate into the transport crate instead and take the rest of libp2p from crates.io at the version the fork is based on.