-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Initsync skip local blobs #13827
Initsync skip local blobs #13827
Conversation
9fa1151
to
2e7b7e2
Compare
f76e31c
to
5afcca0
Compare
beacon-chain/das/availability.go
Outdated
if err == nil { | ||
entry.setDiskSummary(sumz.Summary(root)) | ||
} | ||
|
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.
Please do something about err != nil
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.
The summarizer is an optional optimization. If for whatever reason the summarizer didn't successfully init, we just don't use it. But a debug log would make sense.
for z := len(fc) - 1; z > i; z-- { | ||
hcz := fc[z] | ||
if bs.Summary(hcz.root).AllAvailable(hcz.count) { | ||
continue | ||
} | ||
needed.high = hcz.slot | ||
return needed | ||
} |
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.
Does this assume that fc is a sorted list? If so, is that a safe assumption?
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.
It's a requirement per specs: https://github.com/prysmaticlabs/prysm/blob/develop/beacon-chain/sync/rpc_send_request.go#L93-L103
* wip - init-sync skip available blob req * satisfy deep source * gaz * don't need to sort blobs; simplify blobRequest stack * wip debug log to watch blob skip behavior * unit tests for new blob req generator * refactor to reduce blob req func count * log when WaitForSummarizer fails --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
What type of PR is this?
Feature
What does this PR do? Why is it needed?
Modify blob request methods to skip slot ranges where we already have blobs on disk. Also modifies the availability store so that if a blob is visible in the pruner cache, it does not require that index to be in the availability store cache, only verifying and savings blobs that are not yet known to the cache.