Skip to main content

iota_config/
lib.rs

1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2024 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5#[cfg(not(target_arch = "wasm32"))]
6pub mod certificate_deny_config;
7#[cfg(not(target_arch = "wasm32"))]
8pub mod genesis;
9#[cfg(not(target_arch = "wasm32"))]
10pub mod local_ip_utils;
11#[cfg(not(target_arch = "wasm32"))]
12pub mod migration_tx_data;
13#[cfg(not(target_arch = "wasm32"))]
14pub mod node;
15#[cfg(not(target_arch = "wasm32"))]
16pub mod node_config_metrics;
17#[cfg(not(target_arch = "wasm32"))]
18pub mod object_storage_config;
19#[cfg(not(target_arch = "wasm32"))]
20pub mod p2p;
21// Filesystem-backed config helpers (the `Config` / `PersistedConfig` traits and
22// path utilities). Node-only, so the whole module is gated out on wasm.
23#[cfg(not(target_arch = "wasm32"))]
24mod persisted_config;
25// `transaction_deny_config` + `verifier_signing_config` are the two modules
26// the execution path needs at sign-time. Everything else pulls in network /
27// filesystem / config-file machinery and is gated.
28pub mod transaction_deny_config;
29pub mod validator_client_monitor_config;
30pub mod verifier_signing_config;
31
32#[cfg(not(target_arch = "wasm32"))]
33pub use node::{ConsensusConfig, ExecutionCacheConfig, NodeConfig, WritebackCacheConfig};
34#[cfg(not(target_arch = "wasm32"))]
35pub use persisted_config::{
36    Config, PersistedConfig, genesis_blob_exists, iota_config_dir, ssfn_config_file,
37    validator_config_file,
38};
39
40pub const IOTA_CONFIG_DIR: &str = "iota_config";
41pub const IOTA_NETWORK_CONFIG: &str = "network.yaml";
42pub const IOTA_FULLNODE_CONFIG: &str = "fullnode.yaml";
43pub const IOTA_CLIENT_CONFIG: &str = "client.yaml";
44pub const IOTA_KEYSTORE_FILENAME: &str = "iota.keystore";
45pub const IOTA_BENCHMARK_GENESIS_GAS_KEYSTORE_FILENAME: &str = "benchmark.keystore";
46pub const IOTA_GENESIS_FILENAME: &str = "genesis.blob";
47pub const IOTA_GENESIS_MIGRATION_TX_DATA_FILENAME: &str = "migration.blob";
48pub const IOTA_DEV_NET_URL: &str = "https://api.devnet.iota.cafe:443";
49
50pub const AUTHORITIES_DB_NAME: &str = "authorities_db";
51pub const CONSENSUS_DB_NAME: &str = "consensus_db";
52pub const FULL_NODE_DB_PATH: &str = "full_node_db";