trivial: fix bloom filter init to isEmpty = true #9060

pull robmcl4 wants to merge 1 commits into bitcoin:master from robmcl4:fix-bloom-filter-empty-init changing 1 files +1 −1
  1. robmcl4 commented at 1:12 am on November 2, 2016: contributor
    Fixes newly initialized bloom filters being constructed with isEmpty(false), which still works but loses the possible speedup when checking for key membership in an empty filter.
  2. trivial: fix bloom filter init to isEmpty = true
    Fixes newly initialized bloom filters being
    constructed with isEmpty(false), which still
    works but loses the possible speedup when
    checking for key membership in an empty filter.
    cccf73db04
  3. gmaxwell commented at 1:39 am on November 2, 2016: contributor

    I don’t see anything wrong with doing this, though the IsEmpty/IsFull optimizations were largely a pretextual optimization intended to make unexploitable a remote crash vulnerability (integer division by zero) that existed in the original bloom filtering code without disclosing it. I’m doubtful that they are all that useful. :)

    (if someone does want to remove them entirely, make sure to actually remove the vulnerability too! :) )

  4. TheBlueMatt commented at 1:42 am on November 2, 2016: member

    We need to be better about documenting such failures after sufficient time has passed…

    On November 1, 2016 9:39:50 PM EDT, Gregory Maxwell notifications@github.com wrote:

    I don’t see anything wrong with doing this, though the IsEmpty/IsFull optimizations were largely a pretextual optimization intended to make unexploitable a remote crash vulnerability (integer division by zero) that existed in the original bloom filtering code without disclosing it.

    You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: #9060 (comment)

  5. laanwj added the label Bug on Nov 2, 2016
  6. laanwj commented at 9:36 am on November 2, 2016: member
    utACK https://github.com/bitcoin/bitcoin/pull/9060/commits/cccf73db0483cc3945bf8389ce197df35e931e16, as long as we still have these optimizations they should at least be correct.
  7. laanwj merged this on Nov 2, 2016
  8. laanwj closed this on Nov 2, 2016

  9. laanwj referenced this in commit 1107653d05 on Nov 2, 2016
  10. robmcl4 deleted the branch on Nov 2, 2016
  11. fanquake referenced this in commit 551dc7f664 on May 6, 2020
  12. sidhujag referenced this in commit e9d4768e75 on May 12, 2020
  13. zkbot referenced this in commit be459619a8 on Mar 5, 2021
  14. zkbot referenced this in commit 78de0cdf46 on Apr 15, 2021
  15. MarcoFalke locked this on Sep 8, 2021

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: 2024-10-30 03:12 UTC

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