use thiserror::Error;
use crate::components::{contract_runtime, small_network, storage};
#[derive(Debug, Error)]
pub enum Error {
#[error("prometheus (metrics) error: {0}")]
Metrics(#[from] prometheus::Error),
#[error("small network error: {0}")]
SmallNetwork(#[from] small_network::Error),
#[error("storage error: {0}")]
Storage(#[from] storage::Error),
#[error("consensus error: {0}")]
Consensus(#[from] anyhow::Error),
#[error("contract runtime config error: {0}")]
ContractRuntime(#[from] contract_runtime::ConfigError),
#[error("serialization: {0}")]
Serialization(#[source] bincode::ErrorKind),
}