Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of open connections is configurable #170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Maelkum
Copy link
Collaborator

@Maelkum Maelkum commented Oct 1, 2024

By default, libp2p connection manager has low and high thresholds.

With the changes in this PR, we use the specified limit as the low threshold but allow up to 20% more connections. When we reach the upper bound (checked each 10 seconds), we trim open connections back to the specified value.

Also, we protect boot nodes against pruning, as those are typically higher priority connections like the head node.

Revamp of #162

Sidenote - updated some dependencies to resolve a security issue reported by dependabot.

@Maelkum Maelkum self-assigned this Oct 1, 2024
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.

1 participant