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
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
cargo-doc:
runs-on: ubuntu-latest
timeout-minutes: 20
continue-on-error: true
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -90,7 +89,6 @@ jobs:
with:
cache-on-failure: true
- name: doclint
continue-on-error: true
run: just lint-docs
- name: doctest
run: just test-docs
4 changes: 4 additions & 0 deletions crates/derive/src/stages/attributes_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ mod builder;
pub use builder::{AttributesBuilder, StatefulAttributesBuilder};

/// [AttributesProvider] is a trait abstraction that generalizes the [BatchQueue] stage.
///
/// [BatchQueue]: crate::stages::BatchQueue
#[async_trait]
pub trait AttributesProvider {
/// Returns the next valid batch upon the given safe head.
Expand All @@ -38,6 +40,8 @@ pub trait AttributesProvider {
///
/// This stage can be reset by clearing its batch buffer.
/// This stage does not need to retain any references to L1 blocks.
///
/// [BatchQueue]: crate::stages::BatchQueue
#[derive(Debug)]
pub struct AttributesQueue<P, AB>
where
Expand Down
6 changes: 5 additions & 1 deletion crates/derive/src/stages/batch_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ pub trait BatchQueueProvider {
/// This function can only be called once while the stage is in progress, and will return
/// [`None`] on subsequent calls unless the stage is reset or complete. If the stage is
/// complete and the batch has been consumed, an [StageError::Eof] error is returned.
///
/// [ChannelReader]: crate::stages::ChannelReader
async fn next_batch(&mut self) -> StageResult<Batch>;
}

Expand Down Expand Up @@ -62,7 +64,9 @@ where
/// A set of batches in order from when we've seen them.
batches: Vec<BatchWithInclusionBlock>,

/// A set of cached [SingleBatche]s derived from [SpanBatch]s.
/// A set of cached [SingleBatch]es derived from [SpanBatch]es.
///
/// [SpanBatch]: crate::types::SpanBatch
next_spans: Vec<SingleBatch>,

/// Used to validate the batches.
Expand Down
2 changes: 2 additions & 0 deletions crates/derive/src/stages/channel_bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ use tracing::{debug, warn};
#[async_trait]
pub trait ChannelBankProvider {
/// Retrieves the next [Frame] from the [FrameQueue] stage.
///
/// [FrameQueue]: crate::stages::FrameQueue
async fn next_frame(&mut self) -> StageResult<Frame>;
}

Expand Down
4 changes: 4 additions & 0 deletions crates/derive/src/stages/frame_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ pub trait FrameQueueProvider {

/// The [FrameQueue] stage of the derivation pipeline.
/// This stage takes the output of the [L1Retrieval] stage and parses it into frames.
///
/// [L1Retrieval]: crate::stages::L1Retrieval
#[derive(Debug)]
pub struct FrameQueue<P>
where
Expand All @@ -42,6 +44,8 @@ where
P: FrameQueueProvider + OriginProvider + Debug,
{
/// Create a new [FrameQueue] stage with the given previous [L1Retrieval] stage.
///
/// [L1Retrieval]: crate::stages::L1Retrieval
pub fn new(prev: P) -> Self {
Self { prev, queue: VecDeque::new() }
}
Expand Down
16 changes: 11 additions & 5 deletions crates/derive/src/stages/l1_retrieval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ pub trait L1RetrievalProvider {
/// This function can only be called once while the stage is in progress, and will return
/// [`None`] on subsequent calls unless the stage is reset or complete. If the stage is
/// complete and the [BlockInfo] has been consumed, an [StageError::Eof] error is returned.
///
/// [L1Traversal]: crate::stages::L1Traversal
fn next_l1_block(&mut self) -> StageResult<Option<BlockInfo>>;

/// Returns the batcher [Address] from the [crate::types::SystemConfig].
fn batcher_addr(&self) -> Address;
}

/// The [L1Retrieval] stage of the derivation pipeline.
/// For each L1 [BlockInfo] pulled from the [L1Traversal] stage,
/// [L1Retrieval] fetches the associated data from a specified
/// [DataAvailabilityProvider]. This data is returned as a generic
/// For each L1 [BlockInfo] pulled from the [L1Traversal] stage, [L1Retrieval] fetches the
/// associated data from a specified [DataAvailabilityProvider]. This data is returned as a generic
/// [DataIter] that can be iterated over.
///
/// [L1Traversal]: crate::stages::L1Traversal
/// [DataIter]: crate::traits::DataAvailabilityProvider::DataIter
#[derive(Debug)]
pub struct L1Retrieval<DAP, P>
where
Expand All @@ -47,8 +51,10 @@ where
DAP: DataAvailabilityProvider,
P: L1RetrievalProvider + OriginProvider,
{
/// Creates a new [L1Retrieval] stage with the previous [L1Traversal]
/// stage and given [DataAvailabilityProvider].
/// Creates a new [L1Retrieval] stage with the previous [L1Traversal] stage and given
/// [DataAvailabilityProvider].
///
/// [L1Traversal]: crate::stages::L1Traversal
pub fn new(prev: P, provider: DAP) -> Self {
Self { prev, provider, data: None }
}
Expand Down
2 changes: 2 additions & 0 deletions crates/derive/src/types/ecotone.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![allow(dead_code)]
//! Module containing a [Transaction] builder for the Ecotone network updgrade transactions.
//!
//! [Transaction]: alloy_consensus::Transaction

use crate::types::{RawTransaction, UpgradeDepositSource};
use alloc::{string::String, vec, vec::Vec};
Expand Down
6 changes: 5 additions & 1 deletion crates/derive/src/types/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,18 @@ impl Display for DecodeError {
}
}

/// An [AttributeBuilder] Error.
/// An [AttributesBuilder] Error.
///
/// [AttributesBuilder]: crate::stages::AttributesBuilder
#[derive(Debug)]
pub enum BuilderError {
/// Mismatched blocks.
BlockMismatch(BlockID, BlockID),
/// Mismatched blocks for the start of an Epoch.
BlockMismatchEpochReset(BlockID, BlockID, B256),
/// [SystemConfig] update failed.
///
/// [SystemConfig]: crate::types::SystemConfig
SystemConfigUpdate,
/// Broken time invariant between L2 and L1.
BrokenTimeInvariant(BlockID, u64, BlockID, u64),
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ mod l1_block_info;
pub use l1_block_info::{L1BlockInfoBedrock, L1BlockInfoEcotone, L1BlockInfoTx};

mod blob;
pub use blob::{Blob, BlobData, IndexedBlobHash};
pub use blob::{Blob, BlobData, BlobDecodingError, IndexedBlobHash};

mod genesis;
pub use genesis::Genesis;
Expand Down