-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Discv5: Do not issue FINDNODES right after the start #3429
Conversation
Code Climate has analyzed commit 8dfad5d and detected 0 issues on this pull request. View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## master #3429 +/- ##
==========================================
- Coverage 38.12% 38.09% -0.03%
==========================================
Files 303 303
Lines 7911 7917 +6
Branches 1219 1220 +1
==========================================
Hits 3016 3016
- Misses 4754 4760 +6
Partials 141 141 |
Performance Report✔️ no performance regression detected Full benchmark results
|
5d75192
to
c5cef29
Compare
@dapplion even through we define
|
// Delay the 1st query after starting discv5 | ||
if (Date.now() - this.discv5StartMs <= this.discv5FirstQueryDelayMs) { | ||
return; | ||
} |
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.
Whitespace after this if please 🙏
@@ -196,6 +202,10 @@ export class PeerDiscovery { | |||
* Request to find peers. First, looked at cached peers in peerStore | |||
*/ | |||
private async runFindRandomNodeQuery(): Promise<void> { | |||
// Delay the 1st query after starting discv5 |
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.
Link to the Github issue that explain why this is necessary
Makes sense, not a problem 👍 but now we can add longer delays if we need that would go beyond the second heartbeat |
Motivation
Sometimes we're not able to send/receive discv5 packets successfully right after it starts. Ideally we should investigate discv5 for that, but I found we all
await
for the discv5 start process correctly.Description
FINDNODES
in the 1st heart beat of peer managerpart of #3423