mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-23 06:35:20 +01:00
Scale up addrman.
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
This commit is contained in:
parent
07176c8f65
commit
c80c8e7fe9
1 changed files with 5 additions and 5 deletions
|
@ -104,7 +104,7 @@ const (
|
||||||
|
|
||||||
// triedBucketSize is the maximum number of addresses in each
|
// triedBucketSize is the maximum number of addresses in each
|
||||||
// tried address bucket.
|
// tried address bucket.
|
||||||
triedBucketSize = 64
|
triedBucketSize = 256
|
||||||
|
|
||||||
// triedBucketCount is the number of buckets we split tried
|
// triedBucketCount is the number of buckets we split tried
|
||||||
// addresses over.
|
// addresses over.
|
||||||
|
@ -116,19 +116,19 @@ const (
|
||||||
|
|
||||||
// newBucketCount is the number of buckets that we spread new addresses
|
// newBucketCount is the number of buckets that we spread new addresses
|
||||||
// over.
|
// over.
|
||||||
newBucketCount = 256
|
newBucketCount = 1024
|
||||||
|
|
||||||
// triedBucketsPerGroup is the number of tried buckets over which an
|
// triedBucketsPerGroup is the number of tried buckets over which an
|
||||||
// address group will be spread.
|
// address group will be spread.
|
||||||
triedBucketsPerGroup = 4
|
triedBucketsPerGroup = 8
|
||||||
|
|
||||||
// newBucketsPerGroup is the number of new buckets over which an
|
// newBucketsPerGroup is the number of new buckets over which an
|
||||||
// source address group will be spread.
|
// source address group will be spread.
|
||||||
newBucketsPerGroup = 32
|
newBucketsPerGroup = 64
|
||||||
|
|
||||||
// newBucketsPerAddress is the number of buckets a frequently seen new
|
// newBucketsPerAddress is the number of buckets a frequently seen new
|
||||||
// address may end up in.
|
// address may end up in.
|
||||||
newBucketsPerAddress = 4
|
newBucketsPerAddress = 8
|
||||||
|
|
||||||
// numMissingDays is the number of days before which we assume an
|
// numMissingDays is the number of days before which we assume an
|
||||||
// address has vanished if we have not seen it announced in that long.
|
// address has vanished if we have not seen it announced in that long.
|
||||||
|
|
Loading…
Add table
Reference in a new issue