summaryrefslogtreecommitdiff
path: root/fa/30c8088ff0124db802eeab3971462689b164d4
blob: c2cea67db174098016bafb68260e66de46c5663a (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
Return-Path: <gmaxwell@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 25C5EE9A
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 28 May 2018 19:24:12 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-ua0-f176.google.com (mail-ua0-f176.google.com
	[209.85.217.176])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6B00A102
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 28 May 2018 19:24:11 +0000 (UTC)
Received: by mail-ua0-f176.google.com with SMTP id j5-v6so8469464uak.12
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 28 May 2018 12:24:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:sender:in-reply-to:references:from:date:message-id
	:subject:to:cc:content-transfer-encoding;
	bh=YTNAqA+GqjfTaxxlW64O6QGAh3kkl+O0sIVNuG3/zfc=;
	b=AsOPA87Rwfgk7ff9dJ9/vImJUBDzBV4Y6/gF6Y6dWkopAAg7jz8ZJ5FNO1l6UMU1UN
	Wr8Y0g7YrAFn91jTooFVWeuGjLNYWEC4S5jm/5TNiI93TX5Yy/ycf6QBPH7g4Uu0UPLw
	2ror39DM30oBWuWwd4kWDCeUcfrwmIPSZPU4oZPSFVXJ3hOputXLDa70HcDwmrtr/zlO
	jgcKL7Jeqn81Z2yJ7K4QuqVHE1eWmUibONKDd79A4iHKQPYrOCn/xMtWaPNEruNKQD4/
	XbQ6fqzUum37Am5nLr/Zvn1pKVdxQKxnA6UKsjiFf5Jfsu1YPmiKtUa4wliLwVmYqDdN
	RrRA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
	:date:message-id:subject:to:cc:content-transfer-encoding;
	bh=YTNAqA+GqjfTaxxlW64O6QGAh3kkl+O0sIVNuG3/zfc=;
	b=TKUpxs+2yt3lR+6reQFgLViS/l/PjluIMNAvNa5Fvdly1X0k+OPzVhkyExJAkQFIbt
	TG0Sce5PZAiWEJ9abWPfkyUjT5yShElEOCPkMFjowyY+M3bLRTqJ7HDkUjWxmkzK4HY9
	7F7bC73uuqCfHsRguu0GZ1ernVGF5DwYE2GVtEkzRXwgTXAAiM6Mvi+rw1Fh7rYk/X+O
	+zl8ALeYWQiwZAY1T2QUzWrBleIjhjs7IK2LqBKoWBX4CCKFk8BriJilT0N5mp7p7vHx
	DNxWFviFSdQucah3cZVv8DKmEEU9x1PygrqheKVNtT/3TP/wR2gAPAGxX5A80dGWajyk
	p47w==
X-Gm-Message-State: ALKqPwdC+o+kCFTyWezl92OgXwd2k5hAzOny4zBNRK3Q6r30iAFf0YrL
	z4HbOjERzJkgPjSI2jTXemN02ggBaVt23Zko1+E=
X-Google-Smtp-Source: ADUXVKKr73zKRqsYRGzEcBI98bpBfVePkM3AFXzdfs+AzFrNM/xyOTYjyC+gmHHSdn5M8ZP75P1JxA3tUd7xXU3alSk=
X-Received: by 2002:ab0:18ee:: with SMTP id
	d46-v6mr4008403uah.39.1527535450496; 
	Mon, 28 May 2018 12:24:10 -0700 (PDT)
MIME-Version: 1.0
Sender: gmaxwell@gmail.com
Received: by 2002:a67:5193:0:0:0:0:0 with HTTP; Mon, 28 May 2018 12:24:09
	-0700 (PDT)
In-Reply-To: <F87D7069-0FDC-4572-B02B-398A2A455935@gmail.com>
References: <d43c6082-1b2c-c95b-5144-99ad0021ea6c@mattcorallo.com>
	<CAAS2fgRF-MhOvpFY6c_qAPzNMo3GQ28RExdSbOV6Q6Oy2iWn1A@mail.gmail.com>
	<22d375c7-a032-8691-98dc-0e6ee87a4b08@mattcorallo.com>
	<CAAS2fgR3QRHeHEjjOS1ckEkL-h7=Na56G12hYW9Bmy9WEMduvg@mail.gmail.com>
	<CADZtCShLmH_k-UssNWahUNHgHvWQQ1y638LwaOfnJEipwjbiYg@mail.gmail.com>
	<CAAS2fgQLCN_cuZ-3QPjCLfYOtHfEk=SenTn5=y9LfGzJxLPR3Q@mail.gmail.com>
	<CADZtCSjYr6VMBVQ=rx44SgRWcFSXhVXUZJB=rHMh4X78Z2eY1A@mail.gmail.com>
	<CAO3Pvs9K3n=OzVQ06XGQvzNC+Aqp9S60kWM9VRPA8hWTJ3u9BQ@mail.gmail.com>
	<c23a5346-9f99-44f0-abbf-d7e7979bf1d8@gmail.com>
	<CAO3Pvs_MA4TtgCCu1NgCBjK2bZRN+rKnGQJN6m4yTrViBXRiPA@mail.gmail.com>
	<CAD3i26BibcaMdbQv-j+Egz_1y0GuhzepBp5ATNpj=Qv8hi1TVA@mail.gmail.com>
	<CADZtCShAYpbN=4qNoX5c8yd1j08+mEZzG8gZwcHrj2suY0mb9w@mail.gmail.com>
	<CADZtCShYnM3A949H18V2+BArA-K9J+cDkd=rX8xRn0+0js5CwA@mail.gmail.com>
	<CAAS2fgTXS5Tains7dfe_Rc9JxR6M=NuFW9UtieRELm+6N2uNog@mail.gmail.com>
	<CAFfwr8F+ghYb2HYEgC7Lh7Z-ytNE7EABr6cxiVXYhWLk-TPO7A@mail.gmail.com>
	<CADZtCShDzPK_jqeOrK4XBoB2uriU9c9T8Dm7By-8ew3XOoAeQg@mail.gmail.com>
	<7E4FA664-BBAF-421F-8C37-D7CE3AA5310A@gmail.com>
	<F87D7069-0FDC-4572-B02B-398A2A455935@gmail.com>
From: Gregory Maxwell <greg@xiph.org>
Date: Mon, 28 May 2018 19:24:09 +0000
X-Google-Sender-Auth: _IajEZw1IYSW2UmSa00pByRRlOs
Message-ID: <CAAS2fgT716PiP0ucoASxryM9y+s9H2z06Z0ToaP1xT3BozAtNw@mail.gmail.com>
To: Tamas Blummer <tamas.blummer@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] BIP 158 Flexibility and Filter Size
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Mon, 28 May 2018 19:24:12 -0000

Is there an application that requires watching for output scripts that
doesn't also require watching for input scrips (or, less efficiently,
input outpoints)?

Any of the wallet application that I'm aware of need to see coins
being spent as well as created, else they may try to spend already
spent coins. If we're not aware of any applications that wouldnt use
both, there isn't much reason to separate them and if input scripts
are used instead of input outpoints there is additional savings from
combining them (due to the same scripts being spent as were created in
the block-- due to reuse and chaining).

I still am of the belief, based on Matt's argument, that there is no
use for txid what-so-ever (instead just watch for an outpoint).





On Mon, May 28, 2018 at 6:28 PM, Tamas Blummer <tamas.blummer@gmail.com> wr=
ote:
> Forgot to mention: The link I sent is to a branch that is patched to prod=
uce the filter stats.
> This is the main project and the BIP158 implementation: https://github.co=
m/rust-bitcoin/rust-bitcoin-spv/blob/master/src/blockfilter.rs
>
> Tamas Blummer
>
>> On May 28, 2018, at 20:18, Tamas Blummer <tamas.blummer@gmail.com> wrote=
:
>>
>> Hi Jim,
>>
>> A =E2=80=9Cbasic=E2=80=9D combined filter would mean up to 0.5 GB filter=
 data per month (with 100% segwith use). Considering that 1 GB is the usual=
 data quota for an entry level mobile phone contract, this could be a too h=
igh barrier for adoption.
>>
>> I repeated your calculations and produced a slightly different graph tha=
t shows the fraction of cummulative filter size to cummulative blockchain s=
ize. This is less noisy but otherwise confirms your measurement.
>>
>> I think that the data supports separation of filters as a combined filte=
r does not seem to come with significant savings. (basic  size ~=3D txid + =
input points + output scripts sizes)
>>
>> My calculations are repeatable with:
>>
>> https://github.com/tamasblummer/rust-bitcoin-spv/blob/blockfilterstats/s=
rc/bin/blockfilterstats.rs
>>
>> that is using a Rust implementation of an SPV client built on top of oth=
er libraries we work on in the rust-bitcoin GitHub community (https://githu=
b.com/rust-bitcoin). Yes, this is a shameles plug for the project hoping to=
 attract more developer.
>>
>> Tamas Blummer
>>
>>
>> <filters.png>
>>
>>> On May 24, 2018, at 05:48, Jim Posen via bitcoin-dev <bitcoin-dev@lists=
.linuxfoundation.org> wrote:
>>>
>>> Greg, I've attached a graph including the input scripts.
>>>
>>> In the top graph, we can see how the input script filter compares to th=
e input outpoint filter. It is definitely smaller as a result of address re=
use. The bottom graph shows the ratio over time of combining the input prev=
 script and output script filters vs keeping them separate. In more recent =
blocks, it appears that there are decreasing savings.
>>>
>>
>