Skip to content
Closed
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: 13 additions & 0 deletions rust/kona/crates/node/engine/src/sync/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@

use alloy_eips::BlockId;
use alloy_primitives::B256;
use alloy_rpc_types_engine::PayloadStatus;
use alloy_transport::{RpcError, TransportErrorKind};
use kona_protocol::FromBlockError;
use thiserror::Error;

/// An error that can occur during the sync start process.
#[derive(Error, Debug)]
pub enum SyncStartError {
/// The EL is still syncing; retry without trusting the retained checkpoint's labels.
#[error("Execution layer has not validated the sync-start checkpoint")]
CheckpointNotValidated,
/// The EL rejected the checkpoint forkchoice or returned an unexpected status; do not retry.
#[error("Execution layer rejected the sync-start checkpoint: {0:?}")]
CheckpointRejected(PayloadStatus),
/// The canonical L1 view changed during recovery; retry with a fresh view.
#[error("Canonical chain changed during sync-start recovery")]
ChainViewChanged,
/// An rpc error occurred
#[error("An RPC error occurred: {0}")]
RpcError(#[from] RpcError<TransportErrorKind>),
Expand All @@ -29,6 +39,9 @@ pub enum SyncStartError {
/// Finalized block mismatch
#[error("Finalized block mismatch. Expected {0}, Got {1}")]
MismatchedFinalizedBlock(B256, B256),
/// Recovery would rewind the unsafe origin by more than op-node's five lookback windows.
#[error("L1 reorg exceeds five sync lookback windows")]
ReorgTooDeep,
/// L1 origin mismatch.
#[error("L1 origin mismatch")]
L1OriginMismatch,
Expand Down
582 changes: 506 additions & 76 deletions rust/kona/crates/node/engine/src/sync/mod.rs

Large diffs are not rendered by default.

Loading
Loading