diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-26 11:00:51 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-26 11:00:51 +0900 |
commit | b621c412b3a70f906ece7a97aabea1cb15ec5fd1 (patch) | |
tree | 32df91239cf0d05002f17815b17133709d027e01 | |
parent | 3a2ed928c57940dd07a4cf6aae59d54af9b59fc8 (diff) | |
download | lsd0004-b621c412b3a70f906ece7a97aabea1cb15ec5fd1.tar.gz lsd0004-b621c412b3a70f906ece7a97aabea1cb15ec5fd1.zip |
Change handling of HELLOs in Puts and Results from MUST to SHOULD
also makes wording more consistent.
-rw-r--r-- | draft-schanzen-r5n.xml | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/draft-schanzen-r5n.xml b/draft-schanzen-r5n.xml index 0024d8e..0aaee8d 100644 --- a/draft-schanzen-r5n.xml +++ b/draft-schanzen-r5n.xml | |||
@@ -1529,12 +1529,13 @@ BEGIN | |||
1529 | of the message. | 1529 | of the message. |
1530 | </li>--> | 1530 | </li>--> |
1531 | <li> | 1531 | <li> |
1532 | If the flag is not set, the <tt>PATH_LEN</tt> | 1532 | If the <tt>RecordRoute</tt> flag is not set, the <tt>PATH_LEN</tt> |
1533 | <bcp14>MUST</bcp14> be set to zero. | 1533 | <bcp14>MUST</bcp14> be set to zero. |
1534 | If the <tt>PATH_LEN</tt> is non-zero, | 1534 | If the flag is set and <tt>PATH_LEN</tt> is non-zero, |
1535 | the local peer <bcp14>SHOULD</bcp14> verify the signatures from the <tt>PUTPATH</tt>. | 1535 | the local peer <bcp14>SHOULD</bcp14> verify the signatures from the <tt>PUTPATH</tt>. |
1536 | Verification <bcp14>MAY</bcp14> involve checking all signatures or any random | 1536 | Verification <bcp14>MAY</bcp14> involve checking all signatures or any random |
1537 | subset of the signatures. It is <bcp14>RECOMMENDED</bcp14> that peers adapt | 1537 | subset of the signatures. |
1538 | It is <bcp14>RECOMMENDED</bcp14> that peers adapt | ||
1538 | their behavior to available computational resources so as to not make signature | 1539 | their behavior to available computational resources so as to not make signature |
1539 | verification a bottleneck. If an invalid signature is found, the | 1540 | verification a bottleneck. If an invalid signature is found, the |
1540 | <tt>PUTPATH</tt> <bcp14>MUST</bcp14> be truncated to only include the elements | 1541 | <tt>PUTPATH</tt> <bcp14>MUST</bcp14> be truncated to only include the elements |
@@ -1547,25 +1548,19 @@ BEGIN | |||
1547 | be stored locally in the block storage. | 1548 | be stored locally in the block storage. |
1548 | </li> | 1549 | </li> |
1549 | <li> | 1550 | <li> |
1551 | <!-- FIXME: Discuss: Changed from MUST to SHOULD - MSC --> | ||
1550 | If the <tt>BTYPE</tt> of the message indicates a <tt>HELLO</tt> block, the | 1552 | If the <tt>BTYPE</tt> of the message indicates a <tt>HELLO</tt> block, the |
1551 | peer <bcp14>MUST</bcp14> be considered for the local routing | 1553 | peer <bcp14>SHOULD</bcp14> be considered for the local routing |
1552 | table if the respective k-bucket is not yet full. In this case, | 1554 | table by using the peer address in <tt>BLOCK_KEY</tt>. |
1553 | the local peer <bcp14>MUST</bcp14> try to establish a connection | 1555 | An implementation <bcp14>MAY</bcp14> choose to ignore the <tt>HELLO</tt>, for example |
1556 | because the routing table or the respective k-bucket is already full. | ||
1557 | If the peer is a suitable candidate for insertion, the local peer <bcp14>MUST</bcp14> try to establish a connection | ||
1554 | to the peer indicated in the <tt>HELLO</tt> block using the address information | 1558 | to the peer indicated in the <tt>HELLO</tt> block using the address information |
1555 | from the <tt>HELLO</tt> block and the Underlay function <tt>TRY_CONNECT</tt>. | 1559 | from the <tt>HELLO</tt> block and the Underlay function <tt>TRY_CONNECT</tt>. |
1556 | <!-- FIXME: The above behaviour has a catch: If the implementation only connects to one | 1560 | The implementation <bcp14>MUST</bcp14> instruct the Underlay to connect to all provided addresses |
1557 | address from the hello using TRY_CONNECT, the Underlay also knows only about that connection | ||
1558 | If that failes and PEER_DISCONNECT is called, this neighbor is dead. | ||
1559 | We could say here that the implementation SHOULD instruct to connect to ALL | ||
1560 | addresses or risk flaky connections. The choice of address is also unclear. | ||
1561 | R5N does not really know what the Underlay supports (maybe more than provided in | ||
1562 | own addresses) - Added this for now: --> | ||
1563 | The implementation <bcp14>MAY</bcp14> instruct the Underlay to connect to all provided addresses | ||
1564 | using <tt>TRY_CONNECT</tt> in order to make the underlay aware of multiple addresses for this connection. | 1561 | using <tt>TRY_CONNECT</tt> in order to make the underlay aware of multiple addresses for this connection. |
1565 | If a connection is established, the signal <tt>PEER_CONNECTED</tt> will cause | 1562 | When a connection is established, the signal <tt>PEER_CONNECTED</tt> will cause |
1566 | the peer to be added to the respective k-bucket of the routing table. | 1563 | the peer to be added to the respective k-bucket of the routing table (<xref target="routing"/>). |
1567 | Note that the k-bucket <bcp14>MUST</bcp14> be determined by the | ||
1568 | key computed using <tt>DeriveBlockKey</tt> and not by the <tt>QUERY_HASH</tt>. | ||
1569 | </li> | 1564 | </li> |
1570 | <li> | 1565 | <li> |
1571 | Given the value in <tt>REPL_LVL</tt>, <tt>HOPCOUNT</tt> and the | 1566 | Given the value in <tt>REPL_LVL</tt>, <tt>HOPCOUNT</tt> and the |
@@ -1992,16 +1987,19 @@ BEGIN | |||
1992 | does not have to match the <tt>QUERY_HASH</tt>. | 1987 | does not have to match the <tt>QUERY_HASH</tt>. |
1993 | </li> | 1988 | </li> |
1994 | <li> | 1989 | <li> |
1990 | <!-- FIXME: Discuss: Changed from MUST to SHOULD - MSC --> | ||
1995 | If the <tt>BTYPE</tt> of the message indicates a <tt>HELLO</tt> block, the | 1991 | If the <tt>BTYPE</tt> of the message indicates a <tt>HELLO</tt> block, the |
1996 | peer <bcp14>MUST</bcp14> be considered for the local routing | 1992 | peer <bcp14>SHOULD</bcp14> be considered for the local routing |
1997 | table if the respective k-bucket is not yet full. In this case, | 1993 | table by using the peer address computed from the block using<tt>DeriveBlockKey</tt>. |
1998 | the local peer <bcp14>MUST</bcp14> try to establish a connection | 1994 | An implementation <bcp14>MAY</bcp14> choose to ignore the <tt>HELLO</tt>, for example |
1995 | because the routing table or the respective k-bucket is already full. | ||
1996 | If the peer is a suitable candidate for insertion, the local peer <bcp14>MUST</bcp14> try to establish a connection | ||
1999 | to the peer indicated in the <tt>HELLO</tt> block using the address information | 1997 | to the peer indicated in the <tt>HELLO</tt> block using the address information |
2000 | from the <tt>HELLO</tt> block. If a connection is established, | 1998 | from the <tt>HELLO</tt> block and the Underlay function <tt>TRY_CONNECT</tt>. |
2001 | the peer is added to the respective k-bucket of the routing table. | 1999 | The implementation <bcp14>MUST</bcp14> instruct the Underlay to connect to all provided addresses |
2002 | Note that the k-bucket <bcp14>MUST</bcp14> be determined by the | 2000 | using <tt>TRY_CONNECT</tt> in order to make the underlay aware of multiple addresses for this connection. |
2003 | key computed using <tt>DeriveBlockKey</tt> and not by the <tt>QUERY_HASH</tt>. | 2001 | When a connection is established, the signal <tt>PEER_CONNECTED</tt> will cause |
2004 | </li> | 2002 | the peer to be added to the respective k-bucket of the routing table (<xref target="routing"/>). </li> |
2005 | <li> | 2003 | <li> |
2006 | <t> | 2004 | <t> |
2007 | If the <tt>QUERY_HASH</tt> of this <tt>ResultMessage</tt> is found in the | 2005 | If the <tt>QUERY_HASH</tt> of this <tt>ResultMessage</tt> is found in the |