Skip to content

Upgrade to libp2p 0.56.0 - #3306

Open
Dentosal wants to merge 6 commits into
masterfrom
dento/libp2p-0.56.0
Open

Dentosal wants to merge 6 commits into
masterfrom
dento/libp2p-0.56.0

Conversation

@Dentosal

@Dentosal Dentosal commented May 18, 2026

Copy link
Copy Markdown
Contributor

Bump libp2p to latest version. Vendors libp2p-swarm 0.45.1 to avoid a version conflict for version-compatibility tests: libp2p-swarm 0.45 (required by fuel-core-bin 0.44.0) pins libp2p-swarm-derive=0.35.0, while libp2p-swarm 0.47 (required by new libp2p 0.56) pins =0.35.1. They share the same 0.35.x semver bucket, so Cargo can't handle that.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

@Dentosal Dentosal self-assigned this May 18, 2026
@cursor

cursor Bot commented May 18, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Medium risk due to a major libp2p dependency upgrade impacting networking behaviours, request/response events, and metrics wiring. Most code changes are mechanical API adaptations, but runtime connectivity and scoring/metrics should be re-validated.

Overview
Upgrades P2P dependencies, notably libp2p to 0.56.0 and prometheus-client to 0.23.0, with corresponding lockfile churn and an added changelog entry.

Updates the P2P service to compile against new libp2p APIs: gossipsub metrics are now attached via .with_metrics(...), request/response events handle new struct fields, Swarm::new_ephemeral_tokio is used in tests, and PublishError::InsufficientPeers handling is switched to NoPeersSubscribedToTopic.

Cleans up removed/obsolete deps and types (e.g., replaces void::Void with Infallible and void::unreachable with exhaustive matches), adds an explicit libp2p-gossipsub dependency to satisfy unused-dep linting, and introduces a version-compatibility workspace patch that vendors libp2p-swarm 0.45.1 to resolve a libp2p-swarm-derive version conflict.

Reviewed by Cursor Bugbot for commit c9ce85d. Bugbot is set up for automated code reviews on this repo. Configure here.

@Dentosal
Dentosal marked this pull request as ready for review May 19, 2026 15:54
@Dentosal
Dentosal requested review from a team and xgreenx as code owners May 19, 2026 15:54
@Dentosal Dentosal removed their assignment May 29, 2026
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.

1 participant