-
Notifications
You must be signed in to change notification settings - Fork 745
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 on-disk consensus context format #5598
Fix on-disk consensus context format #5598
Conversation
@@ -26,7 +27,7 @@ pub struct DietAvailabilityPendingExecutedBlock<E: EthSpec> { | |||
parent_block: SignedBeaconBlock<E, BlindedPayload<E>>, | |||
parent_eth1_finalization_data: Eth1FinalizationData, | |||
confirmed_state_roots: Vec<Hash256>, | |||
consensus_context: ConsensusContext<E>, | |||
consensus_context: OnDiskConsensusContext, |
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.
DietAvailabilityPendingExecutedBlock
is constructued on every block, and since OnDiskConsensusContext
drops indexed_attestations
, that cache would be dropped every block.
Could fix this easily by keeping the indexed_attestations
field in OnDiskConsensusContext
with #[ssz(skip_serializing, skip_deserializing)]
.
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.
Great catch, just pushed a fix
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
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 5a9e973 |
Issue Addressed
Fix a regression in
unstable
that causes logs of the form:This was due to the addition of fields to
ConsensusContext
in the single-pass epoch processing PR.ConsensusContext
is now part of our on-disk database schema viaDietAvailabilityPendingExecutedBlock
:lighthouse/beacon_node/beacon_chain/src/data_availability_checker/state_lru_cache.rs
Lines 20 to 30 in 3058b96
Proposed Changes
OnDiskConsensusContext
struct which keeps only the previous fields.