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