Remove the IRC triggered hard last-seen check from the peer selection. #326

pull gmaxwell wants to merge 1 commits into bitcoin:master from gmaxwell:irc_departitioning changing 1 files +0 −5
  1. gmaxwell commented at 2:50 PM on June 18, 2011: contributor

    .Now that IRC is partitioned we won't actually see most nodes coming and going, so excluding these nodes greatly increases the amount of clique formation.

    This was bad even before the channel split because the /who output was limited, so we'd end to stop connecting to long running stable nodes.

  2. Remove the IRC triggered hard last-seen check from the peer
    selection.
    
    Now that IRC is partitioned we won't actually see most nodes coming
    and going, so excluding these nodes greatly increases the amount of
    clique formation.
    
    This was bad even before the channel split because the /who output
    was limited, so we'd end to stop connecting to long running stable
    nodes.
    b1fc3250e1
  3. gavinandresen commented at 2:58 PM on June 18, 2011: contributor

    How can we test this to make sure it makes connectivity better instead of the same or worse?

  4. jrmithdobbs commented at 3:17 PM on June 18, 2011: contributor

    I'm not sure how to test it well, but it makes sense. Preferring nodes that just happen to be in the same irc channel we are is always going to leave a large chunk of good connectable nodes out of the list of possible outbound connections and could eventually lead to island networks in some cases.

  5. gmaxwell commented at 3:30 PM on June 18, 2011: contributor

    I've been running it on a node for a week after I observed that it was only had outbound connections to hosts in the same IRC channel. It has two now.

    It doesn't completely fix the behavior. Because IRC updates the addr.nTime and the time since then is used to control the retry interval it makes nodes much more likely to connect within the channel they are in. But at least with this patch they won't have a zero chance (after the first connection).

    One piece of evidence of this patch's probable safety is that this check also doesn't run for nodes which have IRC disabled, and isn't applied when there is only one connection. Also, the significant majority of nodes listed on IRC (which would get included by this check) are not listening already. So the fact that this check may cause a few more long unreachable nodes to be tried shouldn't be harmful.

    More needs to be done wrt. pruning addr.dat, excluding non-listening nodes, connection rotation, etc. If IRC is retained by default (I don't know what the core dev's plans are for that) then I'll go ahead and submit patches for multi-join (listening nodes should join two channels) and periodic channel hop (every n-hours switch to another channel), both of which I have working but didn't bother cleaning up for submission because I didn't expect bitcoin to keep IRC on by default for long.

  6. gmaxwell closed this on Jun 18, 2011

  7. gmaxwell commented at 6:07 PM on June 18, 2011: contributor

    Er. github lost the last comment I wrote.

    I'm closing this for now because I also want to fix another issue at the same time where the client can get stuck unable to make new outgoing connections, as I'm concerned that it may be worse in the no IRC case (and after this patch). I think whats happening there is that once all remaining nodes have last tried greater than the minimum used in the score, that the ranking becomes completely stationary and it only ever tries one node (until some lucky IRC activity perturbs the order).

    It's going to take me a day to to collect data from an instrumented node to confirm I understand that bug, and a day to confirm that my fix is correct. So I suppose this should wait until then. Sorry for the premature request.

  8. sipa referenced this in commit 9177950c74 on Oct 21, 2015
  9. sipa referenced this in commit f4787d1caf on Oct 21, 2015
  10. sipa referenced this in commit 6557a8cd46 on Oct 26, 2015
  11. sipa referenced this in commit ea06490d14 on Oct 27, 2015
  12. sipa referenced this in commit 003bb87153 on Nov 5, 2015
  13. sipa referenced this in commit bfd83199c3 on Nov 11, 2015
  14. sipa referenced this in commit b437ea7ec9 on Nov 12, 2015
  15. sipa referenced this in commit 1d84107924 on Nov 12, 2015
  16. dexX7 referenced this in commit 1cb1e11892 on Jan 4, 2016
  17. jtimon referenced this in commit 91ee21c024 on Mar 11, 2016
  18. rebroad referenced this in commit 40ead34fbe on Dec 7, 2016
  19. deadalnix referenced this in commit ee58fae4f8 on Jan 19, 2017
  20. destenson referenced this in commit 8b6a13ec48 on Nov 18, 2017
  21. destenson referenced this in commit 1df4af4b10 on Nov 18, 2017
  22. classesjack referenced this in commit 5a84ee02e6 on Jan 2, 2018
  23. attilaaf referenced this in commit 087b68af1b on Jan 13, 2020
  24. 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: 2026-04-18 21:16 UTC

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