Skip to main content

Module version_bits

Module version_bits 

Source
Expand description

BIP9-style version bits activation.

Computes soft-fork activation height from block header version bits so the node can enforce a fork when miners signal (e.g. BIP54) without a fixed activation height.

Structs§

Bip9Deployment
BIP9 deployment parameters (bit index and time window).

Constants§

ACTIVATION_THRESHOLD
BIP9 activation threshold (95% of LOCK_IN_PERIOD).
LOCK_IN_PERIOD
BIP9 lock-in period (2016 blocks).

Functions§

activation_height_from_headers
Computes the activation height for a BIP9 deployment from recent block headers.
bip54_deployment_mainnet
Returns the BIP54 deployment for mainnet when using version-bits activation.
merge_bip54_activation_candidate
Combine a running BIP54/version-bits activation height with a new candidate from activation_height_from_headers. Keeps the minimum (earliest) height.