From 1867d9393ad723e3c95aede79ae5af09d3ded34e Mon Sep 17 00:00:00 2001 From: Somnath Banerjee Date: Mon, 14 Aug 2023 17:57:33 +0530 Subject: [PATCH] Fix duplicate commitments in GetPayloadV3 response (#8018) --- turbo/execution/eth1/block_building.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/turbo/execution/eth1/block_building.go b/turbo/execution/eth1/block_building.go index cbd161ec065..609cb794acf 100644 --- a/turbo/execution/eth1/block_building.go +++ b/turbo/execution/eth1/block_building.go @@ -181,13 +181,19 @@ func (e *EthereumExecutionModule) GetAssembledBlock(ctx context.Context, req *ex "versioned hashes (%d)", i, block.Hash(), len(commitments), len(proofs), len(blobs), lenCheck) } for _, commitment := range commitments { - blobsBundle.Commitments = append(blobsBundle.Commitments, commitment[:]) + c := types.KZGCommitment{} + copy(c[:], commitment[:]) + blobsBundle.Commitments = append(blobsBundle.Commitments, c[:]) } for _, proof := range proofs { - blobsBundle.Proofs = append(blobsBundle.Proofs, proof[:]) + p := types.KZGProof{} + copy(p[:], proof[:]) + blobsBundle.Proofs = append(blobsBundle.Proofs, p[:]) } for _, blob := range blobs { - blobsBundle.Blobs = append(blobsBundle.Blobs, blob[:]) + b := types.Blob{} + copy(b[:], blob[:]) + blobsBundle.Blobs = append(blobsBundle.Blobs, b[:]) } }