4

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.

2 Answers 2

3

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.

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.