Tech Revolution: libp2p Surges to v0.45.0 in Major Upgrade!
Enhanced Connectivity and Streamlined Interfaces Propel P2P Networking Forward, Ushering in a New Era of Efficient Communication!
Commit Details:
chore: bump libp2p to v0.45.0 (#2209) ## Why is this change needed? Upgrades libp2p one minor version up ([Release Notes](https://github.com/libp2p/js-libp2p/releases/tag/v0.45.0) | [Migration Guide](https://github.com/libp2p/js-libp2p/blob/main/doc/migrations/v0.44-v0.45.md)) By extension, upgrades GossipSub two major versions up due to libp2p interface compatibility breakage (does not break protocol compatibility). ### Breaking Changes in Events + Emitters libp2p altered the events to be more precisely aligned for types to event names, and so our use of `peer:connect` and `peer:disconnect` becomes `connection:open` and `connection:close`. Additionally the peer store's address book methods have been coalesced into its parent type with more fluent interfaces. These too have been upgraded. ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [x] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [x] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR updates dependencies, refactors error handling in peer loading, adds test cases for multiaddr formats, and enhances GossipNode event handling. ### Detailed summary - Updated `@libp2p/interface-mocks` to `^12.0.0` - Refactored error handling in `store.ts` - Added test cases for multiaddr formats in `gossipNode.test.ts` - Enhanced event handling in `gossipNode.ts` and `gossipNodeWorker.ts` > The following files were skipped due to too many changes: `apps/hubble/src/network/p2p/gossipNodeWorker.ts`, `yarn.lock`, `node_modules/@libp2p/peer-store/yarn.lock`, `node_modules/@libp2p/peer-store/dist/index.min.js` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->