This PR picks up the abandoned #19280
BlockFilterIndex was depending on GolombRiceDecode()
during the filter decode to sanity check that the filter wasn’t corrupt. However, we can check for corruption by ensuring that the encoded blockfilter’s hash matches up with the one stored in the index database.
Benchmarks that were added in #19280 showed that checking the hash is much faster.
The benchmarks were changed to nanobench and the relevant benchmarks were like below, showing a clear win for the hash check method.
0| ns/elem | elem/s | err% | ins/elem | bra/elem | miss% | total | benchmark
1|--------------------:|--------------------:|--------:|----------------:|---------------:|--------:|----------:|:----------
2| 531.40 | 1,881,819.43 | 0.3% | 3,527.01 | 411.00 | 0.2% | 0.01 | `DecodeCheckedGCSFilter`
3| 258,220.50 | 3,872.66 | 0.1% | 2,990,092.00 | 586,706.00 | 1.7% | 0.01 | `DecodeGCSFilter`
4| 13,036.77 | 76,706.09 | 0.3% | 64,238.24 | 513.04 | 0.2% | 0.01 | `BlockFilterGetHash`