invbloom: reduce hash count to 3.
authorRusty Russell <rusty@rustcorp.com.au>
Sun, 15 Mar 2015 05:37:26 +0000 (16:07 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 15 Mar 2015 05:39:03 +0000 (16:09 +1030)
Kalle shows the superiority of 3 (as does the paper for > 50 buckets).

https://github.com/kallerosenbaum/bitcoin-iblt/wiki/Diff-count-VS-failure-probability

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/invbloom/invbloom.c

index 08d83c882f8786786453c9981e34fb5c78359b76..bda23462ae5d64ed91d7c1cd22966a19c40d0d0c 100644 (file)
@@ -10,7 +10,7 @@
 
        Eppstein, David, et al. "What's the difference?: efficient set reconciliation without prior context." ACM SIGCOMM Computer Communication Review. Vol. 41. No. 4. ACM, 2011. http://conferences.sigcomm.org/sigcomm/2011/papers/sigcomm/p218.pdf
 */
-#define NUM_HASHES 4
+#define NUM_HASHES 3
 
 struct invbloom *invbloom_new_(const tal_t *ctx,
                               size_t id_size,