Replace setInventoryKnown with a rolling bloom filter (rebase of #7100) #7133

pull sipa wants to merge 6 commits into bitcoin:master from sipa:known_bloom changing 8 files +16 −166
  1. sipa commented at 12:31 pm on November 30, 2015: member
  2. Replace setInventoryKnown with a rolling bloom filter.
    Mruset setInventoryKnown was reduced to a remarkably small 1000
     entries as a side effect of sendbuffer size reductions in 2012.
    
    This removes setInventoryKnown filtering from merkleBlock responses
     because false positives there are especially unattractive and
     also because I'm not sure if there aren't race conditions around
     the relay pool that would cause some transactions there to
     be suppressed. (Also, ProcessGetData was accessing
     setInventoryKnown without taking the required lock.)
    ec73ef37ec
  3. Remove mruset as it is no longer used. e20672479e
  4. Rename setInventoryKnown filterInventoryKnown 6b849350ab
  5. Only use filterInventoryKnown with MSG_TX inventory messages.
    Previously this logic could erroneously filter a MSG_BLOCK inventory message.
    b6a0da45db
  6. Actually only use filterInventoryKnown with MSG_TX inventory messages.
    Previously this logic could erroneously filter a MSG_BLOCK inventory message.
    d41e44c9ac
  7. When not filtering blocks, getdata sends more in one test aa4b0c26b0
  8. jtimon commented at 3:30 pm on November 30, 2015: contributor
    utACK
  9. gmaxwell commented at 0:05 am on December 2, 2015: contributor
    ACK
  10. in src/net.cpp: in aa4b0c26b0
    2341@@ -2342,7 +2342,7 @@ unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", DEFAULT_MAX
    2342 CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNameIn, bool fInboundIn) :
    2343     ssSend(SER_NETWORK, INIT_PROTO_VERSION),
    2344     addrKnown(5000, 0.001),
    2345-    setInventoryKnown(SendBufferSize() / 1000)
    2346+    filterInventoryKnown(50000, 0.000001)
    


    dcousens commented at 2:37 am on December 2, 2015:
    Why 50000 OOI? Should this be a named constant?
  11. dcousens commented at 2:38 am on December 2, 2015: contributor
    utACK
  12. dcousens commented at 2:41 am on December 2, 2015: contributor
    Also ACK on FP ratio of 0.000001:1
  13. petertodd commented at 10:43 am on December 3, 2015: contributor
    utACK
  14. laanwj merged this on Dec 3, 2015
  15. laanwj closed this on Dec 3, 2015

  16. laanwj referenced this in commit 8843676621 on Dec 3, 2015
  17. laanwj commented at 12:17 pm on December 3, 2015: member
    utACK
  18. gmaxwell referenced this in commit f31955d9da on Dec 4, 2015
  19. morcos commented at 3:42 pm on December 11, 2015: member
    posthumous utACK. nice.
  20. laanwj added the label P2P on Jul 18, 2016
  21. random-zebra referenced this in commit 8bbc0650e6 on Jul 1, 2020
  22. zkbot referenced this in commit 9dd55615d0 on Feb 22, 2021
  23. zkbot referenced this in commit 2aa9fbbdfe on Mar 5, 2021
  24. zkbot referenced this in commit a7e877a350 on Aug 13, 2021
  25. DrahtBot 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-11-17 18:12 UTC

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