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

Filter Peers Properly With Connection Gater #6251

Merged
merged 5 commits into from
Jun 14, 2020
Merged

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Jun 14, 2020

What type of PR is this?

Feature Improvement

What does this PR do? Why is it needed?

We add filtering to our connection gater so that we can appropriately handle allow and deny lists
properly in its context. Also we now fix allow lists so that only ip's which satisfy the cidr mask are allowed to connect to the beacon node.

  • Remove previous libp2p options and use the connection gater instead.
  • Fix allow lists so that we only allow connections from those relevant IPs.
  • Appropriately filter multiaddresses for both inbound and outbound connections.
  • Add appropriate tests.

Which issues(s) does this PR fix?

Follows on from #6243

Other notes for review

@nisdas nisdas requested a review from a team as a code owner June 14, 2020 13:06
}
}

func TestPeerAllowList(t *testing.T) {
Copy link
Contributor

@shayzluf shayzluf Jun 14, 2020

Choose a reason for hiding this comment

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

it will be good to add test that allow address to peer

@codecov
Copy link

codecov bot commented Jun 14, 2020

Codecov Report

Merging #6251 into master will decrease coverage by 0.17%.
The diff coverage is 63.27%.

@@            Coverage Diff             @@
##           master    #6251      +/-   ##
==========================================
- Coverage   60.07%   59.90%   -0.18%     
==========================================
  Files         323      325       +2     
  Lines       27422    27469      +47     
==========================================
- Hits        16473    16454      -19     
- Misses       8733     8772      +39     
- Partials     2216     2243      +27     

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.

Looks good!

Copy link
Contributor

@shayzluf shayzluf left a comment

Choose a reason for hiding this comment

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

lg

@prylabs-bulldozer prylabs-bulldozer bot merged commit 1dfeb64 into master Jun 14, 2020
@delete-merged-branch delete-merged-branch bot deleted the fixFiltering branch June 14, 2020 14:48
lee51525125 pushed a commit to lee51525125/prysm that referenced this pull request Jun 15, 2020
* add new filtering
* add new tests
* gaz
* shay's review
* Merge branch 'master' into fixFiltering
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.

None yet

3 participants