re-add comment for `PayloadAttributesV2` usage (#5658)

As followup from #5654, ensure that we still keep the comment around
referring to the correct `forkchoiceUpdated` to use being driven by
the fork schedule.
This commit is contained in:
Etan Kissling 2023-12-08 11:50:38 +09:00 committed by GitHub
parent 1cc44729ab
commit d8728b7b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -533,9 +533,15 @@ template BlindedBlockContents*(
template PayloadAttributes*(
kind: static ConsensusFork): auto =
# This also determines what `engine_forkchoiceUpdated` version will be used.
when kind >= ConsensusFork.Deneb:
typedesc[PayloadAttributesV3]
elif kind >= ConsensusFork.Capella:
# https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/shanghai.md#specification-1
# Consensus layer client MUST call this method instead of
# `engine_forkchoiceUpdatedV1` under any of the following conditions:
# `headBlockHash` references a block which `timestamp` is greater or
# equal to the Shanghai timestamp
typedesc[PayloadAttributesV2]
elif kind >= ConsensusFork.Bellatrix:
typedesc[PayloadAttributesV1]