Introduce a new BlockFilter type [v0] next to the existing basic filter type, which is described in BIP 158. https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki#block-filter
Resolves #18222
The BlockFilterIndex implementation allows for the addition of other filter types, this PR will add a new filter type for segwit script programs v0 types only. Light clients (especially new clients that deal with segwit addresses only) do not need any legacy script types in the filters, and with this PR can choose to only index a much smaller portion of the chain. That will greatly reduce the amount of data on disk and that is fetch over the network.
The same GCS parameters where used as basic type.
Total size of serialized filers as of block 619 361:
- Basic = 4.76 GB
- v0 = 252 MB
Building the Index time
- Basic = 3.5 hours
- v0 = 3.5 hours
Enabled in the config by:
0blockfilterindex=p2wpkh
Enabling more then one filter:
0blockfilterindex=v0
1blockfilterindex=basic