BlockBit v1.0.3 - Stratum V1 Difficulty & Share Validation Fixes
Release Date: February 16, 2026
Overview
This release fixes five bugs in the Stratum V1 difficulty and share validation subsystem that caused miners to experience rejected shares, unresponsive difficulty adjustments, and misleading error messages on mainnet. These issues were reported by users running production mining setups.
Bug Fixes
1. Vardiff Deadlock for Miners Below Start Difficulty (Critical)
Problem: Miners with hashrate too low to produce shares at the mainnet start_difficulty of 65536 were permanently locked out. All shares were rejected as LOW_DIFFICULTY, but the vardiff algorithm required 3 accepted shares before it would consider any adjustment — creating a deadlock where difficulty could never decrease.
Fix: Added a zero-share fallback mechanism. If a worker has 0 accepted shares after 30 seconds, difficulty is automatically halved toward min_difficulty. This repeats each retarget cycle until the miner can produce valid shares (e.g., 65536 → 32768 → 16384 → ... → 256).
Files: src/stratum/difficulty.h, src/stratum/difficulty.cpp
2. Vardiff Used Lifetime Average Instead of Windowed Rate (Critical)
Problem: Share rate was calculated as total_shares / total_time_since_connect, making difficulty adjustments increasingly sluggish over long connections. After hours of mining, hashrate changes (thermal throttling, miners going on/offline) barely moved the average, leaving miners at inappropriate difficulty levels.
Fix: Replaced lifetime counters with windowed tracking. New per-worker counters (shares_since_retarget, last_retarget_time) reset on each difficulty change. The vardiff algorithm now measures share rate only within the current window, matching CKPool's approach and responding quickly to hashrate changes.
Files: src/stratum/stratumworker.h, src/stratum/difficulty.cpp, src/stratum/stratumserver.cpp
3. Stale Shares Misreported as LOW_DIFFICULTY (Moderate)
Problem: When a miner submitted a share for a job ID not found in the recent job history, the server silently validated it against the current job instead of rejecting it. This produced incorrect LOW_DIFFICULTY errors when the real issue was a stale/expired job, giving miners misleading diagnostic information.
Fix: Shares referencing unknown job IDs are now properly rejected with "Stale share (job not found)" and logged as stale rejections. The ShareError::STALE code path is now active.
File: src/stratum/stratumserver.cpp
4. mining.suggest_difficulty Ignored Between Subscribe and Authorize (Moderate)
Problem: If a miner sent mining.suggest_difficulty after mining.subscribe but before mining.authorize (a valid ordering per the Stratum V1 specification), the suggested value was stored but never applied. The worker remained at start_difficulty until the vardiff algorithm eventually adjusted.
Fix: HandleAuthorize() now checks for a pending suggested difficulty when a worker authorizes. If one exists and differs from the current difficulty, it is applied immediately with a mining.set_difficulty notification.
File: src/stratum/stratumserver.cpp
5. DifficultyToTarget Truncated Fractional Difficulty (Minor)
Problem: The DifficultyToTarget() function cast difficulty to uint64_t before division, discarding all fractional precision (e.g., difficulty 1.5 became 1, difficulty 0.7 became 0).
Fix: Replaced with scaled integer division using a 10^8 scale factor, preserving 8 decimal places of precision in the target computation.
File: src/stratum/sharevalidator.cpp
Downloads
| File | Platform | Contents |
|---|---|---|
blockbit-v1.0.3-x86_64-linux.tar.gz |
Linux x86_64 | blockbitd, blockbit-qt, blockbit-cli, blockbit |
Verify Download
sha256: 6de97fa48553297a5be83d7a4fd870317b6fac40155ca1b7f643c49c4c7ff8e2 blockbit-v1.0.3-x86_64-linux.tar.gz
Install
tar xzf blockbit-v1.0.3-x86_64-linux.tar.gz
sudo install -m 755 blockbitd blockbit-qt blockbit-cli blockbit /usr/local/bin/Configuration
Stratum V1 Difficulty Parameters (defaults)
| Parameter | Mainnet | Testnet | Regtest |
|---|---|---|---|
-stratumstartdiff |
65536 | 10 | 1000 |
-stratummindiff |
256 | 1 | 100 |
-stratummaxdiff |
unlimited | 10000 | 10000 |
-stratumtargetshares |
2/min | 4/min | 6/min |
-stratumretargetinterval |
10s | 10s | 5s |
Miners can use mining.suggest_difficulty to request a starting difficulty within the min/max range.
Upgrading from v1.0.2
- Stop blockbitd or blockbit-qt
- Replace binaries with v1.0.3 versions
- Restart — no configuration changes needed
- Existing miners will benefit from the fixes on their next connection
Links
- Repository: https://gitlab.com/BlockBitOfficial/blockbit
- Issues: https://gitlab.com/BlockBitOfficial/blockbit/-/issues
- Full Changelog: https://gitlab.com/BlockBitOfficial/blockbit/-/compare/v1.0.2...v1.0.3
Contributors
- The BlockBit developers
- Community bug reports and testing