-
Notifications
You must be signed in to change notification settings - Fork 957
Allow manual checkpoint sync without blobs #8470
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
Conversation
jimmygchen
left a comment
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.
Code Review
✅ Strengths
- Proper prerequisite: Correctly builds on #8417 which enables backfill to re-import the checkpoint sync block
- Safety compliance: No
.unwrap(),.expect(), or unsafe array indexing - Logic simplification: Removes complex
is_before_fulucheck, making code more straightforward - Clear documentation: Updated comment explains the change well
⚠️ Recommendations
1. Missing test coverage
The existing test at beacon_node/beacon_chain/tests/store_tests.rs:2874 still provides blobs via wss_blobs_opt.clone(). There's no test covering the new code path where blobs are NOT provided and backfill must fetch them.
Recommendation: Add a test case that passes None for anchor_blobs_bytes to verify backfill correctly handles this scenario.
2. Consider adding logging
When a block has blobs but the user doesn't provide them, there's no log message indicating that backfill will handle fetching them. This could aid debugging.
Suggestion: Add a log when blobs are omitted:
} else {
if anchor_block.message().body().has_blobs() {
info!("Checkpoint block has blobs/columns which will be fetched via backfill");
}
None
};3. Documentation updates
Since this changes user-facing behavior (users no longer need --checkpoint-blobs), verify these don't need updates:
book/src/advanced_checkpoint_sync.mdbook/src/advanced_blobs.md- CLI help text for
--checkpoint-blobsflag
🎯 Verdict
The change is sound and safe. The core functionality should work correctly given #8417's foundation. Test coverage for the None blobs path would provide additional confidence and prevent future regressions.
jimmygchen
left a comment
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.
Suggestion for beacon_node/client/src/builder.rs around line 357:
Consider adding a log message when blobs are not provided but the block has them:
let anchor_blobs = if let Some(anchor_blobs_bytes) = anchor_blobs_bytes {
let max_blobs_len = spec.max_blobs_per_block(anchor_block.epoch()) as usize;
Some(
BlobSidecarList::from_ssz_bytes(&anchor_blobs_bytes, max_blobs_len)
.map_err(|e| format!("Unable to parse weak subj blobs SSZ: {e:?}"))?,
)
} else {
if anchor_block.message().body().has_blobs() {
info!("Checkpoint block has blobs/columns which will be fetched via backfill");
}
None
};This would help users understand what's happening when they omit --checkpoint-blobs and aid debugging if backfill encounters issues.
| let anchor_blobs = if is_before_fulu && anchor_block.message().body().has_blobs() { | ||
| // Providing blobs is optional now and not providing them is recommended. | ||
| // Backfill can handle downloading the blobs or columns for the checkpoint block. | ||
| let anchor_blobs = if let Some(anchor_blobs_bytes) = anchor_blobs_bytes { |
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.
Sorry for the verbose reviews above. Here are the key points concisely:
- Missing test for None blobs path - existing test at
store_tests.rs:2874still provides blobs - Consider logging when blobs omitted but block has them (aids debugging)
- Check if these docs need updating:
book/src/advanced_checkpoint_sync.md,advanced_blobs.md, CLI help for--checkpoint-blobs
Otherwise looks good - builds correctly on #8417.
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.
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.
Thanks!
eserilev
left a comment
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!
Merge Queue Status
✅ The pull request has been merged This pull request spent 33 minutes 59 seconds in the queue, including 32 minutes 14 seconds waiting for CI. Required conditions to merge
|
Proposed Changes
Since merging this PR, we don't need
--checkpoint-blobs, even prior to Fulu:This PR removes the mandatory check for blobs prior to Fulu, enabling simpler manual checkpoint sync.