<p>Correct: there's no provision in the <a href="https://bitcoin.org/en/developer-reference#p2p-network" rel="nofollow">P2P network protocol</a> for your peers to tell you what ban score they've computed for you.</p>

<p>Since each node connected to you separately computes a ban score using its own rules, there's no way for you to confidently know your ban score unless you have some sort of monitor that knows all the ban score rules for all the full nodes connected to you.  (E.g. the rules for Bitcoin Core 0.9.0, 0.9.2, 0.9.3, etc...)</p>

<p>You could get a rough idea by running a separate Bitcoin Core full node that connects to your node using the whitelist option.  With whitelisting enabled, Bitcoin Core still calculates the ban score and prints it to debug.log even though it will never disconnect because of a high ban score.</p>

CC BY-SA 3.0
2015-01-15T18:46:48.653Z
In addition, there's nothing that says a connected node even has to keep a banscore. Different implementations of the protocol might do security differently.
morsecoder
CC BY-SA 3.0
2015-01-15T19:26:24.040Z
Correct.  And there's also a command line switch for Bitcoin Core that increases the score needed to ban, and another switch to change the time a node stays banned.  I believe core dev Mike Hearn strongly dislikes the ban score mechanism.  I keep forgetting what he proposes as a replacement, but if you're curious, you can search around.  (He mentions it in #bitcoin-dev IRC about once a month.)
David A. Harding
CC BY-SA 3.0
2015-01-15T16:53:58.710Z
2015-01-15T16:53:58.710Z
David A. Harding
<p>If I call <code>getpeerinfo</code> through RPC on one of my nodes, it gives me a list of info about my peers, including my peer's "banscore" for each of its peers.</p>

<p>I would like to do the reverse. <strong>Can I get my peer's ban score for my node?</strong></p>

<p>Or maybe there isn't a way to do this because it would allow peers to misbehave in small ways and keep track of how close they are to getting banned.</p>

<peers><banscore>
How can I get my peer's ban score for my node?
morsecoder
# How can I get my peer's ban score for my node?

(Asked by: username_0 on 2015-01-15)

If I call `getpeerinfo` through RPC on one of my nodes, it gives me a list of info about my peers, including my peer's "banscore" for each of its peers.

I would like to do the reverse. **Can I get my peer's ban score for my node?**

Or maybe there isn't a way to do this because it would allow peers to misbehave in small ways and keep track of how close they are to getting banned.

**Tags:** peers, banscore


---

## 1 answers

### Answer by username_1 on 2015-01-15. Score: 2 | Accepted answer

Correct: there's no provision in the [P2P network protocol](https://bitcoin.org/en/developer-reference#p2p-network) for your peers to tell you what ban score they've computed for you.

Since each node connected to you separately computes a ban score using its own rules, there's no way for you to confidently know your ban score unless you have some sort of monitor that knows all the ban score rules for all the full nodes connected to you. (E.g. the rules for Bitcoin Core 0.9.0, 0.9.2, 0.9.3, etc...)

You could get a rough idea by running a separate Bitcoin Core full node that connects to your node using the whitelist option. With whitelisting enabled, Bitcoin Core still calculates the ban score and prints it to debug.log even though it will never disconnect because of a high ban score.

> **Comments:**
> **username_0**: In addition, there's nothing that says a connected node even has to keep a banscore. Different implementations of the protocol might do security differently.  
> **username_1**: Correct.  And there's also a command line switch for Bitcoin Core that increases the score needed to ban, and another switch to change the time a node stays banned.  I believe core dev Mike Hearn strongly dislikes the ban score mechanism.  I keep forgetting what he proposes as a replacement, but if you're curious, you can search around.  (He mentions it in #bitcoin-dev IRC about once a month.)  

---

