From c80c8e7fe9000d887e1e7b9e22595f1b50d8de23 Mon Sep 17 00:00:00 2001 From: David Hill Date: Mon, 6 Apr 2015 11:45:57 -0400 Subject: [PATCH] Scale up addrman. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change was suggested as Countermeasure 6 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 mimics Bitcoin Core commit 1d21ba2f5ecbf03086d0b65c4c4c80a39a94c2ee --- addrmgr/addrmanager.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addrmgr/addrmanager.go b/addrmgr/addrmanager.go index a5f59274..dd1734c1 100644 --- a/addrmgr/addrmanager.go +++ b/addrmgr/addrmanager.go @@ -104,7 +104,7 @@ const ( // triedBucketSize is the maximum number of addresses in each // tried address bucket. - triedBucketSize = 64 + triedBucketSize = 256 // triedBucketCount is the number of buckets we split tried // addresses over. @@ -116,19 +116,19 @@ const ( // newBucketCount is the number of buckets that we spread new addresses // over. - newBucketCount = 256 + newBucketCount = 1024 // triedBucketsPerGroup is the number of tried buckets over which an // address group will be spread. - triedBucketsPerGroup = 4 + triedBucketsPerGroup = 8 // newBucketsPerGroup is the number of new buckets over which an // source address group will be spread. - newBucketsPerGroup = 32 + newBucketsPerGroup = 64 // newBucketsPerAddress is the number of buckets a frequently seen new // address may end up in. - newBucketsPerAddress = 4 + newBucketsPerAddress = 8 // numMissingDays is the number of days before which we assume an // address has vanished if we have not seen it announced in that long.