mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Merge branch 'gloas-parent-envelope-unknown-lookup' into glamsterdam-devnet-2
This commit is contained in:
@@ -960,16 +960,17 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
|
|||||||
let (parent_block, block) =
|
let (parent_block, block) =
|
||||||
verify_parent_block_is_known::<T>(&fork_choice_read_lock, block)?;
|
verify_parent_block_is_known::<T>(&fork_choice_read_lock, block)?;
|
||||||
|
|
||||||
|
let Ok(bid) = block.message().body().signed_execution_payload_bid() else {
|
||||||
|
return Err(BlockError::InternalError("Invalid variant".to_string()));
|
||||||
|
};
|
||||||
|
|
||||||
// [New in Gloas]: Verify bid.parent_block_root matches block.parent_root.
|
// [New in Gloas]: Verify bid.parent_block_root matches block.parent_root.
|
||||||
if let Ok(bid) = block.message().body().signed_execution_payload_bid()
|
if bid.message.parent_block_root != block.message().parent_root() {
|
||||||
&& bid.message.parent_block_root != block.message().parent_root()
|
|
||||||
{
|
|
||||||
return Err(BlockError::BidParentRootMismatch {
|
return Err(BlockError::BidParentRootMismatch {
|
||||||
bid_parent_root: bid.message.parent_block_root,
|
bid_parent_root: bid.message.parent_block_root,
|
||||||
block_parent_root: block.message().parent_root(),
|
block_parent_root: block.message().parent_root(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that we've received the parent envelope. If not, issue a single envelope
|
// Check that we've received the parent envelope. If not, issue a single envelope
|
||||||
// lookup for the parent and queue this block in the reprocess queue.
|
// lookup for the parent and queue this block in the reprocess queue.
|
||||||
//
|
//
|
||||||
@@ -985,6 +986,7 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
|
|||||||
if parent_is_gloas
|
if parent_is_gloas
|
||||||
&& !parent_is_anchor
|
&& !parent_is_anchor
|
||||||
&& !fork_choice_read_lock.is_payload_received(&block.message().parent_root())
|
&& !fork_choice_read_lock.is_payload_received(&block.message().parent_root())
|
||||||
|
&& Some(bid.message.parent_block_hash) != parent_block.execution_payload_block_hash
|
||||||
{
|
{
|
||||||
return Err(BlockError::ParentEnvelopeUnknown {
|
return Err(BlockError::ParentEnvelopeUnknown {
|
||||||
parent_root: block.message().parent_root(),
|
parent_root: block.message().parent_root(),
|
||||||
|
|||||||
Reference in New Issue
Block a user