De-neuter NODE_BLOOM #7708

pull pstratem wants to merge 1 commits into bitcoin:master from pstratem:2016-03-17-nodebloom changing 4 files +2 −5
  1. pstratem commented at 0:23 am on March 18, 2016: contributor
    Disconnect nodes which request bloom filtering in violation of the protocol.
  2. jonasschnelli added the label P2P on Mar 18, 2016
  3. jonasschnelli commented at 7:17 am on March 18, 2016: contributor

    See also #6579 for discussions.

    utACK.

  4. in src/main.cpp: in d2aee0bca6 outdated
    4376@@ -4377,7 +4377,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
    4377         if (pfrom->nVersion >= NO_BLOOM_VERSION) {
    4378             Misbehaving(pfrom->GetId(), 100);
    4379             return false;
    4380-        } else if (GetBoolArg("-enforcenodebloom", DEFAULT_ENFORCENODEBLOOM)) {
    4381+        } else {
    


    laanwj commented at 9:54 am on March 18, 2016:
    DEFAULT_ENFORCENODEBLOOM constant in main.h needs to go too :)
  5. gmaxwell commented at 10:12 am on March 18, 2016: contributor
    Has someone checked what impact this would have now? (Wouldn’t preclude a merge in master, since there is still a fair amount of time to respond before release– but it would be good to know).
  6. laanwj commented at 10:27 am on March 18, 2016: member

    @gmaxwell Very little, I expect. the intersection of nodes that::

    • Will immediately upgrade to code that includes this
    • Set -peerbloomfilters false (it defaults to true, and will continue to do so)
    • Are not yet using -enforcenodebloom on 0.12

    Is likely to be very, very small.

    This is just continuing the planning, in 0.12 NODE_BLOOM was introduced but not yet enforced (by default) for old versions, and the plan is that in 0.13 it will be enforced for all versions.

    What kind of measurement do you think should change that planning?

    In no case this is going to be backported to 0.12.

  7. jonasschnelli commented at 10:34 am on March 18, 2016: contributor
    Added a counter to my SPV stats node to see how many SPV nodes have not adapted the new rule.
  8. gmaxwell commented at 10:35 am on March 18, 2016: contributor
    Ah. Indeed, I was forgetting that with peerbloomfilters defaulting to true this would have no effect. Still, interesting to know if there has been any progress or not.
  9. pstratem force-pushed on Mar 19, 2016
  10. pstratem commented at 4:25 am on March 19, 2016: contributor
    @laanwj nit picked
  11. Always disconnect old nodes which request filtered connections. c90036f664
  12. laanwj commented at 11:44 am on March 21, 2016: member
    ACK c90036f
  13. laanwj merged this on Mar 21, 2016
  14. laanwj closed this on Mar 21, 2016

  15. laanwj referenced this in commit 9426632cb5 on Mar 21, 2016
  16. rebroad commented at 6:32 am on August 25, 2016: contributor
    @pstratem What is the impact of not disconnecting these nodes?
  17. jonasschnelli commented at 6:45 am on August 25, 2016: contributor

    @rebroad: check https://github.com/bitcoin/bips/blob/master/bip-0111.mediawiki.

    Not all nodes want to provide the BLOOM FILTER service. SPV bloom filtering will consume lots of CPU and disk usage. The produced and consumed data will very likely be worthless for the p2p health after generating/transmitting (where a BLOCK or TX structure will be relay further by other full nodes to other full nodes).

    BIP-0111 will help SPV clients to detect, which peers do and don’t support the NODE_BLOOM service. Otherwise they need to try and disconnect in case they won’t.

  18. sipa commented at 6:51 am on August 25, 2016: member
    And not disconnecting them when they request a bloom filter which we don’t provide would make them unnecessarily stall. By disconnecting you give them an opportunity to find a better peer.
  19. rebroad commented at 7:02 am on August 25, 2016: contributor
    @jonasnick @sipa thanks for explanaing
  20. codablock referenced this in commit edd8f6d66f on Sep 16, 2017
  21. codablock referenced this in commit 3fe37502ac on Sep 19, 2017
  22. codablock referenced this in commit b494eac1bd on Dec 9, 2017
  23. codablock referenced this in commit f4d30a6452 on Dec 19, 2017
  24. 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-06-29 10:13 UTC

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