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

fix: direct peering data needs to be processed by the worker due to obscure node behavior #2303

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

CassOnMars
Copy link
Member

@CassOnMars CassOnMars commented Sep 10, 2024

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


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}

@CassOnMars CassOnMars added the t-bug A fix for a bug with the current system label Sep 10, 2024
Copy link

changeset-bot bot commented Sep 10, 2024

🦋 Changeset detected

Latest commit: e79ab6a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farcaster/hubble Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hub-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 9:05pm

@CassOnMars CassOnMars merged commit ec80ff3 into main Sep 10, 2024
8 checks passed
@CassOnMars CassOnMars deleted the cassie-heart/direct-peer branch September 10, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-bug A fix for a bug with the current system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant