Skip to content
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

feat!: update libp2p deps #295

Merged
merged 1 commit into from
Sep 11, 2024
Merged

feat!: update libp2p deps #295

merged 1 commit into from
Sep 11, 2024

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Sep 11, 2024

  • Bump libp2p dependencies to the newly released major versions

BREAKING CHANGE

  • All exported types relying on libp2p dependencies (eg: @libp2p/inferface, @libp2p/crypto) have been updated
  • SignableENR.createFromPeerId replaced with SignableENR.createFromPrivateKey
  • Discv5.create now takes a PrivateKey rather than a PeerId
  • ENR.peerId(): Promise<PeerId> replaced with getter ENR.peerId: PeerId

@wemeetagain wemeetagain requested a review from a team as a code owner September 11, 2024 16:48
@wemeetagain
Copy link
Member Author

cc @acolytec3

This will result a major version bump
Migration will likely will be fairly straightforward.

  • Bump these packages along with any libp2p dependencies (eg: @libp2p/interface, @libp2p/crypto)
  • See breaking changes
    • peerId -> privateKey for initialization of Discv5 / SignableENR
    • ENR.peerId is now a getter
  • Any tests that generate peerIds may need to change to generate privateKeys instead (use import {generateKeyPair} from "@libp2p/crypto/keys" instead)

@acolytec3
Copy link
Contributor

Thanks for the heads up!

@wemeetagain wemeetagain merged commit ead057d into master Sep 11, 2024
9 checks passed
@wemeetagain wemeetagain deleted the cayman/update-libp2p branch September 11, 2024 18:01
@github-actions github-actions bot mentioned this pull request Sep 11, 2024
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