Mutant created against commit 37912ec.
+1 -1 · cpp
This description is AI generated, mistakes can be made.
Intent: The count that keeps our last full outbound or manual peer on each network now also counts block-relay-only peers and drops manual ones. A block-relay peer on onion/i2p/cjdns then lets the eviction round disconnect our only full-relay or recon peer on that network, losing transaction and addr relay there. The rule replaced MultipleManualOrFullOutboundConns.
Behaviour change: Original: an only-full-outbound onion peer with count 1 is protected. Mutant: with one onion block-relay peer as well the count is 2, so the onion full peer can be picked and fDisconnect set.
Trigger: Node with 8 full-relay IPv4 peers, 1 onion full-relay peer, 1 onion block-relay peer. A stale tip or connection race opens one extra full-relay peer, so GetExtraFullOutboundCounts().full_relay > 0. CheckForStaleTipAndEvictPeers then evicts the onion full-relay peer if it has the oldest block announcement, leaving no full-relay onion connection.
Spec violation: Comment in EvictWorstOutboundPeer: 'If this is the only connection on a particular network that is a full outbound or MANUAL one, protect it.'
Severity if undetected: medium
Why tests miss it: src/test/denialofservice_tests.cpp (stale_tip_peer_management onion case, block_relay_only_eviction, eviction_keeps_a_connection_per_network, reconciliation_peer_eviction): none puts a block-relay or manual peer on the same network as a full-outbound eviction candidate. Grepped test/functional for onion eviction and found nothing.
Plausibility: IsOutboundOrBlockRelayConn and IsManualOrFullOutboundConn are neighbouring helpers with similar names, and the new code replaced a connman helper with a hand-rolled count, which invites picking the wrong predicate.
Equivalence risk: It is only observable when block-relay or manual peers share a network with an eviction candidate whose count would otherwise be 1. That is uncommon but realistic with -onlynet mixes or Tor.
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: condition; location: PeerManagerImpl::EvictWorstOutboundPeer lines 5846-5848
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.