Module P2p_cyclon

CYCLON: Inexpensive Membership Management for Unstructured P2P Overlays

This is an OCaml implementation of the CYCLON protocol as specified in the paper CYCLON: Inexpensive Membership Managementfor Unstructured P2P Overlays.

Protocol

  1. Increase by one the age of all neighbors.
  2. Select neighbor Q with the highest age among all neighbors, and l - 1 other random neighbors.
  3. Replace Q's entry with a new entry of age 0 and with P's address.
  4. Send the updated subset to peer Q.
  5. Receive from Q a subset of no more that i of its own entries.
  6. Discard entries pointing at P and entries already contained in P's cache.
  7. Update P's cache to include all remaining entries, by firstly using empty cache slots (if any), and secondly replacing entries among the ones sent to Q.

Quoted from the paper above.

Security

CYCLON is not secure against malicious nodes deviating from the protocol. See URPS for a stream sampler implementation that achieves uniformity in presence of malicious nodes and which can be used together with CYCLON.

module Make : functor (Node_id : P2p.S.NODE_ID) -> functor (Node : P2p.S.NODE with type nid := Node_id.t) -> functor (View : P2p.S.VIEW with type nid := Node_id.t and type node := Node.t) -> P2p.S.GOSSIP with type node := Node.t and type view := View.t

Functor building an implementation of Cyclon given a Node_id, Node, and gossip View.