diff --git a/crates/supervisor/core/src/error.rs b/crates/supervisor/core/src/error.rs index 6f8b2d1474..cb0e014f1f 100644 --- a/crates/supervisor/core/src/error.rs +++ b/crates/supervisor/core/src/error.rs @@ -3,7 +3,6 @@ use crate::syncnode::ManagedNodeError; use derive_more; use jsonrpsee::types::{ErrorCode, ErrorObjectOwned}; -use kona_interop::InteropValidationError; use kona_supervisor_storage::StorageError; use kona_supervisor_types::AccessListError; use op_alloy_rpc_types::SuperchainDAError; @@ -20,20 +19,12 @@ pub enum SupervisorError { #[error("empty dependency set")] EmptyDependencySet, - /// Interop has not yet been enabled for the chain. - #[error("interop not enabled")] - InteropNotEnabled, - /// Data availability errors. /// /// Spec . #[error(transparent)] SpecError(#[from] SpecError), - /// Indicates that error occurred while validating interop config. - #[error(transparent)] - InteropValidationError(#[from] InteropValidationError), - /// Indicates that error occurred while interacting with the storage layer. #[error(transparent)] StorageError(#[from] StorageError), @@ -74,9 +65,7 @@ impl PartialEq for SupervisorError { match (self, other) { (Unimplemented, Unimplemented) => true, (EmptyDependencySet, EmptyDependencySet) => true, - (InteropNotEnabled, InteropNotEnabled) => true, (SpecError(a), SpecError(b)) => a == b, - (InteropValidationError(a), InteropValidationError(b)) => a == b, (StorageError(a), StorageError(b)) => a == b, (ManagedNodeMissing(a), ManagedNodeMissing(b)) => a == b, (ManagedNodeError(a), ManagedNodeError(b)) => a == b, @@ -129,12 +118,10 @@ impl From for ErrorObjectOwned { // todo: handle these errors more gracefully SupervisorError::Unimplemented | SupervisorError::EmptyDependencySet | - SupervisorError::InteropNotEnabled | SupervisorError::L1BlockMismatch { .. } | SupervisorError::ManagedNodeMissing(_) | SupervisorError::ManagedNodeError(_) | SupervisorError::StorageError(_) | - SupervisorError::InteropValidationError(_) | SupervisorError::AccessListError(_) | SupervisorError::ChainIdParseError() | SupervisorError::SerdeJson(_) => ErrorObjectOwned::from(ErrorCode::InternalError), diff --git a/crates/supervisor/core/src/supervisor.rs b/crates/supervisor/core/src/supervisor.rs index 1cad2f1219..1407ed03c0 100644 --- a/crates/supervisor/core/src/supervisor.rs +++ b/crates/supervisor/core/src/supervisor.rs @@ -307,7 +307,10 @@ where executing_chain_id, executing_descriptor.timestamp, executing_descriptor.timeout, - )?; + ).map_err(|err| { + error!(target: "supervisor::service", %err, "Failed to validate interop timestamps"); + SpecError::SuperchainDAError(SuperchainDAError::ConflictingData) + })?; // Verify the initiating message exists and valid for corresponding executing message. let db = self.get_db(initiating_chain_id)?; @@ -326,7 +329,10 @@ where error!(target: "supervisor::service", %initiating_chain_id, %err, "Failed to get log for chain"); SpecError::from(err) })?; - access.verify_checksum(&log.hash)?; + access.verify_checksum(&log.hash).map_err(|err| { + error!(target: "supervisor::service", %initiating_chain_id, %err, "Failed to verify checksum for access list"); + SpecError::SuperchainDAError(SuperchainDAError::ConflictingData) + })?; // The message must be included in a block that is at least as safe as required // by the `min_safety` level