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

findpeer should work even on peers that are not part of DHT queries #711

Merged
merged 3 commits into from
Apr 5, 2021

Conversation

aschmahmann
Copy link
Contributor

@aschmahmann aschmahmann commented Apr 1, 2021

replaces #708

It looks like when we switched to using QueryFilters to remove relayed peers or other undesirables from our queries we ended up effecting FindPeer because FindPeer isn't treated like a normal put/get but as an "accidental" extension of a normal query.

See #584 for more info on the specialness of FindPeer

… dialed as part of the query under the queryfilter
When performing queries query the next peer if it happens to match
the target even if it would normally be excluded by the queryfilter.

This is meant for fixing FindPeer, but for ease of implementation
is applying more broadly to queries like GetClosestPeers as well.
@aschmahmann aschmahmann requested a review from Stebalien April 1, 2021 18:35
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

This will "fix" the issue, but we should probably return the target peer some other way.

@aschmahmann aschmahmann merged commit f05ebb2 into master Apr 5, 2021
@aschmahmann
Copy link
Contributor Author

aschmahmann commented Apr 5, 2021

This will "fix" the issue, but we should probably return the target peer some other way.

Not sure if it's worth fixing separately from #584 though. It'd be more "correct" to have a special path through the query logic for FindPeer (e.g. even just a field in the query struct isFindPeer), but not sure whether it's worth the bother/added code complexity.

@aschmahmann aschmahmann mentioned this pull request May 3, 2021
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 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