aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-14 14:09:32 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-14 14:09:32 +0100
commitd18767809341e4e63fd3f42f6b1d8510e31c6477 (patch)
tree1476ce1b3997b17a714f545dd5d88e7f826f5552
parentcab45ba74dc984053f893d8caf5e406f643bed93 (diff)
downloadlsd0003-d18767809341e4e63fd3f42f6b1d8510e31c6477.tar.gz
lsd0003-d18767809341e4e63fd3f42f6b1d8510e31c6477.zip
more comments
-rw-r--r--draft-summermatter-set-union.xml236
1 files changed, 139 insertions, 97 deletions
diff --git a/draft-summermatter-set-union.xml b/draft-summermatter-set-union.xml
index b108c79..ca001a2 100644
--- a/draft-summermatter-set-union.xml
+++ b/draft-summermatter-set-union.xml
@@ -746,9 +746,9 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
746 746
747 <t> 747 <t>
748 When the initiating peer decides to use the full synchronisation mode and the set of the initiating peer is bigger than the set of the receiving peer, the initiating 748 When the initiating peer decides to use the full synchronisation mode and the set of the initiating peer is bigger than the set of the receiving peer, the initiating
749 peer sends a <em><xref target="messages_request_full" format="title" /></em> message and change from <strong>Expecting SE</strong> to the <strong>Full Receiving</strong> State. 749 peer sends a <em><xref target="messages_request_full" format="title" /></em> message, and transitions from <strong>Expecting SE</strong> to the <strong>Full Receiving</strong> state.
750 In all other cases the initiating peer sends all set elements to the other peer followed by the <em><xref target="messages_full_done" format="title" /></em> message and 750 If the set of the initiating peer is smaller, it sends all set elements to the other peer followed by the <em><xref target="messages_full_done" format="title" /></em> message, and
751 changes into <strong>Full Sending</strong> state. 751 transitions into the <strong>Full Sending</strong> state.
752 </t> 752 </t>
753 <t> 753 <t>
754 ############# Statemaschine diagram full mode ################## 754 ############# Statemaschine diagram full mode ##################
@@ -758,87 +758,105 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
758 <dt><strong>Expecting IBF:</strong></dt> 758 <dt><strong>Expecting IBF:</strong></dt>
759 <dd> 759 <dd>
760 If a peer in the <strong>Expecting IBF</strong> state receives a <em><xref target="messages_request_full" format="title" /></em> message from the other peer, the 760 If a peer in the <strong>Expecting IBF</strong> state receives a <em><xref target="messages_request_full" format="title" /></em> message from the other peer, the
761 peer starts sending all the elements of the set followed by a <em><xref target="messages_full_done" format="title" /></em> message to the other peer and change to the 761 peer sends all the elements of its set followed by a <em><xref target="messages_full_done" format="title" /></em> message to the other peer, and transitions to the
762 <strong>Full Sending</strong> State. If the peer receives an <em><xref target="messages_full_element" format="title" /></em> message the peer changes to the <strong>Full Receiving</strong> state. 762 <strong>Full Sending</strong> state. If the peer receives an <em><xref target="messages_full_element" format="title" /></em> message, it processes the element and transitions to the <strong>Full Receiving</strong> state.
763 </dd> 763 </dd>
764 <dt><strong>Full Sending:</strong></dt> 764 <dt><strong>Full Sending:</strong></dt>
765 <dd> 765 <dd>
766 While a peer is in <strong>Full Sending</strong> state the peer expects to continuously receiving elements from the other 766 While a peer is in <strong>Full Sending</strong> state the peer expects to continuously receive elements from the other
767 peer. As soon as a the <em><xref target="messages_full_done" format="title" /></em> message is received the peer changes into <strong>Finished</strong> state. 767 peer. As soon as a the <em><xref target="messages_full_done" format="title" /></em> message is received, the peer transitions into
768 the <strong>Finished</strong> state.
768 </dd> 769 </dd>
769 <dt><strong>Full Receiving (In code: Expecting IBF): </strong></dt> 770 <dt><strong>Full Receiving (In code: Expecting IBF): </strong></dt>
770 <dd> 771 <dd>
771 While a peer is in <strong>Full Receiving</strong> state the peer expects to continuously receiving elements from the other 772 While a peer is in the <strong>Full Receiving</strong> state, it expects to continuously receive elements from the other
772 peer. As soon as a the <em><xref target="messages_full_done" format="title" /></em> message is received the peer sends the remaining elements from his set to the other 773 peer. As soon as a the <em><xref target="messages_full_done" format="title" /></em> message is received, it sends
773 peer followed by a <em><xref target="messages_full_done" format="title" /></em>. After sending the last message the peer changes into <strong>Finished</strong> state. 774 the remaining elements (those it did not receive) from its set to the other
775 peer, followed by a <em><xref target="messages_full_done" format="title" /></em>.
776 After sending the last message, the peer transitions into the <strong>Finished</strong> state.
774 </dd> 777 </dd>
775 </dl> 778 </dl>
776 </section> 779 </section>
777 <section anchor="modeofoperation_individual-elements" numbered="true" toc="default"> 780 <section anchor="modeofoperation_individual-elements" numbered="true" toc="default">
778 <name>Delta Synchronisation Mode</name> 781 <name>Delta Synchronisation Mode</name>
779 <t> 782 <t>
780 When the initiating peer in <strong>Expected SE</strong> state decide to use the delta synchronisation mode, the peer 783 When the initiating peer in the <strong>Expected SE</strong> state decides to use the delta synchronisation mode, it
781 sends a <em><xref target="messages_ibf" format="title" /></em> to the receiving peer and changes into the <strong>Passive Decoding</strong> state. 784 sends a <em><xref target="messages_ibf" format="title" /></em> to the receiving peer and transitions into the <strong>Passive Decoding</strong> state.
782 </t> 785 </t>
783 <t> 786 <t>
784 The receiving peer in the <strong>Expecting IBF</strong> state then receives the 787 The receiving peer in the <strong>Expecting IBF</strong> state receives the
785 <em><xref target="messages_ibf" format="title" /></em> message from the initiating peer and changes into <strong>Expecting IBF Last</strong> state when there 788 <em><xref target="messages_ibf" format="title" /></em> message from
786 are multiple <em><xref target="messages_ibf" format="title" /></em> messages to sent, when there is just a single <em><xref target="messages_ibf" format="title" /></em> message the reviving peer 789 the initiating peer and transitions into the <strong>Expecting IBF Last</strong> state when there
787 switches directly to the <strong>Active Decoding</strong> state. 790 are multiple <em><xref target="messages_ibf" format="title" /></em> messages to sent,
791 when there is just a single <em><xref target="messages_ibf" format="title" /></em> message the reviving peer
792 transitions directly to the <strong>Active Decoding</strong> state.
788 </t> 793 </t>
789 <t> 794 <t>
790 The peer that is in the <strong>Active Decoding</strong>, <strong>Finish closing</strong> or in the <strong>Expecting IBF Last</strong> state is called active 795 The peer that is in the <strong>Active Decoding</strong>, <strong>Finish Closing</strong> or in the <strong>Expecting IBF Last</strong>
791 peer and the peer that is in <strong>Passive Decoding</strong> and <strong>Finish Waiting</strong> state is called the passive peer. 796 state is called the active peer and the peer that is in either the <strong>Passive Decoding</strong> or the <strong>Finish Waiting</strong> state
797 is called the passive peer.
792 </t> 798 </t>
793 <t> 799 <t>
794 ############# Statemaschine Delta Synchronisation Mode ################## 800 ############# Statemaschine Delta Synchronisation Mode ##################
795 </t> 801 </t>
796 <t><strong>The behavior of the participants the different state is described below:</strong></t> 802 <t><strong>The behavior of the participants the different states is described below:</strong></t>
797 <dl> 803 <dl>
798 <dt><strong>Passive Decoding:</strong></dt> 804 <dt><strong>Passive Decoding:</strong></dt>
799 <dd> 805 <dd>
800 <t> 806 <t>
801 In the <strong>Passive Decoding</strong> state the passive peer reacts to request from the active peer. 807 In the <strong>Passive Decoding</strong> state the passive peer reacts to requests from the active peer.
802 The action the passive peer executes depend on the message the passive peer receives in the <strong>Passive Decoding</strong> state from the active peer 808 The action the passive peer executes depends on the message the passive peer receives in the <strong>Passive Decoding</strong> state from the active peer
803 and is described bellow on message basis. 809 and is described below on a per message basis.
804 </t> 810 </t>
805 811
806 <dl> 812 <dl>
807 <dt><em><xref target="messages_inquiry" format="title" /></em> Message:</dt> 813 <dt><em><xref target="messages_inquiry" format="title" /></em> message:</dt>
808 <dd> 814 <dd>
809 The <em><xref target="messages_inquiry" format="title" /></em> message 815 The <em><xref target="messages_inquiry" format="title" /></em> message
810 is received if the active peer requests the hash of an element that is missing in the active peers set. 816 is received if the active peer requests the SHA-512 hash of one or more elements (by sending the 64 bit element ID)
811 In this case the passive peer answers with an <em><xref target="messages_offer" format="title" /></em> message 817 that are missing from the active peer's set.
812 which contains a hash of the requested element. 818 In this case the passive peer answers with <em><xref target="messages_offer" format="title" /></em> messages
819 which contain the SHA-512 hash of the requested element. If the passive peer does not have an element with
820 a matching element ID, it MUST ignore the inquiry. If multiple elements match the 64 bit element ID, the passive
821 peer MUST send offers for all of the matching elements.
813 </dd> 822 </dd>
814 <dt><em><xref target="messages_demand" format="title" /></em> Message:</dt> 823 <dt><em><xref target="messages_demand" format="title" /></em> message:</dt>
815 <dd> 824 <dd>
816 The <em><xref target="messages_demand" format="title" /></em> message 825 The <em><xref target="messages_demand" format="title" /></em> message
817 is received if the active peer requests a complete element that is missing in the active peers set. If the requested element is valid 826 is received if the active peer requests a complete element that is missing in the active peers set. If the requested element is valid
818 the passive peer answers with the <em><xref target="messages_elements" format="title" /></em> message which contains the requested element. 827 the passive peer answers with an <em><xref target="messages_elements" format="title" /></em> message which contains the full,
828 application-dependent data of the requested element. If the passive peer receives a demand for a SHA-512 hash for which
829 it has no element, a protocol violation is detected and the protocol MUST be aborted.
830 Implementations MAY strengthen this and forbid demands without previous matching offers.
819 </dd> 831 </dd>
820 <dt><em><xref target="messages_offer" format="title" /></em> Message:</dt> 832 <dt><em><xref target="messages_offer" format="title" /></em> message:</dt>
821 <dd> 833 <dd>
822 The <em><xref target="messages_offer" format="title" /></em> message 834 The <em><xref target="messages_offer" format="title" /></em> message
823 is received if the active peer has decoded an element that is present in the active peers set and is missing in the 835 is received if the active peer has decoded an element that is present in the active peers set and may be missing in the
824 set of the passive peer. If the offered element is missing in the set of the passive peer, the passive peer answers 836 set of the passive peer. If the SHA-512 hash of the offer is indeed not a hash of any of the elements from the set of
825 with a <em><xref target="messages_demand" format="title" /></em> message. 837 the passive peer, the passive peer MUST answer with a <em><xref target="messages_demand" format="title" /></em> message
838 for that SHA-512 hash and remember that it issued this demand.
826 </dd> 839 </dd>
827 <dt><em><xref target="messages_elements" format="title" /></em> Message:</dt> 840 <dt><em><xref target="messages_elements" format="title" /></em> message:</dt>
828 <dd> 841 <dd>
829 A element that is received is saved and validated and not further action is taken. 842 A element that is received is validated and safed and not further action is taken.
843 FIXME: Eh, don't we need to (1) check that we did in fact DEMAND this element, and (2) strike it
844 from the list of pending demands?
830 </dd> 845 </dd>
831 <dt><em><xref target="messages_ibf" format="title" /></em> Message:</dt> 846 <dt><em><xref target="messages_ibf" format="title" /></em> message:</dt>
832 <dd> 847 <dd>
833 If an <em><xref target="messages_ibf" format="title" /></em> message is received the passive client assumes that the decoding of the IBF 848 If an <em><xref target="messages_ibf" format="title" /></em> message is received, this
834 on the active site has failed and role change is initiated. The peer changes directly 849 indicates that decoding of the IBF on the active site has failed and roles should be swapped.
835 into the <strong>Active Decoding</strong> state or in <strong>Expecting IBF Last</strong> state 850 The receiving passive peer transitions into the <strong>Active Decoding</strong> state
836 depending on how many IBFs are sent. 851 or into the <strong>Expecting IBF Last</strong> state depending on how many IBFs are sent.
852 FIXME: really should use two IBF message types (IBF_DATA, IBF_LAST).
837 </dd> 853 </dd>
838 <dt><em><xref target="messages_done" format="title" /></em> Message:</dt> 854 <dt><em><xref target="messages_done" format="title" /></em> message:</dt>
839 <dd> 855 <dd>
840 Receiving the <em><xref target="messages_done" format="title" /></em> message signals 856 Receiving the <em><xref target="messages_done" format="title" /></em> message signals
841 the passive peer that all demand of the active peer have been satisfied. In this case the passive peer changes into 857 the passive peer that all demands of the active peer have been satisfied. Alas, the
858 active peer will continue to process demands from the passive peer.
859 Upon receiving this message, the passive peer transitions into the
842 <strong>Finish Waiting</strong> state. 860 <strong>Finish Waiting</strong> state.
843 </dd> 861 </dd>
844 </dl> 862 </dl>
@@ -846,51 +864,63 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
846 <dt><strong>Active Decoding:</strong></dt> 864 <dt><strong>Active Decoding:</strong></dt>
847 <dd> 865 <dd>
848 <t> 866 <t>
849 In <strong>Active Decoding</strong> state the active peer decodes the IBFs and evaluate the set difference 867 In the <strong>Active Decoding</strong> state the active peer decodes the IBFs and evaluates the set difference
850 between the active and passive peer. In case the IBF decodes successfully the active peer sends offers and 868 between the active and passive peer. Whenever an element ID is obtained by decoding the IBF, the active peer
851 inquiries to the passive peer depending on which site the element is missing. 869 sends either an offer or an inquiry to the passive peer, depending on which site the decoded element is missing.
852 </t> 870 </t>
853 <t> 871 <t>
854 If the IBF decodes a positive (1) pure bucket the element is missing on the passive peers site 872 If the IBF decodes a positive (1) pure bucket, the element is missing on the passive peers site.
855 so the active peer sends an <em><xref target="messages_offer" format="title" /></em> to the active peer. 873 Thus the active peer sends an <em><xref target="messages_offer" format="title" /></em> to the passive peer.
856 A negative (-1) pure bucket indicates that a element is missing in the active peers set so the active peers 874 A negative (-1) pure bucket indicates that a element is missing in the active peers set, so the active peer
857 sends <em><xref target="messages_inquiry" format="title" /></em> to the passive client. 875 sends a <em><xref target="messages_inquiry" format="title" /></em> to the passive peer.
858 </t> 876 </t>
859 <t> 877 <t>
860 In case the IBF does not successfully decode the active peer sends an IBF to the passive client 878 In case the IBF does not successfully decode anymore, the active peer sends a new IBF to the passive client
861 and changes into <strong>Passive Decoding</strong> state. This initiates a role change 879 and changes into <strong>Passive Decoding</strong> state. This initiates a role swap.
862 active->passive. 880 FIXME: On what basis is the new IBF constructed? Specifically, which set is used? Do we
881 wait for the completion of pending demands first? How do L/k/M change? Some of this should
882 be detailed here, but the full details likely need a separate section on the algorithms.
863 </t> 883 </t>
864 <t> 884 <t>
865 All other actions the active peer executes depend on the message the active peer receives from 885 All other actions taken by the active peer depend on the message the active peer receives from
866 the passive peer. The actions are described below on message basis: 886 the passive peer. The actions are described below on a per message basis:
867 </t> 887 </t>
888 <!-- FIXME: Done message generation not described anywhere! -->
868 <dl> 889 <dl>
869 <dt><em><xref target="messages_offer" format="title" /></em> Message:</dt> 890 <dt><em><xref target="messages_offer" format="title" /></em> message:</dt>
870 <dd> 891 <dd>
871 The <em><xref target="messages_offer" format="title" /></em> message indicates that the 892 The <em><xref target="messages_offer" format="title" /></em> message indicates that the
872 passive peer received a <em><xref target="messages_inquiry" format="title" /></em> message from 893 passive peer received a <em><xref target="messages_inquiry" format="title" /></em> message from
873 the active peer. If a Inquiry has been sent and the offered element is missing in the active peers set, 894 the active peer. If a Inquiry has been sent and <!-- FIXME: is this indeed a condition that is checked? -->
895 the offered element is missing in the active peers set,
874 the active peer sends a <em><xref target="messages_demand" format="title" /></em> message to the 896 the active peer sends a <em><xref target="messages_demand" format="title" /></em> message to the
875 passive peer. 897 passive peer.
898 <!-- FIXME: what happens if the offer is for an element that is not missing? I think then we just ignore it, right? -->
876 </dd> 899 </dd>
877 <dt><em><xref target="messages_demand" format="title" /></em> Message:</dt> 900 <dt><em><xref target="messages_demand" format="title" /></em> message:</dt>
878 <dd> 901 <dd>
879 The <em><xref target="messages_demand" format="title" /></em> message indicates that the 902 The <em><xref target="messages_demand" format="title" /></em> message indicates that the
880 passive peer received a <em><xref target="messages_offer" format="title" /></em> from 903 passive peer received a <em><xref target="messages_offer" format="title" /></em> from
881 the active peer. The active peer satisfies the demand of the passive peer by sending 904 the active peer. The active peer satisfies the demand of the passive peer by sending
882 <em><xref target="messages_elements" format="title" /></em> message if a offer request 905 <em><xref target="messages_elements" format="title" /></em> message if a offer request
883 for the element has been sent. 906 for the element has been sent.
907 FIXME: Do we really check that we first made an offer? FIXME: what happens if
908 we do not have an element with the respective SHA-512 hash?
909 FIXME: should we check that a demand cannot be sent repeatedly for the same element?
884 </dd> 910 </dd>
885 <dt><em><xref target="messages_elements" format="title" /></em> Message:</dt> 911 <dt><em><xref target="messages_elements" format="title" /></em> message:</dt>
886 <dd> 912 <dd>
887 A element that is received is saved and validated and not further action is taken. 913 A element that is received is validated and saved and not further action is taken.
914 FIXME: what if we receive elements we already know? Is that cause for failure?
915 FIXME: Do we not need to remember that our demands were satisfied?
888 </dd> 916 </dd>
889 <dt><em><xref target="messages_done" format="title" /></em> Message:</dt> 917 <dt><em><xref target="messages_done" format="title" /></em> message:</dt>
890 <dd> 918 <dd>
891 Receiving the message <em><xref target="messages_done" format="title" /></em> indicates 919 Receiving the message <em><xref target="messages_done" format="title" /></em> indicates
892 that all demands of the passive peer have been satisfied. The active peer then changes into the 920 that all demands of the passive peer have been satisfied. The active peer then changes into the
893 state <strong>Finish Closing</strong> state. 921 state <strong>Finish Closing</strong> state.
922 FIXME: We cannot really receive this message before we completed decoding the IBF and send DONE to the passive peer.
923 So that might be an additional constraint to check here!
894 </dd> 924 </dd>
895 </dl> 925 </dl>
896 </dd> 926 </dd>
@@ -898,7 +928,7 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
898 <dd> 928 <dd>
899 <t> 929 <t>
900 In the <strong>Expecing IBF Last</strong> state the active peer continuously receives <em><xref target="messages_ibf" format="title" /></em> 930 In the <strong>Expecing IBF Last</strong> state the active peer continuously receives <em><xref target="messages_ibf" format="title" /></em>
901 messages from the passive peer. When the last <em><xref target="messages_ibf" format="title" /></em> message is resived 931 messages from the passive peer. When the last <em><xref target="messages_ibf" format="title" /></em> message is received
902 the active peer changes into <strong>Active Decoding</strong> state. 932 the active peer changes into <strong>Active Decoding</strong> state.
903 </t> 933 </t>
904 </dd> 934 </dd>
@@ -907,6 +937,7 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
907 <t> 937 <t>
908 In this states the peers are waiting for all demands to be satisfied and for the synchronisation 938 In this states the peers are waiting for all demands to be satisfied and for the synchronisation
909 to be completed. When all demands are satisfied the peer changes into state <strong>done</strong>. 939 to be completed. When all demands are satisfied the peer changes into state <strong>done</strong>.
940 FIXME: I thought "done" was a message, and the final state was called "Finished"!??!?
910 </t> 941 </t>
911 </dd> 942 </dd>
912 </dl> 943 </dl>
@@ -914,21 +945,23 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
914 <section anchor="modeofoperation_combined-mode" numbered="true" toc="default"> 945 <section anchor="modeofoperation_combined-mode" numbered="true" toc="default">
915 <name>Combined Mode</name> 946 <name>Combined Mode</name>
916 <t> 947 <t>
917 In the Combined Mode the <xref target="modeofoperation_full-sync" format="title" /> and the <xref target="modeofoperation_individual-elements" format="title" /> 948 In the combined mode the <xref target="modeofoperation_full-sync" format="title" /> and
918 are combined to reach the optimal result. 949 the <xref target="modeofoperation_individual-elements" format="title" />
950 are combined to minimize resource consumption.
919 </t> 951 </t>
920 <t> 952 <t>
921 The <xref target="modeofoperation_individual-elements" format="title" /> is only efficient on small set 953 The <xref target="modeofoperation_individual-elements" format="title" /> is only efficient on small set
922 differences or if the byte-size of the elements is large. Is the set difference big for example 954 differences or if the byte-size of the elements is large. Is the set difference is estimated to be large
923 in the initial synchronisation a <xref target="modeofoperation_full-sync" format="title" /> is 955 the <xref target="modeofoperation_full-sync" format="title" /> is
924 more efficient. The exact heuristics and parameter on the basis the protocol evaluates which mode 956 more efficient. The exact heuristics and parameters on which the protocol decides which mode
925 is the optimal is described in the <xref target="performance" format="title" /> section of this document. 957 should be used are described in the <xref target="performance" format="title" /> section of this document.
926 </t> 958 </t>
927 <t> 959 <t>
928 There are two main conditions when a <xref target="modeofoperation_full-sync" format="title" /> 960 There are two main cases when a <xref target="modeofoperation_full-sync" format="title" />
929 is enforced. The first condition is if the flag "FULL_SYNC" is set, this is used for testing purposes only and 961 is always used.
930 should not be used in production environment. The second condition applies if one of the peers has an empty 962 The first case is when one of the peers announces having an empty set. FIXME: HOW is this announced?
931 set and the set is initially synchronized. 963 The second case is if the application requested full synchronization explicitly.
964 This is useful for testing and should not be used in production.
932 </t> 965 </t>
933 <t> 966 <t>
934 ############# NOTE ############ 967 ############# NOTE ############
@@ -950,14 +983,16 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
950 <section anchor="messages_operation_request_description" numbered="true" toc="default"> 983 <section anchor="messages_operation_request_description" numbered="true" toc="default">
951 <name>Description</name> 984 <name>Description</name>
952 <t> 985 <t>
953 This message is the first message of the protocol and it is sent to signal the receiving peer 986 This message is the first message of the protocol and it is sent to signal to the receiving peer
954 that the initiating peer wants to initialize a new connection. 987 that the initiating peer wants to initialize a new connection.
955 </t> 988 </t>
956 <t> 989 <t>
957 This Message is sent in the transition between the <strong>Initiating connection</strong> state and the <strong>Expect SE</strong> state. 990 This message is sent in the transition between the <strong>Initiating Connection</strong> state and the <strong>Expect SE</strong> state.
958 </t> 991 </t>
959 <t> 992 <t>
960 If a peer receives this message the peer answers with sending a Strata estimator back. 993 If a peer receives this message and is willing to run the protocol, it answers by sending back a Strata estimator message.
994 FIXME: turn 'strata estimator' into a link!
995 Otherwise it simply closes the connection.
961 </t> 996 </t>
962 </section> 997 </section>
963 <section anchor="messages_operation_request_structure" numbered="true" toc="default"> 998 <section anchor="messages_operation_request_structure" numbered="true" toc="default">
@@ -984,19 +1019,20 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
984 </dd> 1019 </dd>
985 <dt>MSG TYPE</dt> 1020 <dt>MSG TYPE</dt>
986 <dd> 1021 <dd>
987 the type of SETU_P2P_OPERATION_REQUEST as registered in <xref target="gana" format="title" /> in network byte order. 1022 the type of SETU_P2P_OPERATION_REQUEST as registered in <xref target="gana" format="title" />, in network byte order.
988 </dd> 1023 </dd>
989 <dt>OPERATION TYPE</dt> 1024 <dt>OPERATION TYPE</dt>
990 <dd> 1025 <dd>
991 is a 32-bit unsigned integer which describes the type of operation that should be initiated. 1026 is a 32-bit unsigned integer which describes the type of operation that should be initiated.
1027 FIXME: unclear what this is. What operation types are there? What are the numeric values?
992 </dd> 1028 </dd>
993 <dt>ELEMENT COUNT</dt> 1029 <dt>ELEMENT COUNT</dt>
994 <dd> 1030 <dd>
995 is the count of the elements the requesting party has stored in a 32-bit unsigned integer. 1031 is the number of the elements the requesting party has in its set, as a 32-bit unsigned integer in network byte order.
996 </dd> 1032 </dd>
997 <dt>APX</dt> 1033 <dt>APX</dt>
998 <dd> 1034 <dd>
999 is SHA 512-bit hash that identifies the application. 1035 is a SHA-512 hash that identifies the application.
1000 </dd> 1036 </dd>
1001 </dl> 1037 </dl>
1002 </section> 1038 </section>
@@ -1072,7 +1108,11 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1072 <dt>IBF-SLICES</dt> 1108 <dt>IBF-SLICES</dt>
1073 <dd> 1109 <dd>
1074 are variable count of slices in an array. A single slice contains out of a 64-bit Key, a 1110 are variable count of slices in an array. A single slice contains out of a 64-bit Key, a
1075 32-bit Key Hash and a 32 bit count. 1111 32-bit Key Hash and an 8-bit count.
1112 FIXME: this is not sufficiently precise! How are the element IDs (and IDSUMS) computed?
1113 How are the HASHes (and HASHSUMS) computed? Which byte order is used? What role does
1114 the SALT have in these computations? Definitively needs DETAILED algorithm(s) and
1115 test vectors.
1076 </dd> 1116 </dd>
1077 </dl> 1117 </dl>
1078 <figure anchor="figure_ibf_slice"> 1118 <figure anchor="figure_ibf_slice">
@@ -1108,7 +1148,7 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1108 case the client changes to the <strong>Finished</strong> state as soon as all demands for elements have been satisfied. 1148 case the client changes to the <strong>Finished</strong> state as soon as all demands for elements have been satisfied.
1109 </t> 1149 </t>
1110 <t> 1150 <t>
1111 This message is exclusively send in the <xref target="modeofoperation_individual-elements" format="title" />. 1151 This message is exclusively sent in the <xref target="modeofoperation_individual-elements" format="title" />.
1112 </t> 1152 </t>
1113 </section> 1153 </section>
1114 <section anchor="messages_elements_structure" numbered="true" toc="default"> 1154 <section anchor="messages_elements_structure" numbered="true" toc="default">
@@ -1170,15 +1210,15 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1170 <t> 1210 <t>
1171 The offer message is an answer to an <em><xref target="messages_inquiry" format="title" /></em> message 1211 The offer message is an answer to an <em><xref target="messages_inquiry" format="title" /></em> message
1172 and transmits the full hash of an element that has been requested by the other peer. 1212 and transmits the full hash of an element that has been requested by the other peer.
1173 This full hash enables the other peer to check if the element is really missing in his set and 1213 This full hash enables the other peer to check if the element is really missing in its set and
1174 eventually send a <em><xref target="messages_demand" format="title" /></em> message for that a element. 1214 eventually sends a <em><xref target="messages_demand" format="title" /></em> message for that a element.
1175 </t> 1215 </t>
1176 <t> 1216 <t>
1177 The offer is sent and received only in the <strong>Active Decoding</strong> and in the <strong>Passive Decoding</strong> 1217 The offer is sent and received only in the <strong>Active Decoding</strong> and in the <strong>Passive Decoding</strong>
1178 state. 1218 state.
1179 </t> 1219 </t>
1180 <t> 1220 <t>
1181 This message is exclusively send in the <xref target="modeofoperation_individual-elements" format="title" />. 1221 This message is exclusively sent in the <xref target="modeofoperation_individual-elements" format="title" />.
1182 </t> 1222 </t>
1183 </section> 1223 </section>
1184 <section anchor="messages_offer_structure" numbered="true" toc="default"> 1224 <section anchor="messages_offer_structure" numbered="true" toc="default">
@@ -1219,12 +1259,12 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1219 <section anchor="messages_inquiry_description" numbered="true" toc="default"> 1259 <section anchor="messages_inquiry_description" numbered="true" toc="default">
1220 <name>Description</name> 1260 <name>Description</name>
1221 <t> 1261 <t>
1222 The Inquiry message is exclusively send by the active peer in <strong>Active Decoding</strong> state 1262 The Inquiry message is exclusively sent by the active peer in <strong>Active Decoding</strong> state
1223 to request the full hash of an element that is missing in the active peers set. This is normally answered 1263 to request the full hash of an element that is missing in the active peers set. This is normally answered
1224 by the passive peer with <em><xref target="messages_offer" format="title" /></em> message. 1264 by the passive peer with <em><xref target="messages_offer" format="title" /></em> message.
1225 </t> 1265 </t>
1226 <t> 1266 <t>
1227 This message is exclusively send in the <xref target="modeofoperation_individual-elements" format="title" />. 1267 This message is exclusively sent in the <xref target="modeofoperation_individual-elements" format="title" />.
1228 </t> 1268 </t>
1229 <t> 1269 <t>
1230 NOTE: HERE IS AN IMPLEMENTATION BUG UNNECESSARY 32-BIT PADDING! 1270 NOTE: HERE IS AN IMPLEMENTATION BUG UNNECESSARY 32-BIT PADDING!
@@ -1269,12 +1309,12 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1269 <t> 1309 <t>
1270 The demand message is sent in the <strong>Active Decoding</strong> and in the <strong>Passive Decoding</strong> 1310 The demand message is sent in the <strong>Active Decoding</strong> and in the <strong>Passive Decoding</strong>
1271 state. It is a answer to a received <em><xref target="messages_offer" format="title" /></em> message 1311 state. It is a answer to a received <em><xref target="messages_offer" format="title" /></em> message
1272 and its send if the element described in the <em><xref target="messages_offer" format="title" /></em> message 1312 and is sent if the element described in the <em><xref target="messages_offer" format="title" /></em> message
1273 is missing in the peers set. In the normal workflow the answer to the demand message is an 1313 is missing in the peers set. In the normal workflow the answer to the demand message is an
1274 <em><xref target="messages_elements" format="title" /></em> message. 1314 <em><xref target="messages_elements" format="title" /></em> message.
1275 </t> 1315 </t>
1276 <t> 1316 <t>
1277 This message is exclusively send in the <xref target="modeofoperation_individual-elements" format="title" />. 1317 This message is exclusively sent in the <xref target="modeofoperation_individual-elements" format="title" />.
1278 </t> 1318 </t>
1279 </section> 1319 </section>
1280 <section anchor="messages_demand_structure" numbered="true" toc="default"> 1320 <section anchor="messages_demand_structure" numbered="true" toc="default">
@@ -1314,11 +1354,13 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1314 <section anchor="messages_done_description" numbered="true" toc="default"> 1354 <section anchor="messages_done_description" numbered="true" toc="default">
1315 <name>Description</name> 1355 <name>Description</name>
1316 <t> 1356 <t>
1317 The done message is send when all <em><xref target="messages_demand" format="title" /></em> messages 1357 The done message is sent when all <em><xref target="messages_demand" format="title" /></em> messages
1318 have been successfully satisfied and the set is complete synchronized. 1358 have been successfully satisfied and the set is complete synchronized.
1359 FIXME: we might want to consider adding an additional final checksum (XOR SHA-512 hash) over
1360 all elements to this message, to ensure that really both sides ended up with the same set?
1319 </t> 1361 </t>
1320 <t> 1362 <t>
1321 This message is exclusively send in the <xref target="modeofoperation_individual-elements" format="title" />. 1363 This message is exclusively sent in the <xref target="modeofoperation_individual-elements" format="title" />.
1322 </t> 1364 </t>
1323 </section> 1365 </section>
1324 <section anchor="messages_done_structure" numbered="true" toc="default"> 1366 <section anchor="messages_done_structure" numbered="true" toc="default">
@@ -1399,7 +1441,7 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1399 </t> 1441 </t>
1400 <t> 1442 <t>
1401 The receiving peer receives the Request Full message in the <strong>Expecting IBF</strong>, afterwards the receiving peer 1443 The receiving peer receives the Request Full message in the <strong>Expecting IBF</strong>, afterwards the receiving peer
1402 starts sending his complete set in <xref target="messages_full_element" format="title" /> messages to the initiating peer. 1444 starts sending its complete set in <xref target="messages_full_element" format="title" /> messages to the initiating peer.
1403 </t> 1445 </t>
1404 </section> 1446 </section>
1405 <section anchor="messages_request_full_structure" numbered="true" toc="default"> 1447 <section anchor="messages_request_full_structure" numbered="true" toc="default">
@@ -1572,6 +1614,13 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1572 1614
1573 </section> 1615 </section>
1574 1616
1617 <section anchor="performance" numbered="true" toc="default">
1618 <name>Performance Considerations</name>
1619 <t>
1620 --- TEXT HERE ---
1621 </t>
1622 </section>
1623
1575 <section anchor="security" numbered="true" toc="default"> 1624 <section anchor="security" numbered="true" toc="default">
1576 <name>Security Considerations</name> 1625 <name>Security Considerations</name>
1577 <section anchor="security_crypto" numbered="true" toc="default"> 1626 <section anchor="security_crypto" numbered="true" toc="default">
@@ -1595,13 +1644,6 @@ hashSum | 0000 | 0000 | 0000 | 0000 |
1595 </section> 1644 </section>
1596 </section> 1645 </section>
1597 1646
1598 <section anchor="performance" numbered="true" toc="default">
1599 <name>Performance</name>
1600 <t>
1601 --- TEXT HERE ---
1602 </t>
1603 </section>
1604
1605 <section anchor="gana" numbered="true" toc="default"> 1647 <section anchor="gana" numbered="true" toc="default">
1606 <name>GANA Considerations</name> 1648 <name>GANA Considerations</name>
1607 <t> 1649 <t>