after community testing, we're realizing that vardiff has been causing some confusion on people
currently, Pool + JDC + tProxy all have hardcoded 60s vardiff cycles:
|
async fn run_vardiff_loop(&self) -> PoolResult<(), error::ChannelManager> { |
|
let mut ticker = tokio::time::interval(std::time::Duration::from_secs(60)); |
|
loop { |
|
ticker.tick().await; |
|
info!("Starting vardiff loop for downstreams"); |
|
|
|
if let Err(e) = self.run_vardiff().await { |
|
error!(error = ?e, "Vardiff iteration failed"); |
|
} |
|
} |
|
} |
|
async fn run_vardiff_loop(&self) -> JDCResult<(), error::ChannelManager> { |
|
let mut ticker = tokio::time::interval(std::time::Duration::from_secs(60)); |
|
loop { |
|
ticker.tick().await; |
|
info!("Starting vardiff loop for downstreams"); |
|
|
|
if let Err(e) = self.run_vardiff().await { |
|
error!(error = ?e, "Vardiff iteration failed"); |
|
} |
|
} |
|
} |
|
pub async fn spawn_vardiff_loop(self: Arc<Self>) { |
|
info!("Variable difficulty adjustment enabled - starting vardiff loop"); |
|
|
|
let mut ticker = tokio::time::interval(std::time::Duration::from_secs(60)); |
|
loop { |
|
ticker.tick().await; |
|
info!("Starting vardiff loop for downstreams"); |
|
|
|
self.handle_vardiff_updates().await; |
|
} |
|
} |
we should consider making vardiff cycles smaller than 60s
that would allow the UI to display updates more often
two options:
- set a universal constant on
stratum-apps with a smaller value (e.g.: 10s)
- make it user configurable via
.toml file (and therefore also via sv2-ui wizard)
after community testing, we're realizing that vardiff has been causing some confusion on people
currently, Pool + JDC + tProxy all have hardcoded 60s vardiff cycles:
sv2-apps/pool-apps/pool/src/lib/channel_manager/mod.rs
Lines 565 to 575 in c1cd72e
sv2-apps/miner-apps/jd-client/src/lib/channel_manager/mod.rs
Lines 1093 to 1103 in c1cd72e
sv2-apps/miner-apps/translator/src/lib/sv1/sv1_server/difficulty_manager.rs
Lines 32 to 42 in c1cd72e
we should consider making vardiff cycles smaller than 60s
that would allow the UI to display updates more often
two options:
stratum-appswith a smaller value (e.g.: 10s).tomlfile (and therefore also viasv2-uiwizard)