Module zebra_state::service::check::difficulty
source · Expand description
Block difficulty adjustment calculations for contextual validation.
This module supports the following consensus rule calculations:
ThresholdBits
from the Zcash Specification,- the Testnet minimum difficulty adjustment from ZIPs 205 and 208, and
median-time-past
.
Structs§
- Contains the context needed to calculate the adjusted difficulty for a block.
Constants§
- The maximum number of seconds between the
median-time-past
of a block, and the block’stime
field. - The overall block span used for adjusting Zcash block difficulty.
- The damping factor for median timespan variance.
- The maximum downward adjustment percentage for median timespan variance.
- The maximum upward adjustment percentage for median timespan variance.
- The median block span for time median calculations.