-
Notifications
You must be signed in to change notification settings - Fork 402
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
perf(hubble): improve libp2p sync #1912
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is an install script?Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts. Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
cb616d2
to
0e9d202
Compare
0e9d202
to
d3c9cdb
Compare
runs_on: 'buildjet-8vcpu-ubuntu-2204' | ||
- node_version: 20 | ||
- node_version: 21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep both 20 and 21 (but can remove 18) from the matrix
// Hashes the raw message data | ||
return noSignMsgId(msg.data); | ||
const id = noSignMsgId(msg.data); | ||
if (id instanceof Promise) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can just "await id" right, and javascript will handle both the promise and non-promise cases
@@ -1253,7 +1253,7 @@ class SyncEngine extends TypedEmitter<SyncEvents> { | |||
let fetchMessagesThreshold = HASHES_PER_FETCH; | |||
// If we have more messages but the hashes still mismatch, we need to find the exact message that's missing. | |||
if (ourNode && ourNode.numMessages >= 1) { | |||
fetchMessagesThreshold = 1; | |||
fetchMessagesThreshold = HASHES_PER_FETCH / 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this line from this PR. We'll remove this whole concept from the DiffSync v2 PR
Pretty cool. I thought upgrading will be very messy, but looks quite managable. |
everything and needs a major overhaul, and now it does not properly handle peer discovery or connection management, and the connection manager is a nonsensical dumpster fire of spaghetti code
d3c9cdb
to
68d26aa
Compare
Closing due to age, and not actively being pursued. Thanks! |
Motivation
Change Summary
Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewAdditional Context
Before
After
PR-Codex overview
This PR updates dependencies, refactors PeerId imports, and improves IP family handling.
Detailed summary
@libp2p/interface
ipFamilyFromString
function