Bitcoin Forum
May 13, 2024, 10:37:54 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: The services filed in the version messages shall be used  (Read 1084 times)
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
November 15, 2014, 09:44:26 PM
Last edit: November 15, 2014, 10:27:58 PM by piotr_n
 #1

IMHO, each specific functionality of a node (maybe even each message type), should have its own bit in the services field.
I'm talking about the 64-bit field that currently is always set to 1.

Using the "version" filed to indicate whether a node supports things like "getheaders", "ping", "mempool", "reject" or bloom filters - this is a mistake.
Currently you basically get to choose between version 6000x and 7000x, but the reality is never that simple.

For instance: the node I use does not support bloom filters (probably never will), but it does support things like "getheaders" or "ping".
And I wish my node could be honest about which commands it will reply or act upon, and which it won't, but with the current protocol this is just impossible to be honest about it.
All I can tell you is version 60002, 70001 or 70002 - and none of them will actually be correct.

My point is: if the folks developing the core could get advantage of the services field (which shall not be a hassle), I believe the protocol itself (and thus the network as a whole) would have benefited from it.


EDIT:
Also I'd like to point out that the service field (unlike the version filed) is sent along with IP inside the addr message.
So for instance if you have an SVP client, then you could just ignore all the nodes that are not going to serve the bloom filtering for you and never connect to them.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715639874
Hero Member
*
Offline Offline

Posts: 1715639874

View Profile Personal Message (Offline)

Ignore
1715639874
Reply with quote  #2

1715639874
Report to moderator
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
November 17, 2014, 02:50:06 AM
 #2

I agree this is a great idea, this would also help to serve many different functioning clients, and help grow the protocol into many different directions.

I hope Tsar Gavin would approve this!
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
November 17, 2014, 12:44:27 PM
 #3

That is a pretty old BIP to support custom services discovery.

https://en.bitcoin.it/wiki/User:Justmoon/BIP_Draft:_Custom_Service_Discovery

If that was included, there wouldn't need to be quite the same level of "hoarding" of the services bits.

According to the protocol.h file:

Quote
// Bits 24-31 are reserved for temporary experiments. Just pick a bit that
// isn't getting used, or one not being used much, and notify the
// bitcoin-development mailing list. Remember that service bits are just
// unauthenticated advertisements, so your code must be robust against
// collisions and other cases where nodes may be advertising a service they
// do not actually support. Other service bits should be allocated via the
// BIP process.

You could pick random bits from 24-41.

If you want "official" recognition, then you could submit a BIP.  The reference implementation would be pretty easy, since it would support all the packets.

An alternative would be for a new message that lists the supported messages.  It wouldn't be quite as good.  Peers would have to connect, ask for the packet, and then disconnect if they don't have it.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!