getblockfilter Error: Index is not enabled for filtertype basic I'm failing to run the getblockfilter example. What am I doing wrong?
$ bitcoin-cli help getblockfilter
getblockfilter &quot;blockhash&quot; ( &quot;filtertype&quot; )

Retrieve a BIP 157 content filter for a particular block.

Arguments:
1. blockhash     (string, required) The hash of the block
2. filtertype    (string, optional, default=basic) The type name of the filter

Result:
{                      (json object)
  &quot;filter&quot; : &quot;hex&quot;,    (string) the hex-encoded filter data
  &quot;header&quot; : &quot;hex&quot;     (string) the hex-encoded filter header
}

Examples:
&gt; bitcoin-cli getblockfilter &quot;00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09&quot; &quot;basic&quot;
&gt; curl --user myusername --data-binary '{&quot;jsonrpc&quot;: &quot;1.0&quot;, &quot;id&quot;: &quot;curltest&quot;, &quot;method&quot;: &quot;getblockfilter&quot;, &quot;params&quot;: [&quot;00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09&quot;, &quot;basic&quot;]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

$ bitcoin-cli getblockfilter &quot;00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09&quot; &quot;basic&quot;
error code: -1
error message:
Index is not enabled for filtertype basic

$ bitcoind --version
Bitcoin Core version v0.20.0.0-ga62f0ed64f8bbbdfe6467ac5ce92ef5b5222d1bd
...

Do I need to build a block filter index or something?
To enable the compact block filter, you need to start bitcoind with the -blockfilterindex=basic (or simply -blockfilterindex) command line option, or put that option in your bitcoin.conf file.
Depending on your hardware, it may take a few hours to build the compact block filter index. This is done in the background and does not affect normal node or wallet processing.