public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Wladimir <laanwj@gmail•com>
To: Andy Parkins <andyparkins@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:42:21 +0200	[thread overview]
Message-ID: <CA+s+GJA2-+HuRFfX3b=-4wv7u9iFCnfOMyDKwekxmipszt27Cw@mail.gmail.com> (raw)
In-Reply-To: <201206160916.24485.andyparkins@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]

On Sat, Jun 16, 2012 at 10:16 AM, Andy Parkins <andyparkins@gmail•com>wrote:

>
> It's less of a problem in a (nearly) stateless protocol like Bitcoin.
>

It's currently (nearly) stateless, however it would be short-sighted to
think it will stay that way. State is being introduced as we speak; for
example, connection-specific filters.

I like the idea of a capabilities command; as time goes on and the ecosystem
> of thin/spv/semi-thin/headers-only/blocks-on-demand/reverse-search-
> blockchain/memory-pool-query clients becomes more varied, it's going to be
> more an more important.  The particular example that occurs is thin clients
> connecting to the network are going to want to ensure they are connected to
> at least one non-thin client.
>

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.

This also makes it easier to deprecate (lack of) certain features later on.
You can simply drop support for protocol versions before a certain number
(which has happened before). With the extension system this is much harder,
which likely means you keep certain workarounds forever.

Letting the node know of each others capabilities at connection time helps
somewhat. It'd allow refusing clients that do not implement a certain
feature. Then again, to me it's unclear what this wins compared to
incremental protocol versions with clear requirements.

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

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.

Wladimir

[-- Attachment #2: Type: text/html, Size: 2772 bytes --]

  reply	other threads:[~2012-06-16  8:42 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 [this message]
2012-06-16  9:16         ` Amir Taaki
2012-06-16  9:54         ` Andy Parkins
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='CA+s+GJA2-+HuRFfX3b=-4wv7u9iFCnfOMyDKwekxmipszt27Cw@mail.gmail.com' \
    --to=laanwj@gmail$(echo .)com \
    --cc=andyparkins@gmail$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    /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