Skip to content

Commit a814e5c

Browse files
authored
use justified rather than fcr for engine API safe block hash (#8280)
1 parent 0258cc0 commit a814e5c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

beacon_chain/consensus_object_pools/attestation_pool.nim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,8 +882,10 @@ proc getBeaconHead*(
882882
.get(ZERO_HASH)
883883

884884
# https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.4/fork_choice/safe-block.md#get_safe_execution_block_hash
885-
safeBlockRoot = pool.forkChoice.retrieve_fast_confirmed_root()
886-
safeBlock = pool.dag.getBlockRef(safeBlockRoot)
885+
# Use the justified checkpoint root as the safe block reported to the
886+
# execution client via `engine_forkchoiceUpdated`.
887+
safeBlock = pool.dag.getBlockRef(
888+
pool.forkChoice.checkpoints.justified.checkpoint.root)
887889
safeExecutionBlockHash =
888890
if safeBlock.isErr:
889891
# If finality already advanced beyond the current safe block,

0 commit comments

Comments
 (0)