This enables nodes to serve block filters compliant with BIP 157. This is the last PR required for BIP 157/158 compatibility.
If the node has the block filter index enabled, once the index is in sync, the node will begin signaling the BIP 158 service bit and responding to BIP 157 requests. On invalid requests, the node disconnects the offending peer.
This is tested using functional tests. I have also synced an lnd testnet node using the neutrino backend connected to a Core node running this code.
Questions:
- Should there be a separate CLI flag other than
-blockfilterindex
to enable serving of filters from the index? - Is the mechanism to only signal the service flag once the index is in sync OK?
- Is the use of
boost::shared_lock
around the checkpoint cache acceptable?