summaryrefslogtreecommitdiff
path: root/4e/677ab20ecfdd64c01ab0c85ef17836c51ce2a5
blob: 8a258c51bb84a00b55b1e5e985162240d167884c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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 <mh.in.england@gmail.com>) 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 <bitcoin-development@lists.sourceforge.net>;
	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: <CA+8=xu+GPykmKdAjxLdRA3QoCPR8azervT9uO-GVraNowAb49g@mail.gmail.com>
	<5379CE4D.5040100@gmail.com>
Date: Mon, 19 May 2014 14:15:54 +0200
X-Google-Sender-Auth: 8EX3-4wsYRz4xqcBZjvGtuQhapo
Message-ID: <CANEZrP28PQNwuLYTgzyaTDUY-Sg2fEijiPZ26k3NbwvgYoqLww@mail.gmail.com>
From: Mike Hearn <mike@plan99.net>
To: =?UTF-8?B?QmrDuHJuIMOYaXZpbmQgQmrDuHJuc2Vu?= <bo.bjornsen@gmail.com>
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 <bitcoin-development@lists.sourceforge.net>
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: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex">As an interested party not intimately familiar w=
ith the bitcoin codebase<br>

who also spent some time setting up a node a while ago, I would like to<br>
add one thing to the above list - network rate limiting.</blockquote><div><=
br></div><div>The problem is that this is easier said than done. Bitcoin Co=
re won&#39;t notice a remote peer is working but slow and switch to a faste=
r one, and even if it did, it&#39;d just mean throttling your connection wo=
uld cause all remote nodes to give up and hit the other unthrottled peers e=
ven more.</div>
<div><br></div><div>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&#3=
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.</div>
<div><br></div><div>It&#39;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.</div>
</div></div></div>

--089e01184b2894680004f9bfb92e--