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