This thread introduces RSKIP517, a proposal to revise Rootstock’s difficulty adjustment mechanism to enable safer reductions in block time targets.
Motivation
The current difficulty algorithm was designed to maintain safe operation with a fixed block time and uncle production level. It achieves that goal under normal conditions, but exhibits two limitations when used to progressively shorten block intervals:
- Uncle rate conflation – The current design treats both main chain blocks and uncles as indicators of block frequency. This creates a feedback loop: reduced difficulty leads to higher uncle rates, which are misinterpreted as excess block production, triggering premature difficulty increases.
- Per-block sensitivity – Difficulty is adjusted based only on the latest block. Because block times follow an exponential distribution, this approach introduces persistent noise and a statistical bias that drifts the system away from the target.
These two effects make it difficult to lower block times without triggering instability.
Proposal
RSKIP517 addresses these issues by introducing a window-based difficulty update method. Rather than reacting to single-block samples, the algorithm computes average block time and uncle rate over the last NNN blocks. Uncle rate only influences difficulty when it crosses a specified threshold, allowing the system to prioritize main chain block timing while still preserving safeguards against instability.
This proposal builds upon the ideas in RSKIP77, which introduced smoothing via windows, but RSKIP517 further decouples uncle rate from regular difficulty adjustments.
It also replaces RSKIP491, addressing the same objective—progressively reducing block intervals—through a more robust adjustment mechanism. The open question from that thread regarding the impact on protocols remains, and further exploration is still encouraged.
For a higher-level overview of the motivation and proposed changes, see the accompanying article:
Rootstock Blocks Getting Faster: Redefining Difficulty Adjustment
-
An implementation reference is available in this PR: rskj#3178
-
Full proposal: RSKIP517 on GitHub
Open Questions for Discussion:
- What potential risks can we identify in reducing the block time to 20s?
- Apps/protocols that depends on block time?
- PowPeg (source code)
- 2wpApp (source)
- FlyOver (LPs update # of blocks in UI, also source)
- RootstockCollective DAO (do you know where to link it?)
- Protocols like MoC and Sovryn (?.
- PowPeg (source code)