-
Notifications
You must be signed in to change notification settings - Fork 179
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
eth: Backfill blocks in batches #2489
eth: Backfill blocks in batches #2489
Conversation
da825dc
to
349b497
Compare
21af295
to
596bea4
Compare
Codecov Report
@@ Coverage Diff @@
## master #2489 +/- ##
===================================================
- Coverage 54.73000% 54.70159% -0.02841%
===================================================
Files 95 95
Lines 19852 19855 +3
===================================================
- Hits 10865 10861 -4
- Misses 8383 8390 +7
Partials 604 604
Continue to review full report at Codecov.
|
Is this solved by the fact that sync is faster because of fewer RPC calls? |
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.
Have a couple of questions. Other than that, it looks fine for me.
Right, it's solved, because in many cases Livepeer will never catch up with blocks polling them one by one, so it's effectively down. Using backfilling, it will most likely catch with the missing blocks. |
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.
Looks good to me.
What does this pull request do? Explain your changes. (required)
Optimize the number of ETH RPC request by first backfilling blocks in batches during the block sync. In result, only the latest block is polled separately instead of polling all missing blocks one-by-one.
This also fixes the Livepeer downtime issue in the case when Livepeer cannot catch up with the blocks and therefore can't transcode.
Specific updates (required)
syncToLatestBlock()
, execute first block backfilling and then poll block only for the latest oneHow did you test each of these updates (required)
Does this pull request close any open issues?
fix #2480
Checklist:
make
runs successfully./test.sh
passREADME and other documentation updated