-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Disable the mempool P2P command when bloom filters disabled #8078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable the mempool P2P command when bloom filters disabled #8078
Conversation
|
utACK fd432d7bb487e410a5e83f375df018132f183871 |
|
utACK/concept ACK fd432d7 |
|
This should also make getdata only use the relaypool to close off the mempool privacy loss. |
|
@gmaxwell Sounds reasonable, but I think out of scope of this pull-req. |
Only useful to SPV peers, and attackers... like bloom is a DoS vector as far more data is sent than received.
|
Would it make sense also to trigger this when bloom filters are enabled, but |
|
Simple test you might want to pull into this PR: |
fd432d7 to
3d3602f
Compare
|
@jonasschnelli Good idea, done. |
|
Also useful to bootstrap a mempool. |
|
@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. |
|
|
||
| class P2PMempoolTests(BitcoinTestFramework): | ||
| def setup_chain(self): | ||
| initialize_chain_clean(self.options.tmpdir, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use __init__ for that, instead of overwriting setup_chain?
I.e. something like
def __init__(self):
super().__init__()
self.num_nodes = 2
self.setup_clean_chain = True # not needed (default should already be true)|
Can one of the admins verify this patch? |
|
@petertodd @jonasschnelli Interested in fixing the two nits for the rpc test? |
|
utACK beceac9 |
|
Going to merge this - the nits can be done later. |
…lters disabled aba64e5 Enable p2p_mempool.py test in the test suite (furszy) 536c251 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. (Peter Todd) Pull request description: Another DoS vector patch coming straight from bitcoin#8078. Plus, enabled and connected the `p2p_mempool.py` functional test and reordered the `mempool_persist.py` in the list based on its time, favoring running tests in parallel. ACKs for top commit: random-zebra: utACK aba64e5 Fuzzbawls: utACK aba64e5 Tree-SHA512: c5cd1797fa2b7d90db9761a55d8c9851653e7d1915678a281cf8b0748f5ca12bd4a0bfd4fdaabed9af2f0ee27d8171a3a3f7fa0875044946c2e190d66a07b24b
Only useful to SPV peers, and attackers... like bloom is a DoS vector as far more data is sent than received.