[Snyk] Upgrade libp2p from 0.23.1 to 0.27.3 #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade libp2p from 0.23.1 to 0.27.3.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.Release notes
Package name: libp2p
Bug Fixes
Bug Fixes
Bug Fixes
🔦 Highlights
📜 Improved docs
We've done an overhaul of our docs to make libp2p easier to use. Among other docs in the new doc folder, you can find a full list of exposed methods in the API.md, and a guide on how to configure libp2p in CONFIGURATION.md. We've also created a Getting Started guide for anyone starting out with libp2p.
⌚️ Async/Await instead of Callbacks
All callback APIs have been change to be async / await compliant. See the API.md readme for detailed usage. When migrating, you can leverage the migration guide to see samples on some of the common migrations you may need to make.
🚰 Streaming Iterables instead of Pull Streams
Now that readable streams are async iterable, we can leverage Streaming Iterables instead of Pull Streams to greatly simplify the internal stream logic of libp2p. Among other things, this makes debugging streams much easier. You can check out the it-awesome repo for a list of an increasing number of modules built for the streaming iterables ecosystem. This also includes modules to convert to and from pull streams if you need to refactor your applications over time. If you're having trouble migrating, please feel free to reach out on the discuss forums!
📞 Clearer Connections
We've created a whole new Connection Interface! Creating multiple streams off of a single connection is now much clearer, and every stream created is tracked in the Connection. This makes it much easier to keep track of every open stream, which greatly empowers resource management in js-libp2p.
⏹ Abortable Dials
We've reconstructed transports and connections from the ground up. This gives us the ability to pass an AbortSignal when dialing, so we can now properly terminate connections early. This also means we'll be able to add proper support for parallel dials to reduce connection times without running the risk of lingering dials.
🆔 The Identify Push Protocol
Identify Push is now available in js-libp2p. As a libp2p node changes its Multiaddrs (changes in networks) or protocols, it will broadcast those changes to all connected peers. Once support for AutoNAT and AutoRelay is added to js-libp2p, we will be able to broadcast those changes maximizing the effectiveness of those protocols.
🔍 Plaintext 2 for testing
We've upgraded from Plaintext 1 to 2. If you need to test things locally without encryption to see what's going on over the wire, Plaintext 2 makes this more viable. Public Keys are now exchanged, which is required by many protocols. This should NEVER be used in production, happy testing!
🙏 More polite connections
Currently when two nodes connect, they will actively ask each other what protocols they support. This ends up being multiple checks in parallel, rather than getting the information from a single Identify check. js-libp2p will now only use Identify. This greatly reduces network chatter. The
peerStore
, formerlypeerBook
to better match common libp2p terminology, will now emit change events for protocols. Applications that need to check for protocol support can now politely listen for updates, instead of actively checking every peer that connects.📊Stats (now Metrics) can now be enabled/disabled
We're making
stats
disabled by default and they are now available atlibp2p.metrics
instead oflibp2p.stats
. You can enable metrics if you need them, but for performance reasons we have disabled them by default. Good news, if you need to run them they're more performant as we've moved away from event emitting in metrics. This greatly reduces the amount of processing that happens until you explicitly request something! You can read more about Metrics at METRICS.md.🏗 API Changes
See the API.md readme for detailed usage on the new API. Significant breaking changes are detailed below.
libp2p.peerBook
is nowlibp2p.peerStore
to match common libp2p terminology.libp2p.stats
is nowlibp2p.metrics
.libp2p.pubsub.ls
is nowlibp2p.pubsub.getTopics
.libp2p.pubsub.peers
is notlibp2p.pubsub.getSubscribers
.libp2p.ping
now simply returns the latency of the ping. See the migration guide for more details.Bug Fixes
Features
Bug Fixes
Bug Fixes
Features
Features
Bug Fixes
Features
Bug Fixes
Bug Fixes
Commit messages
Package name: libp2p
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs