Mutant created against commit b821585.
+0 -1 · cpp
This mutant deletes the original lines without replacement.
This description is AI generated, mistakes can be made.
Intent: Break BIP 9's rule that a block whose top bits are not 001 signals nothing, for the warning checker only (VersionBitsConditionChecker::Condition keeps it), so legacy or non-versionbits block versions are counted as signalling unknown softforks.
Behaviour change: Blocks with nVersion outside [0x20000000, 0x3FFFFFFF] now contribute to the tally: e.g. version 4 blocks set bit 2, version 2 blocks set bit 1, version 1 blocks set bit 0, and any BIP 8-style 0x40000000-family version counts for whichever low bit it happens to set. A period dominated by such blocks drives the warning state machine to LOCKED_IN/ACTIVE and raises 'Unknown new rules activated (versionbit N)' on a chain where nobody signalled anything.
Trigger: A chain where >=90% (mainnet) / 75% (test chains) of a retarget period carries a legacy version - e.g. a regtest/signet chain built by a test harness that mines version-4 blocks, or a mainnet miner deliberately mining old-style versions - makes the node warn its operator that unknown rules activated.
Spec violation: BIP 9: 'When a block nVersion does not have top bits 001, it is treated as if all bits are 0 for the purposes of deployments.'
Severity if undetected: low
Why tests miss it: feature_versionbits_warning.py mines only VB_TOP_BITS-based versions (0x20000008 / 0x20000020) plus node-generated 0x20000000 blocks, so no period reaches the threshold on any low bit (the genesis block's version 1 is 1 block out of 144); no functional test asserts that node warnings are empty (grepped 'warnings' across test/functional - all hits are wallet/descriptor warnings); versionbits_tests.cpp never builds a WarningBitsConditionChecker
Plausibility: The remaining bit test looks self-sufficient, and the top-mask clause is easy to read as redundant with the identical check already done in VersionBitsConditionChecker::Condition; the diff is a single deleted line in a boolean chain.
Equivalence risk: In practice essentially all modern blocks carry top bits 001, so on today's mainnet the tally is unchanged; the mutant only bites on legacy or exotic version numbers.
Commands and environment reported by the submitter
cmake -B build -DBUILD_GUI=OFF -DWITH_ZMQ=OFF -DENABLE_IPC=OFF && cmake --build build -j$(nproc)ctest --test-dir build -j$(nproc) && build/test/functional/test_runner.py -j$(nproc)mutant-harness operator: condition; location: WarningBitsConditionChecker::Condition lines 326
Imported from mutant-harness 6cd939b.
Commands are shown as text and never executed by MutantHub.
0 comments
No comments yet
Discuss equivalence, reproduction difficulties, or a test that kills this mutant.