-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: correctly poll BasicBlockDownloader
#11981
Conversation
hmm, this is expected because a ready indicates that there can be more work and the caller is supposed to call it again which I think we do: reth/crates/engine/tree/src/engine.rs Lines 115 to 120 in 5532d34
|
ah, then I think the issue is in this line: reth/crates/engine/tree/src/engine.rs Line 116 in 5532d34
if we get |
the issue I've seen is that block fetching future was not being polled |
5532d34
to
d10b16d
Compare
Updated logic to instead make sure that we drain downloader events in |
if let Poll::Ready(outcome) = self.downloader.poll(cx) { | ||
if let DownloadOutcome::Blocks(blocks) = outcome { |
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.
ah, yes of course lol
initial I wanted to bubble up the newdownload started event, but came to the conclusion that this isn't very useful
Right now if we schedule block download, on next poll of
BasicBlockDownloader
we'll returnPoll:Ready
withNewDownloadStarted
event and never register waker with actual downloading future.Found this to be an issue when writing e2e tests, not sure if can occur during normal node operation