Tune revalidateMax + defaultMaxGossipNodes values in wire protocol (#2658)

The revalidateMax value is lowered to have a quicker ramp up of
the radiusCache + to keep it healthier.

The defaultMaxGossipNodes value is lowered because with the
current value a Nodes lookup is triggered almost always.
This value is dependant on the content replication value. This
is dependant on the network (and subnetwork) because of the amount
of nodes and their radius/storage capacity.
This commit is contained in:
Kim De Mey 2024-09-25 17:38:33 +02:00 committed by GitHub
parent 69d58e8215
commit dd5bb695ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -115,7 +115,7 @@ const
## that will be processed
refreshInterval = 5.minutes ## Interval of launching a random query to
## refresh the routing table.
revalidateMax = 10000 ## Revalidation of a peer is done between 0 and this
revalidateMax = 4000 ## Revalidation of a peer is done between 0 and this
## value in milliseconds
initialLookups = 1 ## Amount of lookups done when populating the routing table
@ -1500,8 +1500,8 @@ proc neighborhoodGossip*(
# 1. Select the closest neighbours in the routing table
# 2. Check if the radius is known for these these nodes and whether they are
# in range of the content to be offered.
# 3. If more than n (= 8) nodes are in range, offer these nodes the content
# (max nodes set at 8).
# 3. If more than n (= maxGossipNodes) nodes are in range, offer these nodes
# the content (maxed out at n).
# 4. If less than n nodes are in range, do a node lookup, and offer the nodes
# returned from the lookup the content (max nodes set at 8)
#

View File

@ -46,7 +46,7 @@ const
defaultRadiusConfig* = RadiusConfig(kind: Dynamic)
defaultRadiusConfigDesc* = $defaultRadiusConfig.kind
defaultDisablePoke* = false
defaultMaxGossipNodes = 8
defaultMaxGossipNodes = 4
revalidationTimeout* = chronos.seconds(30)
defaultPortalProtocolConfig* = PortalProtocolConfig(