mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
fix: remove premature on_valid_payload_envelope_received + disable backfill for GLOaS
1. Remove on_valid_payload_envelope_received call before process_block in chain segment import. The block isn't in fork choice yet, so it always fails with NodeUnknown. import_envelope_from_range_sync handles this correctly after process_block. 2. Disable backfill sync when GLOaS is scheduled. Backfill calls into_available_block which panics on GLOaS RangeSyncBlock variant. Backfill for GLOaS is not yet implemented.
This commit is contained in:
@@ -3257,18 +3257,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
error: BlockError::BeaconChainError(Box::new(e.into())),
|
error: BlockError::BeaconChainError(Box::new(e.into())),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if let Err(e) = self
|
// Note: we do NOT call on_valid_payload_envelope_received here
|
||||||
.canonical_head
|
// because the block hasn't been added to fork choice yet (that
|
||||||
.fork_choice_write_lock()
|
// happens in process_block below). The fork choice update is
|
||||||
.on_valid_payload_envelope_received(block_root)
|
// handled by import_envelope_from_range_sync after process_block.
|
||||||
{
|
|
||||||
return ChainSegmentResult::Failed {
|
|
||||||
imported_blocks,
|
|
||||||
error: BlockError::BeaconChainError(Box::new(
|
|
||||||
BeaconChainError::ForkChoiceError(e),
|
|
||||||
)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
match self
|
match self
|
||||||
|
|||||||
@@ -215,6 +215,11 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
network: &mut SyncNetworkContext<T>,
|
||||||
) -> Result<SyncStart, BackFillError> {
|
) -> Result<SyncStart, BackFillError> {
|
||||||
|
// Skip backfill sync for GLOaS — not yet implemented for this fork.
|
||||||
|
if self.beacon_chain.spec.gloas_fork_epoch.is_some_and(|e| e != Epoch::max_value()) {
|
||||||
|
return Ok(SyncStart::NotSyncing);
|
||||||
|
}
|
||||||
|
|
||||||
match self.state() {
|
match self.state() {
|
||||||
BackFillState::Syncing => {} // already syncing ignore.
|
BackFillState::Syncing => {} // already syncing ignore.
|
||||||
BackFillState::Paused => {
|
BackFillState::Paused => {
|
||||||
|
|||||||
Reference in New Issue
Block a user