# Run a Compact-Block-Filter DigiByte Node

This guide configures a DigiByte Core full node to serve **BIP157/158 compact
block filters** to light wallets. Serving filters lets privacy-preserving light
clients (such as the DigiByte Android wallet) sync without revealing which
addresses they own to your node. This is the same node role the DigiScope oracle
set runs.

Requires DigiByte Core **v9.26.x or newer**, an **unpruned** full node (roughly
45 GB of disk for the chain plus the filter index), and an always-on connection.
Do **not** enable pruning: `blockfilterindex` is incompatible with `prune` (the
node refuses to start with both), and serving filters for historical blocks needs
the full chain.

## 1. Install DigiByte Core

Download the v9.26.x release for your platform from the official DigiByte source,
verify its signature, and place `digibyted` and `digibyte-cli` on your `PATH`.

## 2. Configure digibyte.conf

Create or edit `~/.digibyte/digibyte.conf` and add exactly:

```conf
# Serve BIP157/158 compact block filters to light wallets
blockfilterindex=1
peerblockfilters=1

# Accept inbound P2P connections so light wallets can reach you
server=1
listen=1

# RPC interface, used by the verification steps below
rpcuser=CHANGE_ME
rpcpassword=CHANGE_ME_TO_A_LONG_RANDOM_STRING
```

`blockfilterindex=1` builds the basic (BIP158) filter index. `peerblockfilters=1`
advertises `NODE_COMPACT_FILTERS` and serves those filters to peers over P2P.
`peerblockfilters` requires `blockfilterindex` — the node refuses to start with
one set but not the other.

## 3. Start the node and let it sync

```bash
digibyted -daemon
```

The first run downloads the full chain and builds the filter index; on a fresh
node this takes several hours. Track progress:

```bash
digibyte-cli getblockchaininfo | grep -E 'blocks|headers|verificationprogress'
```

A `verificationprogress` near `1.0` means the chain is synced.

## 4. Verify the filter index is built

```bash
digibyte-cli getindexinfo
```

Expected output once the index has caught up:

```json
{
  "basic block filter index": {
    "synced": true,
    "best_block_height": 22345678
  }
}
```

`"synced": true` confirms the filter index has reached the chain tip.

## 5. Verify you can serve a filter

Fetch the compact filter for the current tip:

```bash
digibyte-cli getblockfilter $(digibyte-cli getbestblockhash)
```

Expected: a JSON object with a `filter` hex string and a `header` hex string. If
you instead get `Index is not enabled for filtertype basic`, `blockfilterindex=1`
did not take effect — recheck `digibyte.conf` and restart.

## 6. Open the P2P port

Light wallets connect over the mainnet P2P port **12024/tcp**. Open it on your
firewall (and forward it on your router if you are behind NAT):

```bash
sudo ufw allow 12024/tcp
```

Your node now serves compact block filters. A light wallet pointed at your node's
address on port 12024 can sync privately against it.

## Related

- [DigiByte wallet privacy](/wallet/privacy) — how the light wallet uses these BIP157/158 compact filters to sync without leaking your addresses.
