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.28 RELEASE 🚀 #603

Closed
7 of 18 tasks
vasco-santos opened this issue Apr 6, 2020 · 4 comments
Closed
7 of 18 tasks

⚡️ 0.28 RELEASE 🚀 #603

vasco-santos opened this issue Apr 6, 2020 · 4 comments

Comments

@vasco-santos
Copy link
Member

vasco-santos commented Apr 6, 2020

The peer-store revamp with an easier management of peers' data and persistence!

🗺 What's left for release

js-ipfs integration

🔦 Highlights

📜 Improved PeerStore towards v2

Libp2p's PeerStore is responsible for keeping an updated register with the relevant information of the known peers. It should be the single source of truth for all peer data, where a subsystem can learn about peers' data and where someone can listen for data updates.

The initial design of the PeerStore (formerly known as peer-book) was not implemented with some functionalities in mind that we plan to land over the next releases, so that node connectivity and connection management are improved.

The PeerStore will now comprise four main components: addressBook, keyBook, protoBook and metadataBook. With this separation of concerns, libp2p now provides a PeerStore API so that known data of a peer can be easily added and a persistence layer, in order to enable faster connectivity on subsequent node starts, since it will not to discover the stored peers one more time to establish a connection with them.

With this revamp of the PeerStore, the building blocks for the PeerStore v2 are created. As a result, we will be able to focus on the PeerStore v2 over the coming releases, which might add multiaddr confidence, peer scoring, among other improvements aiming to improve connectivity efficiency and connection management.

♻️ Removed peer-info abstraction layer

PeerInfo is a libp2p peer abstraction layer that combines a PeerId with known data of the peer, namely its multiaddrs and protocols. It has been used for a long time by js-libp2p and its modules to carry this data around the libp2p stack, as well as by the libp2p API, both for providing this data to the users or to receive it from them.

Since this PeerInfo instances were navigating through the entire codebases, some data inconsistencies could be observed in libp2p. Different libp2p subsystems were running with different visions of the known peers data. For instance, a libp2p subsystem receives a copy of this instance with the peer multiaddrs and protocols, but if new data of the peer is obtained from other subsystem, it would not be updated on the former. Moreover, considering that several subsystems were modifying the peer data, libp2p had no visibility on which data was the updated and the older one.

Considering the complete revamp of the libp2p PeerStore towards its second version. With this new PeerStore acting as the single source of truth, we do not need to carry [PeerInfo][peer-info] instances around. This also solves all the problems stated above, since subsystems will report new observations to the PeerStore and it will provide clear and updated picture of the known peers' data.

Given that peer-info is being deprecated, all the API methods with parameters or return values were changed in favour of the peer-id. If someone need more information about the peer, it is now recommended to use the PeerStore API.

⚙️ Address Manager

With the deprecation of the peer-info module, js-libp2p must provide a new way of specifying which multiaddrs should be used by its underlying transports to listen for new connections. With this in mind and some other discussions regarding supporting announce and noAnnounce addresses in the past, we created the Address Manager.

With this release, js-libp2p supports the configuration of listen, announce and noAnnounce multiaddrs. These will be used to create the Address Manager (listen) and by other subsystems which announce the peer addresses to the outside world (announce and noAnnounce).

🛡️Full support for ed25519 keys and noise handshake protocol

js-ibp2p now fully supports ed25519 keys and JS nodes can establish connections with GO nodes using them!

Thanks to NodeFactoryIo, js-libp2p now supports the noise handshake protocol through NodeFactoryIo/js-libp2p-noise module. This module is now fully supported and tested through the libp2p codebase and is interoperable with the noise implementation for go-libp2p.

🔒Out of the box keychain

Libp2p already provided the libp2p-keychain module that users could use for key management and cryptographically protected messages. However, users would need to properly setup the keychain as a separate piece of the stack.

In 0.28, libp2p keychain is now part of the libp2p core 🎉. As a result, libp2p users can now provide the keychain configuration through the libp2p config and use the keychain via its API, i.e libp2p.keychain.

🏗 API Changes

See the API.md readme for detailed usage on the new API and the migration guide v0.27 to v0.28.

Significant breaking changes are briefly listed below:

  • All peerInfo usage
  • libp2p.peerStore

✅ 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
  • 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

TODO

🙌🏽 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

FYI: All code slated for the 0.28 release will be merged into the 0.28.x branch during development.

@jacobheun jacobheun pinned this issue Apr 24, 2020
@vasco-santos
Copy link
Member Author

vasco-santos commented May 14, 2020

After release checklist:

Issues to close on release:

@jacobheun
Copy link
Contributor

The initial rc 0.28.0-rc.0 is out, it can be installed via npm install libp2p@next.

Please keep in mind that dependencies that required breaking changes due to the removal of PeerInfo will need to be installed with via their beta tag, such as npm install libp2p-webrtc-star@beta. You can check specific modules via npm show (npm show libp2p-webrtc-star) to see if a beta version exists, if so you should use that for 0.28. Once the release is ready we will change the beta version to latest for all affected modules.

@jacobheun
Copy link
Contributor

0.28.0 has been released. We've also updated npm dist-tags for everything that had a breaking change due to PeerInfo being removed, so npm install will now install modules compliant with 0.28.

achingbrain pushed a commit to ipfs/js-ipfs that referenced this issue Jun 8, 2020
This PR updates libp2p usage to `0.28.x`. 

The biggest impact in `js-ipfs` is the deprecation of `PeerInfo`, which creates breaking changes in several parts of the libp2p API.

For more information you can check the libp2p migration guide and release notes:

- [libp2p/js-libp2p/doc/migrations/v0.27-v.28.md](https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.27-v.28.md)
- [libp2p/js-libp2p#603](libp2p/js-libp2p#603)

BREAKING CHANGES:

- `.libp2p` property of `ipfs` nodes now supports 0.28.x libp2p API
- `PeerInfo` is no longer exported from `require('ipfs')`
@jacobheun jacobheun unpinned this issue Jul 6, 2020
github-actions bot pushed a commit to ipfs-examples/js-ipfs-custom-libp2p that referenced this issue Jun 14, 2021
This PR updates libp2p usage to `0.28.x`. 

The biggest impact in `js-ipfs` is the deprecation of `PeerInfo`, which creates breaking changes in several parts of the libp2p API.

For more information you can check the libp2p migration guide and release notes:

- [libp2p/js-libp2p/doc/migrations/v0.27-v.28.md](https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.27-v.28.md)
- [libp2p/js-libp2p#603](libp2p/js-libp2p#603)

BREAKING CHANGES:

- `.libp2p` property of `ipfs` nodes now supports 0.28.x libp2p API
- `PeerInfo` is no longer exported from `require('ipfs')`
oliveriosousa pushed a commit to ipfs-examples/js-ipfs-examples that referenced this issue Jul 26, 2021
This PR updates libp2p usage to `0.28.x`. 

The biggest impact in `js-ipfs` is the deprecation of `PeerInfo`, which creates breaking changes in several parts of the libp2p API.

For more information you can check the libp2p migration guide and release notes:

- [libp2p/js-libp2p/doc/migrations/v0.27-v.28.md](https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.27-v.28.md)
- [libp2p/js-libp2p#603](libp2p/js-libp2p#603)

BREAKING CHANGES:

- `.libp2p` property of `ipfs` nodes now supports 0.28.x libp2p API
- `PeerInfo` is no longer exported from `require('ipfs')`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants