Consensus::Params

Parameters that influence chain consensus.

Synopsis

Declared in <consensus/params.h>

struct Params;

Member Functions

NameDescription
DeploymentHeight Returns the activation height of a buried deployment.
DifficultyAdjustmentInterval Returns the number of blocks in one difficulty retargeting interval.
PowTargetSpacing Returns the target spacing between blocks.

Data Members

NameDescription
BIP34Hash Hash of the block at which BIP34 becomes active.
BIP34Height Block height and hash at which BIP34 becomes active
BIP65Height Block height at which BIP65 becomes active
BIP66Height Block height at which BIP66 becomes active
CSVHeight Block height at which CSV (BIP68, BIP112 and BIP113) becomes active
MinBIP9WarningHeight Don't warn about unknown BIP 9 activations below this height. This prevents us from warning about the CSV, segwit and taproot activations.
SegwitHeight Block height at which Segwit (BIP141, BIP143 and BIP147) becomes active. Note that segwit v0 script rules are enforced on all blocks except the BIP 16 exception blocks.
defaultAssumeValid By default assume that the signatures in ancestors of this block are valid
enforce_BIP94 Enforce BIP94 timewarp attack mitigation. On testnet4 this also enforces the block storm mitigation.
fPowAllowMinDifficultyBlocks If true, allow minimum-difficulty blocks after a long gap (used on test chains).
fPowNoRetargeting If true, disable difficulty retargeting (used on the regression test chain).
hashGenesisBlock Hash of the genesis block for this chain.
nMinimumChainWork The best chain should have at least this much work
nPowTargetSpacing Target spacing between blocks, in seconds.
nPowTargetTimespan Length of a difficulty retargeting window, in seconds.
nSubsidyHalvingInterval Number of blocks between successive halvings of the block subsidy.
powLimit Proof of work parameters
script_flag_exceptions Hashes of blocks that - are known to be consensus valid, and - buried in the chain, and - fail if the default script verify flags are applied.
signet_blocks If true, witness commitments contain a payload equal to a Bitcoin Script solution to the signet challenge. See BIP325.
signet_challenge Bitcoin Script challenge that signet block witness commitments must solve (BIP325).
vDeployments Per-deployment BIP9 version-bits parameters, indexed by DeploymentPos.

Non-Member Functions

NameDescription
::DeploymentEnabledDetermine if a version-bits deployment is enabled (can ever be active).
::DeploymentEnabledDetermine if a deployment is enabled (can ever be active)
::PermittedDifficultyTransitionReturn false if the proof-of-work requirement specified by new_nbits at a given height is not possible, given the proof-of-work on the prior block as specified by old_nbits.