Skip to content

Vendor patched libp2p-stream instead of forking libp2p - #217

Open
kalabukdima wants to merge 2 commits into
address-cachefrom
vendor-libp2p-stream
Open

Vendor patched libp2p-stream instead of forking libp2p#217
kalabukdima wants to merge 2 commits into
address-cachefrom
vendor-libp2p-stream

Conversation

@kalabukdima

Copy link
Copy Markdown
Contributor

The kalabukdima/rust-libp2p fork patched only protocols/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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants