3

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

1 Answer 1

5

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

BIP158 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.

2
  • 2
    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. Jul 31, 2023 at 20:31
  • Thanks @PieterWuille, I have updated my phrasing.
    – Murch
    Jul 31, 2023 at 21:25

Your Answer

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

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