From d96eeb234f25240c37204734ee4219ea8cb0d12e Mon Sep 17 00:00:00 2001 From: James Ray <16969914+jamesray1@users.noreply.github.com> Date: Thu, 24 Jan 2019 15:29:07 +1100 Subject: [PATCH] Further clarification --- pubsub/gossipsub/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pubsub/gossipsub/README.md b/pubsub/gossipsub/README.md index 566f0e1..f36c317 100644 --- a/pubsub/gossipsub/README.md +++ b/pubsub/gossipsub/README.md @@ -236,9 +236,11 @@ Topic membership is controlled by two operations supported by the router, as part of the pubsub api: - On `JOIN(topic)` the router joins the topic. In order to do so, if it already has `D` peers from the `fanout` peers of a topic, then it adds them to `mesh[topic]`, - and notifies them with a `GRAFT(topic)` control message. Otherwise, it - selects `D` peers from `peers.gossipsub[topic]`, and likewise adds them to - `mesh[topic]` and notifies them with a `GRAFT(topic)` control message. + and notifies them with a `GRAFT(topic)` control message. Otherwise, if there are + less than `D` peers (let this number be `x` in the fanout for a topic, then it + still adds them as above (if there are any), and selects the remaining number + of peers (`D-x` from `peers.gossipsub[topic]`, and likewise adds them to + `mesh[topic]` and notifies them with a `GRAFT(topic)` control message. - On `LEAVE(topic)` the router leaves the topic. It notifies the peers in `mesh[topic]` with a `PRUNE(topic)` message and forgets `mesh[topic]`.