Struct NodeConfig
pub struct NodeConfig {
pub storage: StorageConfig,
pub image: ImageConfig,
pub network: NetworkConfig,
pub peers: Vec<PeerConfig>,
pub profile: ProfileConfig,
pub node_mode: NodeMode,
pub node_key: NodeKey,
pub submitter: Option<SubmitterConfig>,
pub runtime: RuntimeConfig,
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).
image: ImageConfigImage repository configuration.
network: NetworkConfigNetwork configuration (API and UPC listeners).
peers: Vec<PeerConfig>Static peer list (optional).
profile: ProfileConfigNetwork profile selection and overrides.
node_mode: NodeModeHigh-level node deployment mode.
node_key: NodeKeyNode identity configuration.
submitter: Option<SubmitterConfig>Node-side Ethereum transaction submitter signer.
runtime: RuntimeConfigTokio runtime sizing.
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 load( config_path: Option<PathBuf>, overrides: JsonMap<String, JsonValue>, ) -> Result<Self>
Load a node config from an optional file plus JSON-style override map, then validate it.
pub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate all nested config sections and annotate failures with section context.
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 files).
pub fn resolved_image_repo_dir(&self) -> PathBuf
pub fn resolved_image_repo_dir(&self) -> PathBuf
Resolve the on-disk image repository directory.
pub fn resolved_acme_storage_path(&self) -> Option<PathBuf>
pub fn resolved_acme_storage_path(&self) -> Option<PathBuf>
Resolve ACME storage path if ACME is configured.
pub fn resolved_serving_dns_suffix(&self) -> Result<String>
pub fn resolved_serving_dns_suffix(&self) -> Result<String>
Resolve the HTTPS/DNS serving domain, defaulting to the profile network domain.
pub fn resolved_submitter(
&self,
network_type: NetworkType,
) -> Result<ResolvedSubmitterConfig>
pub fn resolved_submitter( &self, network_type: NetworkType, ) -> Result<ResolvedSubmitterConfig>
Resolve the node-side Ethereum submitter signer according to the network profile policy.
Trait Implementations§
§impl Clone for NodeConfig
impl Clone for NodeConfig
§fn clone(&self) -> NodeConfig
fn clone(&self) -> NodeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more