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#[cfg(not(target_arch = "wasm32"))]
22pub mod setting;
23// Filesystem-backed config helpers (the `Config` / `PersistedConfig` traits and
24// path utilities). Node-only, so the whole module is gated out on wasm.
25#[cfg(not(target_arch = "wasm32"))]
26mod persisted_config;
27// `transaction_deny_config` + `verifier_signing_config` are the two modules
28// the execution path needs at sign-time. Everything else pulls in network /
29// filesystem / config-file machinery and is gated.
30pub mod transaction_deny_config;
31pub mod validator_client_monitor_config;
32pub mod verifier_signing_config;
33
34#[cfg(not(target_arch = "wasm32"))]
35pub use node::{ConsensusConfig, ExecutionCacheConfig, NodeConfig, WritebackCacheConfig};
36#[cfg(not(target_arch = "wasm32"))]
37pub use persisted_config::{
38    Config, PersistedConfig, genesis_blob_exists, iota_config_dir, ssfn_config_file,
39    validator_config_file,
40};
41
42pub const IOTA_CONFIG_DIR: &str = "iota_config";
43pub const IOTA_NETWORK_CONFIG: &str = "network.yaml";
44pub const IOTA_FULLNODE_CONFIG: &str = "fullnode.yaml";
45pub const IOTA_CLIENT_CONFIG: &str = "client.yaml";
46pub const IOTA_KEYSTORE_FILENAME: &str = "iota.keystore";
47pub const IOTA_BENCHMARK_GENESIS_GAS_KEYSTORE_FILENAME: &str = "benchmark.keystore";
48pub const IOTA_GENESIS_FILENAME: &str = "genesis.blob";
49pub const IOTA_GENESIS_MIGRATION_TX_DATA_FILENAME: &str = "migration.blob";
50pub const IOTA_DEV_NET_URL: &str = "https://api.devnet.iota.cafe:443";
51
52pub const AUTHORITIES_DB_NAME: &str = "authorities_db";
53pub const CONSENSUS_DB_NAME: &str = "consensus_db";
54pub const FULL_NODE_DB_PATH: &str = "full_node_db";