libp2p / devgrants

want to hack on libp2p? this repo tracks libp2p endeavors eligible for incentivization.
https://libp2p.io
Other
40 stars 3 forks source link

Add support for Addrs {listen, announce, noAnnounce} on js-libp2p #14

Closed vasco-santos closed 4 years ago

vasco-santos commented 5 years ago

Motivation and context

With the advances on js-libp2p config, we can allow users to configure which of their own addresses they want to use for listening, as well as as the addresses that they are willing to announce to other peers in the network.

Reference:

Value

Having more control over how addresses are announced to the network greatly improves the potential availability of nodes on the network, and greatly simplifies node deployment. For example, when running a node on an EC2 instance of inside of a container, it's necessary to be able to announce the public address of the node rather than the listening addresses.

Benefits (if addressed)

go-libp2p already supports this, and we would be able to get js-libp2p feature parity closer with this. Moreover, js-libp2p has been prone to some issues regarding dialing, which would be mitigated by adding this feature. Some examples:

Risks (if not addressed)

Nodes that are not announcing reliable, public addresses risk not being dialable and create a burden for other nodes when doing so.

Expected output and constraints

An updated to js-libp2p to include the logic described at https://github.com/libp2p/js-libp2p/issues/202#issuecomment-461070174. This should allow for specifying a new set of options when creating a Libp2p instance, to control what addresses are announced to the network.

Design/implementation notes

@jacobheun proposal on libp2p/js-libp2p#202#issuecomment-461070174

raulk commented 5 years ago

@vasco-santos I'm not sure this is substantial enough to be a scoped project worth rewarding via a devgrant. How long do you estimate this would take you or @jacobheun to implement?

jacobheun commented 4 years ago

This has been added in js-libp2p 0.28.