perf(tree): integrate parallel state root (#7161)

This commit is contained in:
Roman Krasiuk
2024-03-21 17:08:49 +01:00
committed by GitHub
parent aac0b00f53
commit 56b63adecc
17 changed files with 184 additions and 144 deletions

View File

@@ -131,6 +131,9 @@ pub enum ProviderError {
/// Error encountered when the block number conversion from U256 to u64 causes an overflow.
#[error("failed to convert block number U256 to u64: {0}")]
BlockNumberOverflow(U256),
/// Consistent view error.
#[error("failed to initialize consistent view: {0}")]
ConsistentView(Box<ConsistentViewError>),
}
impl From<reth_primitives::fs::FsPathError> for ProviderError {
@@ -152,7 +155,7 @@ pub struct RootMismatch {
}
/// Consistent database view error.
#[derive(Error, Debug)]
#[derive(Clone, Debug, Error, PartialEq, Eq)]
pub enum ConsistentViewError {
/// Error thrown on attempt to initialize provider while node is still syncing.
#[error("node is syncing. best block: {0}")]
@@ -163,7 +166,10 @@ pub enum ConsistentViewError {
/// The tip diff.
tip: GotExpected<Option<B256>>,
},
/// Underlying provider error.
#[error(transparent)]
Provider(#[from] ProviderError),
}
impl From<ConsistentViewError> for ProviderError {
fn from(value: ConsistentViewError) -> Self {
Self::ConsistentView(Box::new(value))
}
}