js-waku icon indicating copy to clipboard operation
js-waku copied to clipboard

Support peer exchange (gossipsub)

Open D4nte opened this issue 2 years ago • 5 comments

Description

Peer exchange tl;dr: remote node include alternative peer when sending a PRUNE message as part of gossip sub mesh maintenance.

While it does not make sense for js-waku to includes peers in outgoing PRUNE messages, it would be beneficial for js-waku to decode and remember peers received from PRUNE messages and possibly connect to them.

Definition of Done

Ensure that js-waku accepts alternative peer in PRUNE messages. Review connection management and handle those peer and connect to them if the number of connected peer is below a configurable threshold.

D4nte avatar Oct 06 '21 23:10 D4nte

Best to wait for nim-waku implementation first.

D4nte avatar Dec 20 '21 01:12 D4nte

@jm-clius is gossip sub peer exchange support in nwaku?

@kaiserd @jm-clius do we want to pursue this route or should I focus on https://rfc.vac.dev/spec/34/ first/instead?

fryorcraken avatar Aug 25 '22 06:08 fryorcraken

@jm-clius is gossip sub peer exchange support in nwaku?

@kaiserd @jm-clius do we want to pursue this route or should I focus on https://rfc.vac.dev/spec/34/ first/instead?

nwaku does support gossipsub peer exchange, but it's disabled by default.

Note that due to the significant security risks associated with GossipSub PX I'd suggest rather going with RFC34 cc @kaiserd

jm-clius avatar Aug 25 '22 07:08 jm-clius

Agree with @jm-clius PX also has anonymity problems as listed in the RFC, but this is more explicit because nodes opt in to use PX, whereas gossipsub peer exchange happens on prune. We also plan to improve anonymity properties of PX in the future.

kaiserd avatar Aug 25 '22 09:08 kaiserd

In icebox as per comments above.

fryorcraken avatar Aug 31 '22 04:08 fryorcraken