<oembed><type>rich</type><version>1.0</version><author_name>npub19helcfnqgk2jrwzjex2aflq6jwfc8zd9uzzkwlgwhve7lykv23mq5zkvn4</author_name><author_url>https://nostr.ae/npub19helcfnqgk2jrwzjex2aflq6jwfc8zd9uzzkwlgwhve7lykv23mq5zkvn4</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-06-08&#xA;📝 Original message:&gt; That in argument against adopting the inferior version, as that will&#xA;&gt; contribute more momentum to doing it in a way that doesn&#39;t make sense long&#xA;&gt; term.&#xA;&#xA;That was moreso an attempt at a disclosure, rather than may argument. But&#xA;also as noted further up in the thread, both approaches have a trade off:&#xA;one is better for light clients in a p2p &#34;one honest peer mode&#34;, while the&#xA;other is more compact, but is less verifiable for the light clients. They&#39;re&#xA;&#34;inferior&#34; in different ways.&#xA;&#xA;My argument goes more like: moving to prev scripts means clients cannot&#xA;verify in full unless a block message is added to include the prev outs.&#xA;This is a downgrade assuming a &#34;one honest peer&#34; model for the p2p&#xA;interactions. A commitment removes this drawback, but ofc requires a soft&#xA;fork. Soft forks take a &#34;long&#34; time to deploy. So what&#39;s the cost in using&#xA;the current filter (as it lets the client verify the filter if they want to,&#xA;or in an attempted &#34;bamboozlement&#34; scenario) in the short term (as we don&#39;t&#xA;yet have a proposal for committing the filters) which would allow us to&#xA;experiment more with the technique on mainnet before making the step up to&#xA;committing the filter. Also, depending on the way the commitment is done,&#xA;the filters themselves would need to be modified.&#xA;&#xA;&gt; I don&#39;t agree at all, and I can&#39;t see why you say so.&#xA;&#xA;Sure it doesn&#39;t _have_ to, but from my PoV as &#34;adding more commitments&#34; is&#xA;on the top of every developers wish list for additions to Bitcoin, it would&#xA;make sense to coordinate on an &#34;ultimate&#34; extensible commitment once, rather&#xA;than special case a bunch of distinct commitments. I can see arguments for&#xA;either really.&#xA;&#xA;&gt; This is inherent in how e.g. the segwit commitment is encoded, the initial&#xA;&gt; bytes are an identifying cookies. Different commitments would have&#xA;different&#xA;&gt; cookies.&#xA;&#xA;Indeed, if the filter were to be committed, using an output on the coinbase&#xA;would be a likely candidate. However, I see two issues with this:&#xA;&#xA;  1. The current filter format (even moving to prevouts) cannot be committed&#xA;     in this fashion as it indexes each of the coinbase output scripts. This&#xA;     creates a circular dependency: the commitment is modified by the&#xA;     filter, which is modified by the commitment (the filter atm indexes the&#xA;     commitment). So we&#39;d need to add a special case to skip outputs with a&#xA;     particular witness magic. However, we don&#39;t know what that witness&#xA;     magic looks like (as there&#39;s no proposal). As a result, the type&#xA;     filters that can be served over the p2p network may be distinct from&#xA;     the type of filters that are to be committed, as the commitment may&#xA;     have an impact on the filter itself.&#xA;&#xA;  2. Since the coinbase transaction is the first in a block, it has the&#xA;     longest merkle proof path. As a result, it may be several hundred bytes&#xA;     (and grows with future capacity increases) to present a proof to the&#xA;     client. Depending on the composition of blocks, this may outweigh the&#xA;     gains had from taking advantage of the additional compression the prev&#xA;     outs allow.&#xA;&#xA;In regards to the second item above, what do you think of the old Tier Nolan&#xA;proposal [1] to create a &#34;constant&#34; sized proof for future commitments by&#xA;constraining the size of the block and placing the commitments within the&#xA;last few transactions in the block?&#xA;&#xA;&gt; but with an added advantage of permitting expirementation ahead of the&#xA;&gt; commitment.&#xA;&#xA;Indeed! To my knowledge, lnd is the only software deployed that even has&#xA;code to experiment with the filtering proposal in general. Also, as I&#xA;pointed out above, we may require an additional modification in order to be&#xA;able to commit the filter. The nature of that modification may depend on how&#xA;the filter is to be committed. As a result, why hinder experimentation today&#xA;(since it might need to be changed anyway, and as you point out the filter&#xA;being committed can even be swapped) by delaying until we know what the&#xA;commitment will look like?&#xA;&#xA;&gt; You can still scan blocks directly when peers disagree on the filter&#xA;&gt; content, regardless of how the filter is constructed&#xA;&#xA;But the difference is that one options lets you fully construct the filter&#xA;from a block, while the other requires additional data.&#xA;&#xA;&gt; but it makes the attack ineffective and using outpoints considerably&#xA;increases&#xA;&gt; bandwidth for everyone without an attack&#xA;&#xA;So should we optimize for the ability to validate in a particular model&#xA;(better&#xA;security), or lower bandwidth in this case? It may also be the case that the&#xA;overhead of receiving proofs of the commitment outweigh the savings&#xA;depending&#xA;on block composition (ofc entire block that re-uses the same address is&#xA;super&#xA;small).&#xA;&#xA;&gt; It seems to me this point is being overplayed, especially considering the&#xA;&gt; current state of non-existing validation in SPV software (if SPV software&#xA;&gt; doesn&#39;t validate anything else they could be validating, why would they&#xA;&gt; implement a considerable amount of logic for this?).&#xA;&#xA;I don&#39;t think its fair to compare those that wish to implement this proposal&#xA;(and actually do the validation) to the legacy SPV software that to my&#xA;knowledge is all but abandoned. The project I work on that seeks to deploy&#xA;this proposal (already has, but mainnet support is behind a flag as I&#xA;anticipated further modifications) indeed has implemented the &#34;considerable&#34;&#xA;amount of logic to check for discrepancies and ban peers trying to bamboozle&#xA;the light clients. I&#39;m confident that the other projects seeking to&#xA;implement&#xA;this (rust-bitcoin-spv, NBitcoin, bcoin, maybe missing a few too) won&#39;t&#xA;find it&#xA;too difficult to implement &#34;full&#34; validation, as they&#39;re bitcoin developers&#xA;with quite a bit of experience.&#xA;&#xA;I think we&#39;ve all learned from the past defects of past light clients, and&#xA;don&#39;t seek to repeat history by purposefully implementing as little&#xA;validation&#xA;as possible. With these new projects by new authors, I think we have an&#xA;opprotunity to implement light clients &#34;correctly&#34; this time around.&#xA;&#xA;[1]:&#xA;https://github.com/TierNolan/bips/blob/00a8d3e1ac066ce3728658c6c40240e1c2ab859e/bip-aux-header.mediawiki&#xA;&#xA;-- Laolu&#xA;&#xA;&#xA;On Fri, Jun 8, 2018 at 9:14 AM Gregory Maxwell &lt;greg at xiph.org&gt; wrote:&#xA;&#xA;&gt; On Fri, Jun 8, 2018 at 5:03 AM, Olaoluwa Osuntokun via bitcoin-dev&#xA;&gt; &lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt; &gt; As someone who&#39;s written and reviews code integrating the proposal all&#xA;&gt; the&#xA;&gt; &gt; way up the stack (from node to wallet, to application), IMO, there&#39;s no&#xA;&gt; &gt; immediate cost to deferring the inclusion/creation of a filter that&#xA;&gt; includes&#xA;&gt; &gt; prev scripts (b) instead of the outpoint as the &#34;regular&#34; filter does&#xA;&gt; now.&#xA;&gt; &gt; Switching to prev script in the _short term_ would be costly for the set&#xA;&gt; of&#xA;&gt; &gt; applications already deployed (or deployed in a minimal or flag flip&#xA;&gt; gated&#xA;&gt; &gt; fashion) as the move from prev script to outpoint is a cascading one that&#xA;&gt; &gt; impacts wallet operation, rescans, HD seed imports, etc.&#xA;&gt;&#xA;&gt; It seems to me that you&#39;re making the argument against your own case&#xA;&gt; here: I&#39;m reading this as a &#34;it&#39;s hard to switch so it should be done&#xA;&gt; the inferior way&#34;.  That in argument against adopting the inferior&#xA;&gt; version, as that will contribute more momentum to doing it in a way&#xA;&gt; that doesn&#39;t make sense long term.&#xA;&gt;&#xA;&gt; &gt; Such a proposal would need to be generalized enough to allow several&#xA;&gt; components to be committed,&#xA;&gt;&#xA;&gt; I don&#39;t agree at all, and I can&#39;t see why you say so.&#xA;&gt;&#xA;&gt; &gt; likely have versioning,&#xA;&gt;&#xA;&gt; This is inherent in how e.g. the segwit commitment is encoded, the&#xA;&gt; initial bytes are an identifying cookies. Different commitments would&#xA;&gt; have different cookies.&#xA;&gt;&#xA;&gt; &gt; and also provide the necessary extensibility to allow additional items&#xA;&gt; to be committed in the future&#xA;&gt;&#xA;&gt; What was previously proposed is that the commitment be required to be&#xA;&gt; consistent if present but not be required to be present.  This would&#xA;&gt; allow changing whats used by simply abandoning the old one.  Sparsity&#xA;&gt; in an optional commitment can be addressed when there is less than&#xA;&gt; 100% participation by having each block that includes a commitment&#xA;&gt; commit to the missing filters ones from their immediate ancestors.&#xA;&gt;&#xA;&gt; Additional optionality can be provided by the other well known&#xA;&gt; mechanisms,  e.g. have the soft fork expire at a block 5 years out&#xA;&gt; past deployment, and continue to soft-fork it in for a longer term so&#xA;&gt; long as its in use (or eventually without expiration if its clear that&#xA;&gt; it&#39;s not going away).&#xA;&gt;&#xA;&gt; &gt; wallets which wish to primarily use the filters for rescan purposes can&#39;t&#xA;&gt; &gt; just construct them locally for this particular use case independent of&#xA;&gt; &gt; what&#39;s currently deployed on the p2p network.&#xA;&gt;&#xA;&gt; Absolutely, but given the failure of BIP37 on the network-- and the&#xA;&gt; apparent strong preference of end users for alternatives that don&#39;t&#xA;&gt; scan (e.g. electrum and web wallets)-- supporting making this&#xA;&gt; available via P2P was already only interesting to many as a nearly&#xA;&gt; free side effect of having filters for local scanning.  If it&#39;s a&#xA;&gt; different filter, it&#39;s no longer attractive.&#xA;&gt;&#xA;&gt; It seems to me that some people have forgotten that this whole idea&#xA;&gt; was originally proposed to be a committed data-- but with an added&#xA;&gt; advantage of permitting expirementation ahead of the commitment.&#xA;&gt;&#xA;&gt; &gt; Maintaining the outpoint also allows us to rely on a &#34;single honest&#xA;&gt; peer&#34;security model in the short term.&#xA;&gt;&#xA;&gt; You can still scan blocks directly when peers disagree on the filter&#xA;&gt; content, regardless of how the filter is constructed-- yes, it uses&#xA;&gt; more bandwidth if you&#39;re attacked, but it makes the attack ineffective&#xA;&gt; and using outpoints considerably increases bandwidth for everyone&#xA;&gt; without an attack.  These ineffective (except for increasing&#xA;&gt; bandwidth) attacks would have to be common to offset the savings. It&#xA;&gt; seems to me this point is being overplayed, especially considering the&#xA;&gt; current state of non-existing validation in SPV software (if SPV&#xA;&gt; software doesn&#39;t validate anything else they could be validating, why&#xA;&gt; would they implement a considerable amount of logic for this?).&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180608/347a6539/attachment-0001.html&gt;</html></oembed>