doc: make it easier to work out size of bloom filter #19130

pull ajtowns wants to merge 1 commits into bitcoin:master from ajtowns:202005-bloom-doc changing 1 files +12 −1
  1. ajtowns commented at 4:29 AM on June 1, 2020: member

    I've manually traced through the bloom filter code to work out how big a filter ends up being a few times now; this just adds some python code as a comment so it's easy to do that by cutting and pasting into an interpreter instead.

  2. doc: make it easier to work out size of bloom filter d896aee3ae
  3. fanquake added the label Docs on Jun 1, 2020
  4. sipa commented at 4:42 AM on June 1, 2020: member

    Looks right, but perhaps it should go in the .h file (which has an easier approximate formula already).

  5. MarcoFalke commented at 11:54 AM on June 1, 2020: member

    An alternative would be to run the code in massif and show the size of the object. :grimacing:

  6. sipa commented at 11:19 PM on June 1, 2020: member

    To have an idea of the approximation, the formula "4.328 bits per element and per bit of fprate" is at most 0.115% off for better than 8-bit fprate (fprate < 1/256). For 10-bit, at most 0.074%. For 12-bit, at most 0.052%. For 20-bit, 0.019%.

  7. laanwj commented at 6:53 PM on July 22, 2020: member

    Looks right, but perhaps it should go in the .h file (which has an easier approximate formula already).

    I agree. In general, this kind of documentation would be better in the header file. This also gets included in doxygen etc.

  8. fanquake added the label Waiting for author on Aug 23, 2020
  9. fanquake commented at 4:21 AM on August 23, 2020: member

    @ajtowns did you want to follow up here and move this into the header?

  10. fanquake added the label Up for grabs on Sep 15, 2020
  11. fanquake closed this on Sep 15, 2020

  12. fanquake removed the label Up for grabs on Sep 17, 2020
  13. fanquake removed the label Waiting for author on Sep 17, 2020
  14. laanwj referenced this in commit e12ad7f383 on Nov 19, 2020
  15. sidhujag referenced this in commit 283a159512 on Nov 19, 2020
  16. jnewbery commented at 9:36 AM on February 14, 2021: member

    This is really helpful. I'd love to see it merged into the header file at some point.

  17. laanwj commented at 9:44 AM on February 14, 2021: member

    #19968 did that, i think ?

  18. jnewbery commented at 10:05 AM on February 14, 2021: member

    #19968 did that, i think ?

    Oh! I remembered there was a python snippet to calculate this and couldn't find it in master. I see now that #19968 included the formula without the script. That's good.

  19. PastaPastaPasta referenced this in commit d4c943a872 on Jun 27, 2021
  20. PastaPastaPasta referenced this in commit fb5804a0b2 on Jun 28, 2021
  21. PastaPastaPasta referenced this in commit 108c9b1891 on Jun 29, 2021
  22. PastaPastaPasta referenced this in commit fc333b0a9a on Jul 1, 2021
  23. PastaPastaPasta referenced this in commit 1d3ab5aa9d on Jul 1, 2021
  24. PastaPastaPasta referenced this in commit 101a0bba40 on Jul 15, 2021
  25. PastaPastaPasta referenced this in commit e376c205dd on Jul 15, 2021
  26. PastaPastaPasta referenced this in commit a9b5723556 on Jul 16, 2021
  27. gabriel-bjg referenced this in commit 105338f255 on Jul 16, 2021
  28. gades referenced this in commit c34b31e2ae on Apr 25, 2022
  29. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 12:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me