Skip to content

Commit

Permalink
fix(sidecar): kzg commitments in the header
Browse files Browse the repository at this point in the history
  • Loading branch information
thedevbirb committed Jul 19, 2024
1 parent 36979f2 commit 47c69d3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bolt-sidecar/src/builder/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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) =
Expand Down Expand Up @@ -165,14 +166,15 @@ impl LocalBuilder {
&self,
value: U256,
header: ExecutionPayloadHeader,
blob_kzg_commitments: List<KzgCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK>,
) -> Result<SignedBuilderBid, BuilderError> {
// compat: convert from blst to ethereum consensus types
let pubkey = self.secret_key.sk_to_pk().to_bytes();
let consensus_pubkey = PublicKey::try_from(pubkey.as_slice()).expect("valid pubkey bytes");

let message = BuilderBid {
header,
blob_kzg_commitments: List::default(),
blob_kzg_commitments,
public_key: consensus_pubkey,
value,
};
Expand Down

0 comments on commit 47c69d3

Please sign in to comment.