<oembed><type>rich</type><version>1.0</version><author_name>npub1za0a9afyj7um5feva0d5xmhfsah3zxm252hna2duq0numa952frqvuua2a</author_name><author_url>https://nostr.ae/npub1za0a9afyj7um5feva0d5xmhfsah3zxm252hna2duq0numa952frqvuua2a</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-05-23&#xA;📝 Original message:Hi all,&#xA;&#xA;Jimpo, thanks for looking into those stats! I had always imagined that there&#xA;would be a more significant savings in having all filters in one bundle, as&#xA;opposed to separate. These results are interesting, to say the least, and&#xA;definitely offer us some flexibility in options for filter sharding.&#xA;&#xA;So far, the bulk of this discussion has centered around bandwidth. I am&#xA;concerned, however, that splitting up the filters is at odds with the other&#xA;goal of the proposal in offering improved privacy.&#xA;&#xA;Allowing clients to choose individual filter sets trivially exposes the&#xA;type of&#xA;data that client is interested in. This alone might be enough to&#xA;fingerprint the&#xA;function of a peer and reduce anonymity set justifying their potential&#xA;behavior.&#xA;&#xA;Furthermore, if a match is encountered, and block requested, full nodes have&#xA;more targeted insight into what caused a particular match. They could infer&#xA;that&#xA;the client received funds in a particular block, e.g., if they are only&#xA;requesting&#xA;output scripts.&#xA;&#xA;This is above and beyond the additional complexity of now syncing,&#xA;validating,&#xA;and managing five or six distinct header/filter-header/filter/block chains.&#xA;&#xA;I agree that saving on bandwidth is an important goal, but bandwidth and&#xA;privacy&#xA;are always seemingly at odds. Strictly comparing the bandwidth requirements&#xA;of&#xA;a system that heavily weighs privacy to existing ones, e.g. BIP39, that&#xA;don&#39;t is a&#xA;losing battle IMO.&#xA;&#xA;I&#39;m not fundamentally opposed to splitting the filters, I certainly see the&#xA;arguments for flexibility. However, I also want to ensure we are&#xA;considering the&#xA;second order effects that fall out of optimizing for one metric when others&#xA;exist.&#xA;&#xA;Cheers,&#xA;Conner&#xA;On Wed, May 23, 2018 at 10:29 Gregory Maxwell via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; Any chance you could add a graph of input-scripts  (instead of input&#xA;&gt; outpoints)?&#xA;&gt;&#xA;&gt; On Wed, May 23, 2018 at 7:38 AM, Jim Posen via bitcoin-dev&#xA;&gt; &lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt; &gt; So I checked filter sizes (as a proportion of block size) for each of the&#xA;&gt; &gt; sub-filters. The graph is attached.&#xA;&gt; &gt;&#xA;&gt; &gt; As interpretation, the first ~120,000 blocks are so small that the&#xA;&gt; &gt; Golomb-Rice coding can&#39;t compress the filters that well, which is why the&#xA;&gt; &gt; filter sizes are so high proportional to the block size. Except for the&#xA;&gt; &gt; input filter, because the coinbase input is skipped, so many of them&#xA;&gt; have 0&#xA;&gt; &gt; elements. But after block 120,000 or so, the filter compression converges&#xA;&gt; &gt; pretty quickly to near the optimal value. The encouraging thing here is&#xA;&gt; that&#xA;&gt; &gt; if you look at the ratio of the combined size of the separated filters vs&#xA;&gt; &gt; the size of a filter containing all of them (currently known as the basic&#xA;&gt; &gt; filter), they are pretty much the same size. The mean of the ratio&#xA;&gt; between&#xA;&gt; &gt; them after block 150,000 is 99.4%. So basically, not much compression&#xA;&gt; &gt; efficiently is lost by separating the basic filter into sub-filters.&#xA;&gt; &gt;&#xA;&gt; &gt; On Tue, May 22, 2018 at 5:42 PM, Jim Posen &lt;jim.posen at gmail.com&gt; wrote:&#xA;&gt; &gt;&gt;&gt;&#xA;&gt; &gt;&gt;&gt; My suggestion was to advertise a bitfield for each filter type the node&#xA;&gt; &gt;&gt;&gt; serves,&#xA;&gt; &gt;&gt;&gt; where the bitfield indicates what elements are part of the filters.&#xA;&gt; This&#xA;&gt; &gt;&gt;&gt; essentially&#xA;&gt; &gt;&gt;&gt; removes the notion of decided filter types and instead leaves the&#xA;&gt; &gt;&gt;&gt; decision to&#xA;&gt; &gt;&gt;&gt; full-nodes.&#xA;&gt; &gt;&gt;&#xA;&gt; &gt;&gt;&#xA;&gt; &gt;&gt; I think it makes more sense to construct entirely separate filters for&#xA;&gt; the&#xA;&gt; &gt;&gt; different types of elements and allow clients to download only the ones&#xA;&gt; they&#xA;&gt; &gt;&gt; care about. If there are enough elements per filter, the compression&#xA;&gt; ratio&#xA;&gt; &gt;&gt; shouldn&#39;t be much worse by splitting them up. This prevents the&#xA;&gt; exponential&#xA;&gt; &gt;&gt; blowup in the number of filters that you mention, Johan, and it works&#xA;&gt; nicely&#xA;&gt; &gt;&gt; with service bits for advertising different filter types independently.&#xA;&gt; &gt;&gt;&#xA;&gt; &gt;&gt; So if we created three separate filter types, one for output scripts,&#xA;&gt; one&#xA;&gt; &gt;&gt; for input outpoints, and one for TXIDs, each signaled with a separate&#xA;&gt; &gt;&gt; service bit, are people good with that? Or do you think there shouldn&#39;t&#xA;&gt; be a&#xA;&gt; &gt;&gt; TXID filter at all, Matt? I didn&#39;t include the option of a prev output&#xA;&gt; &gt;&gt; script filter or rolling that into the block output script filter&#xA;&gt; because it&#xA;&gt; &gt;&gt; changes the security model (cannot be proven to be correct/incorrect&#xA;&gt; &gt;&gt; succinctly).&#xA;&gt; &gt;&gt;&#xA;&gt; &gt;&gt; Then there&#39;s the question of whether to separate or combine the headers.&#xA;&gt; &gt;&gt; I&#39;d lean towards keeping them separate because it&#39;s simpler that way.&#xA;&gt; &gt;&#xA;&gt; &gt;&#xA;&gt; &gt;&#xA;&gt; &gt; _______________________________________________&#xA;&gt; &gt; bitcoin-dev mailing list&#xA;&gt; &gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; &gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt; &gt;&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180523/b7412db9/attachment.html&gt;</html></oembed>