Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1R0xWi-0004gd-CQ for bitcoin-development@lists.sourceforge.net; Tue, 06 Sep 2011 15:25:28 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.216.182 as permitted sender) client-ip=209.85.216.182; envelope-from=shadders.del@gmail.com; helo=mail-qy0-f182.google.com; Received: from mail-qy0-f182.google.com ([209.85.216.182]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1R0xWe-0001Gs-CF for bitcoin-development@lists.sourceforge.net; Tue, 06 Sep 2011 15:25:28 +0000 Received: by qyk9 with SMTP id 9so3869725qyk.13 for ; Tue, 06 Sep 2011 08:25:19 -0700 (PDT) Received: by 10.52.177.7 with SMTP id cm7mr1150210vdc.37.1315322718894; Tue, 06 Sep 2011 08:25:18 -0700 (PDT) Received: from [10.1.1.50] (155.88-67-202.dynamic.dsl.syd.iprimus.net.au [202.67.88.155]) by mx.google.com with ESMTPS id df6sm304167vdb.22.2011.09.06.08.25.15 (version=SSLv3 cipher=OTHER); Tue, 06 Sep 2011 08:25:18 -0700 (PDT) Message-ID: <4E663B55.9050508@gmail.com> Date: Wed, 07 Sep 2011 01:25:09 +1000 From: Steve User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 MIME-Version: 1.0 To: Mike Hearn References: <4E65CEE6.7030002@gmail.com> <4E65DA06.9060403@gmail.com> <4E661FAE.9020008@gmail.com> <4E662B79.5090303@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------060206040500050907030804" X-Spam-Score: -0.9 (/) 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 (shadders.del[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 -0.3 AWL AWL: From: address is in the auto white-list X-Headers-End: 1R0xWe-0001Gs-CF Cc: bitcoin-development@lists.sourceforge.net Subject: Re: [Bitcoin-development] Building a node crawler to map network X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: shadders.del@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 15:25:28 -0000 This is a multi-part message in MIME format. --------------060206040500050907030804 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for the overview Mike. I just bailed up Gavin on IRC and between that convo and what you've just written I'm starting to picture a plan in my head... This sounds right up my alley, I wish I didn't have to go to bed right now as I've got a ton of ideas buzzing around I'd like to get started on right now. But I'll be onto it as soon as I've got a free moment... On 07/09/11 00:52, Mike Hearn wrote: > On Tue, Sep 6, 2011 at 4:17 PM, Steve > wrote: > > I'm not really understanding the use case though. I believe most > bitcoind's have a default max connections of 8. Is the goal to > increase this without fundamentally altering the bitcoind > concurrency model? > > > bitcoind already uses asynchronous IO. That's not the problem. > > The issue came up in a conversation about scalability. If Bitcoins > popularity continues to grow, users are very likely to migrate away > from running full verifying nodes to lightweight clients, either a > different mode of the Satoshi client or different implementations like > the Android Wallet or MultiBit. > > Lightweight clients cannot verify thus should not relay. And they'll > be run by users who just want to send/receive coins from time to time, > so don't leave the programs running 24/7. The result could be running > out of sockets (like we have had problems with recently). It's > especially true because lightweight clients cannot check transactions > for themselves. If they want to show transactions appearing > immediately (and they do), they have to use "heard from lots of nodes" > as a proxy for validity. So lightweight clients are likely to be > socket intensive. > > We could solve this by just hoping that lots of people run full nodes. > The problem is that a full node is quite an intensive thing already, > it uses lots of CPU and disk seeks, and will just get more expensive > in future. And as transaction traffic increases, that leaves less CPU > time available to service thousands of connected clients. The ROI of > bringing up a new node decreases at the same time as the userbase > increases. > > One traditional approach to solving this is frontend proxies. > Jabber.com/org used this technique many years ago, and Google has also > used it to scale up the lockservice > (see > section 3.1). It's effective because often maintaining connections to > thousands of clients doesn't involve much brainwork, just shifting > bytes around. This is especially true of Bitcoin. So if somebody is > running a full node already they could increase their client capacity > by just bringing up a frontend proxy and having it handle things like > outbound tx broadcasts/deduping inbound broadcasts, connection setup, > relaying recently found blocks etc. A well written proxy could > probably support tens of thousands of simultaneous clients which frees > up the bitcoinds time for verification and wallet manipulation. --------------060206040500050907030804 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks for the overview Mike.  I just bailed up Gavin on IRC and between that convo and what you've just written I'm starting to picture a plan in my head... This sounds right up my alley, I wish I didn't have to go to bed right now as I've got a ton of ideas buzzing around I'd like to get started on right now.  But I'll be onto it as soon as I've got a free moment...

On 07/09/11 00:52, Mike Hearn wrote:
On Tue, Sep 6, 2011 at 4:17 PM, Steve <shadders.del@gmail.com> wrote:
I'm not really understanding the use case though.  I believe most bitcoind's have a default max connections of 8.  Is the goal to increase this without fundamentally altering the bitcoind concurrency model?

bitcoind already uses asynchronous IO. That's not the problem.

The issue came up in a conversation about scalability. If Bitcoins popularity continues to grow, users are very likely to migrate away from running full verifying nodes to lightweight clients, either a different mode of the Satoshi client or different implementations like the Android Wallet or MultiBit.

Lightweight clients cannot verify thus should not relay. And they'll be run by users who just want to send/receive coins from time to time, so don't leave the programs running 24/7. The result could be running out of sockets (like we have had problems with recently). It's especially true because lightweight clients cannot check transactions for themselves. If they want to show transactions appearing immediately (and they do), they have to use "heard from lots of nodes" as a proxy for validity. So lightweight clients are likely to be socket intensive.

We could solve this by just hoping that lots of people run full nodes. The problem is that a full node is quite an intensive thing already, it uses lots of CPU and disk seeks, and will just get more expensive in future. And as transaction traffic increases, that leaves less CPU time available to service thousands of connected clients. The ROI of bringing up a new node decreases at the same time as the userbase increases.

One traditional approach to solving this is frontend proxies. Jabber.com/org used this technique many years ago, and Google has also used it to scale up the lockservice (see section 3.1). It's effective because often maintaining connections to thousands of clients doesn't involve much brainwork, just shifting bytes around. This is especially true of Bitcoin. So if somebody is running a full node already they could increase their client capacity by just bringing up a frontend proxy and having it handle things like outbound tx broadcasts/deduping inbound broadcasts, connection setup, relaying recently found blocks etc. A well written proxy could probably support tens of thousands of simultaneous clients which frees up the bitcoinds time for verification and wallet manipulation.
--------------060206040500050907030804--