Skip to content

Commit

Permalink
Merge of #6445
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Oct 15, 2024
2 parents 2e440df + 5160ac2 commit b14e396
Show file tree
Hide file tree
Showing 35 changed files with 433 additions and 901 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 b14e396

Please sign in to comment.