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

Add Inbound Peer Limit #7942

Merged
merged 10 commits into from
Dec 12, 2020
Merged

Add Inbound Peer Limit #7942

merged 10 commits into from
Dec 12, 2020

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Nov 24, 2020

What type of PR is this?

Feature Clean-up

What does this PR do? Why is it needed?

  • Adds an inbound peer limit, to moderate incoming dials.
  • Bumps up co-location limit to be more forgiving.
  • Unit tests .

Which issues(s) does this PR fix?

N.A

Other notes for review

@nisdas nisdas requested a review from a team as a code owner November 24, 2020 16:23
@nisdas nisdas added Ready For Review A pull request ready for code review Networking P2P related items labels Nov 24, 2020
@rauljordan rauljordan changed the base branch from master to develop November 30, 2020 21:41
@@ -73,7 +73,7 @@ func (s *Service) validateDial(addr multiaddr.Multiaddr) bool {
return false
}
s.ipLimiter.Add(ip.String(), 1)
return true
return !s.peers.IsAtInboundLimit()
Copy link
Member

Choose a reason for hiding this comment

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

Any test for this?

Copy link
Member

@prestonvanloon prestonvanloon left a comment

Choose a reason for hiding this comment

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

Can we add a test for connection_gater changes? Seems like an important line of code added

@prestonvanloon prestonvanloon modified the milestones: v1.0.4, v1.0.5 Dec 4, 2020
@prestonvanloon
Copy link
Member

Any update on this?

@prylabs-bulldozer prylabs-bulldozer bot merged commit 11bbf06 into develop Dec 12, 2020
@delete-merged-branch delete-merged-branch bot deleted the addInboundLimit branch December 12, 2020 03:46
@nisdas nisdas mentioned this pull request Dec 18, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Networking P2P related items Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants