user134494: Bitcoin RPC has the setban command and some other ban related commands.
From what I understood from Bitcoin, the network becomes more secure as more nodes are connected sharing blockchain data.
From an internet network point of view, the concept of ban is pretty clear so there is no misconception there.
What I do not understand is why would I want to ban other nodes in the network, since the whole P2P network goal is to interconnect as many nodes as it can so they can secure the blockchain and validate its transactions.

user133407: setban RPC was added in PR #6158 by Jonas Schnelli as this feature was requested by a user in issue #5866
Rationale provided by user:

Now that I have been using the new Peers screen in bitcoin-qt, I have noticed that there are several peers that are doing something that I don't like (using too much bandwidth, multiple connections from the same ip, etc.) I would like an option to right click on a peer and be able to disconnect or ban them. Also, it would be nice if the same right click menu had an option to reserve an inbound slot for a specific peer, but that would likely be a bit more tricky.

No reviewers had any disagreement with it in the related issue or pull request.

user13866: 
What I do not understand is why would I want to ban other nodes in the network,

According to https://bitcoincore.reviews/19825 some of the reasons suggested include:


maybe you want to not allow connections from/to certain cloud providers. they have a lot of ip ranges
it's rather for not up-to-date nodes or bugged nodes
Ban nodes not sending blocks or nodes attempting to swarm your node.
to keep the network healthy from bad actors such as spy nodes


and so on.


since the whole P2P network goal is to interconnect as many nodes as it can so they can secure the blockchain and validate its transactions.

My understanding is that interconnecting as many nodes as possible doesn't require that each node individually needs to communicate with as many as possible.
Just as the notion of six degrees of separation doesn't require that we all individually try to communicate directly with seven billion other people.

134494: <p>Bitcoin RPC has the setban command and some other ban related commands.
From what I understood from Bitcoin, the network becomes more secure as more nodes are connected sharing blockchain data.</p>
<p>From an internet network point of view, the concept of ban is pretty clear so there is no misconception there.</p>
<p>What I do not understand is why would I want to ban other nodes in the network, since the whole P2P network goal is to interconnect as many nodes as it can so they can secure the blockchain and validate its transactions.</p>
 133407: <p><code>setban</code> RPC was added in PR <a href="https://github.com/bitcoin/bitcoin/pull/6158" rel="nofollow noreferrer">#6158</a> by Jonas Schnelli as this feature was requested by a user in issue <a href="https://github.com/bitcoin/bitcoin/issues/5866" rel="nofollow noreferrer">#5866</a></p>
<p>Rationale provided by user:</p>
<blockquote>
<p>Now that I have been using the new Peers screen in bitcoin-qt, I have noticed that there are several peers that are doing something that <strong>I don't like (using too much bandwidth, multiple connections from the same ip, etc.) I would like an option to right click on a peer and be able to disconnect or ban them.</strong> Also, it would be nice if the same right click menu had an option to reserve an inbound slot for a specific peer, but that would likely be a bit more tricky.</p>
</blockquote>
<p>No reviewers had any disagreement with it in the related issue or pull request.</p>
 13866: <blockquote>
<p><strong>What I do not understand is why would I want to ban other nodes in the network,</strong></p>
</blockquote>
<p>According to <a href="https://bitcoincore.reviews/19825" rel="nofollow noreferrer">https://bitcoincore.reviews/19825</a> some of the reasons suggested include:</p>
<blockquote>
<ul>
<li>maybe you want to not allow connections from/to certain cloud providers. they have a lot of ip ranges</li>
<li>it's rather for not up-to-date nodes or bugged nodes</li>
<li>Ban nodes not sending blocks or nodes attempting to swarm your node.</li>
<li>to keep the network healthy from bad actors such as spy nodes</li>
</ul>
</blockquote>
<p>and so on.</p>
<hr />
<blockquote>
<p><strong>since the whole P2P network goal is to interconnect as many nodes as it can so they can secure the blockchain and validate its transactions.</strong></p>
</blockquote>
<p>My understanding is that interconnecting as many nodes as possible doesn't require that each node individually needs to communicate with as many as possible.</p>
<p>Just as the notion of <a href="https://en.wikipedia.org/wiki/Six_degrees_of_separation" rel="nofollow noreferrer">six degrees of separation</a> doesn't require that we all individually try to communicate directly with seven billion other people.</p>
