<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-17&#xA;📝 Original message:&gt;&#xA;&gt; It isn&#39;t a question of &#39;some lite clients&#39; -- I am aware of no&#xA;&gt; implementation of these kinds of measures in any cryptocurrency ever.&#xA;&gt;&#xA;&#xA;Doesn&#39;t mean there can&#39;t or shouldn&#39;t be a first. :-)&#xA;&#xA;&#xA;&gt; The same kind of comparison to the block could have been done with&#xA;&gt; BIP37 filtering, but no one has implemented that. (similarly, the&#xA;&gt; whitepaper suggests doing that for all network rules when a&#xA;&gt; disagreement has been seen, though that isn&#39;t practical for all&#xA;&gt; network rules it could be done for many of them-- but again no&#xA;&gt; implementation or AFAIK any interest in implementing that)&#xA;&#xA;&#xA;Correct me if I&#39;m wrong, but I don&#39;t think it&#39;s true that the same could be&#xA;done for BIP 37. With BIP 37, one would have to download every partial&#xA;block from every peer to determine if there is a difference between them.&#xA;With BIP 157, you only download a 32 byte filter header from every peer&#xA;(because filters are deterministic), and using that commitment can&#xA;determine whether there&#39;s a conflict requiring further interrogation. The&#xA;difference in overhead makes checking for conflicts with BIP 157 practical,&#xA;whereas it&#39;s not as practical with BIP 37.&#xA;&#xA;&#xA;&gt; Sure, but at what cost?   And &#34;additional&#34; while nice doesn&#39;t&#xA;&gt; necessarily translate into a meaningful increase in delivered security&#xA;&gt; for any particular application.&#xA;&gt;&#xA;&gt; I think we might be speaking too generally here.&#xA;&gt;&#xA;&#xA;Sure. The security model that BIP 157 now allows is that a light client with*&#xA;at least one honest peer serving filters* can get the correct information&#xA;about the chain. No, this does not prevent against total eclipse attacks,&#xA;but I think it&#39;s a much stronger security guarantee than requiring all&#xA;peers or even a majority of peers to be honest. In a decentralized network&#xA;that stores money, I think there&#39;s a big difference between those security&#xA;models.&#xA;&#xA;&#xA;&gt; But in exchange the filters for a given FP rate would be probably&#xA;&gt; about half the current size (actual measurements would be needed&#xA;&gt; because the figure depends on much scriptpubkey reuse there is, it&#xA;&gt; probably could be anywhere between 1/3 and 2/3rd).&#xA;&gt;&#xA;&#xA;This does not seem right. Let&#39;s assume txids are removed because they are&#xA;not relevant to this particular point. The difference as I understand it is&#xA;whether to include in the filter serialized outpoints for inputs or&#xA;serialized prev scriptPubkeys for inputs. When hashed these are the same&#xA;size, and there&#39;s an equal number of them (one per input in a block). So&#xA;the only savings comes from deduping the prev scriptPubkeys with each other&#xA;and with the scriptPubkeys in the block&#39;s outputs. So it comes down&#xA;entirely to how much address reuse there is on the chain.&#xA;&#xA;&#xA;&gt; Monitoring inputs by scriptPubkey vs input-txid also has a massive&#xA;&gt; advantage for parallel filtering:  You can usually known your pubkeys&#xA;&gt; well in advance, but if you have to change what you&#39;re watching block&#xA;&gt;  N+1 for based on the txids that paid you in N you can&#39;t filter them&#xA;&gt; in parallel.&#xA;&gt;&#xA;&#xA;Yes, I&#39;ll grant that this is a benefit of your suggestion.&#xA;&#xA;&#xA;&gt; I think Peter missed Matt&#39;s point that you can monitor for a specific&#xA;&gt; transaction&#39;s confirmation by monitoring for any of the outpoints that&#xA;&gt; transaction contains. Because the txid commits to the outpoints there&#xA;&gt; shouldn&#39;t be any case where the txid is knowable but (an) outpoint is&#xA;&gt; not.  Removal of the txid and monitoring for any one of the outputs&#xA;&gt; should be a strict reduction in the false positive rate for a given&#xA;&gt; filter size (the filter will contain strictly fewer elements and the&#xA;&gt; client will match for the same (or usually, fewer) number).&#xA;&gt;&#xA;&gt; I _think_ dropping txids as matt suggests is an obvious win that costs&#xA;&gt; nothing.  Replacing inputs with scripts as I suggested has some&#xA;&gt; trade-offs.&#xA;&gt;&#xA;&#xA;I may have interpreted this differently. So wallets need a way to know when&#xA;the transactions they send get confirmed (for obvious usability reasons and&#xA;so for automatic fee-bumping). One way is to match the spent outpoints&#xA;against the filter, which I think of as the standard. Another would be to&#xA;match the txid of the spending transaction against the first, which only&#xA;works if the transaction is not malleable. Another would be to match the&#xA;change output script against the first, assuming the wallet does not reuse&#xA;change addresses and that the spending transaction does in fact have a&#xA;change output.&#xA;&#xA;Now lets say these pieces of data, txids, output scripts, and spent&#xA;outpoints are in three separate filters that a wallet can download&#xA;separately or choose not to download. The spent outpoint method is the most&#xA;reliable and has no caviats. It also allows for theft detection as Peter&#xA;notes, which is a very nice property indeed. If the wallet uses the txid&#xA;matching though, the txid filter would be smaller because there are fewer&#xA;txids per block than inputs. So there could be some bandwidth savings to&#xA;that approach. The change output watching is probably the nicest in some&#xA;ways because the client needs the output filter anyway. If the transaction&#xA;has no change output with a unique script, the client could watch for any&#xA;of the other outputs on the spending tx, but may get more false positives&#xA;depending on the degree of address reuse.&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180517/01b8298f/attachment-0001.html&gt;</html></oembed>