Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up⚡️ 0.27 RELEASE 🚀 The Async / Await refactor #487
Comments
This comment has been minimized.
This comment has been minimized.
|
We'll be working on testing, and finishing up a few more docs and a migration guide in preparation for an official RC. If you start using the prerelease please let us know what your experience is like! |
This comment has been minimized.
This comment has been minimized.
|
When using the prerelease you will need to install the
|
This comment has been minimized.
This comment has been minimized.
|
We've published a new pre release, 0.27.0-pre.1. It includes some fixes and coalescing dial support. We're looking to get a Release Candidate out this week. If you start testing the release early please let us know if you have any feedback! |
This comment has been minimized.
This comment has been minimized.
|
A new pre release has been published, 0.27.0-pre.2. As we've been working through some downstream integration testing we discovered a few bugs and added a few convenience methods and configurations. We are continuing testing this week as we push towards a stable RC. A full list of the changes will be included in the final change log. |
This comment has been minimized.
This comment has been minimized.
|
The official Release Candidate is out! v0.27.0-rc.0. We'll be doing final testing against the RC to make sure everything is good and will follow with the official release of 0.27.0. |
This comment has been minimized.
This comment has been minimized.
|
The 0.27 release is out, https://github.com/libp2p/js-libp2p/releases/tag/v0.27.0! Blog post and social media announcements will be coming shortly. |
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.
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.
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!
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.
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.
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.
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!
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, formerlypeerBookto 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.We're making
statsdisabled by default and they are now available atlibp2p.metricsinstead 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.See the API.md readme for detailed usage on the new API. Significant breaking changes are detailed below.
libp2p.peerBookis nowlibp2p.peerStoreto match common libp2p terminology.libp2p.statsis nowlibp2p.metrics.libp2p.pubsub.lsis nowlibp2p.pubsub.getTopics.libp2p.pubsub.peersis notlibp2p.pubsub.getSubscribers.libp2p.pingnow simply returns the latency of the ping. See the migration guide for more details.In alphabetical order, here are the 60 humans that made 1241 contributions to this release:
🙌🏽 Want to contribute?
Would you like to contribute to the libp2p project and don't know how? Well, there are a few places you can get started:
help wantedlabel in the libp2p repoThe best place to ask your questions about libp2p, how it works and what you can do with it is at discuss.libp2p.io. We are also available at the #libp2p channel on Freenode.