Mutant created against commit 37912ec.
+0 -1 · c
This mutant deletes the original lines without replacement.
This description is AI generated, mistakes can be made.
Intent: This breaks the invariant that m_short_id_mapping mirrors m_local_set on the initiator side. Stale short IDs pile up after every completed round. They get copied into the snapshot that ComputeExtendedSketch uses, they produce false collisions in HasCollision, and they grow without bound because MAX_RECONSET_SIZE only bounds m_local_set. The case for high is the unbounded per-peer memory, but it is driven by normal traffic rather than attacker-cheap, so medium.
Behaviour change: Original: after an initiator round the mapping is empty. Mutant: the mapping keeps every short ID ever added. In a later round that needs an extension, SnapshotLocalSet copies the stale IDs into m_short_id_mapping_snapshot, so the extended local sketch covers txs the peer's sketch doesn't. The decode then finds bogus differences, announces old wtxids, or fails and falls back to flooding.
Trigger: Outbound full-recon peer: round 1 succeeds with txs A..Z, so Clear() runs ClearLocalSet. Round 2 has new txs, and the initial sketch decode fails (difference above capacity), so we send REQSKETCHEXT. HandleSketchExtension builds ComputeExtendedSketch over the new IDs plus all stale A..Z IDs. It reports A..Z as peer-missing and announces them again, or the decode fails and we flood everything.
Spec violation: BIP-330 extension: the extended sketch must be computed over the same set as the initial sketch. Header comment: m_short_id_mapping is 'a cache of these IDs' for the local set.
Severity if undetected: medium
Why tests miss it: HandleSketchTest (rounds after a clear check only diff-derived results; the extension round is not completed), p2p_txrecon_initiator.py (no extension flows), AddToSetCollisionTest (single round); rg m_short_id_mapping in tests: none
Plausibility: ClearLocalSet looks like it only needs to clear 'the set'. The parallel SnapshotLocalSet clears both, but someone trimming or rewriting the helper could easily miss the second container.
Equivalence risk: On the initiator, the initial-round sketch is built from m_local_set, so a stale mapping only matters for extensions, 32-bit collisions, and memory. The responder never calls ClearLocalSet.
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) --failfastmutant-harness operator: deletion; location: TxReconciliationState::ClearLocalSet lines 228-232
Imported from mutant-harness 474b4f7.
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.