{"type":"rich","version":"1.0","author_name":"npub1za0a9afyj7um5feva0d5xmhfsah3zxm252hna2duq0numa952frqvuua2a","author_url":"https://nostr.ae/npub1za0a9afyj7um5feva0d5xmhfsah3zxm252hna2duq0numa952frqvuua2a","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2018-05-23\n📝 Original message:Hi all,\n\nJimpo, thanks for looking into those stats! I had always imagined that there\nwould be a more significant savings in having all filters in one bundle, as\nopposed to separate. These results are interesting, to say the least, and\ndefinitely offer us some flexibility in options for filter sharding.\n\nSo far, the bulk of this discussion has centered around bandwidth. I am\nconcerned, however, that splitting up the filters is at odds with the other\ngoal of the proposal in offering improved privacy.\n\nAllowing clients to choose individual filter sets trivially exposes the\ntype of\ndata that client is interested in. This alone might be enough to\nfingerprint the\nfunction of a peer and reduce anonymity set justifying their potential\nbehavior.\n\nFurthermore, if a match is encountered, and block requested, full nodes have\nmore targeted insight into what caused a particular match. They could infer\nthat\nthe client received funds in a particular block, e.g., if they are only\nrequesting\noutput scripts.\n\nThis is above and beyond the additional complexity of now syncing,\nvalidating,\nand managing five or six distinct header/filter-header/filter/block chains.\n\nI agree that saving on bandwidth is an important goal, but bandwidth and\nprivacy\nare always seemingly at odds. Strictly comparing the bandwidth requirements\nof\na system that heavily weighs privacy to existing ones, e.g. BIP39, that\ndon't is a\nlosing battle IMO.\n\nI'm not fundamentally opposed to splitting the filters, I certainly see the\narguments for flexibility. However, I also want to ensure we are\nconsidering the\nsecond order effects that fall out of optimizing for one metric when others\nexist.\n\nCheers,\nConner\nOn Wed, May 23, 2018 at 10:29 Gregory Maxwell via bitcoin-dev \u003c\nbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\n\u003e Any chance you could add a graph of input-scripts  (instead of input\n\u003e outpoints)?\n\u003e\n\u003e On Wed, May 23, 2018 at 7:38 AM, Jim Posen via bitcoin-dev\n\u003e \u003cbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\u003e \u003e So I checked filter sizes (as a proportion of block size) for each of the\n\u003e \u003e sub-filters. The graph is attached.\n\u003e \u003e\n\u003e \u003e As interpretation, the first ~120,000 blocks are so small that the\n\u003e \u003e Golomb-Rice coding can't compress the filters that well, which is why the\n\u003e \u003e filter sizes are so high proportional to the block size. Except for the\n\u003e \u003e input filter, because the coinbase input is skipped, so many of them\n\u003e have 0\n\u003e \u003e elements. But after block 120,000 or so, the filter compression converges\n\u003e \u003e pretty quickly to near the optimal value. The encouraging thing here is\n\u003e that\n\u003e \u003e if you look at the ratio of the combined size of the separated filters vs\n\u003e \u003e the size of a filter containing all of them (currently known as the basic\n\u003e \u003e filter), they are pretty much the same size. The mean of the ratio\n\u003e between\n\u003e \u003e them after block 150,000 is 99.4%. So basically, not much compression\n\u003e \u003e efficiently is lost by separating the basic filter into sub-filters.\n\u003e \u003e\n\u003e \u003e On Tue, May 22, 2018 at 5:42 PM, Jim Posen \u003cjim.posen at gmail.com\u003e wrote:\n\u003e \u003e\u003e\u003e\n\u003e \u003e\u003e\u003e My suggestion was to advertise a bitfield for each filter type the node\n\u003e \u003e\u003e\u003e serves,\n\u003e \u003e\u003e\u003e where the bitfield indicates what elements are part of the filters.\n\u003e This\n\u003e \u003e\u003e\u003e essentially\n\u003e \u003e\u003e\u003e removes the notion of decided filter types and instead leaves the\n\u003e \u003e\u003e\u003e decision to\n\u003e \u003e\u003e\u003e full-nodes.\n\u003e \u003e\u003e\n\u003e \u003e\u003e\n\u003e \u003e\u003e I think it makes more sense to construct entirely separate filters for\n\u003e the\n\u003e \u003e\u003e different types of elements and allow clients to download only the ones\n\u003e they\n\u003e \u003e\u003e care about. If there are enough elements per filter, the compression\n\u003e ratio\n\u003e \u003e\u003e shouldn't be much worse by splitting them up. This prevents the\n\u003e exponential\n\u003e \u003e\u003e blowup in the number of filters that you mention, Johan, and it works\n\u003e nicely\n\u003e \u003e\u003e with service bits for advertising different filter types independently.\n\u003e \u003e\u003e\n\u003e \u003e\u003e So if we created three separate filter types, one for output scripts,\n\u003e one\n\u003e \u003e\u003e for input outpoints, and one for TXIDs, each signaled with a separate\n\u003e \u003e\u003e service bit, are people good with that? Or do you think there shouldn't\n\u003e be a\n\u003e \u003e\u003e TXID filter at all, Matt? I didn't include the option of a prev output\n\u003e \u003e\u003e script filter or rolling that into the block output script filter\n\u003e because it\n\u003e \u003e\u003e changes the security model (cannot be proven to be correct/incorrect\n\u003e \u003e\u003e succinctly).\n\u003e \u003e\u003e\n\u003e \u003e\u003e Then there's the question of whether to separate or combine the headers.\n\u003e \u003e\u003e I'd lean towards keeping them separate because it's simpler that way.\n\u003e \u003e\n\u003e \u003e\n\u003e \u003e\n\u003e \u003e _______________________________________________\n\u003e \u003e bitcoin-dev mailing list\n\u003e \u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e \u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n\u003e \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\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180523/b7412db9/attachment.html\u003e"}
