-
Notifications
You must be signed in to change notification settings - Fork 784
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
Prevent reconstruction starting prematurely #6669
Merged
mergify
merged 3 commits into
sigp:release-v6.0.1
from
michaelsproul:dont-start-reconstruction-early
Dec 12, 2024
Merged
Prevent reconstruction starting prematurely #6669
mergify
merged 3 commits into
sigp:release-v6.0.1
from
michaelsproul:dont-start-reconstruction-early
Dec 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
michaelsproul
added
ready-for-review
The code is ready for review
database
UX-and-logs
v6.0.1
Bugfix for v6.0.0
labels
Dec 9, 2024
michaelsproul
added a commit
that referenced
this pull request
Dec 9, 2024
Squashed commit of the following: commit fa6fadd Author: Michael Sproul <michael@sigmaprime.io> Date: Mon Dec 9 11:30:49 2024 +1100 Prevent reconstruction starting prematurely
Merged
jimmygchen
reviewed
Dec 10, 2024
jimmygchen
approved these changes
Dec 12, 2024
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, thanks!
jimmygchen
added
ready-for-merge
This PR is ready to merge.
and removed
ready-for-review
The code is ready for review
labels
Dec 12, 2024
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at fc0e0ae |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Addressed
Fix a long-standing issue most recently reported by @xrchz whereby Lighthouse attempts to start state reconstruction too early.
Proposed Changes
When starting up, only attempt to start state reconstruction if block backfill is already complete. A similar guard condition already exists at the point in block backfill where we start reconstruction:
lighthouse/beacon_node/beacon_chain/src/historical_blocks.rs
Lines 279 to 284 in c042dc1
Additional Info
Alternatively we could refactor the reconstruction code itself to just log a debug message and return
Ok(())
in the case where reconstruction is not yet ready to start. However due to the limited number of places from which reconstruction can be triggered, I think the current approach is preferable, as it avoids sending and processing an unnecessary event.