Skip to content

Commit

Permalink
use correct KZG commitments in Deneb constructPlainBlindedBlock (#5642
Browse files Browse the repository at this point in the history
)

For Deneb, extend on #5639 and use correct KZG commitments when
producing new blinded blocks using Nimbus VC.
  • Loading branch information
etan-status authored Dec 4, 2023
1 parent 0e5c44b commit b0839d1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions beacon_chain/validators/beacon_validators.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit b0839d1

Please sign in to comment.