<p>There are many facts that can increase a node's banscore. A node's banscore is updated in the <a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L1685" rel="noreferrer">Misbehaving</a> function from <a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp" rel="noreferrer">main.cpp</a>. Some of the reasons that trigger such update are:</p>

<ul>
<li><a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L1721" rel="noreferrer">Sending invalid blocks</a>.</li>
<li><a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L4570" rel="noreferrer">Sending duplicate version messages</a>.</li>
<li><a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L4687" rel="noreferrer">Not sending first a version message</a> (before other communication).</li>
<li><a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L4789" rel="noreferrer">Sending addr messages with more than 1000 addresses</a>.</li>
<li><a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L4864" rel="noreferrer">Sending inv messages with more than 50000 elements</a>.</li>
<li><a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L5115" rel="noreferrer">Sending header messages with more than 2000 elements</a>.</li>
<li><a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L5380" rel="noreferrer">Sending too large bloom filters</a>.</li>
<li>...</li>
</ul>

<p>Regarding transactions, it seems that they also may <a href="https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L5042" rel="noreferrer">increase</a> the banscore:</p>

<blockquote>
  <p>// Punish peer that gave us an invalid orphan tx</p>
</blockquote>

CC BY-SA 3.0
2016-06-27T21:49:26.463Z
That's good that they're punished for sending invalid transactions, that way there can't be any lazy nodes out there.
Geremia
CC BY-SA 3.0
2017-09-05T10:57:28.297Z
No, it doesn't (see https://bitcoin.stackexchange.com/a/28159/3041)
cpsola
CC BY-SA 4.0
2021-03-03T15:38:30.487Z
Could continuously re-broadcasting a transaction that is already in all nodes' mempools increase banscore?
deezy
CC BY-SA 4.0
2021-05-03T16:11:06.427Z
@deezy iiuc all nodes are continually re-broadcasting the transactions in their mempools, in order to make sure that their mempools line up with the rest of the network
tjr226
CC BY-SA 3.0
2016-05-20T18:30:37.113Z
2016-05-20T19:01:34.503Z
2016-05-20T19:01:34.503Z
cpsola
<p>What increases a node's banscore? What factors contribute to the banscore? Does a node sending bad transactions increase its banscore? Does its using unnecessarily too much bandwidth also increase its banscore?</p>

<banscore>
What increases a node's banscore?
Geremia
# What increases a node's banscore?

(Asked by: username_0 on 2016-05-20)

What increases a node's banscore? What factors contribute to the banscore? Does a node sending bad transactions increase its banscore? Does its using unnecessarily too much bandwidth also increase its banscore?

**Tags:** banscore


---

## 1 answers

### Answer by username_1 on 2016-05-20. Score: 12 | Accepted answer

There are many facts that can increase a node's banscore. A node's banscore is updated in the [Misbehaving](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L1685) function from [main.cpp](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp). Some of the reasons that trigger such update are:

* [Sending invalid blocks](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L1721).
* [Sending duplicate version messages](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L4570).
* [Not sending first a version message](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L4687) (before other communication).
* [Sending addr messages with more than 1000 addresses](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L4789).
* [Sending inv messages with more than 50000 elements](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L4864).
* [Sending header messages with more than 2000 elements](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L5115).
* [Sending too large bloom filters](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L5380).
* ...

Regarding transactions, it seems that they also may [increase](https://github.com/bitcoin/bitcoin/blob/239d4198645434542b01916dae5eebc7a3a7bbcc/src/main.cpp#L5042) the banscore:

> // Punish peer that gave us an invalid orphan tx

> **Comments:**
> **username_0**: That's good that they're punished for sending invalid transactions, that way there can't be any lazy nodes out there.  
> **username_1**: No, it doesn't (see https://bitcoin.stackexchange.com/a/28159/3041)  
> **username_2**: Could continuously re-broadcasting a transaction that is already in all nodes' mempools increase banscore?  
> **username_3**: @username_2 iiuc all nodes are continually re-broadcasting the transactions in their mempools, in order to make sure that their mempools line up with the rest of the network  

---

