<p>Compact block filters encode the output scripts of both spent TXOs and created UTXOs.</p>
<p><a href="https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki" rel="nofollow noreferrer">BIP158</a>  states that the <em>false positive rate M</em> is 784931. This means that for every looked up output script that’s not present in the block, there is a chance of 1/784931 that the filter produces a match (i.e. a false positive).</p>
<p>Under the assumption that the wallet is monitoring about 1000 output scripts, this works out to about one random block downloaded every 8 weeks (H/T Dave Harding).</p>
<p>The chance of true positives is 1. Any output script present in the block will always produce a match when it is looked up, i.e. the chance of false negatives is 0.</p>

CC BY-SA 4.0
2023-07-31T20:31:18.863Z
For every `scriptPubKey` you look up, if it is not present in the block, you have a chance of 1/784931 of getting a match. If it is present in the block, the chance is 1 obviously.
Pieter Wuille
CC BY-SA 4.0
2023-07-31T21:25:10.067Z
Thanks @PieterWuille, I have updated my phrasing.
Murch
CC BY-SA 4.0
2023-07-31T20:16:59.847Z
2023-08-01T17:49:17.823Z
2023-08-01T17:49:17.823Z
Murch
<p>I read in the mailing list that the rate of false positives for compact block filters is small, but what is the actual rate?</p>

<compact-client-side-block-filters>
What is the false positive rate for compact block filters?
Murch
# What is the false positive rate for compact block filters?

(Asked by: username_0 on 2023-07-31)

I read in the mailing list that the rate of false positives for compact block filters is small, but what is the actual rate?

**Tags:** compact-client-side-block-filters


---

## 1 answers

### Answer by username_0 on 2023-07-31. Score: 5 | Accepted answer

Compact block filters encode the output scripts of both spent TXOs and created UTXOs.

[BIP158](https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki) states that the *false positive rate M* is 784931. This means that for every looked up output script that’s not present in the block, there is a chance of 1/784931 that the filter produces a match (i.e. a false positive).

Under the assumption that the wallet is monitoring about 1000 output scripts, this works out to about one random block downloaded every 8 weeks (H/T Dave Harding).

The chance of true positives is 1. Any output script present in the block will always produce a match when it is looked up, i.e. the chance of false negatives is 0.

> **Comments:**
> **username_1**: For every `scriptPubKey` you look up, if it is not present in the block, you have a chance of 1/784931 of getting a match. If it is present in the block, the chance is 1 obviously.  
> **username_0**: Thanks @PieterWuille, I have updated my phrasing.  

---

