diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index 08a00d7bf8d..2963b3f9a7f 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -121,8 +121,7 @@ impl TryFrom> for ProvenancedPayload( let mut message = match payload_response_type { crate::GetPayloadResponseType::Full(payload_response) => { #[allow(clippy::type_complexity)] - let (payload, _block_value, maybe_blobs_bundle, _maybe_requests): ( + let (payload, value, maybe_blobs_bundle, maybe_requests): ( ExecutionPayload, Uint256, Option>, @@ -559,8 +559,9 @@ pub fn serve( blob_kzg_commitments: maybe_blobs_bundle .map(|b| b.commitments) .unwrap_or_default(), - value: Uint256::from(DEFAULT_BUILDER_PAYLOAD_VALUE_WEI), + value, pubkey: builder.builder_sk.public_key().compress(), + execution_requests: maybe_requests.unwrap_or_default(), }), ForkName::Deneb => BuilderBid::Deneb(BuilderBidDeneb { header: payload @@ -570,7 +571,7 @@ pub fn serve( blob_kzg_commitments: maybe_blobs_bundle .map(|b| b.commitments) .unwrap_or_default(), - value: Uint256::from(DEFAULT_BUILDER_PAYLOAD_VALUE_WEI), + value, pubkey: builder.builder_sk.public_key().compress(), }), ForkName::Capella => BuilderBid::Capella(BuilderBidCapella { @@ -578,7 +579,7 @@ pub fn serve( .as_capella() .map_err(|_| reject("incorrect payload variant"))? .into(), - value: Uint256::from(DEFAULT_BUILDER_PAYLOAD_VALUE_WEI), + value, pubkey: builder.builder_sk.public_key().compress(), }), ForkName::Bellatrix => BuilderBid::Bellatrix(BuilderBidBellatrix { @@ -586,7 +587,7 @@ pub fn serve( .as_bellatrix() .map_err(|_| reject("incorrect payload variant"))? .into(), - value: Uint256::from(DEFAULT_BUILDER_PAYLOAD_VALUE_WEI), + value, pubkey: builder.builder_sk.public_key().compress(), }), ForkName::Base | ForkName::Altair => { @@ -596,7 +597,7 @@ pub fn serve( } crate::GetPayloadResponseType::Blinded(payload_response) => { #[allow(clippy::type_complexity)] - let (payload, _block_value, maybe_blobs_bundle, _maybe_requests): ( + let (payload, value, maybe_blobs_bundle, maybe_requests): ( ExecutionPayload, Uint256, Option>, @@ -611,8 +612,9 @@ pub fn serve( blob_kzg_commitments: maybe_blobs_bundle .map(|b| b.commitments) .unwrap_or_default(), - value: Uint256::from(DEFAULT_BUILDER_PAYLOAD_VALUE_WEI), + value, pubkey: builder.builder_sk.public_key().compress(), + execution_requests: maybe_requests.unwrap_or_default(), }), ForkName::Deneb => BuilderBid::Deneb(BuilderBidDeneb { header: payload @@ -622,7 +624,7 @@ pub fn serve( blob_kzg_commitments: maybe_blobs_bundle .map(|b| b.commitments) .unwrap_or_default(), - value: Uint256::from(DEFAULT_BUILDER_PAYLOAD_VALUE_WEI), + value, pubkey: builder.builder_sk.public_key().compress(), }), ForkName::Capella => BuilderBid::Capella(BuilderBidCapella { @@ -630,7 +632,7 @@ pub fn serve( .as_capella() .map_err(|_| reject("incorrect payload variant"))? .into(), - value: Uint256::from(DEFAULT_BUILDER_PAYLOAD_VALUE_WEI), + value, pubkey: builder.builder_sk.public_key().compress(), }), ForkName::Bellatrix => BuilderBid::Bellatrix(BuilderBidBellatrix { @@ -638,7 +640,7 @@ pub fn serve( .as_bellatrix() .map_err(|_| reject("incorrect payload variant"))? .into(), - value: Uint256::from(DEFAULT_BUILDER_PAYLOAD_VALUE_WEI), + value, pubkey: builder.builder_sk.public_key().compress(), }), ForkName::Base | ForkName::Altair => { diff --git a/beacon_node/execution_layer/src/test_utils/mod.rs b/beacon_node/execution_layer/src/test_utils/mod.rs index 1e71fde2551..f19f84891e1 100644 --- a/beacon_node/execution_layer/src/test_utils/mod.rs +++ b/beacon_node/execution_layer/src/test_utils/mod.rs @@ -30,7 +30,7 @@ pub use execution_block_generator::{ static_valid_tx, Block, ExecutionBlockGenerator, }; pub use hook::Hook; -pub use mock_builder::{MockBuilder, Operation}; +pub use mock_builder::{MockBuilder, Operation, serve as serve_mock_builder}; pub use mock_execution_layer::MockExecutionLayer; pub const DEFAULT_TERMINAL_DIFFICULTY: u64 = 6400; diff --git a/consensus/types/src/builder_bid.rs b/consensus/types/src/builder_bid.rs index 9885f78474f..5d405d25401 100644 --- a/consensus/types/src/builder_bid.rs +++ b/consensus/types/src/builder_bid.rs @@ -2,7 +2,8 @@ use crate::beacon_block_body::KzgCommitments; use crate::{ ChainSpec, EthSpec, ExecutionPayloadHeaderBellatrix, ExecutionPayloadHeaderCapella, ExecutionPayloadHeaderDeneb, ExecutionPayloadHeaderElectra, ExecutionPayloadHeaderRef, - ExecutionPayloadHeaderRefMut, ForkName, ForkVersionDeserialize, SignedRoot, Uint256, + ExecutionPayloadHeaderRefMut, ExecutionRequests, ForkName, ForkVersionDeserialize, SignedRoot, + Uint256, }; use bls::PublicKeyBytes; use bls::Signature; @@ -33,6 +34,8 @@ pub struct BuilderBid { pub header: ExecutionPayloadHeaderElectra, #[superstruct(only(Deneb, Electra))] pub blob_kzg_commitments: KzgCommitments, + #[superstruct(only(Electra))] + pub execution_requests: ExecutionRequests, #[serde(with = "serde_utils::quoted_u256")] pub value: Uint256, pub pubkey: PublicKeyBytes,