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
perf(discv5): boost bootstrap lookups #7695
Conversation
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.
lgtm
would one second be too noisy? Ideally we would keep the aggressive discovery until we we connect to a peer in our chain, but can be done later on, I'm not even sure if we do that for discv4
this is stats I have so far, from RLPx peering. all started clean (without a known_peers.json file, and new non-default port). #7683 clearly this pr is better for bootstrapping, it makes a successful outgoing RLPx connection within 5 mins. think we only need to do the pulses for 100 counts (with 5 sec sleeps, 100 counts amount to 20 mins, logs show bootstrap count down becomes zero from we can expose the bootstrap pulse interval and the countdown in cli in a separate pr, then we can try 1 second like that |
hm, we could move the bootstrap pulse out of the loop, and stack them on top of each other without sleep, let me try that |
tried this, it's not good. the queries need some time in-between so that the next query can use the returned peers from the last query, 5 seconds seems good. thought |
Fills the three buckets at log2distance furthest from the local node id, at 5 second intervals, at bootstrap. This gives RLPx a better chance of finding peers instantly after bootstrapping.