diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index 1ed5579fea..a491e8559b 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -57,9 +57,6 @@ use crate::observed_block_producers::ObservedBlockProducers; use crate::observed_data_sidecars::ObservedDataSidecars; use crate::observed_operations::{ObservationOutcome, ObservedOperations}; use crate::observed_slashable::ObservedSlashable; -use crate::payload_envelope_verification::{ - EnvelopeError, ExecutedEnvelope, ExecutionPendingEnvelope, -}; use crate::pending_payload_envelopes::PendingPayloadEnvelopes; use crate::persisted_beacon_chain::PersistedBeaconChain; use crate::persisted_custody::persist_custody_context; @@ -3557,33 +3554,6 @@ impl BeaconChain { )) } - /// Accepts a fully-verified payload envelope and awaits on its payload verification handle to - /// get a fully `ExecutedEnvelope`. - /// - /// An error is returned if the verification handle couldn't be awaited. - #[instrument(skip_all, level = "debug")] - pub async fn into_executed_payload_envelope( - self: Arc, - pending_envelope: ExecutionPendingEnvelope, - ) -> Result, EnvelopeError> { - let ExecutionPendingEnvelope { - signed_envelope, - import_data, - payload_verification_handle, - } = pending_envelope; - - let payload_verification_outcome = payload_verification_handle - .await - .map_err(BeaconChainError::TokioJoin)? - .ok_or(BeaconChainError::RuntimeShutdown)??; - - Ok(ExecutedEnvelope::new( - signed_envelope, - import_data, - payload_verification_outcome, - )) - } - /* Import methods */ /// Checks if the block is available, and imports immediately if so, otherwise caches the block diff --git a/beacon_node/beacon_chain/src/execution_payload.rs b/beacon_node/beacon_chain/src/execution_payload.rs index b0644ac8aa..a5c2ead427 100644 --- a/beacon_node/beacon_chain/src/execution_payload.rs +++ b/beacon_node/beacon_chain/src/execution_payload.rs @@ -122,7 +122,7 @@ impl PayloadNotifier { } } -/// Verify that `execution_payload` contained by `block` is considered valid by an execution +/// Verify that `execution_payload` associated with `beacon_block_root` is considered valid by an execution /// engine. /// /// ## Specification diff --git a/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs b/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs index f2633e8d5f..603e14446a 100644 --- a/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs +++ b/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs @@ -17,6 +17,7 @@ use crate::{ NotifyExecutionLayer, block_verification_types::{AsBlock, AvailableBlockData}, metrics, + payload_envelope_verification::ExecutionPendingEnvelope, validator_monitor::{get_slot_delay_ms, timestamp_now}, }; @@ -157,6 +158,33 @@ impl BeaconChain { } } + /// Accepts a fully-verified payload envelope and awaits on its payload verification handle to + /// get a fully `ExecutedEnvelope`. + /// + /// An error is returned if the verification handle couldn't be awaited. + #[instrument(skip_all, level = "debug")] + pub async fn into_executed_payload_envelope( + self: Arc, + pending_envelope: ExecutionPendingEnvelope, + ) -> Result, EnvelopeError> { + let ExecutionPendingEnvelope { + signed_envelope, + import_data, + payload_verification_handle, + } = pending_envelope; + + let payload_verification_outcome = payload_verification_handle + .await + .map_err(BeaconChainError::TokioJoin)? + .ok_or(BeaconChainError::RuntimeShutdown)??; + + Ok(ExecutedEnvelope::new( + signed_envelope, + import_data, + payload_verification_outcome, + )) + } + #[instrument(skip_all)] pub async fn import_available_execution_payload_envelope( self: &Arc,