summaryrefslogtreecommitdiff
path: root/b5/647be07078a9374bc04deabcc66faa75ca3bcf
blob: f285505e0feaf47904183d346d0b3e415c4b512e (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
Return-Path: <adam.ficsor73@gmail.com>
Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])
 by lists.linuxfoundation.org (Postfix) with ESMTP id E4CDCC0177
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 28 Feb 2020 14:37:27 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by fraxinus.osuosl.org (Postfix) with ESMTP id CCC4986B74
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 28 Feb 2020 14:37:27 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from fraxinus.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id NP7TPWzWKkux
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 28 Feb 2020 14:37:26 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com
 [209.85.167.174])
 by fraxinus.osuosl.org (Postfix) with ESMTPS id A353286B63
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 28 Feb 2020 14:37:26 +0000 (UTC)
Received: by mail-oi1-f174.google.com with SMTP id q81so3070025oig.0
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 28 Feb 2020 06:37:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=MjCUQ0Xj6oR/NVsfBzmF80DRaC5JHfge1VZVFN4rNbg=;
 b=ll1+1b/7kMIzizMzgMmLhTEmWQUwDqdzAvy9ElGh8Y7UU7RwfVhBfaUzFGPwG8n+XQ
 M+qooX1U1mwDxz/2yGe2phQu1qXrztOsXi1WF4epSlgRG9O5lQT3Wt3UwZ9aF5nbChKf
 7ccbdXCLqFlsaSmzDxtxRSH9XwYllIAE4VCHkgyJIr7UfngNSUmmO+gq9Z1yqrM+ZAZY
 4w/obf112mJGhsW9zWofxlMIqOU6GyFTAWcUI1bW4+U1au4zeqY7cAjgk3JLcv9txoI2
 ndRET2sa4DETNlzIhSSwvrFgBQXtEr01YTWQ+PzmJQQRWz4y71/79dI+7MxrnhoH2MpW
 hx1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=MjCUQ0Xj6oR/NVsfBzmF80DRaC5JHfge1VZVFN4rNbg=;
 b=AFUOlgyKVD0RdBv6lUtodEPs+GdVlZCMj5LzEFs0wb4P02gKfgrlckvQ/QEHoMIFx9
 6taCE5nkfSJZAjZ1GmfaW7pJPASvQFhCY4M5PgsyqvKOtSG317FaKvTyWEyN0onJc4zn
 E3vhbJ1r12jwjxGByl9TcDsQ/TcLp1mrx0PV9v0786xssWm7PCwlsbuFVNlVcmUX2sfe
 jRv14N4MDeR1J2cgLvIDKs7VyRazBRa6ZIggIJcJmbVfzQA63bTzQsIoWsb0VTyaoFA9
 6g4ug8vxGqQ+O7Q4TKnZa22VVKfjMKG+n8UMmAJ5n6iOGhIqGSQlcSBu4j4V4N9rPLST
 0+Mg==
X-Gm-Message-State: APjAAAWdFS5U6TDrBQ+3Pbwk793HR94xp+7AUBBL+C5TYTo8K0kzUtjs
 1uCX3LSkoOC4bA0jsRxwscZpXsc8VW97h+Izj6KBDtNn
X-Google-Smtp-Source: APXvYqxiBVW7eJR94msYJEszCB3UbU746R2LvfOzRZbH/M4XGphI955svWb/mT6BXTLJCA0kZwv1K0Q8fNrlOqquF3s=
X-Received: by 2002:aca:f305:: with SMTP id r5mr3470370oih.174.1582900645609; 
 Fri, 28 Feb 2020 06:37:25 -0800 (PST)
MIME-Version: 1.0
From: nopara73 <adam.ficsor73@gmail.com>
Date: Fri, 28 Feb 2020 15:37:14 +0100
Message-ID: <CAEPKjgdmZEU75uM6EtCD2Ut55dmnoXRHtEK_UsfnK6QUtPWtMA@mail.gmail.com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="000000000000b24730059fa3c60f"
X-Mailman-Approved-At: Fri, 28 Feb 2020 14:44:16 +0000
Subject: [bitcoin-dev] [bitcin-dev] BIP157 Filter Type Extensibility
	Proposal for Combinations
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
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: Fri, 28 Feb 2020 14:37:28 -0000

--000000000000b24730059fa3c60f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

BIP157 defines a section called "Filter Types" (
https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#filter-types
 )

>  For the sake of future extensibility and reducing filter sizes, there
are multiple *filter types* that determine which data is included in a
block filter as well as the method of filter construction/querying. In this
model, full nodes generate one filter per block per filter type supported.

>  Each type is identified by a one byte code, and specifies the contents
and serialization format of the filter. A full node MAY signal support for
particular filter types using service bits. The initial filter types are
defined separately in BIP 158
<https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki>, and one
service bit is allocated to signal support for them.

While it provides a way to extend to multiple filter types, it does not
provide a way to extend to filter type combinations. Such combinations are
possible if the filter types would have to be defined with the power of
two: 1, 2, 4, 8, 16..., so every octet of a byte array could denote a
specific filter type, this way we could be able to signal for any number of
combinations of those filter types.

Originally this idea is described in more details and with code here:
https://github.com/bitcoin/bitcoin/issues/18221

MarcoFalke suggested for me to submit it to the mailing list instead of a
GitHub issue then propose an update to the BIP if consensus is reached.

--=20
Best,
=C3=81d=C3=A1m

--000000000000b24730059fa3c60f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">BIP157 defines a section called &quot;Filter Types&quot; (

<a href=3D"https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#f=
ilter-types">https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki=
#filter-types</a>=C2=A0)<br><br>&gt;=C2=A0

<span style=3D"color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystem=
Font,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoj=
i&quot;,&quot;Segoe UI Emoji&quot;;font-size:16px">For the sake of future e=
xtensibility and reducing filter sizes, there are multiple=C2=A0</span><i s=
tyle=3D"box-sizing:border-box;color:rgb(36,41,46);font-family:-apple-system=
,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;A=
pple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;font-size:16px">filter ty=
pes</i><span style=3D"color:rgb(36,41,46);font-family:-apple-system,BlinkMa=
cSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Col=
or Emoji&quot;,&quot;Segoe UI Emoji&quot;;font-size:16px">=C2=A0that determ=
ine which data is included in a block filter as well as the method of filte=
r construction/querying. In this model, full nodes generate one filter per =
block per filter type supported.</span>=C2=A0<br><br>&gt;=C2=A0

<span style=3D"color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystem=
Font,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoj=
i&quot;,&quot;Segoe UI Emoji&quot;;font-size:16px">Each type is identified =
by a one byte code, and specifies the contents and serialization format of =
the filter. A full node MAY signal support for particular filter types usin=
g service bits. The initial filter types are defined separately in=C2=A0</s=
pan><a href=3D"https://github.com/bitcoin/bips/blob/master/bip-0158.mediawi=
ki" style=3D"box-sizing:border-box;color:rgb(3,102,214);text-decoration-lin=
e:none;font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,He=
lvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji=
&quot;;font-size:16px">BIP 158</a><span style=3D"color:rgb(36,41,46);font-f=
amily:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial=
,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;font-s=
ize:16px">, and one service bit is allocated to signal support for them.</s=
pan>=C2=A0<br><br>While it provides a way to extend to multiple filter type=
s, it does not provide a way to extend to filter type combinations. Such co=
mbinations are possible if the filter types would have to be defined with t=
he power of two: 1, 2, 4, 8, 16..., so every octet of a byte array could de=
note a specific filter type, this way we could be able to signal for any nu=
mber of combinations of those filter types.<br><br>Originally this idea is =
described in more details and with code here:=C2=A0<a href=3D"https://githu=
b.com/bitcoin/bitcoin/issues/18221">https://github.com/bitcoin/bitcoin/issu=
es/18221</a>=C2=A0<br><br>MarcoFalke suggested for me to submit it to the m=
ailing list instead of a GitHub issue then propose an update to the BIP if =
consensus is reached.<div><br></div>-- <br><div dir=3D"ltr" class=3D"gmail_=
signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div di=
r=3D"ltr"><div><div dir=3D"ltr"><div><div><span style=3D"font-size:13.33333=
39691162px">Best,<br>=C3=81d=C3=A1m</span></div></div></div></div></div></d=
iv></div></div></div>

--000000000000b24730059fa3c60f--