don't try to validate execution block hashes of non-execution payloads (#4687)

This commit is contained in:
tersec 2023-03-02 00:11:46 +00:00 committed by GitHub
parent 5a9e63a029
commit 88092bb411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -399,7 +399,8 @@ proc storeBlock*(
# https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#specification
when typeof(signedBlock).toFork() >= ConsensusFork.Bellatrix:
template payload(): auto = signedBlock.message.body.execution_payload
if payload.block_hash != payload.compute_execution_block_hash():
if signedBlock.message.is_execution_block and
payload.block_hash != payload.compute_execution_block_hash():
debug "Execution block hash validation failed",
execution_payload = shortLog(payload)
doAssert strictVerification notin dag.updateFlags