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

⚡️ 0.30 RELEASE 🚀 #655

Closed
14 of 17 tasks
vasco-santos opened this issue Jun 2, 2020 · 1 comment
Closed
14 of 17 tasks

⚡️ 0.30 RELEASE 🚀 #655

vasco-santos opened this issue Jun 2, 2020 · 1 comment
Labels

Comments

@vasco-santos
Copy link
Member

vasco-santos commented Jun 2, 2020

Libp2p is becoming self sufficient on discoverability and connectivity - The first step

🔦 Highlights

📝 Type definitions

js-libp2p is now distributed with type definitions for TypeScript in its core API. We are using JSDoc to type the code inline and aegir for type checking and generate type definitions on release.

Upstream typescript projects have been leveraging projects like https://github.com/ChainSafe/libp2p-ts to have definitions for libp2p. With 0.30 typescript projects can start using the built in libp2p types.

This will also enable us to provide automated (and updated) docs, without the need to manually keep them.

🌐 Auto relay

AutoRelay enables libp2p nodes to dynamically find and bind to relays on the network. Once binding (listening) is done, the node can and should advertise its addresses to the network, allowing any other node to dial it over its bound relay(s). While direct connections to nodes are preferable, it's not always possible to do so due to NATs or browser limitations.

This is a crucial feature in terms of connectivity for some peers in the network, which will now be able to connect to other peers in a more independent fashion.

🗺 Improved Peer advertising and Dialer mechanics

Libp2p announces all the addresses a peer is listening on. However, most of the time these addresses include local private addresses, which as expected are not reachable. With peer store persistence, other peers will store (and even exchange) these local private addresses that will not be useful for others. Libp2p now supports a customAnnounceFilter function that enables via config to not announce any private addresses for instance. For simplifying this even more, libp2p-utils already has some filters that can just be imported and used.

libp2p-websockets has allowed TCP and DNS addresses, both with ws or wss, to be used for dialling. This should not be the default scenario due to security and browser policies. Now, libp2p-websockets will only support DNS based multiaddrs, as well as supporting wss only in the browser. And yes, you still need other types of multiaddrs for testing/development and we got you covered. You can override the websockets filter config easily via transport config options.

On more general dialer mechanics enhancements, the dialer will now sort the known addresses of a peer on a public and certified first logic. This way, the dialer will try to dial first the addresses that in theory will be more likely to work. This behaviour can also be configured via a custom function in the config.

Last but not least, in order for other nodes on the network to easily find a given libp2p node, this node will now recurrently find its closest peers on the network, connect to them and exchange its address records. This will enable other peers on the network to find a peer in an easier and faster fashion.

📂 Production Guides and Examples improvements

Taking into account the importante of the Auto relay, this release also comes with comprehensive examples and production guides on how the needed infrastructure blocks should be setup.

🏗 API Changes

https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.29-v0.30.md

✅ Release Checklist

  • Robustness and quality
    • Ensure that all tests are passing, this includes:
      • unit
    • Publish a release candidate to npm
      # Minor prerelease (e.g. 0.24.1 -> 0.25.0-rc.0)
      $ npx aegir release --type preminor -t node -t browser --preid rc --dist-tag next
      
      # Increment prerelease (e.g. 0.25.0-rc.0 -> 0.25.0-rc.1)
      $ npx aegir release --type prerelease -t node -t browser --preid rc --dist-tag next
    • Run tests of the following projects with the new release:
  • Documentation
    • Ensure that README.md is up to date
    • Ensure that all the examples run
    • Ensure that libp2p/docs is updated
  • Communication
    • Create the release issue
    • Take a snapshot between of everyone that has contributed to this release (including its subdeps in IPFS, libp2p, IPLD and multiformats) using name-your-contributors. Generate a nice markdown list with this script
    • Announcements (both pre-release and post-release)
    • Blog post
    • Copy release notes to the GitHub Release description

❤️ Huge thank you to everyone that made this release possible

In alphabetical order, here are all the humans that contributed to the 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:

⁉️ Do you have questions?

The 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.

@jacobheun
Copy link
Contributor

Related to connection gating: #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants