<p>The format is simply xN.[seedname], where N is the required service flags, ORed together, encoded in hex.</p>
<p>From Bitcoin Core's <code>src/protocol.h</code>:</p>
<pre><code>    NODE_NONE = 0,
    // NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently
    // set by all Bitcoin Core non pruned nodes, and is unset by SPV clients or other light clients.
    NODE_NETWORK = (1 &lt;&lt; 0),
    // NODE_BLOOM means the node is capable and willing to handle bloom-filtered connections.
    // Bitcoin Core nodes used to support this by default, without advertising this bit,
    // but no longer do as of protocol version 70011 (= NO_BLOOM_VERSION)
    NODE_BLOOM = (1 &lt;&lt; 2),
    // NODE_WITNESS indicates that a node can be asked for blocks and transactions including
    // witness data.
    NODE_WITNESS = (1 &lt;&lt; 3),
    // NODE_COMPACT_FILTERS means the node will service basic block filter requests.
    // See BIP157 and BIP158 for details on how this is implemented.
    NODE_COMPACT_FILTERS = (1 &lt;&lt; 6),
    // NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only
    // serving the last 288 (2 day) blocks
    // See BIP159 for details on how this is implemented.
    NODE_NETWORK_LIMITED = (1 &lt;&lt; 10),
</code></pre>
<p>So as a hypothetical example, say you want NODE_WITNESS, NODE_COMPACT_FILTERS, and NODE_NETWORK_LIMITED, you'd need N = (1 &lt;&lt; 3) + (1 &lt;&lt; 6) + (1 &lt;&lt; 10) = 1096, which is <code>448</code> in hexadecimal. Thus, you'd query <code>x448.[seedname]</code>.</p>
<p>Note that not all combinations are supported, and which ones are may depend on the seed. My Bitcoin seeder software by default supports the following combinations currently:</p>
<pre><code>NODE_NETWORK
NODE_NETWORK | NODE_BLOOM
NODE_NETWORK | NODE_WITNESS
NODE_NETWORK | NODE_WITNESS | NODE_COMPACT_FILTERS
NODE_NETWORK | NODE_WITNESS | NODE_BLOOM
NODE_NETWORK_LIMITED
NODE_NETWORK_LIMITED | NODE_BLOOM
NODE_NETWORK_LIMITED | NODE_WITNESS
NODE_NETWORK_LIMITED | NODE_WITNESS | NODE_COMPACT_FILTERS
NODE_NETWORK_LIMITED | NODE_WITNESS | NODE_BLOOM
</code></pre>

CC BY-SA 4.0
2021-10-04T13:54:44.040Z
2021-10-04T13:54:44.040Z
Pieter Wuille
<p>I'm working on some lite client of bitcoin, and at the moment I'm trying to make a seed resolution by services supported by the nodes expose over a DNS seed.</p>
<p>I <a href="https://bitcointalk.org/index.php?topic=1888573.msg18791989#msg18791989" rel="nofollow noreferrer">found this post</a> on bitcointalk, but I think that not all the flag features are documented. In particular, I'm interested to know that is the flag feature of the BIP 158 service, but I also want to know where I can see all these flags on bitcoin core. It looks like they are no longer hardcoded in the code, or better not longer in clear hardcoded in the code.</p>
<p>Thanks.</p>

<bitcoin-core><dns>
Bitcoin dns seed flags
vincenzopalazzo
# Bitcoin dns seed flags

(Asked by: username_0 on 2021-10-04)

I'm working on some lite client of bitcoin, and at the moment I'm trying to make a seed resolution by services supported by the nodes expose over a DNS seed.

I [found this post](https://bitcointalk.org/index.php?topic=1888573.msg18791989#msg18791989) on bitcointalk, but I think that not all the flag features are documented. In particular, I'm interested to know that is the flag feature of the BIP 158 service, but I also want to know where I can see all these flags on bitcoin core. It looks like they are no longer hardcoded in the code, or better not longer in clear hardcoded in the code.

Thanks.

**Tags:** bitcoin-core, dns


---

## 1 answers

### Answer by username_1 on 2021-10-04. Score: 3 | Accepted answer

The format is simply xN.[seedname], where N is the required service flags, ORed together, encoded in hex.

From Bitcoin Core's `src/protocol.h`:

```
    NODE_NONE = 0,
    // NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently
    // set by all Bitcoin Core non pruned nodes, and is unset by SPV clients or other light clients.
    NODE_NETWORK = (1 << 0),
    // NODE_BLOOM means the node is capable and willing to handle bloom-filtered connections.
    // Bitcoin Core nodes used to support this by default, without advertising this bit,
    // but no longer do as of protocol version 70011 (= NO_BLOOM_VERSION)
    NODE_BLOOM = (1 << 2),
    // NODE_WITNESS indicates that a node can be asked for blocks and transactions including
    // witness data.
    NODE_WITNESS = (1 << 3),
    // NODE_COMPACT_FILTERS means the node will service basic block filter requests.
    // See BIP157 and BIP158 for details on how this is implemented.
    NODE_COMPACT_FILTERS = (1 << 6),
    // NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only
    // serving the last 288 (2 day) blocks
    // See BIP159 for details on how this is implemented.
    NODE_NETWORK_LIMITED = (1 << 10),

```

So as a hypothetical example, say you want NODE\_WITNESS, NODE\_COMPACT\_FILTERS, and NODE\_NETWORK\_LIMITED, you'd need N = (1 << 3) + (1 << 6) + (1 << 10) = 1096, which is `448` in hexadecimal. Thus, you'd query `x448.[seedname]`.

Note that not all combinations are supported, and which ones are may depend on the seed. My Bitcoin seeder software by default supports the following combinations currently:

```
NODE_NETWORK
NODE_NETWORK | NODE_BLOOM
NODE_NETWORK | NODE_WITNESS
NODE_NETWORK | NODE_WITNESS | NODE_COMPACT_FILTERS
NODE_NETWORK | NODE_WITNESS | NODE_BLOOM
NODE_NETWORK_LIMITED
NODE_NETWORK_LIMITED | NODE_BLOOM
NODE_NETWORK_LIMITED | NODE_WITNESS
NODE_NETWORK_LIMITED | NODE_WITNESS | NODE_COMPACT_FILTERS
NODE_NETWORK_LIMITED | NODE_WITNESS | NODE_BLOOM

```


---

