Disable the mempool P2P command when bloom filters disabled #8078

pull petertodd wants to merge 2 commits into bitcoin:master from petertodd:2016-05-mempool-p2p-and-bloom changing 2 files +106 −0
  1. petertodd commented at 1:48 pm on May 20, 2016: contributor
    Only useful to SPV peers, and attackers… like bloom is a DoS vector as far more data is sent than received.
  2. jonasschnelli commented at 1:49 pm on May 20, 2016: contributor
    utACK fd432d7bb487e410a5e83f375df018132f183871
  3. laanwj added the label P2P on May 20, 2016
  4. gmaxwell commented at 1:59 pm on May 20, 2016: contributor
    This should also make getdata only use the relaypool to close off the mempool privacy loss.
  5. petertodd commented at 2:05 pm on May 20, 2016: contributor
    @gmaxwell Sounds reasonable, but I think out of scope of this pull-req.
  6. Disable the mempool P2P command when bloom filters disabled
    Only useful to SPV peers, and attackers... like bloom is a DoS vector as far
    more data is sent than received.
    beceac9bbf
  7. kazcw commented at 2:50 pm on May 20, 2016: contributor
    Would it make sense also to trigger this when bloom filters are enabled, but pfrom has not set one?
  8. Add RPC test for the p2p mempool command in conjunction with disabled bloomfilters 3d3602faf4
  9. jonasschnelli commented at 2:52 pm on May 20, 2016: contributor
  10. petertodd force-pushed on May 20, 2016
  11. petertodd commented at 3:10 pm on May 20, 2016: contributor
    @jonasschnelli Good idea, done.
  12. luke-jr commented at 3:10 pm on May 20, 2016: member
    Also useful to bootstrap a mempool.
  13. petertodd commented at 3:21 pm on May 20, 2016: contributor
    @luke-jr That’s why it’s still allowed for whitelisted nodes; in general it’s a DoS attack and we need a better system. Also we discussed the bootstrap case and think getting all the mempool isn’t actually all that useful, for things we expect to need it like block relaying optimizations - need a subset.
  14. in qa/rpc-tests/p2p-mempool.py: in 3d3602faf4
    71+        self.lastInv = []
    72+        self.send_message(msg_mempool())
    73+
    74+class P2PMempoolTests(BitcoinTestFramework):
    75+    def setup_chain(self):
    76+        initialize_chain_clean(self.options.tmpdir, 2)
    


    MarcoFalke commented at 2:18 pm on May 21, 2016:

    Could you use __init__ for that, instead of overwriting setup_chain?

    I.e. something like

    0    def __init__(self):
    1        super().__init__()
    2        self.num_nodes = 2
    3        self.setup_clean_chain = True # not needed (default should already be true)
    
  15. arowser commented at 8:43 am on May 25, 2016: contributor
    Can one of the admins verify this patch?
  16. MarcoFalke commented at 11:46 am on June 3, 2016: member
    @petertodd @jonasschnelli Interested in fixing the two nits for the rpc test?
  17. laanwj commented at 10:56 am on June 8, 2016: member
    Going to merge this - the nits can be done later.
  18. laanwj merged this on Jun 8, 2016
  19. laanwj closed this on Jun 8, 2016

  20. laanwj referenced this in commit 2156fa23b8 on Jun 8, 2016
  21. codablock referenced this in commit 3014543a5e on Sep 16, 2017
  22. codablock referenced this in commit 9845bfe13a on Sep 19, 2017
  23. codablock referenced this in commit 2ee817fb0d on Dec 22, 2017
  24. andvgal referenced this in commit 4bad9e80cc on Jan 6, 2019
  25. furszy referenced this in commit 297fd18fd4 on Feb 13, 2021
  26. 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-11-25 03:12 UTC

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