{"type":"rich","version":"1.0","author_name":"npub1f2nvlx49er5c7sqa43src6ssyp6snd4qwvtkwm5avc2l84cs84esecrwet","author_url":"https://nostr.ae/npub1f2nvlx49er5c7sqa43src6ssyp6snd4qwvtkwm5avc2l84cs84esecrwet","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2018-05-23\n📝 Original message:Any chance you could add a graph of input-scripts  (instead of input outpoints)?\n\nOn Wed, May 23, 2018 at 7:38 AM, Jim Posen via bitcoin-dev\n\u003cbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\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 that\n\u003e if you look at the ratio of the combined size of the separated filters vs\n\u003e the size of a filter containing all of them (currently known as the basic\n\u003e filter), they are pretty much the same size. The mean of the ratio between\n\u003e them after block 150,000 is 99.4%. So basically, not much compression\n\u003e efficiently is lost by separating the basic filter into 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\u003e\u003e\n\u003e\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\n\u003e\u003e\n\u003e\u003e I think it makes more sense to construct entirely separate filters for the\n\u003e\u003e different types of elements and allow clients to download only the ones they\n\u003e\u003e care about. If there are enough elements per filter, the compression ratio\n\u003e\u003e shouldn't be much worse by splitting them up. This prevents the exponential\n\u003e\u003e blowup in the number of filters that you mention, Johan, and it works nicely\n\u003e\u003e with service bits for advertising different filter types 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 a\n\u003e\u003e 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 it\n\u003e\u003e 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\n\u003e\n\u003e\n\u003e _______________________________________________\n\u003e bitcoin-dev mailing list\n\u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n\u003e"}
