HomePhabricator

Add test-before-evict discipline to addrman

Description

Add test-before-evict discipline to addrman

Summary:
Changes addrman to use the test-before-evict discipline in which an
address is to be evicted from the tried table is first tested and if
it is still online it is not evicted.

Adds tests to provide test coverage for this change.

This change was suggested as Countermeasure 3 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.

This is a backport of Core PR9037

Depends on D1861

Test Plan:

make check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox, teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1862

Details

Provenance
Ethan Heilman <ethan@geographicslab.org>Authored on Oct 27 2016, 17:55
deadalnixCommitted on Oct 7 2018, 23:40
deadalnixPushed on Oct 7 2018, 23:40
Reviewer
Restricted Project
Differential Revision
D1862: Add test-before-evict discipline to addrman
Parents
rABC28d806194023: Remove unused code
Branches
Unknown
Tags
Unknown

Event Timeline