mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
At the fork transition ensure we build ontop of the correct parent block hash (#9160)
When producing a block at the fork, treat parent payload status as full I've been testing on kurtosis and this fixes an issue where we cant propose a block at the fork. This is a screenshot of the fix. The envelope shows missing because we are missing an SSE event, but the envelope is in fact being imported and the chain is progressing just fine <img width="652" height="748" alt="image" src="https://github.com/user-attachments/assets/7764a68c-33fb-4987-a691-0af71f0bea02" /> Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
@@ -690,7 +690,13 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
let parent_bid = state.latest_execution_payload_bid()?;
|
let parent_bid = state.latest_execution_payload_bid()?;
|
||||||
|
|
||||||
// TODO(gloas): need should_extend_payload check here as well
|
// TODO(gloas): need should_extend_payload check here as well
|
||||||
let parent_block_hash = if parent_payload_status == PayloadStatus::Full {
|
let parent_block_slot = state.latest_block_header().slot;
|
||||||
|
let parent_is_pre_gloas = !self
|
||||||
|
.spec
|
||||||
|
.fork_name_at_slot::<T::EthSpec>(parent_block_slot)
|
||||||
|
.gloas_enabled();
|
||||||
|
let parent_block_hash =
|
||||||
|
if parent_payload_status == PayloadStatus::Full || parent_is_pre_gloas {
|
||||||
// Build on parent bid's payload.
|
// Build on parent bid's payload.
|
||||||
parent_bid.block_hash
|
parent_bid.block_hash
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user