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

Simplify Filter Whitelisting #92

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Conversation

aarshkshah1992
Copy link
Contributor

@aschmahmann

I've found bugs in the query diversity logic wherein a whitelisted peer can later be rejected by the Filter simply because we don't have an ASN for it's IPV6 address etc etc.

Part of the reason these bugs exist is the filter is hard to reason about. This is one step towards simplifying it.

@@ -185,29 +174,11 @@ func (f *Filter) TryAdd(p peer.ID) bool {
return false
}
if len(key) == 0 {
dfLog.Errorw("group key is empty", "appKey", f.logKey, "ip", ip.String(), "peer", p)
dfLog.Debugw("group key is empty", "appKey", f.logKey, "ip", ip.String(), "peer", p)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aschmahmann This is intentional as it causes needless noise in the logs.

@aarshkshah1992 aarshkshah1992 merged commit 6ee4186 into master Jun 10, 2020
@aarshkshah1992 aarshkshah1992 deleted the fix/filter-whitelisting branch June 10, 2020 18:28
@aschmahmann aschmahmann mentioned this pull request Sep 22, 2020
72 tasks
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