maili_protocol/batch/
errors.rs#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]
pub enum SpanBatchError {
    #[error("The span batch is too big.")]
    TooBigSpanBatchSize,
    #[error("The bit field is too long")]
    BitfieldTooLong,
    #[error("Empty span batch")]
    EmptySpanBatch,
    #[error("Missing L1 origin")]
    MissingL1Origin,
    #[error("Span batch decoding error: {0}")]
    Decoding(#[from] SpanDecodingError),
}
#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]
pub enum BatchEncodingError {
    #[error("Error encoding an Alloy RLP: {0}")]
    AlloyRlpError(alloy_rlp::Error),
    #[error("Error encoding a span batch: {0}")]
    SpanBatchError(#[from] SpanBatchError),
}
#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]
pub enum BatchDecodingError {
    #[error("Empty buffer")]
    EmptyBuffer,
    #[error("Error decoding an Alloy RLP: {0}")]
    AlloyRlpError(alloy_rlp::Error),
    #[error("Error decoding a span batch: {0}")]
    SpanBatchError(#[from] SpanBatchError),
}
#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]
pub enum SpanDecodingError {
    #[error("Failed to decode relative timestamp")]
    RelativeTimestamp,
    #[error("Failed to decode L1 origin number")]
    L1OriginNumber,
    #[error("Failed to decode parent check")]
    ParentCheck,
    #[error("Failed to decode L1 origin check")]
    L1OriginCheck,
    #[error("Failed to decode block count")]
    BlockCount,
    #[error("Failed to decode block tx counts")]
    BlockTxCounts,
    #[error("Failed to decode transaction nonces")]
    TxNonces,
    #[error("Mismatch in length between the transaction type and signature arrays")]
    TypeSignatureLenMismatch,
    #[error("Invalid transaction type")]
    InvalidTransactionType,
    #[error("Invalid transaction data")]
    InvalidTransactionData,
    #[error("Invalid transaction signature")]
    InvalidTransactionSignature,
}