Skip to content

Commit e8cca43

Browse files
committed
improve wait_time_for_blocks, mock_mining and stacker documentation
1 parent f1f29b8 commit e8cca43

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

stackslib/src/config/mod.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,15 +1726,14 @@ pub struct NodeConfig {
17261726
///
17271727
/// Default: `false`
17281728
pub miner: bool,
1729-
/// Flag indicating whether this node is configured to operate with Stacker responsibilities,
1730-
/// such as participating in (PoX) by signaling support via StackerDB interactions.
1731-
/// Setting this to `true` requires also running a signer.
1729+
/// Setting this to `true` enables the node to replicate the miner and signer Stacker DBs
1730+
/// required for signing, and is required if the node is connected to a signer.
17321731
///
17331732
/// Default: `false`
17341733
pub stacker: bool,
17351734
/// Enables a simulated mining mode, primarily for local testing and development.
1736-
/// When `true`, the node may generate blocks locally without participating in the real
1737-
/// burn chain consensus or P2P block production process.
1735+
/// When `true`, *and* [`NodeConfig::miner`] is also `true`, the node may generate blocks
1736+
/// locally without participating in the real bitcoin consensus or P2P block production process.
17381737
///
17391738
/// Default: `false`
17401739
pub mock_mining: bool,
@@ -1767,7 +1766,12 @@ pub struct NodeConfig {
17671766
/// Default: `30_000`
17681767
/// Deprecated: Microblocks were removed in the Nakamoto upgrade. This setting is ignored in Epoch 3.0+.
17691768
pub wait_time_for_microblocks: u64,
1770-
/// Maximum time (in milliseconds) to wait between mining blocks.
1769+
/// When operating as a miner, this specifies the maximum time (in milliseconds)
1770+
/// the node waits after detecting a new burnchain block to synchronize corresponding
1771+
/// Stacks block data from the network before resuming mining attempts.
1772+
/// If synchronization doesn't complete within this duration, mining resumes anyway
1773+
/// to prevent stalling. This setting is loaded by all nodes but primarily affects
1774+
/// miner behavior within the relayer thread.
17711775
///
17721776
/// Default: `30_000`
17731777
pub wait_time_for_blocks: u64,
@@ -1841,7 +1845,7 @@ pub struct NodeConfig {
18411845
/// affirmation map checks.
18421846
/// Normal operation requires this to be `true`; setting to `false` will likely break consensus adherence.
18431847
/// This parameter cannot be set via the configuration file; it must be modified programmatically.
1844-
1848+
///
18451849
/// Default: `true`
18461850
pub assume_present_anchor_blocks: bool,
18471851
/// Fault injection setting for testing purposes. If set to `Some(p)`, where `p` is between 0 and 100,

0 commit comments

Comments
 (0)