From 9720a8af1f02e71acb174a5228b3494bbccdf1a4 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Fri, 19 Jul 2024 17:21:21 +0200 Subject: [PATCH] fix(sidecar): kzg commitments in the header --- bolt-sidecar/src/builder/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bolt-sidecar/src/builder/mod.rs b/bolt-sidecar/src/builder/mod.rs index c49a69dfb..e6512cb17 100644 --- a/bolt-sidecar/src/builder/mod.rs +++ b/bolt-sidecar/src/builder/mod.rs @@ -1,8 +1,8 @@ use alloy_primitives::U256; use blst::min_pk::SecretKey; use ethereum_consensus::{ - crypto::PublicKey, - deneb::mainnet::ExecutionPayloadHeader, + crypto::{KzgCommitment, PublicKey}, + deneb::mainnet::{ExecutionPayloadHeader, MAX_BLOB_COMMITMENTS_PER_BLOCK}, ssz::prelude::{List, MerkleizationError}, }; use payload_builder::FallbackPayloadBuilder; @@ -132,7 +132,8 @@ impl LocalBuilder { ); // 3. sign the bid with the local builder's BLS key - let signed_bid = self.create_signed_builder_bid(value, eth_header)?; + let signed_bid = + self.create_signed_builder_bid(value, eth_header, blobs_bundle.commitments)?; // 4. prepare a get_payload response for when the beacon node will ask for it let Some(get_payload_res) = @@ -165,6 +166,7 @@ impl LocalBuilder { &self, value: U256, header: ExecutionPayloadHeader, + blob_kzg_commitments: List, ) -> Result { // compat: convert from blst to ethereum consensus types let pubkey = self.secret_key.sk_to_pk().to_bytes(); @@ -172,7 +174,7 @@ impl LocalBuilder { let message = BuilderBid { header, - blob_kzg_commitments: List::default(), + blob_kzg_commitments, public_key: consensus_pubkey, value, };