gitlab.com/gpdionisio/tendermint@v0.34.19-dev2/p2p/pex/params.go (about)

     1  package pex
     2  
     3  import "time"
     4  
     5  const (
     6  	// addresses under which the address manager will claim to need more addresses.
     7  	needAddressThreshold = 1000
     8  
     9  	// interval used to dump the address cache to disk for future use.
    10  	dumpAddressInterval = time.Minute * 2
    11  
    12  	// max addresses in each old address bucket.
    13  	oldBucketSize = 64
    14  
    15  	// buckets we split old addresses over.
    16  	oldBucketCount = 64
    17  
    18  	// max addresses in each new address bucket.
    19  	newBucketSize = 64
    20  
    21  	// buckets that we spread new addresses over.
    22  	newBucketCount = 256
    23  
    24  	// old buckets over which an address group will be spread.
    25  	oldBucketsPerGroup = 4
    26  
    27  	// new buckets over which a source address group will be spread.
    28  	newBucketsPerGroup = 32
    29  
    30  	// buckets a frequently seen new address may end up in.
    31  	maxNewBucketsPerAddress = 4
    32  
    33  	// days before which we assume an address has vanished
    34  	// if we have not seen it announced in that long.
    35  	numMissingDays = 7
    36  
    37  	// tries without a single success before we assume an address is bad.
    38  	numRetries = 3
    39  
    40  	// max failures we will accept without a success before considering an address bad.
    41  	maxFailures = 10 // ?
    42  
    43  	// days since the last success before we will consider evicting an address.
    44  	minBadDays = 7
    45  
    46  	// % of total addresses known returned by GetSelection.
    47  	getSelectionPercent = 23
    48  
    49  	// min addresses that must be returned by GetSelection. Useful for bootstrapping.
    50  	minGetSelection = 32
    51  
    52  	// max addresses returned by GetSelection
    53  	// NOTE: this must match "maxMsgSize"
    54  	maxGetSelection = 250
    55  )