Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Improve query capabilities #932
Improve query capabilities #932
Changes from 2 commits
86285a0
d5f37fe
ac0e316
a9f130e
13934e2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 171 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L171
Check warning on line 180 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L179-L180
Check warning on line 263 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L263
Check warning on line 345 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L345
Check warning on line 375 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L375
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should make
20
configurableThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this number is like a global parameter. If we set this here to e.g. 30, every other peer would still respond with the 20 closest peers it knows. The remaining ten that we receive are just other random close peers. @guillaumemichel devised a great technique to query for a wider range of peers which is more elaborate: https://www.notion.so/pl-strflt/N-closest-peers-83038476d00f4af1bfb40aeeefec39f5?pvs=4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should be configurable. Though here the call to GetClosestNodes is getting the 20 closest nodes from our own routing table to seed the query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indirectly used the DHT's bucketsize config value
Check warning on line 421 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L420-L421
Check warning on line 452 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L452
Check warning on line 478 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L478
Check warning on line 549 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L541-L549
Check warning on line 593 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L592-L593
Check warning on line 619 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L618-L619
Check warning on line 645 in v2/coord/coordinator.go
Codecov / codecov/patch
v2/coord/coordinator.go#L644-L645
Check warning on line 73 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L71-L73
Check warning on line 85 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L84-L85
Check warning on line 96 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L95-L96
Check warning on line 111 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L110-L111
Check warning on line 147 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L146-L147
Check warning on line 159 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L158-L159
Check warning on line 196 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L195-L196
Check warning on line 216 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L215-L216
Check warning on line 225 in v2/coord/event.go
Codecov / codecov/patch
v2/coord/event.go#L224-L225
Check warning on line 30 in v2/coord/internal/tiny/node.go
Codecov / codecov/patch
v2/coord/internal/tiny/node.go#L29-L30
Check warning on line 175 in v2/coord/network.go
Codecov / codecov/patch
v2/coord/network.go#L175
Check warning on line 248 in v2/coord/network.go
Codecov / codecov/patch
v2/coord/network.go#L248