Skip to content

Commit

Permalink
Updated the kademlia consts in discover/table.go
Browse files Browse the repository at this point in the history
dominant-strategies#546 to track this
change.
  • Loading branch information
gameofpointers authored and wizeguyy committed Jan 25, 2023
1 parent 4847aa7 commit 3f4e260
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions p2p/discover/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@ import (
)

const (
alpha = 3 // Kademlia concurrency factor
alpha = 6 // Kademlia concurrency factor
bucketSize = 16 // Kademlia bucket size
maxReplacements = 10 // Size of per-bucket replacement list

// We keep buckets for the upper 1/15 of distances because
// it's very unlikely we'll ever encounter a node that's closer.
hashBits = len(common.Hash{}) * 8
nBuckets = hashBits / 15 // Number of buckets
nBuckets = hashBits // Number of buckets
bucketMinDistance = hashBits - nBuckets // Log distance of closest bucket

// IP address limits.
bucketIPLimit, bucketSubnet = 2, 24 // at most 2 addresses from the same /24
tableIPLimit, tableSubnet = 10, 24
bucketIPLimit, bucketSubnet = 24, 24 // at most 2 addresses from the same /24
tableIPLimit, tableSubnet = 24, 24

refreshInterval = 30 * time.Minute
revalidateInterval = 10 * time.Second
copyNodesInterval = 30 * time.Second
seedMinTableTime = 5 * time.Minute
seedMinTableTime = 1 * time.Second
seedCount = 30
seedMaxAge = 5 * 24 * time.Hour
)
Expand Down

0 comments on commit 3f4e260

Please sign in to comment.