Skip to content

Commit

Permalink
Merge branch 'engine-requests' into electra-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanjay176 committed Oct 9, 2024
2 parents 235c239 + b60f5cf commit 33c1b2c
Show file tree
Hide file tree
Showing 26 changed files with 396 additions and 868 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions beacon_node/beacon_chain/src/beacon_block_streamer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{metrics, BeaconChain, BeaconChainError, BeaconChainTypes, BlockProcessStatus};
use execution_layer::{ExecutionLayer, ExecutionPayloadBody};
use execution_layer::{ExecutionLayer, ExecutionPayloadBodyV1};
use slog::{crit, debug, error, Logger};
use std::collections::HashMap;
use std::sync::Arc;
Expand Down Expand Up @@ -57,7 +57,7 @@ struct BodiesByRange<E: EthSpec> {
struct BlockParts<E: EthSpec> {
blinded_block: Box<SignedBlindedBeaconBlock<E>>,
header: Box<ExecutionPayloadHeader<E>>,
body: Option<Box<ExecutionPayloadBody<E>>>,
body: Option<Box<ExecutionPayloadBodyV1<E>>>,
}

impl<E: EthSpec> BlockParts<E> {
Expand Down
28 changes: 20 additions & 8 deletions beacon_node/beacon_chain/src/beacon_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5553,10 +5553,15 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
)
}
BeaconState::Deneb(_) => {
let (payload, kzg_commitments, maybe_blobs_and_proofs, execution_payload_value) =
block_contents
.ok_or(BlockProductionError::MissingExecutionPayload)?
.deconstruct();
let (
payload,
kzg_commitments,
maybe_blobs_and_proofs,
_maybe_requests,
execution_payload_value,
) = block_contents
.ok_or(BlockProductionError::MissingExecutionPayload)?
.deconstruct();

(
BeaconBlock::Deneb(BeaconBlockDeneb {
Expand Down Expand Up @@ -5591,10 +5596,15 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
)
}
BeaconState::Electra(_) => {
let (payload, kzg_commitments, maybe_blobs_and_proofs, execution_payload_value) =
block_contents
.ok_or(BlockProductionError::MissingExecutionPayload)?
.deconstruct();
let (
payload,
kzg_commitments,
maybe_blobs_and_proofs,
maybe_requests,
execution_payload_value,
) = block_contents
.ok_or(BlockProductionError::MissingExecutionPayload)?
.deconstruct();

(
BeaconBlock::Electra(BeaconBlockElectra {
Expand All @@ -5619,6 +5629,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
bls_to_execution_changes: bls_to_execution_changes.into(),
blob_kzg_commitments: kzg_commitments
.ok_or(BlockProductionError::InvalidPayloadFork)?,
execution_requests: maybe_requests
.ok_or(BlockProductionError::MissingExecutionRequests)?,
},
}),
maybe_blobs_and_proofs,
Expand Down
1 change: 1 addition & 0 deletions beacon_node/beacon_chain/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ pub enum BlockProductionError {
InvalidBlockVariant(String),
KzgError(kzg::Error),
FailedToBuildBlobSidecars(String),
MissingExecutionRequests,
}

easy_from_to!(BlockProcessingError, BlockProductionError);
Expand Down
1 change: 1 addition & 0 deletions beacon_node/execution_layer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ alloy-rlp = { workspace = true }
alloy-consensus = { workspace = true }
lighthouse_version = { workspace = true }
fixed_bytes = { workspace = true }
sha2 = { workspace = true }
Loading

0 comments on commit 33c1b2c

Please sign in to comment.