Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Coding Enthusiast on December 22, 2016, 05:33:49 AM



Title: Is Services identifiers in developer-reference deprecated?
Post by: Coding Enthusiast on December 22, 2016, 05:33:49 AM
According to https://bitcoin.org/en/developer-reference#version there are two service identifiers 0x00 and 0x01 (8 bytes) but I am getting other numbers in that field in both Version message and Addr. What am I missing?

Example:
Version message received from the connected node has 0x0d 00 00 00 00 00 00 00
addr messages: 0x05 00 00 00 00 00 00 00

double checked with Wireshark bitcoin filter.


Title: Re: Is Services identifiers in developer-reference deprecated?
Post by: achow101 on December 22, 2016, 05:56:20 AM
That documentation is not updated very frequently. It is missing some services. There are also NODE_BLOOM (0x02) and NODE_WITNESS (0x03) service bits.


Title: Re: Is Services identifiers in developer-reference deprecated?
Post by: Coding Enthusiast on December 22, 2016, 06:08:36 AM
That documentation is not updated very frequently. It is missing some services. There are also NODE_BLOOM (0x02) and NODE_WITNESS (0x03) service bits.

Are these the only two?
And where can I read more about them to know what they indicate?


Title: Re: Is Services identifiers in developer-reference deprecated?
Post by: achow101 on December 22, 2016, 03:21:59 PM
That documentation is not updated very frequently. It is missing some services. There are also NODE_BLOOM (0x02) and NODE_WITNESS (0x03) service bits.

Are these the only two?
And where can I read more about them to know what they indicate?
I'm pretty sure these are the only other two service bits in use. However it is possible that other software implementations are using service bits but not informing the rest of the development community that they are.

Generally the service bits have an associated BIP, but you will have to read through all BIPs in order to find most defined service bits; they are not so state obviously in the BIP title.. Even so, some developers like the developers of Bitcoin Unlimited do not participate in the BIP process so they may be using service bits that no one else knows about.


Title: Re: Is Services identifiers in developer-reference deprecated?
Post by: Coding Enthusiast on December 23, 2016, 12:37:12 PM
I sometimes hate bitcoin :D
I was looking around since yesterday and so far I have found this: https://github.com/bitcoin/bitcoin/blob/master/src/protocol.h#L249-L278
And at least in core these are the "service flags" (if my understanding of bit shift in c++ was correct) with their numbers:
NODE_NONE = 0,
NODE_NETWORK = 1,
NODE_GETUTXO = 2,
NODE_BLOOM = 4,
NODE_WITNESS = 8,
NODE_XTHIN = 16


Have not yet found "5" and "13", gotta dig deeper in BIPs
Everything so far is clear now.
5: NodeNetwork | NodeBloom
13: NodeNetwork | NodeBloom | NodeWitness