lsd0003

LSD0003: Set Union
Log | Files | Refs | README

commit f7cabaeda33f191044bae0fcd1090c77028ba6ee
parent 5db8f326a57d72375bc11652db327b0383739df0
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 13 Jun 2021 16:00:50 +0200

minor fixes

Diffstat:
Mdraft-summermatter-set-union.xml | 30++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/draft-summermatter-set-union.xml b/draft-summermatter-set-union.xml @@ -2009,7 +2009,7 @@ FUNCTION decide_operation_mode(avg_element_size, estimated_total_diff = est_set_diff_remote + est_local_set_diff - total_elements_to_send_local_send_first = est_remote_set_diff + local_set_size; + total_elements_to_send_local_send_first = est_remote_set_diff + local_set_size total_bytes_full_local_send_first = (avg_element_size * total_elements_to_send_local_send_first) + (total_elements_to_send_local_send_first * sizeof(ELEMENT_MSG_HEADER)) @@ -2030,7 +2030,7 @@ FUNCTION decide_operation_mode(avg_element_size, ibf_bucket_count = IBF_MIN_SIZE END IF - ibf_message_count = ceil ( ibf_bucket_count / MAX_BUCKETS_PER_MESSAGE); + ibf_message_count = ceil ( ibf_bucket_count / MAX_BUCKETS_PER_MESSAGE) estimated_counter_size = MIN ( 2 * LOG2(local_set_size / ibf_bucket_count), @@ -2046,8 +2046,8 @@ FUNCTION decide_operation_mode(avg_element_size, element_size = (avg_element_size + sizeof(ELEMENT_MSG_HEADER)) * estimated_total_diff done_size = sizeof(DONE_HEADER) inquery_size = (sizeof(IBF_KEY) + sizeof(INQUERY_MSG_HEADER)) * estimated_total_diff - demand_size = (sizeof(HASHCODE) + sizeof(DEMAND_MSG_HEADER)) * estimated_total_diff; - offer_size = (sizeof(HASHCODE) + sizeof(OFFER_MSG_HEADER)) * estimated_total_diff; + demand_size = (sizeof(HASHCODE) + sizeof(DEMAND_MSG_HEADER)) * estimated_total_diff + offer_size = (sizeof(HASHCODE) + sizeof(OFFER_MSG_HEADER)) * estimated_total_diff total_bytes_diff = (element_size + done_size + inquery_size + demand_size + offer_size + ibf_bytes) @@ -2064,19 +2064,24 @@ FUNCTION decide_operation_mode(avg_element_size, ELSE RETURN DIFFERENTIAL_SYNC IF END - - ]]></artwork> + ]]></artwork> +<!-- FIXME: the above algorithm is a mess, starting with formatting; + please begin by using shorter variable names and formatting so + that it renders properly in the HTML. Then, add some comments. + Also note that I switched the first two conditions, which + matters in case both sizes have set size of 0. --> </figure> </section> <section anchor="performance_formula_ibf_parameters" numbered="true" toc="default"> <name>IBF Size</name> <t> The functions, described in this section, calculate the optimal initial size (initial_ibf_size) - and in case of decoding failure, the optimal next bigger IBF size (get_next_ibf_size). + and in case of decoding failure, the optimal next IBF size (get_next_ibf_size). </t> <t> - These algorithms are described and justified in more details in the following work + These algorithms are described and justified in more details in <xref target="byzantine_fault_tolerant_set_reconciliation" format="default"/>. + <!-- FIXME: cite more precisely where in the thesis! --> </t> <figure anchor="performance_formula_ibf_parameters_code"> <artwork name="" type="" align="left" alt=""><![CDATA[ @@ -2088,7 +2093,7 @@ FUNCTION decide_operation_mode(avg_element_size, # next_size: Size of the initial IBF FUNCTION initial_ibf_size(set_difference) - return MAX(37, IBF_BUCKET_NUMBER_FACTOR * set_difference ); + return MAX(37, IBF_BUCKET_NUMBER_FACTOR * set_difference); FUNCTION END # CONSTANTS: @@ -2097,10 +2102,10 @@ FUNCTION END # decoded_elements: Number of elements that have been successfully decoded # last_ibf_size: The number of buckets of the last IBF # Output: -# next_size: Size of the next IBF +# number of buckets for the next IBF FUNCTION get_next_ibf_size(decoded_elements, last_ibf_size) - next_size =(last_ibf_size * IBF_BUCKET_NUMBER_FACTOR) - ( IBF_BUCKET_NUMBER_FACTOR * decoded_elements ) + next_size = IBF_BUCKET_NUMBER_FACTOR * (last_ibf_size - decoded_elements) return MAX(37, next_size); FUNCTION END ]]></artwork> @@ -2112,7 +2117,8 @@ FUNCTION END The number of buckets an element is hashed to is hardcoded to 3. Reasoning and justification can be found in the following work <xref target="byzantine_fault_tolerant_set_reconciliation" format="default"/>. - + <!-- FIXME: Maybe this is better simply left to section 9 constants? + Again, be precise in which part of your thesis you cite. --> </t> </section> </section>