-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client): Trace extension support (#778)
* check * check * lint * don't use `derive_more::Error`
- Loading branch information
Showing
22 changed files
with
404 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
gk/holocene-derivation-action-testing-stacked | ||
afe849ea0b0f5ee5889e0fe440ad7827d7ceef5f |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//! Error types for the client program. | ||
use alloc::string::ToString; | ||
use derive_more::derive::Display; | ||
use kona_derive::errors::{PipelineError, PipelineErrorKind}; | ||
use kona_mpt::OrderedListWalkerError; | ||
use kona_preimage::errors::PreimageOracleError; | ||
use op_alloy_protocol::{FromBlockError, OpBlockConversionError}; | ||
|
||
/// Error from an oracle-backed provider. | ||
#[derive(Display, Debug)] | ||
pub enum OracleProviderError { | ||
/// Requested block number is past the chain head. | ||
#[display("Block number ({_0}) past chain head ({_1})")] | ||
BlockNumberPastHead(u64, u64), | ||
/// Preimage oracle error. | ||
#[display("Preimage oracle error: {_0}")] | ||
Preimage(PreimageOracleError), | ||
/// List walker error. | ||
#[display("Trie walker error: {_0}")] | ||
TrieWalker(OrderedListWalkerError), | ||
/// BlockInfo error. | ||
#[display("From block error: {_0}")] | ||
BlockInfo(FromBlockError), | ||
/// Op Block conversion error. | ||
#[display("Op block conversion error: {_0}")] | ||
OpBlockConversion(OpBlockConversionError), | ||
/// Error decoding or encoding RLP. | ||
#[display("RLP error: {_0}")] | ||
Rlp(alloy_rlp::Error), | ||
/// Slice conversion error. | ||
#[display("Slice conversion error: {_0}")] | ||
SliceConversion(core::array::TryFromSliceError), | ||
} | ||
|
||
impl core::error::Error for OracleProviderError {} | ||
|
||
impl From<OracleProviderError> for PipelineErrorKind { | ||
fn from(val: OracleProviderError) -> Self { | ||
match val { | ||
OracleProviderError::BlockNumberPastHead(_, _) => PipelineError::EndOfSource.crit(), | ||
_ => PipelineError::Provider(val.to_string()).crit(), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.