Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1SfoaS-0003KF-3O for bitcoin-development@lists.sourceforge.net; Sat, 16 Jun 2012 08:42:28 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.160.47 as permitted sender) client-ip=209.85.160.47; envelope-from=laanwj@gmail.com; helo=mail-pb0-f47.google.com; Received: from mail-pb0-f47.google.com ([209.85.160.47]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-MD5:128) (Exim 4.76) id 1SfoaR-00070D-Ay for bitcoin-development@lists.sourceforge.net; Sat, 16 Jun 2012 08:42:28 +0000 Received: by pbbrq2 with SMTP id rq2so5841037pbb.34 for ; Sat, 16 Jun 2012 01:42:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.241.232 with SMTP id wl8mr28482826pbc.106.1339836141291; Sat, 16 Jun 2012 01:42:21 -0700 (PDT) Received: by 10.143.44.2 with HTTP; Sat, 16 Jun 2012 01:42:21 -0700 (PDT) In-Reply-To: <201206160916.24485.andyparkins@gmail.com> References: <1339810493.15660.YahooMailNeo@web121004.mail.ne1.yahoo.com> <201206160916.24485.andyparkins@gmail.com> Date: Sat, 16 Jun 2012 10:42:21 +0200 Message-ID: From: Wladimir To: Andy Parkins Content-Type: multipart/alternative; boundary=047d7b339bf5424a3b04c292e9b8 X-Spam-Score: -0.6 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (laanwj[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1SfoaR-00070D-Ay Cc: bitcoin-development@lists.sourceforge.net Subject: Re: [Bitcoin-development] Proposed new P2P command and response: getcmds, cmdlist X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jun 2012 08:42:28 -0000 --047d7b339bf5424a3b04c292e9b8 Content-Type: text/plain; charset=UTF-8 On Sat, Jun 16, 2012 at 10:16 AM, Andy Parkins 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 --047d7b339bf5424a3b04c292e9b8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Jun 16, 2012 at 10:16 AM, Andy Parkins <andyparkins@gmail.com<= /a>> wrote:

It's less of a problem in a (nearly) stateless protocol like Bitc= oin.

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

I like the idea of a capabili= ties 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. =C2=A0The particular example that occurs is thin cl= ients
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 w= hat a 'thin client' and what a 'thick client' does and offe= rs (at a certain version level), without having to explicitly enumerate eve= rything over the protocol.=C2=A0

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

Letting the node know of each others capabilities at co= nnection time helps somewhat. It'd allow refusing clients that do not i= mplement a certain feature. Then again, to me it's unclear what this wi= ns compared to incremental protocol versions with clear requirements.=C2=A0=

I'm just afraid that the currently simple P2P proto= col will turn into a zoo of complicated (and potentially buggy/insecure) in= teractions.=C2=A0

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

Wladimir

--047d7b339bf5424a3b04c292e9b8--