-
Notifications
You must be signed in to change notification settings - Fork 24
consider smaller vardiff cycles #396
Copy link
Copy link
Open
Labels
Milestone
Description
after community testing, we're realizing that vardiff has been causing some confusion on people
- Vardif needs better explanation, and to show progress in the UI, until Vardiff kicks in, users are reporting 'stats are off" type of issues. sv2-ui#42
- label hashrate as estimated with informational tooltips sv2-ui#47
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
| 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"); | |
| } | |
| } | |
| } |
sv2-apps/miner-apps/jd-client/src/lib/channel_manager/mod.rs
Lines 1093 to 1103 in c1cd72e
| 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"); | |
| } | |
| } | |
| } |
sv2-apps/miner-apps/translator/src/lib/sv1/sv1_server/difficulty_manager.rs
Lines 32 to 42 in c1cd72e
| 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-appswith a smaller value (e.g.: 10s) - make it user configurable via
.tomlfile (and therefore also viasv2-uiwizard)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo 📝