Skip to content

[ETCM-260] Tweak network config#752

Merged
KonradStaniec merged 5 commits intodevelopfrom
etcm-260/tweak-network-configs
Oct 23, 2020
Merged

[ETCM-260] Tweak network config#752
KonradStaniec merged 5 commits intodevelopfrom
etcm-260/tweak-network-configs

Conversation

@KonradStaniec
Copy link
Copy Markdown
Contributor

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 info as it is pretty usefull

@KonradStaniec KonradStaniec requested a review from mmrozek October 21, 2020 13:11

def scheduler: Scheduler

private val maxSize = 1000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could get this value from config?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

@KonradStaniec KonradStaniec Oct 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. We could use nodesLimit here. Please add a comment why such value (as you explain above)

Copy link
Copy Markdown
Contributor

@mmrozek mmrozek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@KonradStaniec KonradStaniec merged commit 17358d2 into develop Oct 23, 2020
@KonradStaniec KonradStaniec deleted the etcm-260/tweak-network-configs branch October 23, 2020 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants