Tech Titans Tackle Troubling Glitch: Direct Peering Data Receives Critical Overhaul
Mystery Solved as Workers Administer Fix to Obscure Node Behavior, Ensuring Seamless Connections in Peer-to-Peer Networks!
Commit Details:
fix: direct peering data needs to be processed by the worker due to obscure node behavior (#2303) ## Why is this change needed? Peer id validation performs a check of the existence of an object key that is a `symbol`. When we pass this over to the gossip node worker, the structuredClone copy drops this key (and functions), which was causing a crash when using direct peers. The loss of functions would have been more pronounced in discovering this, but because the check was on the symbol first, it appeared to be a libp2p bug, until it was discovered the symbol-based key itself was being omitted per specification. ## 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) - [ ] 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 focuses on updating the direct peering data handling in the `hubble` and `gossipNodeWorker` modules. ### Detailed summary - Updated `directPeers` type to `string[]` in `hubble.ts` and `gossipNode.ts` - Modified direct peer address processing logic in `cli.ts` and `gossipNodeWorker.ts` - Added `parseAddress` function import in `gossipNodeWorker.ts` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->