Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WmMU5-0000Zg-L7 for bitcoin-development@lists.sourceforge.net; Mon, 19 May 2014 12:16:01 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.219.51 as permitted sender) client-ip=209.85.219.51; envelope-from=mh.in.england@gmail.com; helo=mail-oa0-f51.google.com; Received: from mail-oa0-f51.google.com ([209.85.219.51]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WmMU3-0000xH-R1 for bitcoin-development@lists.sourceforge.net; Mon, 19 May 2014 12:16:01 +0000 Received: by mail-oa0-f51.google.com with SMTP id n16so6025994oag.38 for ; Mon, 19 May 2014 05:15:54 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.84.204 with SMTP id b12mr605939oez.8.1400501754421; Mon, 19 May 2014 05:15:54 -0700 (PDT) Sender: mh.in.england@gmail.com Received: by 10.76.71.162 with HTTP; Mon, 19 May 2014 05:15:54 -0700 (PDT) In-Reply-To: <5379CE4D.5040100@gmail.com> References: <5379CE4D.5040100@gmail.com> Date: Mon, 19 May 2014 14:15:54 +0200 X-Google-Sender-Auth: 8EX3-4wsYRz4xqcBZjvGtuQhapo Message-ID: From: Mike Hearn To: =?UTF-8?B?QmrDuHJuIMOYaXZpbmQgQmrDuHJuc2Vu?= Content-Type: multipart/alternative; boundary=089e01184b2894680004f9bfb92e X-Spam-Score: -0.5 (/) 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 (mh.in.england[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 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: 1WmMU3-0000xH-R1 Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] About the small number of bitcoin nodes 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: Mon, 19 May 2014 12:16:01 -0000 --089e01184b2894680004f9bfb92e Content-Type: text/plain; charset=UTF-8 > > As an interested party not intimately familiar with the bitcoin codebase > who also spent some time setting up a node a while ago, I would like to > add one thing to the above list - network rate limiting. The problem is that this is easier said than done. Bitcoin Core won't notice a remote peer is working but slow and switch to a faster one, and even if it did, it'd just mean throttling your connection would cause all remote nodes to give up and hit the other unthrottled peers even more. The best way to implement this is to do chain pruning, so your node will still try and shovel bytes as fast as possible, but it's limited by how many bytes it has to shovel. Remote nodes that are pulling down the block chain can then switch between nodes depending on what they have available in order to try and avoid hitting one node too hard. Nodes that were offline for a while and just catching up would prefer nodes that have less of the chain. It'd be great if someone could experiment with this. The first step is extending the p2p protocol so addr broadcasts and version messages include how much of the chain (counting blocks from the head?) the peer is willing to serve, and then updating the downloading code so it tries to be smarter about peer selection. Unfortunately all this work is sort of backed up waiting for sipa to finish merging in headers-first downloading. --089e01184b2894680004f9bfb92e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
As an interested party not intimately familiar w= ith the bitcoin codebase
who also spent some time setting up a node a while ago, I would like to
add one thing to the above list - network rate limiting.
<= br>
The problem is that this is easier said than done. Bitcoin Co= re won't notice a remote peer is working but slow and switch to a faste= r one, and even if it did, it'd just mean throttling your connection wo= uld cause all remote nodes to give up and hit the other unthrottled peers e= ven more.

The best way to implement this is to do chain pruning, = so your node will still try and shovel bytes as fast as possible, but it= 9;s limited by how many bytes it has to shovel. Remote nodes that are pulli= ng down the block chain can then switch between nodes depending on what the= y have available in order to try and avoid hitting one node too hard. Nodes= that were offline for a while and just catching up would prefer nodes that= have less of the chain.

It'd be great if someone could experiment with this= . The first step is extending the p2p protocol so addr broadcasts and versi= on messages include how much of the chain (counting blocks from the head?) = the peer is willing to serve, and then updating the downloading code so it = tries to be smarter about peer selection. Unfortunately all this work is so= rt of backed up waiting for sipa to finish merging in headers-first downloa= ding.
--089e01184b2894680004f9bfb92e--