<blockquote>
<p>Of the 18 outbound connections, one is to a peer which offers COMPACT_FILTERS BIP 158 service. (I got the name from a list of optional node services provided here in Dec. 2019.) And here it says that a node can provide BIP 157 service by setting peerblockfilters=1. How is BIP 158 service provided?</p>
</blockquote>
<p>The separation between BIP158 and BIP157 is somewhat murky, but in terms of the service provided, they can be thought of a single thing. Strictly speaking, BIP158 is the definition of the filter data structure, while BIP157 is the network service that exposes the BIP158-based filtering to the network. So, peers don't offer BIP158; they implement BIP158, and then use that to expose BIP157 services (or not).</p>
<blockquote>
<p>I'd like to provide any services that are feasible and useful. I've gathered that there would be a cost of an extra 5GB of storage (growing or static?) Other than that, any downsides to be considered?</p>
</blockquote>
<p>More bandwidth, if peers use it.</p>
<blockquote>
<p>And are these services useful only to peers connecting inbound?</p>
</blockquote>
<p>Strictly speaking, no, but in practice almost certainly yes. Nodes connect out to peers that provide what they want. It's unlikely that a full node (which provides BIP157) connects out to a light client (which needs/wants BIP157 services). Most likely the light client doesn't even support incoming connections.</p>
<blockquote>
<p>In about 36 hours I haven't seen any of those.</p>
</blockquote>
<p>It can take way longer than that before the network learns that you're a (good) node to connect to, even if nothing is wrong.</p>
<blockquote>
<p>Did upgrading to 22.0 and/or the recent exclusion of tor V2 peers mean an onion-only node will have no incoming connections?</p>
</blockquote>
<p>Not necessarily - if you're correctly configured to have a V3 hidden service now, you should eventually get inbound connections.</p>

CC BY-SA 4.0
2021-09-17T20:12:57.073Z
If this isn't right, please let me know... My node implements BIP 158 by virtue of running bitcoind 22.0, so all I need do is set `peerblockfilters=1`. (Your answer gets a virtual +1, but I need more reputation to make it actual.)
HashHouse
CC BY-SA 4.0
2021-09-17T20:29:46.020Z
The filter is off by default; you need `blockfilterindex=1` to enable the BIP158 filter, and `peerblockfilters=1` to enable exposing it through the network.
Pieter Wuille
CC BY-SA 4.0
2021-09-17T19:59:26.780Z
2021-09-17T19:59:26.780Z
Pieter Wuille
<p>As an educational exericse I have a new 22.0 full node using tor onion-only. Of the 18 outbound connections, one is to a peer which offers COMPACT_FILTERS BIP 158 service. (I got the name from a list of optional node services provided <a href="https://bitcoin.stackexchange.com/questions/92237/what-meanings-do-the-nodeid-version-and-services-convey-on-peers-tab-of-b/92238#92238">here</a> in Dec. 2019.) And <a href="https://bitcoin.stackexchange.com/questions/105472/does-bitcoin-core-support-bip157-some-call-it-neutrino/105473#105473">here</a> it says that a node can provide BIP 157 service by setting <code>peerblockfilters=1</code>. How is BIP 158 service provided?</p>
<p>I'd like to provide any services that are feasible and useful. I've gathered that there would be a cost of an extra 5GB of storage (growing or static?) Other than that, any downsides to be considered?</p>
<p>And are these services useful only to peers connecting inbound? In about 36 hours I haven't seen any of those. I did see a few inbounds occasionally in previous days running 0.21.0. Did upgrading to 22.0 and/or the recent exclusion of tor V2 peers mean an onion-only node will have no incoming connections? And if so, does that make my BIP 157/158 questions irrelevant?</p>

<bitcoin-core><tor><services><bip>
Should full node provide BIP 157/158 services?
HashHouse
# Should full node provide BIP 157/158 services?

(Asked by: username_0 on 2021-09-17)

As an educational exericse I have a new 22.0 full node using tor onion-only. Of the 18 outbound connections, one is to a peer which offers COMPACT\_FILTERS BIP 158 service. (I got the name from a list of optional node services provided [here](https://bitcoin.stackexchange.com/questions/92237/what-meanings-do-the-nodeid-version-and-services-convey-on-peers-tab-of-b/92238#92238) in Dec. 2019.) And [here](https://bitcoin.stackexchange.com/questions/105472/does-bitcoin-core-support-bip157-some-call-it-neutrino/105473#105473) it says that a node can provide BIP 157 service by setting `peerblockfilters=1`. How is BIP 158 service provided?

I'd like to provide any services that are feasible and useful. I've gathered that there would be a cost of an extra 5GB of storage (growing or static?) Other than that, any downsides to be considered?

And are these services useful only to peers connecting inbound? In about 36 hours I haven't seen any of those. I did see a few inbounds occasionally in previous days running 0.21.0. Did upgrading to 22.0 and/or the recent exclusion of tor V2 peers mean an onion-only node will have no incoming connections? And if so, does that make my BIP 157/158 questions irrelevant?

**Tags:** bitcoin-core, tor, services, bip


---

## 1 answers

### Answer by username_1 on 2021-09-17. Score: 4 | Accepted answer

> Of the 18 outbound connections, one is to a peer which offers COMPACT\_FILTERS BIP 158 service. (I got the name from a list of optional node services provided here in Dec. 2019.) And here it says that a node can provide BIP 157 service by setting peerblockfilters=1. How is BIP 158 service provided?

The separation between BIP158 and BIP157 is somewhat murky, but in terms of the service provided, they can be thought of a single thing. Strictly speaking, BIP158 is the definition of the filter data structure, while BIP157 is the network service that exposes the BIP158-based filtering to the network. So, peers don't offer BIP158; they implement BIP158, and then use that to expose BIP157 services (or not).

> I'd like to provide any services that are feasible and useful. I've gathered that there would be a cost of an extra 5GB of storage (growing or static?) Other than that, any downsides to be considered?

More bandwidth, if peers use it.

> And are these services useful only to peers connecting inbound?

Strictly speaking, no, but in practice almost certainly yes. Nodes connect out to peers that provide what they want. It's unlikely that a full node (which provides BIP157) connects out to a light client (which needs/wants BIP157 services). Most likely the light client doesn't even support incoming connections.

> In about 36 hours I haven't seen any of those.

It can take way longer than that before the network learns that you're a (good) node to connect to, even if nothing is wrong.

> Did upgrading to 22.0 and/or the recent exclusion of tor V2 peers mean an onion-only node will have no incoming connections?

Not necessarily - if you're correctly configured to have a V3 hidden service now, you should eventually get inbound connections.

> **Comments:**
> **username_0**: If this isn't right, please let me know... My node implements BIP 158 by virtue of running bitcoind 22.0, so all I need do is set `peerblockfilters=1`. (Your answer gets a virtual +1, but I need more reputation to make it actual.)  
> **username_1**: The filter is off by default; you need `blockfilterindex=1` to enable the BIP158 filter, and `peerblockfilters=1` to enable exposing it through the network.  

---

