summaryrefslogtreecommitdiff
path: root/9d/e8d06aad1d505a9bff0c7cdd2af6a80958452b
blob: 2a79a6faf321077e8e7edbe73a8efe40da283e16 (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
Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193]
	helo=mx.sourceforge.net)
	by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <gmaxwell@gmail.com>) id 1WYDVX-0004b8-E9
	for bitcoin-development@lists.sourceforge.net;
	Thu, 10 Apr 2014 11:51:03 +0000
Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com
	designates 209.85.217.171 as permitted sender)
	client-ip=209.85.217.171; envelope-from=gmaxwell@gmail.com;
	helo=mail-lb0-f171.google.com; 
Received: from mail-lb0-f171.google.com ([209.85.217.171])
	by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1WYDVW-0000xB-9j
	for bitcoin-development@lists.sourceforge.net;
	Thu, 10 Apr 2014 11:51:03 +0000
Received: by mail-lb0-f171.google.com with SMTP id w7so2200725lbi.2
	for <bitcoin-development@lists.sourceforge.net>;
	Thu, 10 Apr 2014 04:50:55 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.112.131.65 with SMTP id ok1mr981627lbb.51.1397130655627;
	Thu, 10 Apr 2014 04:50:55 -0700 (PDT)
Received: by 10.112.89.68 with HTTP; Thu, 10 Apr 2014 04:50:55 -0700 (PDT)
In-Reply-To: <CAPg+sBjWL_hKhWW-6i=WAHnx+Ue5JE=A9RrxnWuAYOXw19qiDw@mail.gmail.com>
References: <CA+s+GJCn9U2kmyMH6w3o+m99NCfO0ws=SccvGBYJv07WVuF=eA@mail.gmail.com>
	<CAAt2M18z_Qkqat1OETiXAz0QQey4+y5J6=pC7nkoJfyfrpj3=A@mail.gmail.com>
	<CAAS2fgScWkentFy7Ak0bpYVLsOFL+xkwPm5QRu9ENeX9oCtPug@mail.gmail.com>
	<534570A2.9090502@gmx.de>
	<CA+s+GJAXu3SEXFDDwi85dNFjO2rfPXJrg-aKHYwbogAHfu3vfQ@mail.gmail.com>
	<0B038624-8861-438E-B7B1-566B4A8E126B@bitsofproof.com>
	<CA+s+GJCQSCUyq7Ajv0EgZ8Vbcv4Xt7G-y_8D12fsoKjyFjnhwg@mail.gmail.com>
	<CAPg+sBjWL_hKhWW-6i=WAHnx+Ue5JE=A9RrxnWuAYOXw19qiDw@mail.gmail.com>
Date: Thu, 10 Apr 2014 04:50:55 -0700
Message-ID: <CAAS2fgTkgddRGGXuuAza-A=Dgjfr5aNF8yxDePPixN4M7Rbpyg@mail.gmail.com>
From: Gregory Maxwell <gmaxwell@gmail.com>
To: Pieter Wuille <pieter.wuille@gmail.com>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -1.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
	(gmaxwell[at]gmail.com)
	-0.0 SPF_PASS               SPF: sender matches SPF record
	-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: 1WYDVW-0000xB-9j
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Bitcoind-in-background mode for SPV
	wallets
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: Thu, 10 Apr 2014 11:51:03 -0000

On Thu, Apr 10, 2014 at 4:32 AM, Pieter Wuille <pieter.wuille@gmail.com> wrote:
> There were earlier discussions.

On this list.

> The two ideas were either using one or a few service bits to indicate
> availability of blocks, or to extend addr messages with some flags to
> indicate this information.
>
> I wonder whether we can't have a hybrid: bits to indicate general
> degree of availability of blocks (none, only recent, everything), but
> indicate actual availability only upon actually connecting (through a
> "version" extension, or - preferably - a separate message). Reason is
> that the actual blocks available are likely to change frequently (if
> you keep the last week of blocks, a 3-day old addr entry will have
> quite outdated information), and not that important to actual peer
> selection - only to drive the decision which blocks to ask after
> connection.

I think you actually do need the kept ranges to be circulated,
otherwise you might need to hunt for a very long time to find the
right nodes with the blocks you need.  Alternatively, you give up and
don't hunt and pick some node that has them all and we get poor load
distribution. I'd rather be in a case where the nodes that have the
full history are only hit as a last resort.

WRT the changing values, I think that is pretty uniquely related to
the most recent blocks, and so instead I think that should be handled
symbolically (e.g. the hybrid approach... a flag for the "I keep the
most recent 2000 blocks", I say 2000 because thats about where the
request offset historgrams flattened out) or as a single offset range
"I keep the last N=200",  and the flag or the offset would be in
addition to whatever additional range was signaled. The latter could
be infrequently changing.

Signaling _more_ and more current range data on connect seems fine to
me, I just don't think it replaces something that gets relayed.

Based on the safety against reorgs and the block request access
patterns we observed I'm pretty sure we'd want any node serving blocks
at all to be at least the last N (for some number between 144 and 2000
or so). Based on the request patterns if just the recent blocks use up
all the space you're willing to spend, then I think thats probably
still the optimal contribution...

(Just be glad I'm not suggesting coding the entire blockchain with an
error correcting code so that it doesn't matter which subset you're
holding)