libp2p / js-libp2p

The JavaScript Implementation of libp2p networking stack.
https://libp2p.github.io/js-libp2p/
Other
2.34k stars 447 forks source link

fix!: make circuit relay listen on addresses like other transports #2776

Closed achingbrain closed 1 month ago

achingbrain commented 1 month ago

Refactors the circuit relay transport to behave like other transports

  1. Specify the addresses to listen on in the addresses.listen config
  2. Remove the discoverRelays option
  3. Remove the transport manager listen call to just listen on configured addresses
  4. Emit the listen event when listen addresses change like other transports

This fixes the instances where we miss relay address updates and the corresponding self:peer:update event never fires.

BREAKING CHANGE: The discoverRelays option has been removed, instead add one or more instances of "/p2p-circuit" to the libp2p config under the addresses.listen key

Change checklist