<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-23&#xA;📝 Original message:So I checked filter sizes (as a proportion of block size) for each of the&#xA;sub-filters. The graph is attached.&#xA;&#xA;As interpretation, the first ~120,000 blocks are so small that the&#xA;Golomb-Rice coding can&#39;t compress the filters that well, which is why the&#xA;filter sizes are so high proportional to the block size. Except for the&#xA;input filter, because the coinbase input is skipped, so many of them have 0&#xA;elements. But after block 120,000 or so, the filter compression converges&#xA;pretty quickly to near the optimal value. The encouraging thing here is&#xA;that if you look at the ratio of the combined size of the separated filters&#xA;vs the size of a filter containing all of them (currently known as the&#xA;basic filter), they are pretty much the same size. The mean of the ratio&#xA;between them after block 150,000 is 99.4%. So basically, not much&#xA;compression efficiently is lost by separating the basic filter into&#xA;sub-filters.&#xA;&#xA;On Tue, May 22, 2018 at 5:42 PM, Jim Posen &lt;jim.posen at gmail.com&gt; wrote:&#xA;&#xA;&gt; My suggestion was to advertise a bitfield for each filter type the node&#xA;&gt;&gt; serves,&#xA;&gt;&gt; where the bitfield indicates what elements are part of the filters. This&#xA;&gt;&gt; essentially&#xA;&gt;&gt; removes the notion of decided filter types and instead leaves the&#xA;&gt;&gt; decision to&#xA;&gt;&gt; full-nodes.&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt; I think it makes more sense to construct entirely separate filters for the&#xA;&gt; different types of elements and allow clients to download only the ones&#xA;&gt; they care about. If there are enough elements per filter, the compression&#xA;&gt; ratio shouldn&#39;t be much worse by splitting them up. This prevents the&#xA;&gt; exponential blowup in the number of filters that you mention, Johan, and it&#xA;&gt; works nicely with service bits for advertising different filter types&#xA;&gt; independently.&#xA;&gt;&#xA;&gt; So if we created three separate filter types, one for output scripts, one&#xA;&gt; for input outpoints, and one for TXIDs, each signaled with a separate&#xA;&gt; service bit, are people good with that? Or do you think there shouldn&#39;t be&#xA;&gt; a TXID filter at all, Matt? I didn&#39;t include the option of a prev output&#xA;&gt; script filter or rolling that into the block output script filter because&#xA;&gt; it changes the security model (cannot be proven to be correct/incorrect&#xA;&gt; succinctly).&#xA;&gt;&#xA;&gt; Then there&#39;s the question of whether to separate or combine the headers.&#xA;&gt; I&#39;d lean towards keeping them separate because it&#39;s simpler that way.&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180523/5a74bcf7/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: 2066101 bytes&#xA;Desc: not available&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180523/5a74bcf7/attachment-0001.svg&gt;</html></oembed>