[ETCM-260] Tweak network config#752
Conversation
|
|
||
| def scheduler: Scheduler | ||
|
|
||
| private val maxSize = 1000 |
There was a problem hiding this comment.
Maybe we could get this value from config?
There was a problem hiding this comment.
problem is that this trait is shared across many different components, so the question arises what config. Also some of those componets should probably use differnt values.
| with ActorLogging | ||
| with Stash | ||
| with BlacklistSupport { | ||
| override val maxBlacklistedNodes: Int = 5000 |
There was a problem hiding this comment.
Why do we need to override this value? Couldn't we change it in the base trait? Or maybe base trait shouldn't use any default value?
There was a problem hiding this comment.
we override it as other components do not need such large value, as usually they do not see more than few peers. PeerManageActor se more peers as it is almost on the lowset level of the stack, so it will see ~5k peers from which most will be useless (not neceserilly malicious, but just not usefull).
This whole blacklisting/marking useless peers approach sucks, but here I just wanted to tweak some values to more realistic ones.
One thing we could easily improce is to use here value from DiscoveryConfig.nodesLimit as we should not have more blacklisted peers than those found in discovery. wdyt ?
There was a problem hiding this comment.
I agree with you. We could use nodesLimit here. Please add a comment why such value (as you explain above)
Description
Sometimes it takes long time to find new peers. And main reason for it is that we restrict found peers to 1000 nodes where there at least 5000 in the network.
Also increases max blacklisted nodes on network level to avoid constant churn in blacklist list.
Also changes peer inoo logs to
infoas it is pretty usefull