<oembed><type>rich</type><version>1.0</version><author_name>npub1ppn2nhlfdzkw9gw0ytljpef5dpyzsxzw8ffcyykamt32hw6pge0smhs2fw</author_name><author_url>https://nostr.ae/npub1ppn2nhlfdzkw9gw0ytljpef5dpyzsxzw8ffcyykamt32hw6pge0smhs2fw</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-05-23&#xA;📝 Original message:Thanks, Jimpo!&#xA;&#xA;This is very encouraging, I think. I sorta assumed that separating the&#xA;elements into their own sub-filters would hurt the compression a lot more.&#xA;Can the compression ratio/false positive rate be tweaked with the&#xA;sub-filters in mind?&#xA;&#xA;With the total size of the separated filters being no larger than the&#xA;combined filters, I see no benefit of combined filters? Committing to them&#xA;all in the headers would also save space, and we could ensure nodes are&#xA;serving all sub-filters.&#xA;&#xA;- Johan&#xA;&#xA;On Wed, May 23, 2018 at 9:38 AM, Jim Posen &lt;jim.posen at gmail.com&gt; wrote:&#xA;&#xA;&gt; So I checked filter sizes (as a proportion of block size) for each of the&#xA;&gt; sub-filters. The graph is attached.&#xA;&gt;&#xA;&gt; As interpretation, the first ~120,000 blocks are so small that the&#xA;&gt; Golomb-Rice coding can&#39;t compress the filters that well, which is why the&#xA;&gt; filter sizes are so high proportional to the block size. Except for the&#xA;&gt; input filter, because the coinbase input is skipped, so many of them have 0&#xA;&gt; elements. But after block 120,000 or so, the filter compression converges&#xA;&gt; pretty quickly to near the optimal value. The encouraging thing here is&#xA;&gt; that if you look at the ratio of the combined size of the separated filters&#xA;&gt; vs the size of a filter containing all of them (currently known as the&#xA;&gt; basic filter), they are pretty much the same size. The mean of the ratio&#xA;&gt; between them after block 150,000 is 99.4%. So basically, not much&#xA;&gt; compression efficiently is lost by separating the basic filter into&#xA;&gt; sub-filters.&#xA;&gt;&#xA;&gt; On Tue, May 22, 2018 at 5:42 PM, Jim Posen &lt;jim.posen at gmail.com&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; My suggestion was to advertise a bitfield for each filter type the node&#xA;&gt;&gt;&gt; serves,&#xA;&gt;&gt;&gt; where the bitfield indicates what elements are part of the filters. This&#xA;&gt;&gt;&gt; essentially&#xA;&gt;&gt;&gt; removes the notion of decided filter types and instead leaves the&#xA;&gt;&gt;&gt; decision to&#xA;&gt;&gt;&gt; full-nodes.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; I think it makes more sense to construct entirely separate filters for&#xA;&gt;&gt; the different types of elements and allow clients to download only the ones&#xA;&gt;&gt; they care about. If there are enough elements per filter, the compression&#xA;&gt;&gt; ratio shouldn&#39;t be much worse by splitting them up. This prevents the&#xA;&gt;&gt; exponential blowup in the number of filters that you mention, Johan, and it&#xA;&gt;&gt; works nicely with service bits for advertising different filter types&#xA;&gt;&gt; independently.&#xA;&gt;&gt;&#xA;&gt;&gt; So if we created three separate filter types, one for output scripts, one&#xA;&gt;&gt; for input outpoints, and one for TXIDs, each signaled with a separate&#xA;&gt;&gt; service bit, are people good with that? Or do you think there shouldn&#39;t be&#xA;&gt;&gt; a TXID filter at all, Matt? I didn&#39;t include the option of a prev output&#xA;&gt;&gt; script filter or rolling that into the block output script filter because&#xA;&gt;&gt; it changes the security model (cannot be proven to be correct/incorrect&#xA;&gt;&gt; succinctly).&#xA;&gt;&gt;&#xA;&gt;&gt; Then there&#39;s the question of whether to separate or combine the headers.&#xA;&gt;&gt; I&#39;d lean towards keeping them separate because it&#39;s simpler that way.&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180523/7df6715a/attachment.html&gt;</html></oembed>