summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-14 01:51:57 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-14 01:51:57 +0100
commit28cea67fa6089ec0b9ba33d7aeef57664516eba9 (patch)
tree48040041ebb4a5835c0178a0ebdc2b7dac771a3e
parentfec15549407552db80575ae1f8b199da8f7e08ea (diff)
downloadlsd0004-28cea67fa6089ec0b9ba33d7aeef57664516eba9.tar.gz
lsd0004-28cea67fa6089ec0b9ba33d7aeef57664516eba9.zip
add ComputeOutDegee() function to spec
-rw-r--r--draft-schanzen-r5n.xml38
1 files changed, 35 insertions, 3 deletions
diff --git a/draft-schanzen-r5n.xml b/draft-schanzen-r5n.xml
index cc59f22..d273b49 100644
--- a/draft-schanzen-r5n.xml
+++ b/draft-schanzen-r5n.xml
@@ -948,6 +948,7 @@ bchar = *(ALPHA / DIGIT)
948 <tt>ComputeOutDegree(REPL_LVL, HOPCOUNT, L2NSE) -&gt; Number</tt> 948 <tt>ComputeOutDegree(REPL_LVL, HOPCOUNT, L2NSE) -&gt; Number</tt>
949 </dt> 949 </dt>
950 <dd> 950 <dd>
951 <t>
951 This function computes the number of neighbors 952 This function computes the number of neighbors
952 that a message should be forwarded to. The arguments 953 that a message should be forwarded to. The arguments
953 are the desired replication level (<tt>REPL_LVL</tt>), the <tt>HOPCOUNT</tt> of the message so far, and 954 are the desired replication level (<tt>REPL_LVL</tt>), the <tt>HOPCOUNT</tt> of the message so far, and
@@ -955,9 +956,34 @@ bchar = *(ALPHA / DIGIT)
955 size estimate (<tt>L2NSE</tt>) as provided 956 size estimate (<tt>L2NSE</tt>) as provided
956 by the underlay. The result 957 by the underlay. The result
957 is the non-negative number of next hops to 958 is the non-negative number of next hops to
958 select. 959 select. The following figure gives the
959 <!-- FIXME: specify full function! --> 960 pseudocode for computing the number of neighbors
960 </dd> 961 the peer should attempt to forward the message to.
962 </t>
963 <figure anchor="compute_out_degree" title="Computing the number of next hops.">
964 <artwork name="" type="" align="left" alt=""><![CDATA[
965function ComputeOutDegree(REPL_LVL, HOPCOUNT, L2NSE)
966BEGIN
967 if (HOPCOUNT > L2NSE * 4)
968 return 0;
969 if (HOPCOUNT > L2NSE * 2)
970 return 1;
971 if (0 = REPL_LEVL)
972 REPL_LEVL = 1
973 if (REPL_LEVEL > 16)
974 REPL_LEVEL = 16
975 RM1 = REPL_LEVEL - 1
976 return 1 + (RM1 / (L2NSE + RM1 * HOPCOUNT))
977]]></artwork>
978 </figure>
979 <t>
980 The above calculation may yield values that are
981 not discrete. Hence, the result <bcp14>MUST</bcp14> be
982 rounded probabilistically to the nearest
983 discrete value, using the fraction
984 as the probability for rounding up.
985 </t>
986 </dd>
961 </dl> 987 </dl>
962 </section> 988 </section>
963 <section anchor="pending_table"> 989 <section anchor="pending_table">
@@ -2298,6 +2324,12 @@ gnunet+tcp://12.3.4.5/ \
2298 as an adversary would have to invest more resources over time 2324 as an adversary would have to invest more resources over time
2299 to mount an effective attack. 2325 to mount an effective attack.
2300 </t> 2326 </t>
2327 <t>
2328 The <tt>ComputeOutDegree</tt> function limits the
2329 <tt>REPL_LVL</tt> to a maximum of 16. This imposes
2330 an upper limit on bandwidth amplification an attacker
2331 may achieve for a given network size and topology.
2332 </t>
2301 </section> 2333 </section>
2302 <section anchor="iana" numbered="true" toc="default"> 2334 <section anchor="iana" numbered="true" toc="default">
2303 <name>IANA Considerations</name> 2335 <name>IANA Considerations</name>