Do not absolutely protect local peers; decide group ties based on time. #7438

pull gmaxwell wants to merge 2 commits into bitcoin:0.12 from gmaxwell:dont_protect_local changing 1 files +10 −8
  1. gmaxwell commented at 10:42 pm on January 28, 2016: contributor

    [This is the first patch of #7082 broken out targeting 0.12]

    With automatic tor HS support in place we should probably not be providing absolute protection for local peers, since HS inbound could be used to attack pretty easily. Instead, this counts on the latency metric inside AttemptToEvictConnection to privilege actually local peers.

    This also corrects a bug the case of tying group size where the code may fail to select the group with the newest member. Since newest time is the final selection criteria, failing to break ties on it on the step before can undermine the final selection.

    Tied netgroups are very common.

  2. Do not absolutely protect local peers from eviction.
    With automatic tor HS support in place we should probably not be providing
     absolute protection for local peers, since HS inbound could be used to
     attack pretty easily.  Instead, this counts on the latency metric inside
     AttemptToEvictConnection to privilege actually local peers.
    46dbcd4833
  3. Decide eviction group ties based on time.
    This corrects a bug the case of tying group size where the code may
     fail to select the group with the newest member. Since newest time
     is the final selection criteria, failing to break ties on it
     on the step before can undermine the final selection.
    
    Tied netgroups are very common.
    8e09f914f8
  4. dcousens commented at 10:53 pm on January 28, 2016: contributor
    What is HS?
  5. gmaxwell commented at 10:53 pm on January 28, 2016: contributor
    Hidden service.
  6. jonasschnelli added the label P2P on Jan 29, 2016
  7. laanwj added this to the milestone 0.12.0 on Jan 29, 2016
  8. laanwj commented at 9:37 am on February 1, 2016: member
    utACK 8e09f91, thanks for doing this on such short notice
  9. laanwj merged this on Feb 1, 2016
  10. laanwj closed this on Feb 1, 2016

  11. laanwj referenced this in commit e2d9a58588 on Feb 1, 2016
  12. laanwj commented at 1:36 pm on February 2, 2016: member
    This was cherry-picked into master via 1e05727 and 1e9613a (#7453)
  13. zkbot referenced this in commit 45faa928ec on Mar 26, 2017
  14. MarcoFalke locked this on Sep 8, 2021


gmaxwell dcousens petertodd laanwj

Labels
P2P

Milestone
0.12.0


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: 2025-04-03 00:12 UTC

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