Skip to content
Open
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: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/client/flashblocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ alloy-provider.workspace = true
alloy-rpc-types.workspace = true
alloy-consensus.workspace = true
alloy-primitives.workspace = true
alloy-op-evm.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types-engine.workspace = true

Expand Down Expand Up @@ -72,6 +71,7 @@ rayon.workspace = true
rstest.workspace = true
rand.workspace = true
eyre.workspace = true
revm = { workspace = true, features = ["std"] }
reth-db.workspace = true
once_cell.workspace = true
reth-provider.workspace = true
Expand Down
16 changes: 16 additions & 0 deletions crates/client/flashblocks/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ pub enum ExecutionError {
/// Failed to load cache account for depositor.
#[error("failed to load cache account for deposit transaction sender")]
DepositAccountLoad,

/// Failed to build RPC receipt.
#[error("failed to build RPC receipt: {0}")]
RpcReceiptBuild(String),
}

impl From<RecoveryError> for ExecutionError {
Expand All @@ -86,6 +90,12 @@ impl From<RecoveryError> for ExecutionError {
}
}

impl From<crate::ReceiptBuildError> for ExecutionError {
fn from(_: crate::ReceiptBuildError) -> Self {
Self::DepositAccountLoad
}
}

/// Errors related to pending blocks construction.
#[derive(Debug, Clone, Eq, PartialEq, Error)]
pub enum BuildError {
Expand Down Expand Up @@ -124,6 +134,12 @@ impl From<RecoveryError> for StateProcessorError {
}
}

impl From<crate::ReceiptBuildError> for StateProcessorError {
fn from(err: crate::ReceiptBuildError) -> Self {
Self::Execution(ExecutionError::from(err))
}
}

/// A type alias for `Result<T, StateProcessorError>`.
pub type Result<T> = std::result::Result<T, StateProcessorError>;

Expand Down
3 changes: 3 additions & 0 deletions crates/client/flashblocks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub use traits::{FlashblocksAPI, FlashblocksReceiver, PendingBlocksAPI};
mod state_builder;
pub use state_builder::{ExecutedPendingTransaction, PendingStateBuilder};

mod receipt_builder;
pub use receipt_builder::{ReceiptBuildError, UnifiedReceiptBuilder};

mod validation;
pub use validation::{
CanonicalBlockReconciler, FlashblockSequenceValidator, ReconciliationStrategy,
Expand Down
1 change: 0 additions & 1 deletion crates/client/flashblocks/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ where
prev_pending_blocks.clone(),
l1_block_info,
state_overrides,
*evm_config.block_executor_factory().receipt_builder(),
);

for (idx, (transaction, sender)) in txs_with_senders.into_iter().enumerate() {
Expand Down
Loading