public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail•com>
To: Wladimir <laanwj@gmail•com>
Cc: bitcoin-development@lists•sourceforge.net
Subject: Re: [Bitcoin-development] Proposed new P2P command and response: getcmds, cmdlist
Date: Sat, 16 Jun 2012 10:54:11 +0100	[thread overview]
Message-ID: <201206161054.11537.andyparkins@gmail.com> (raw)
In-Reply-To: <CA+s+GJA2-+HuRFfX3b=-4wv7u9iFCnfOMyDKwekxmipszt27Cw@mail.gmail.com>

On Saturday 16 Jun 2012 09:42:21 Wladimir wrote:

> Which is a perfectly reasonable requirement. However, one could simply
> standardize what a 'thin client' and what a 'thick client' does and
> offers (at a certain version level), without having to explicitly
> enumerate everything over the protocol.

My problem is that that I suspect the spectrum of clients will be far more 
than simply "thin" or "thick".  What about thick-pruned, thick-full?  What 
about thin-blocks-on-demand and thin-headers-on-demand?  These are just what 
I can think of now; it seems unwise to limit the functionality of clients 
not yet designed with a binary designation.  So... we make a field that can 
hold more than just a bit; with each possible value representing a specific 
(possibly overlapping) set of features?  Why not just enumerate the features 
then?

I did write responses to each of your following points; but they just 
sounded like me being contrary.  The short version is that I think too much 
emphasis is being placed on defining a specific set of feature->version 
mapping.  That's going to make it hard for future clients that want to 
implement some of the features but not all, and yet still want to be good 
bitcoin citizens and be able to tell their peers what they don't support.  
For example, there is no easy way for a node to tell another that it doesn't 
have the whole block chain available, so requesting it from it will fail. 

> I'm just afraid that the currently simple P2P protocol will turn into a
> zoo of complicated (and potentially buggy/insecure) interactions.

Fair enough.

> So maybe a capability system is a good idea but then the granularity
> should be large, not command-level. The interaction between protocol
> versions and capabilities needs to be defined as well. Does offering
> "getdata" at protocol version 10 mean the same as offering it at
> protocol version 11"? Probably not guaranteed. The arguments might have
> changed. So it's not entirely self-documenting either.

That problem doesn't go away just because you don't have a capabilities 
system.  Either version 11 can speak version 10 or it can't.  I don't see 
how having a system for finding out that fact changes anything other than 
removing a load of protocol noise.

"I support getdata10" makes it far easier to discover that the peer supports 
getdata10 than sending getdata11 and watching it fail does.



Andy
-- 
Dr Andy Parkins
andyparkins@gmail•com



  parent reply	other threads:[~2012-06-16  9:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-16  0:13 Jeff Garzik
2012-06-16  1:34 ` Amir Taaki
2012-06-16  6:45   ` Wladimir
2012-06-16  8:16     ` Andy Parkins
2012-06-16  8:42       ` Wladimir
2012-06-16  9:16         ` Amir Taaki
2012-06-16  9:54         ` Andy Parkins [this message]
2012-06-17 15:19         ` Jeff Garzik
2012-06-17 16:30           ` Amir Taaki
2012-06-18  1:27             ` Mark Friedenbach
2012-06-16  8:17   ` Andy Parkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201206161054.11537.andyparkins@gmail.com \
    --to=andyparkins@gmail$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=laanwj@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox