Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Ensure ASERT only activates after miners have explicitly signaled readiness,
replacing the hardcoded timestamp activation with BIP9 versionbits consensus.
This guarantees the DAA switch happens only when a supermajority (95% on
mainnet) of hashrate has upgraded and agreed to the change.
Summary
asertActivationTimetimestamp gatewith a proper
DEPLOYMENT_ASERTversionbits deployment (bit 24). Mainnetsignaling window runs 2026-03-01 to 2027-03-01 with period=672 and
threshold=639 (95%). Testnet/signet use ALWAYS_ACTIVE; regtest uses real BIP9
(nStartTime=0, period=32) so the full state machine is exercisable in tests.
GetASERTAnchorBlocknow usesStateSinceHeightto derive the anchor for all networks — block 1 forALWAYS_ACTIVE, last block of the LOCKED_IN period for real BIP9 — eliminating
the old
asertActivationTime == 0special case.Details
Consensus params:
consensus/params.h— removeasertActivationTime, addDEPLOYMENT_ASERTto
DeploymentPosenumdeploymentinfo.cpp— register deployment name andgbt_force = truechainparams.cpp— configureDEPLOYMENT_ASERTper network, fix TESTDUMMYmin_activation_height(1 → 0) to satisfy period-boundary invariantActivation logic:
pow.cpp—IsASERTEnableddelegates toDeploymentActiveAfter;GetASERTAnchorBlockreplaced timestamp walk-back withStateSinceHeightquery;
GetNextFACTORASERTWorkRequireduses a singleGetASERTAnchorBlockcall for all networks
Tests:
pow_tests.cpp— anchor tests now useRegtestTestingSetupwith aBuildBIP9ActivatedChainhelper that constructs a chain with explicitversion-bit signaling (blocks 32-63), exercising the full
DEFINED → STARTED → LOCKED_IN → ACTIVE state machine. Covers anchor
discovery, cache invalidation on reorg, fast blocks, and slow blocks
versionbits_tests.cpp—check_computeblockversionrespects per-deploymentperiod overrides instead of assuming global
nMinerConfirmationWindowSmoke tests performed