mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(trie): witness (#9803)
This commit is contained in:
@ -20,6 +20,7 @@ alloy-primitives.workspace = true
|
||||
alloy-rlp.workspace = true
|
||||
alloy-eips.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
nybbles.workspace = true
|
||||
|
||||
thiserror-no-std = { workspace = true, default-features = false }
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
//! Errors when computing the state root.
|
||||
|
||||
use alloy_primitives::B256;
|
||||
use nybbles::Nibbles;
|
||||
use reth_storage_errors::{db::DatabaseError, provider::ProviderError};
|
||||
use thiserror_no_std::Error;
|
||||
|
||||
@ -23,6 +25,26 @@ impl From<StateProofError> for ProviderError {
|
||||
}
|
||||
}
|
||||
|
||||
/// Trie witness errors.
|
||||
#[derive(Error, Debug, PartialEq, Eq, Clone)]
|
||||
pub enum TrieWitnessError {
|
||||
/// Error gather proofs.
|
||||
#[error(transparent)]
|
||||
Proof(#[from] StateProofError),
|
||||
/// RLP decoding error.
|
||||
#[error(transparent)]
|
||||
Rlp(#[from] alloy_rlp::Error),
|
||||
/// Missing storage multiproof.
|
||||
#[error("missing storage multiproof for {0}")]
|
||||
MissingStorageMultiProof(B256),
|
||||
/// Missing account.
|
||||
#[error("missing account {0}")]
|
||||
MissingAccount(B256),
|
||||
/// Missing target node.
|
||||
#[error("target node missing from proof {0:?}")]
|
||||
MissingTargetNode(Nibbles),
|
||||
}
|
||||
|
||||
/// State root errors.
|
||||
#[derive(Error, Debug, PartialEq, Eq, Clone)]
|
||||
pub enum StateRootError {
|
||||
|
||||
Reference in New Issue
Block a user