Skip to content

feat!: update to libp2p v3 api#532

Draft
achingbrain wants to merge 5 commits into
masterfrom
feat/upgrade-to-libp2p-v3-api
Draft

feat!: update to libp2p v3 api#532
achingbrain wants to merge 5 commits into
masterfrom
feat/upgrade-to-libp2p-v3-api

Conversation

@achingbrain
Copy link
Copy Markdown
Collaborator

Refactors code to conform to the libp2p@3.x.x API.

  • Encrypted streams are now EventTargets

BREAKING CHANGE: Must be used with libp2p@3.x.x, it cannot be used with earlier versions

@achingbrain achingbrain force-pushed the feat/upgrade-to-libp2p-v3-api branch from a1c90fd to 06b6298 Compare September 24, 2025 06:36
@achingbrain
Copy link
Copy Markdown
Collaborator Author

achingbrain commented Sep 24, 2025

Opened as a draft because the tests still need a bit of work. The mock network code was removed from @libp2p/interface-compliance-tests - to bridge the gap I think multistream-select just needs to run here.

Refactors code to conform to the `libp2p@3.x.x` API.

- Encrypted streams are now EventTargets

BREAKING CHANGE: Must be used with `libp2p@3.x.x`, it cannot be used with earlier versions
@achingbrain achingbrain force-pushed the feat/upgrade-to-libp2p-v3-api branch from 06b6298 to ccd5191 Compare September 24, 2025 06:41
@christroutner
Copy link
Copy Markdown

I'm eagerly waiting to see this PR get merged. I'm waiting to upgrade from v2 to v3 of libp2p and v5 to v6 of helia, until this is complete. My application depends on pubsub and its currently broken with those newer versions.

@achingbrain
Copy link
Copy Markdown
Collaborator Author

achingbrain commented Apr 1, 2026

@christroutner there's a stopgap version you can use at @libp2p/gossipsub but you should revert to @chainsafe/libp2p-gossipsub as soon at it's compatible with libp2p@3.x.x.

For this PR to move forward, it may just need @dozyio's changes from libp2p/js-libp2p#3424 patching in.

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