AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

net: add options to AttemptToEvictConnection

Public commit record

What the developer wrote

Authored by Martin Zumsande

68/100 · Adequate
net: add options to AttemptToEvictConnection

If the added bool evict_tx_relay_peer_only is set, non-tx-relay
peers will be exempt from disconnection.
Also allow to specify a peer that exempt from eviction.
Both options will be used in later commits.

Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds two new optional controls to Bitcoin Core's peer eviction logic: a flag to only evict transaction-relaying peers, and a way to protect a specific peer from being evicted. The existing call site still behaves exactly as before (the new flag is set to false). The change is a preparatory refactor for future commits and does not, by itself, alter live network behavior or fix a known vulnerability.

Recommended action

No immediate action required. Treat as a normal refactor. Review future commits that actually use the new parameters to ensure the eviction protections against network partitioning remain sound and that the new options cannot be abused by an attacker to pin or isolate a node.

Security signals we found

01

Touches peer eviction logic, which is security-sensitive because improper eviction can enable network partitioning attacks.

02

Adds a 'protect_peer' bypass that could, if misused in future callers, allow a specific peer to be exempted from eviction.

03

Adds an 'evict_tx-relay-peer-only' mode that could, if enabled, leave non-tx-relay peers permanently connected while tx-relay peers are evicted.

04

No current caller enables the new restrictive mode, so no immediate behavior change.

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.