use correct KZG commitments in Deneb `constructPlainBlindedBlock` (#5642)

For Deneb, extend on #5639 and use correct KZG commitments when
producing new blinded blocks using Nimbus VC.
This commit is contained in:
Etan Kissling 2023-12-04 17:36:50 +01:00 committed by GitHub
parent 0e5c44b529
commit b0839d1ae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -682,7 +682,7 @@ func constructPlainBlindedBlock[T: capella_mev.BlindedBeaconBlock](
func constructPlainBlindedBlock[T: deneb_mev.BlindedBeaconBlock](
blck: ForkyBeaconBlock,
executionPayloadHeader: deneb_mev.BlindedExecutionPayloadAndBlobsBundle): T =
blindedBundle: deneb_mev.BlindedExecutionPayloadAndBlobsBundle): T =
# https://github.com/nim-lang/Nim/issues/23020 workaround
static: doAssert T is deneb_mev.BlindedBeaconBlock
@ -695,7 +695,12 @@ func constructPlainBlindedBlock[T: deneb_mev.BlindedBeaconBlock](
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#block-proposal
copyFields(blindedBlock, blck, blckFields)
copyFields(blindedBlock.body, blck.body, blckBodyFields)
assign(blindedBlock.body.execution_payload_header, executionPayloadHeader.execution_payload_header)
assign(
blindedBlock.body.execution_payload_header,
blindedBundle.execution_payload_header)
assign(
blindedBlock.body.blob_kzg_commitments,
blindedBundle.blob_kzg_commitments)
blindedBlock