Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

feat: allow user defined services #375

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Apr 17, 2023

Adds types to libp2p to allow user defined services.

Removes all non-essential services to allow them to be defined alongside any custom user versions.

This increases the modularity of libp2p as default protocols like identify, fetch and ping will not be enabled unless specifically allowed by the user, which also decreases the attack surface area of libp2p applications.

pubsub, dht, ping, fetch and identify have been removed - re-enable these by passing them as services

@achingbrain
Copy link
Member Author

Blocked on libp2p/js-libp2p#1563

Adds types to libp2p to allow user defined services.

Removes all non-essential services to allow them to be defined
alongside any custom user versions.

This increases the modularity of libp2p as default protocols like
identify, fetch and ping will not be enabled unless specifically
allowed by the user, which also decreases the attack surface area
of libp2p applications.

BREAKING CHANGE: pubsub, dht, ping, fetch and identify have been removed - re-enable these by passing them as services
@achingbrain achingbrain force-pushed the feat/allow-user-defined-services branch from ba6ce9f to d72bbd3 Compare April 17, 2023 13:57
@achingbrain achingbrain marked this pull request as draft April 17, 2023 15:55
Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@achingbrain achingbrain changed the title feat!: allow user defined services feat: allow user defined services Apr 21, 2023
@achingbrain achingbrain marked this pull request as ready for review April 27, 2023 14:45
@achingbrain achingbrain merged commit 13cf442 into master Apr 27, 2023
@achingbrain achingbrain deleted the feat/allow-user-defined-services branch April 27, 2023 14:46
github-actions bot pushed a commit that referenced this pull request Apr 27, 2023
## [@libp2p/interface-libp2p-v3.0.0](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-libp2p-v2.0.0...@libp2p/interface-libp2p-v3.0.0) (2023-04-27)

### ⚠ BREAKING CHANGES

* pubsub, dht, ping, fetch and identify have been removed - re-enable these by passing them as services

### Features

* allow user defined services ([#375](#375)) ([13cf442](13cf442))

### Documentation

* fix typos in docs ([#386](#386)) ([8ec2cdc](8ec2cdc))
@github-actions
Copy link

🎉 This PR is included in version @libp2p/interface-libp2p-v3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants