Addrman offline attempts #8065

pull gmaxwell wants to merge 2 commits into bitcoin:master from gmaxwell:addrman_offline_attempts changing 5 files +31 −17
  1. gmaxwell commented at 7:26 am on May 17, 2016: contributor

    If a node is offline failed outbound connection attempts will crank up the addrman counter and effectively blow away our state.

    This change reduces the problem by only counting attempts made while the node believes it has outbound connections to at least two netgroups.

    Connect and addnode connections are also not counted, as there is no reason to unequally penalize them for their more frequent connections – though there should be no real effect from this unless their addnode configureation is later removed.

    Wasteful repeated connection attempts while only a few connections are up are avoided via nLastTry.

    This is still somewhat incomplete protection because our outbound peers could be down but not timed out or might all be on ’local' networks (although the requirement for multiple netgroups helps).

    ( reopen of #6030 )

  2. jonasschnelli added the label P2P on May 17, 2016
  3. pstratem commented at 10:07 pm on May 17, 2016: contributor
    This should probably be checking for connections to at least two netgroups outside of RFC1918 IP space, but this is certainly an improvement.
  4. gmaxwell commented at 9:17 am on May 18, 2016: contributor
    @pstratem checking connections is better than no check at all. This PR is from April 2015, so I’m not inclined to expand the scope any further right now. If this is accepted I’ll happily open a follow on PR to make it stronger.
  5. arowser commented at 8:43 am on May 25, 2016: contributor
    Can one of the admins verify this patch?
  6. sipa commented at 5:23 pm on May 25, 2016: member
    Needs rebase.
  7. sipa commented at 12:32 pm on May 26, 2016: member
    Did you accidentally include #7992?
  8. sipa commented at 12:35 pm on May 26, 2016: member
    utACK 66cefd47194a8aa7478dbea9a1b96640febeeda7
  9. Avoid counting failed connect attempts when probably offline.
    If a node is offline failed outbound connection attempts will crank up
     the addrman counter and effectively blow away our state.
    
    This change reduces the problem by only counting attempts made while
     the node believes it has outbound connections to at least two
     netgroups.
    
    Connect and addnode connections are also not counted, as there is no
     reason to unequally penalize them for their more frequent
     connections -- though there should be no real effect from this
     unless their addnode configureation is later removed.
    
    Wasteful repeated connection attempts while only a few connections are
     up are avoided via nLastTry.
    
    This is still somewhat incomplete protection because our outbound
     peers could be down but not timed out or might all be on 'local'
     networks (although the requirement for multiple netgroups helps).
    c769c4af11
  10. Do not increment nAttempts by more than one for every Good connection.
    This slows the increase of the nAttempts in addrman while partitioned,
     even if the node hasn't yet noticed the partitioning.
    6182d10503
  11. sipa commented at 10:27 pm on May 26, 2016: member
    Running a public node with #7960 #8007 #8065 #8080 #8082 #8084 #8086 for testing.
  12. sipa commented at 2:52 pm on June 7, 2016: member
    This should be easy to test manually: add a debug log entry above the info.nAttempts increment in CAddrMan::Attempt_(), and see how often it triggers with network connected and disconnected.
  13. laanwj commented at 10:58 am on June 8, 2016: member
    utACK 6182d10
  14. laanwj merged this on Jun 8, 2016
  15. laanwj closed this on Jun 8, 2016

  16. laanwj referenced this in commit 67c91f8c4c on Jun 8, 2016
  17. sickpig referenced this in commit 7bb7ee7b1e on Apr 14, 2017
  18. sickpig referenced this in commit e35c03a72f on Apr 14, 2017
  19. sickpig referenced this in commit acc6b17a1a on Apr 14, 2017
  20. sickpig referenced this in commit 45bef70677 on Apr 14, 2017
  21. sickpig referenced this in commit 77a5dbc995 on Apr 14, 2017
  22. sickpig referenced this in commit 91b33b058c on Apr 14, 2017
  23. codablock referenced this in commit d8211d2538 on Sep 16, 2017
  24. codablock referenced this in commit ce90bf9e00 on Sep 19, 2017
  25. codablock referenced this in commit 00c84ca53e on Dec 22, 2017
  26. andvgal referenced this in commit 123e32fe1a on Jan 6, 2019
  27. furszy referenced this in commit 195d46690c on Mar 27, 2020
  28. akshaynexus referenced this in commit 23f7fe49b0 on Mar 30, 2020
  29. wqking referenced this in commit 69fa150dcb on Aug 24, 2020
  30. 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-12-19 00:12 UTC

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