Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions crates/supervisor/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Comment thread
dhyaniarun1993 marked this conversation as resolved.
use kona_supervisor_types::AccessListError;
use op_alloy_rpc_types::SuperchainDAError;
Expand All @@ -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 <https://github.com/ethereum-optimism/specs/blob/main/specs/interop/supervisor.md#protocol-specific-error-codes>.
#[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),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -129,12 +118,10 @@ impl From<SupervisorError> 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),
Expand Down
10 changes: 8 additions & 2 deletions crates/supervisor/core/src/supervisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it require to be error log as this is user/caller error

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing that out.
Nope. It should be debug/warn. I will fix it in a separate PR

SpecError::SuperchainDAError(SuperchainDAError::ConflictingData)
})?;

// Verify the initiating message exists and valid for corresponding executing message.
let db = self.get_db(initiating_chain_id)?;
Expand All @@ -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
Expand Down
Loading