summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-12-27 22:25:35 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-12-27 22:25:35 +0900
commitde76f481524227f6c81af0428d10b6b866085378 (patch)
treedbd27e4d10302e501d155b02a66d9ffb01797cec
parentd42a8a5f8cb64ec103598b981eeafd0533662ff9 (diff)
downloadlsd0004-de76f481524227f6c81af0428d10b6b866085378.tar.gz
lsd0004-de76f481524227f6c81af0428d10b6b866085378.zip
Update use of existing pending table concept.
-rw-r--r--draft-schanzen-r5n.xml47
1 files changed, 27 insertions, 20 deletions
diff --git a/draft-schanzen-r5n.xml b/draft-schanzen-r5n.xml
index 200f28d..54212c4 100644
--- a/draft-schanzen-r5n.xml
+++ b/draft-schanzen-r5n.xml
@@ -829,7 +829,7 @@ BEGIN
829 the peer has encountered. To ensure that the peer does 829 the peer has encountered. To ensure that the peer does
830 not run out of memory, information about older requests 830 not run out of memory, information about older requests
831 is discarded. The value of <tt>MAX_RECENT</tt> <bcp14>MAY</bcp14> be 831 is discarded. The value of <tt>MAX_RECENT</tt> <bcp14>MAY</bcp14> be
832 configurable and <bcp14>SHOULD</bcp14> be at least 128k. 832 configurable and <bcp14>SHOULD</bcp14> be at least 128 * 10<sup>3</sup>.
833 </t> 833 </t>
834 <t> 834 <t>
835 For each entry in the pending table, the DHT <bcp14>MUST</bcp14> track 835 For each entry in the pending table, the DHT <bcp14>MUST</bcp14> track
@@ -1703,8 +1703,8 @@ BEGIN
1703 (1) If the local peer is the closest peer 1703 (1) If the local peer is the closest peer
1704 (cf. <tt>IsClosestPeer (SELF, QueryHash, PeerFilter)</tt>, or (2) 1704 (cf. <tt>IsClosestPeer (SELF, QueryHash, PeerFilter)</tt>, or (2)
1705 if the <tt>DemultiplexEverywhere</tt> flag is set, or (3) 1705 if the <tt>DemultiplexEverywhere</tt> flag is set, or (3)
1706 if the local peer is not the closest and the <tt>GetRequest</tt> was answered previously 1706 if the local peer is not the closest and a similar <tt>GetRequest</tt> was answered previously
1707 resulting in a cached reply (<xref target="p2p_result_processing"/>). 1707 with a cached result message this request also matches (<xref target="p2p_result_processing"/>).
1708 </t> 1708 </t>
1709 <t> 1709 <t>
1710 The reply is produced (if one is available) using the following 1710 The reply is produced (if one is available) using the following
@@ -1748,6 +1748,13 @@ BEGIN
1748 </t> 1748 </t>
1749 </li> 1749 </li>
1750 <li> 1750 <li>
1751 <!-- FIXME: For how long? what exactly must be stored? -->
1752 The implementation <tt>SHOULD</tt> create (or merge) an entry in the pending table
1753 <xref target="pending_table"/> for the query represented by this <tt>GetMessage</tt>.
1754 If the peer is unable to handle an additional entry in the table, the message
1755 <bcp14>MUST</bcp14> be discarded and processing ends.
1756 </li>
1757 <li>
1751 Using the value in <tt>REPL_LVL</tt>, the number of peers to forward to 1758 Using the value in <tt>REPL_LVL</tt>, the number of peers to forward to
1752 <bcp14>MUST</bcp14> be calculated using 1759 <bcp14>MUST</bcp14> be calculated using
1753 <tt>ComputeOutDegree()</tt>. 1760 <tt>ComputeOutDegree()</tt>.
@@ -1762,9 +1769,6 @@ BEGIN
1762 to, <tt>SEND(P, GetMessageP)</tt> is called. Here, <tt>GetMessageP</tt> 1769 to, <tt>SEND(P, GetMessageP)</tt> is called. Here, <tt>GetMessageP</tt>
1763 is the original message with the updated fields for <tt>HOPCOUNT</tt> (incremented 1770 is the original message with the updated fields for <tt>HOPCOUNT</tt> (incremented
1764 by 1), <tt>PEER_BF</tt> and <tt>RESULT_FILTER</tt>. 1771 by 1), <tt>PEER_BF</tt> and <tt>RESULT_FILTER</tt>.
1765 <!-- FIXME: For how long? what exactly must be stored? -->
1766 The implementation <tt>MUST</tt> cache the originator peer address and the
1767 <tt>GetMessage</tt> in order to correctly process any <tt>ResultMessage</tt>s.
1768 </li> 1772 </li>
1769 </ol> 1773 </ol>
1770 </section> 1774 </section>
@@ -1971,13 +1975,14 @@ BEGIN
1971 The implementation <bcp14>MUST</bcp14> instruct the Underlay to connect to all provided addresses 1975 The implementation <bcp14>MUST</bcp14> instruct the Underlay to connect to all provided addresses
1972 using <tt>TRY_CONNECT</tt> in order to make the underlay aware of multiple addresses for this connection. 1976 using <tt>TRY_CONNECT</tt> in order to make the underlay aware of multiple addresses for this connection.
1973 When a connection is established, the signal <tt>PEER_CONNECTED</tt> will cause 1977 When a connection is established, the signal <tt>PEER_CONNECTED</tt> will cause
1974 the peer to be added to the respective k-bucket of the routing table (<xref target="routing"/>). </li> 1978 the peer to be added to the respective k-bucket of the routing table (<xref target="routing"/>).
1979 </li>
1980 <li>
1981 If the <tt>QUERY_HASH</tt> of this <tt>ResultMessage</tt> does not match an entry in the
1982 pending table (<xref target="pending_table"/>), then the message is discarded and processing ends.
1983 Otherwise, processing continues for each entry in the table as follows.
1984 </li>
1975 <li> 1985 <li>
1976 <t>
1977 If the <tt>QUERY_HASH</tt> of this <tt>ResultMessage</tt> is found in the
1978 list of pending local or remote queries, then
1979 for each matching pending query:
1980 </t>
1981 <ol type="%c)"> 1986 <ol type="%c)">
1982 <li> 1987 <li>
1983 If the <tt>FindApproximate</tt> flag was not set in the query and the <tt>BTYPE</tt> allowed the 1988 If the <tt>FindApproximate</tt> flag was not set in the query and the <tt>BTYPE</tt> allowed the
@@ -2011,15 +2016,17 @@ BEGIN
2011 the <tt>GETPATH_L</tt> and <tt>PUTPATH_L</tt> 2016 the <tt>GETPATH_L</tt> and <tt>PUTPATH_L</tt>
2012 <bcp14>MUST</bcp14> be set to zero when forwarding the result. 2017 <bcp14>MUST</bcp14> be set to zero when forwarding the result.
2013 </li> 2018 </li>
2019 <li>
2020 If the result filter result is either <tt>FILTER_MORE</tt> or <tt>FILTER_LAST</tt>,
2021 the message is forwarded to the origin of the query as defined in the entry
2022 which may either be the local peer or a remote peer.
2023 In case this is a query of the local peer the result may have to be provided to
2024 applications through the overlay API.
2025 Otherwise, the result is forwarded using <tt>SEND(P, ResultMessage')</tt> where
2026 <tt>ResultMessage'</tt> is the now modified message.
2027 If the result was <tt>FILTER_LAST</tt>, the query is removed from the pending table.
2028 </li>
2014 </ol> 2029 </ol>
2015 <t>
2016 If the result is either <tt>FILTER_MORE</tt> or <tt>FILTER_LAST</tt>,
2017 the message is forwarded to the origin of the query through
2018 either the overlay API or using <tt>SEND(P, ResultMessage')</tt> where
2019 <tt>ResultMessage'</tt> is the now modified message.
2020 If the result was <tt>FILTER_LAST</tt>, the query is removed from the list of pending
2021 queries.
2022 </t>
2023 </li> 2030 </li>
2024 <li> 2031 <li>
2025 Finally, the implementation <bcp14>SHOULD</bcp14> cache 2032 Finally, the implementation <bcp14>SHOULD</bcp14> cache