1

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 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?

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?

1 Answer 1

4

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.

2
  • 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
    Sep 17, 2021 at 20:12
  • 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. Sep 17, 2021 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.