mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-26 01:03:40 +00:00
Resolve merge conflicts
This commit is contained in:
@@ -90,7 +90,6 @@ pub(crate) fn post_beacon_execution_payload_envelope<T: BeaconChainTypes>(
|
||||
.boxed()
|
||||
}
|
||||
/// Publishes a signed execution payload envelope to the network.
|
||||
/// TODO(gloas): Add gossip verification (BroadcastValidation::Gossip) before import.
|
||||
pub async fn publish_execution_payload_envelope<T: BeaconChainTypes>(
|
||||
envelope: SignedExecutionPayloadEnvelope<T::EthSpec>,
|
||||
chain: Arc<BeaconChain<T>>,
|
||||
@@ -132,18 +131,21 @@ pub async fn publish_execution_payload_envelope<T: BeaconChainTypes>(
|
||||
};
|
||||
|
||||
let ctx = chain.gossip_verification_context();
|
||||
let Ok(gossip_verifed_envelope) = GossipVerifiedEnvelope::new(signed_envelope, &ctx) else {
|
||||
warn!(%slot, %beacon_block_root, "Execution payload envelope rejected");
|
||||
return Err(warp_utils::reject::custom_bad_request(
|
||||
"execution payload envelope rejected, gossip verification".to_string(),
|
||||
));
|
||||
let gossip_verified_envelope = match GossipVerifiedEnvelope::new(signed_envelope, &ctx) {
|
||||
Ok(envelope) => envelope,
|
||||
Err(e) => {
|
||||
warn!(%slot, %beacon_block_root, error = ?e, "Execution payload envelope rejected");
|
||||
return Err(warp_utils::reject::custom_bad_request(format!(
|
||||
"execution payload envelope rejected: {e:?}",
|
||||
)));
|
||||
}
|
||||
};
|
||||
|
||||
// Import the envelope locally (runs state transition and notifies the EL).
|
||||
chain
|
||||
.process_execution_payload_envelope(
|
||||
beacon_block_root,
|
||||
gossip_verifed_envelope,
|
||||
gossip_verified_envelope,
|
||||
NotifyExecutionLayer::Yes,
|
||||
BlockImportSource::HttpApi,
|
||||
publish_fn,
|
||||
|
||||
@@ -2148,10 +2148,14 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
execution_status: execution_status_string,
|
||||
best_child: node
|
||||
.best_child()
|
||||
.ok()
|
||||
.flatten()
|
||||
.and_then(|index| proto_array.nodes.get(index))
|
||||
.map(|child| child.root()),
|
||||
best_descendant: node
|
||||
.best_descendant()
|
||||
.ok()
|
||||
.flatten()
|
||||
.and_then(|index| proto_array.nodes.get(index))
|
||||
.map(|descendant| descendant.root()),
|
||||
},
|
||||
|
||||
@@ -146,12 +146,8 @@ pub async fn publish_block<T: BeaconChainTypes, B: IntoGossipVerifiedBlock<T>>(
|
||||
let slot = block.message().slot();
|
||||
let sender_clone = network_tx.clone();
|
||||
|
||||
let build_sidecar_task_handle = spawn_build_data_sidecar_task(
|
||||
chain.clone(),
|
||||
block.clone(),
|
||||
unverified_blobs,
|
||||
current_span.clone(),
|
||||
)?;
|
||||
let build_sidecar_task_handle =
|
||||
spawn_build_data_sidecar_task(chain.clone(), block.clone(), unverified_blobs)?;
|
||||
|
||||
// Gossip verify the block and blobs/data columns separately.
|
||||
let gossip_verified_block_result = unverified_block.into_gossip_verified_block(&chain);
|
||||
@@ -358,7 +354,6 @@ fn spawn_build_data_sidecar_task<T: BeaconChainTypes>(
|
||||
chain: Arc<BeaconChain<T>>,
|
||||
block: Arc<SignedBeaconBlock<T::EthSpec, FullPayload<T::EthSpec>>>,
|
||||
proofs_and_blobs: UnverifiedBlobs<T>,
|
||||
current_span: Span,
|
||||
) -> Result<impl Future<Output = BuildDataSidecarTaskResult<T>>, Rejection> {
|
||||
chain
|
||||
.clone()
|
||||
@@ -368,7 +363,7 @@ fn spawn_build_data_sidecar_task<T: BeaconChainTypes>(
|
||||
let Some((kzg_proofs, blobs)) = proofs_and_blobs else {
|
||||
return Ok((vec![], vec![]));
|
||||
};
|
||||
let _guard = debug_span!(parent: current_span, "build_data_sidecars").entered();
|
||||
let _span = debug_span!("build_data_sidecars").entered();
|
||||
|
||||
let peer_das_enabled = chain.spec.is_peer_das_enabled_for_epoch(block.epoch());
|
||||
if !peer_das_enabled {
|
||||
|
||||
@@ -671,7 +671,7 @@ pub fn post_validator_prepare_beacon_proposer<T: BeaconChainTypes>(
|
||||
.await;
|
||||
|
||||
// TODO(gloas): verify this is correct. We skip proposer preparation for
|
||||
// GLOAS because the execution payload is no longer embedded in the beacon
|
||||
// Gloas because the execution payload is no longer embedded in the beacon
|
||||
// block (it's in the payload envelope), so the head block's
|
||||
// execution_payload() is unavailable.
|
||||
let next_slot = current_slot + 1;
|
||||
|
||||
@@ -3179,10 +3179,14 @@ impl ApiTester {
|
||||
.unwrap_or_else(|| "irrelevant".to_string()),
|
||||
best_child: node
|
||||
.best_child()
|
||||
.ok()
|
||||
.flatten()
|
||||
.and_then(|index| expected_proto_array.nodes.get(index))
|
||||
.map(|child| child.root()),
|
||||
best_descendant: node
|
||||
.best_descendant()
|
||||
.ok()
|
||||
.flatten()
|
||||
.and_then(|index| expected_proto_array.nodes.get(index))
|
||||
.map(|descendant| descendant.root()),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user