From 3e58a5b4aa9eaffac3f1b7d67ae9b1f5e42c5003 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Wed, 29 Dec 2021 19:49:36 +0100 Subject: more routing --- draft-schanzen-r5n.xml | 49 ++++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/draft-schanzen-r5n.xml b/draft-schanzen-r5n.xml index ea0736f..519fb60 100644 --- a/draft-schanzen-r5n.xml +++ b/draft-schanzen-r5n.xml @@ -514,36 +514,43 @@ PEER-SELECT(key, bloomfilter) END END ]]> - - - R5N requires the following procedures for its routing table: - -
-
FindBucket(PeerID, Key) -> k-bucket
-
+ + + R5N requires the following procedures for its routing table: + +
+
FindBucket(PeerID, Key) -> k-bucket as List
+
The FindBucket procedure determines how many low order bits succesively match between a PeerID and a Key starting from the first bit. The procedure returns the k-bucket for this index. It contains all connected nodes which share the same prefix length with PeerID. -
-
GetDistance(NodeKey_A, NodeKey_B)
-
- FIXME: We do NOT do XOR here. We do some kind of - fancy calculation. See get_distance() -
-
AmClosestNode(NodeID, Key, Bloom) -> true | false
-
- This procedure first determines which k-bucket contains the +
+
GetDistance(NodeKey_A, NodeKey_B) -> Distance as Integer
+
+ FIXME: We do NOT do XOR here. We do some kind of + fancy calculation. See get_distance() +
+
SelectClosestPeer(Key) -> NodeID
+
+ This procedure determines the closest node ID to Key + of all connected nodes using GetDistance. + FIXME: Also has a bloomfilter. Isn't AmClosestNode simply + !SelectClosestPeer == myID ? +
+
AmClosestNode(NodeID, Key, Bloom) -> true | false
+
+ This procedure first determines which k-bucket contains the closest node IDs to Key. Any node IDs which match the bloom filter are not considered. If there is a node ID NodeID' in the k-bucket where GetDistance(NodeID, Key) > GetDistance(NodeID', Key), - then false is returned, otherwise true. - FIXME: Currently, GDS_am_closest_peer checks for longer matching - bits. Not GetDistance. Why? -
-
+ then false is returned, otherwise true. + FIXME: Currently, GDS_am_closest_peer checks for longer matching + bits. Not GetDistance. Why? +
+
-- cgit v1.2.3