This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
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.
The dependency libp2p was updated from
0.25.5
to0.26.0
.This version is not covered by your current version range.
If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
Publisher: jacobheun
License: MIT
Release Notes for v0.26.0
🔦 Highlights
🗣 Gossipsub
Thanks to the awesome work of the ChainSafe team, Gossipsub is here! Gossipsub is a much more efficient pubsub router than Floodsub. Intead of broadcasting to all of its peers, it broadcasts to a controlled subset of peers. To learn more about how Gossipsub works and where it differs from Floodsub, check out the Spec.
If you are using Pubsub you can now switch to using Gossipsub instead of Floodsub. Have old peers you need to flood stuff to? Don't worry, Gossipsub will automatically fallback to Floodsub for peers that don't support it. See the API Changes section below for how to migrate your config over to using Gossipsub.
🚉 Promisify
As we migrate to async/await we are promisifying the Libp2p public methods. Several lower level libraries are currently leveraging libp2p for testing. Their transition to full async/await will be greatly helped by promisifying the libp2p API. Once the async/await changes are propagated up, we will remove Promisify in a future update, along with callback support, as libp2p will have full async/await support at that time. See the API Changes below to check out the Breaking Changes.
🏗 API Changes
BREAKING CHANGES
Configuration
Switch Options
Configuration for
libp2p-switch
has changed.blacklistTTL
andblackListAttempts
have been changed todenyTTL
anddenyAttempts
respectively. You can set these as follows:Pubsub
Subscribe: To comply with the pubsub interface, the order of params for
libp2p.pubsub.subscribe
have been reordered. They were previouslytopic, options, handler, callback
, and are nowtopic, handler, options, callback
. If your implementation does not useoptions
you should be able to ignore this change.Config: Pubsub was previously enabled via the
EXPERIMENTAL
config. You must now specify your pubsub implementation (Gossipsub or Floodsub), and enable/disable it via it's own configuration. Setting pubsub will automatically enable it. You can disable it by explicitly setting enabled to false in the configuration .Promisify
All libp2p public methods have been promisified, so callbacks can be omitted in favor of promise based usage, including async/await. For example,
start
can be used as:Gossipsub
Gossipsub is integrated into the existing
libp2p.pubsub
API. Once Gossipsub has been supplied as your pubsub implementation, you will be able to use it just as Floodsub was previously used. See the section above for pubsub configuration changes.Commits
The new version differs by 21 commits.
d788433
chore: release version v0.26.0
d5a977b
chore: update contributors
0489972
chore: release version v0.26.0-rc.3
3f31b1f
chore: update contributors
a2b3446
docs: async migration (#397)
ff7a6c8
fix: promisified methods (#398)
9a8d609
chore: release version v0.26.0-rc.2
9fef58c
chore: update contributors
684f283
chore: update switch (#395)
3e95e6f
fix: dont override methods of created instance (#394)
f4f3f0f
fix: pubsub default config (#393)
7c2c852
chore: release version v0.26.0-rc.1
e8d8aab
chore: update contributors
dd48d26
chore: promisify pubsub start and stop (#392)
99a5359
chore: release version v0.26.0-rc.0
There are 21 commits in total.
See the full diff
FAQ and help
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper bot 🌴