mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
chore: move nodetypes to node-api (#7268)
This commit is contained in:
19
crates/node-api/src/node.rs
Normal file
19
crates/node-api/src/node.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
//! Traits for configuring a node
|
||||
|
||||
use crate::{primitives::NodePrimitives, ConfigureEvm, EngineTypes};
|
||||
|
||||
/// The type that configures the essential types of an ethereum like node.
|
||||
///
|
||||
/// This includes the primitive types of a node, the engine API types for communication with the
|
||||
/// consensus layer, and the EVM configuration type for setting up the Ethereum Virtual Machine.
|
||||
pub trait NodeTypes: Send + Sync + 'static {
|
||||
/// The node's primitive types, defining basic operations and structures.
|
||||
type Primitives: NodePrimitives;
|
||||
/// The node's engine types, defining the interaction with the consensus engine.
|
||||
type Engine: EngineTypes;
|
||||
/// The node's EVM configuration, defining settings for the Ethereum Virtual Machine.
|
||||
type Evm: ConfigureEvm;
|
||||
|
||||
/// Returns the node's evm config.
|
||||
fn evm_config(&self) -> Self::Evm;
|
||||
}
|
||||
Reference in New Issue
Block a user