@@ -1672,6 +1672,8 @@ pub struct NodeConfig {
1672
1672
/// All persistent data, including chainstate, burnchain databases, and potentially other stores,
1673
1673
/// will be located within this directory.
1674
1674
/// This path can be overridden by setting the `STACKS_WORKING_DIR` environment variable.
1675
+ /// Note: For persistent mainnet or testnet nodes, this path must be explicitly
1676
+ /// configured to a non-temporary location in the configuration file.
1675
1677
///
1676
1678
/// Default: `/tmp/stacks-node-{current_timestamp}`.
1677
1679
pub working_dir : String ,
@@ -1688,13 +1690,13 @@ pub struct NodeConfig {
1688
1690
/// The publicly accessible URL that this node advertises to peers during the P2P handshake
1689
1691
/// as its HTTP RPC endpoint. Other nodes or services might use this URL to query the node's API.
1690
1692
///
1691
- /// Default: `http://{rpc_bind}` (e.g., "http://127 .0.0.1 :20443" if rpc_bind is default and resolves locally ).
1693
+ /// Default: `http://{rpc_bind}` (e.g., "http://0 .0.0.0 :20443" if rpc_bind is default).
1692
1694
pub data_url : String ,
1693
1695
/// The publicly accessible IPv4 address and port that this node advertises to peers for P2P connections.
1694
1696
/// This might differ from `p2p_bind` if the node is behind NAT or a proxy.
1695
1697
/// Note: The default value derivation might be unexpected, potentially using the `rpc_bind` address; explicit configuration is recommended if needed.
1696
1698
///
1697
- /// Default: Derived from `rpc_bind` (e.g., "127 .0.0.1 :20443" with default settings ).
1699
+ /// Default: Derived from `rpc_bind` (e.g., "0 .0.0.0 :20443" if rpc_bind is default ).
1698
1700
pub p2p_address : String ,
1699
1701
/// The private key seed, provided as a hex string in the config file, used specifically for the
1700
1702
/// node's identity and message signing within the P2P networking layer.
@@ -1703,11 +1705,14 @@ pub struct NodeConfig {
1703
1705
/// Default: Randomly generated 32 bytes.
1704
1706
pub local_peer_seed : Vec < u8 > ,
1705
1707
/// A list of initial peer nodes used to bootstrap connections into the Stacks P2P network.
1706
- /// Peers are specified as comma-separated strings in the format "PUBKEY@IP:PORT" or "PUBKEY@HOSTNAME:PORT"
1707
- /// in the configuration file . DNS hostnames are resolved during configuration loading.
1708
- /// If empty on mainnet, default Hiro and Stacks seed nodes are used .
1708
+ /// Peers are specified in a configuration file as comma-separated strings in the
1709
+ /// format `"PUBKEY@IP:PORT"` or `"PUBKEY@HOSTNAME:PORT"` . DNS hostnames are resolved
1710
+ /// during configuration loading .
1709
1711
///
1710
- /// Default: Empty vector `[]`.
1712
+ /// Default: The effective initial list depends on how the node is started:
1713
+ /// - `mainnet` subcommand: Uses the default Hiro and Stacks mainnet seed nodes
1714
+ /// - `testnet` subcommand: Uses the default Hiro testnet seed node
1715
+ /// - Other subcommands (`start`, `mocknet`, `helium`, etc.): Empty vector `[]`.
1711
1716
pub bootstrap_node : Vec < Neighbor > ,
1712
1717
/// A list of peer addresses that this node should explicitly deny connections from.
1713
1718
/// Peers are specified as comma-separated strings in the format "IP:PORT" or "HOSTNAME:PORT"
@@ -1792,8 +1797,8 @@ pub struct NodeConfig {
1792
1797
/// Default: `None` (effectively `"noop"`).
1793
1798
pub marf_cache_strategy : Option < String > ,
1794
1799
/// Controls the timing of hash calculations for MARF trie nodes.
1795
- /// If `true`, hashes are calculated only when the MARF is flushed to disk (deferred hashing).
1796
- /// If `false`, hashes are calculated immediately as leaf nodes are inserted or updated (immediate hashing).
1800
+ /// - If `true`, hashes are calculated only when the MARF is flushed to disk (deferred hashing).
1801
+ /// - If `false`, hashes are calculated immediately as leaf nodes are inserted or updated (immediate hashing).
1797
1802
/// Deferred hashing might improve write performance.
1798
1803
///
1799
1804
/// Default: `true`
@@ -1811,22 +1816,22 @@ pub struct NodeConfig {
1811
1816
/// Default: `None` (uses standard network genesis).
1812
1817
pub use_test_genesis_chainstate : Option < bool > ,
1813
1818
/// Controls if Stacks Epoch 2.1+ affirmation map logic should be applied even before Epoch 2.1.
1814
- /// If `true` (default), the node consistently uses the newer (Epoch 2.1) rules for PoX anchor block
1815
- /// validation and affirmation-based reorg handling, even in earlier epochs.
1816
- /// If `false`, the node strictly follows the rules defined for the specific epoch it is currently
1817
- /// processing, only applying 2.1+ logic from Epoch 2.1 onwards.
1819
+ /// - If `true` (default), the node consistently uses the newer (Epoch 2.1) rules for PoX anchor block
1820
+ /// validation and affirmation-based reorg handling, even in earlier epochs.
1821
+ /// - If `false`, the node strictly follows the rules defined for the specific epoch it is currently
1822
+ /// processing, only applying 2.1+ logic from Epoch 2.1 onwards.
1818
1823
/// Differences in this setting between nodes prior to Epoch 2.1 could lead to consensus forks.
1819
1824
///
1820
1825
/// Default: `true`
1821
1826
pub always_use_affirmation_maps : bool ,
1822
1827
/// Controls if the node must wait for locally missing but burnchain-affirmed PoX anchor blocks.
1823
1828
/// If an anchor block is confirmed by the affirmation map but not yet processed by this node:
1824
1829
/// - If `true`: Burnchain processing halts until the affirmed block is acquired. Ensures strict
1825
- /// adherence to the affirmed canonical chain, typical for followers.
1830
+ /// adherence to the affirmed canonical chain, typical for followers.
1826
1831
/// - If `false`: Burnchain processing continues without waiting. Allows miners to operate optimistically
1827
- /// but may necessitate unwinding later if the affirmed block alters the chain state.
1832
+ /// but may necessitate unwinding later if the affirmed block alters the chain state.
1828
1833
///
1829
- /// Default: default is `true` for followers and `false` for miners (when not explicitly configured).
1834
+ /// Default: `true` for followers, `false` for miners (when not explicitly configured).
1830
1835
pub require_affirmed_anchor_blocks : bool ,
1831
1836
/// Controls if the node must strictly wait for any PoX anchor block selected by the core consensus mechanism.
1832
1837
/// - If `true`: Halts burnchain processing immediately whenever a selected anchor block is missing locally
@@ -1860,10 +1865,12 @@ pub struct NodeConfig {
1860
1865
pub chain_liveness_poll_time_secs : u64 ,
1861
1866
/// A list of specific StackerDB contracts (identified by their qualified contract identifiers,
1862
1867
/// e.g., "SP000000000000000000002Q6VF78.pox-3") that this node should actively replicate.
1863
- /// If the node is configured as a miner (`node.miner = true`) or stacker (`node.stacker = true`),
1864
- /// relevant system contracts (like `.miners` and `.signers-*`) are typically added automatically.
1865
1868
///
1866
- /// Default: Empty vector `[]`.
1869
+ /// Default: The initial list depends on the `node.miner` and `node.stacker` settings:
1870
+ /// - If `miner = true` or `stacker = true`: Relevant system contracts (like `.miners`
1871
+ /// and `.signers-*`) are automatically added during configuration loading, in addition
1872
+ /// to any contracts specified in the configuration file.
1873
+ /// - If `miner = false` and `stacker = false`: Empty vector `[]`.
1867
1874
pub stacker_dbs : Vec < QualifiedContractIdentifier > ,
1868
1875
/// Enables the transaction index, which maps transaction IDs to the blocks containing them.
1869
1876
/// Setting this to `true` allows the use of RPC endpoints that look up transactions by ID
0 commit comments