Mutant created against commit b821585.
+1 -1 · cpp
This description is AI generated, mistakes can be made.
Intent: Break the documented meaning of BIP9Stats::possible ('False if there are not enough blocks left in this period to pass activation threshold') at its boundary: the case where every single remaining block must signal is still possible, but is now reported as hopeless.
Behaviour change: With period 2016 / threshold 1916, after exactly 100 non-signalling blocks the original still reports possible=true (the fork activates if every remaining block signals); the mutant reports possible=false and getdeploymentinfo then omits both 'threshold' and 'possible' from the statistics object only when threshold is also 0 - in the STARTED case it reports "possible": false while activation is still achievable.
Trigger: getdeploymentinfo (or the REST /deploymentinfo endpoint) on any node whose current period has exactly period-threshold non-signalling blocks so far - e.g. regtest testdummy with 36 of the first 36 blocks of a 144-block period not signalling, then querying at any point before the period ends.
Spec violation: versionbits.h: '/** False if there are not enough blocks left in this period to pass activation threshold */ bool possible' - with elapsed-count == period-threshold there are exactly enough blocks left.
Severity if undetected: low
Why tests miss it: grepped 'possible' across test/functional (only rpc_blockchain.py, where count == elapsed so both sides are true) and src/test (only the fuzz target); GetStateStatisticsFor is never called from versionbits_tests.cpp
Plausibility: The expression is already written in a slightly awkward 'slack >= deficit' form; flipping it to a strict inequality is the classic off-by-one a reader cannot check without re-deriving the algebra, and no reviewer sees a failing test.
Equivalence risk: Only differs on the exact boundary (elapsed-count == period-threshold); every test period so far has elapsed == count, where both forms are true.
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: boundary; location: AbstractThresholdConditionChecker::GetStateStatisticsFor lines 152
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.