Struct NodeConfig
pub struct NodeConfig {
pub storage: StorageConfig,
pub network: NetworkConfig,
pub peers: Vec<PeerConfig>,
pub profile: NetworkType,
pub node_key: NodeKey,
pub force_seq_eth: Option<String>,
pub flush_interval_secs: u64,
}Expand description
Configuration schema for running the Lyquor node. Can be loaded from config files and overridden via CLI to produce a validated runtime config.
Fields§
§storage: StorageConfigStorage backend choice (mem-db or RocksDB with directory).
network: NetworkConfigNetwork configuration (API and UPC listeners).
peers: Vec<PeerConfig>Static peer list (optional).
profile: NetworkTypeNetwork to run (devnet/testnet/mainnet).
node_key: NodeKeyNode identity configuration.
force_seq_eth: Option<String>Override the WebSocket URL for the Ethereum sequencer.
flush_interval_secs: u64Interval in seconds for database flushing (0 to disable).
Implementations§
§impl NodeConfig
impl NodeConfig
pub fn load( config_path: Option<PathBuf>, overrides: JsonMap<String, JsonValue>, ) -> Result<Self>
pub fn resolved_db_dir(&self) -> PathBuf
pub fn resolved_db_dir(&self) -> PathBuf
Resolve the on-disk database directory, falling back to the default path for in-memory mode when we still need a place for ancillary files (e.g., anvil state dumps).
Trait Implementations§
§impl Clone for NodeConfig
impl Clone for NodeConfig
§fn clone(&self) -> NodeConfig
fn clone(&self) -> NodeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for NodeConfig
impl Debug for NodeConfig
§impl<'de> Deserialize<'de> for NodeConfig
impl<'de> Deserialize<'de> for NodeConfig
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl JsonSchema for NodeConfig
impl JsonSchema for NodeConfig
§fn schema_name() -> Cow<'static, str>
fn schema_name() -> Cow<'static, str>
The name of the generated JSON Schema. Read more
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read more§impl Serialize for NodeConfig
impl Serialize for NodeConfig
Auto Trait Implementations§
impl Freeze for NodeConfig
impl RefUnwindSafe for NodeConfig
impl Send for NodeConfig
impl Sync for NodeConfig
impl Unpin for NodeConfig
impl UnwindSafe for NodeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more