BTQ Docs
Mining

Mining Difficulty

How BTQ difficulty retargeting holds up: the mathematics, a 293-trial Monte Carlo campaign, and live multi-node fork-resolution runs on regtest.

Mining Difficulty

Published: May 7, 2026  ·  Length: 25 pages  ·  Format: PDF (≈ 791 KB)

Download the full whitepaper (PDF)

Overview

This whitepaper studies how the BTQ protocol behaves under stress in two complementary regimes: the algorithmic regime, via a 293-trial Monte Carlo simulation campaign over three candidate difficulty algorithms, and the operational regime, via live multi-node experiments on a five-node btqd regtest cluster.

BTQ differs from Bitcoin in three ways that matter for proof-of-work: a one-minute target block spacing, a 20,160-block retarget window, and Dilithium-sized transactions that drive blocks toward an 8 MWU capacity ceiling. The interaction of those choices with the inherited difficulty-adjustment policy, gossip, mempool, and fork resolution is exactly what this study isolates.

Headline Findings

  1. The legacy retargeter is unfit for T = 60 s. Under a −95% catastrophic hashrate event the Bitcoin-style retarget that BTQ inherits leaves mean block intervals at ≈ 678 s (11.3× target) for thousands of post-shock blocks. LWMA-1 (N = 45) returns to nominal within ∼ 80 blocks. ASERT (τ = 2 d) returns asymptotically. This is the single strongest quantitative argument for BTQ to migrate off the legacy retarget.
  2. MAX_FUTURE_BLOCK_TIME is a faithful drift bound. Across all three algorithms, MFBT bounds adversarially induced timestamp drift with slope indistinguishable from 1 on log–log axes, independent of the retarget family in use.
  3. Fork resolution on btqd is decisive. A deliberately constructed two-tip fork at height 56,273 resolved by chain reorg to the longer minority branch within a single 2 s polling tick on reconnection, with all five nodes converging to a single best-block hash.

Scope

  • Simulation campaign (E1–E6): 293 runs spanning three retarget algorithms (legacy windowed, BTQ-style LWMA-1, ASERT), seven hashrate scenarios, an LWMA-1 window sweep, an ASERT half-life sweep, adversarial-clock fraction sweeps, MFBT sweeps, and a soft-minimum block-interval hardening, with multiple seeds per cell.
  • Live cluster experiments: Peer connectivity matrix, 50-block mining storm, 400 ms transaction storm, three-minute Prometheus rollup, and a deliberately induced network partition that produced a clean two-tip fork and a verifiable chain reorg on reconnection.

Recommendations Matrix (Summary)

DecisionRecommendation
Difficulty algorithmMigrate off legacy windowed retarget. Default LWMA-1 (N = 45); evaluate ASERT (τ ∈ [6, 24] h) as an alternative.
MAX_FUTURE_BLOCK_TIMEPick against an explicit drift budget; do not inherit Bitcoin's 7200 s as a default.
MTP ruleAdequate as-is at all examined adversarial clock fractions.
Soft-minimum block intervalConditional — no measurable benefit on stationary or sinusoidal hashrate; do not enable by default.
Deployed btqd network primitivesTrust within scope — block propagation, mempool gossip, and fork resolution all behaved correctly on regtest.

Scope limits: the cluster experiments are regtest-only on a single kind host with sub-millisecond intra-cluster RTT. WAN-scale gossip tails and mainnet-scale Dilithium-signed block sizes are out of scope for the live experiments. The simulation hashrate is dimensionless, calibrated only to the genesis target.

Download the PDF

On this page