<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:Hi sipa,&#xA;&#xA;&gt; The advantage of (a) is that it can be verified against a full block&#xA;without&#xA;&gt; access to the outputs being spent by it&#xA;&gt;&#xA;&gt; The advantage of (b) is that it is more compact (scriot reuse, and outputs&#xA;&gt; spent within the same block as they are created).&#xA;&#xA;Thanks for this breakdown. I think you&#39;ve accurately summarized the sole&#xA;remaining discussing point in this thread.&#xA;&#xA;As someone who&#39;s written and reviews code integrating the proposal all the&#xA;way up the stack (from node to wallet, to application), IMO, there&#39;s no&#xA;immediate cost to deferring the inclusion/creation of a filter that includes&#xA;prev scripts (b) instead of the outpoint as the &#34;regular&#34; filter does now.&#xA;Switching to prev script in the _short term_ would be costly for the set of&#xA;applications already deployed (or deployed in a minimal or flag flip gated&#xA;fashion) as the move from prev script to outpoint is a cascading one that&#xA;impacts wallet operation, rescans, HD seed imports, etc.&#xA;&#xA;Maintaining the outpoint also allows us to rely on a &#34;single honest peer&#34;&#xA;security model in the short term. In the long term the main barrier to&#xA;committing the filters isn&#39;t choosing what to place in the filters (as once&#xA;you have the gcs code, adding/removing elements is a minor change), but the&#xA;actual proposal to add new consensus enforced commitments to Bitcoin in the&#xA;first place. Such a proposal would need to be generalized enough to allow&#xA;several components to be committed, likely have versioning, and also provide&#xA;the necessary extensibility to allow additional items to be committed in the&#xA;future. To my knowledge no such soft-fork has yet been proposed in a serious&#xA;manner, although we have years of brainstorming on the topic. The timeline&#xA;of the drafting, design, review, and deployment of such a change would&#xA;likely be measures in years, compared to the immediate deployment of the&#xA;current p2p filter model proposed in the BIP.&#xA;&#xA;As a result, I see no reason to delay the p2p filter deployment (with the&#xA;outpoint) in the short term, as the long lead time a soft-fork to add&#xA;extensible commitments to Bitcoin would give application+wallet authors&#xA;ample time to switch to the new model. Also there&#39;s no reason that full-node&#xA;wallets which wish to primarily use the filters for rescan purposes can&#39;t&#xA;just construct them locally for this particular use case independent of&#xA;what&#39;s currently deployed on the p2p network.&#xA;&#xA;Finally, I&#39;ve addressed the remaining comments on my PR modifying the BIP&#xA;from my last message.&#xA;&#xA;-- Laolu&#xA;&#xA;On Sat, Jun 2, 2018 at 11:12 PM Pieter Wuille via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; On Sat, Jun 2, 2018, 22:56 Tamas Blummer via bitcoin-dev &lt;&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; Lighter but SPV secure nodes (filter committed) would help the network&#xA;&gt;&gt; (esp. Layer 2) to grow mesh like, but add more user that blindly follow POW.&#xA;&gt;&gt;&#xA;&gt;&gt; On longer term most users&#39; security will be determined by either trusted&#xA;&gt;&gt; hubs or POW.&#xA;&gt;&gt; I do not know which is worse, but we should at least offer the choice to&#xA;&gt;&gt; the user, therefore commit filters.&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt; I don&#39;t think that&#39;s the point of discussion here. Of course, in order to&#xA;&gt; have filters that verifiably don&#39;t lie by omission, the filters need to be&#xA;&gt; committed to by blocks.&#xA;&gt;&#xA;&gt; The question is what data that filter should contain.&#xA;&gt;&#xA;&gt; There are two suggestions:&#xA;&gt; (a) The scriptPubKeys of the block&#39;s outputs, and prevouts of the block&#39;s&#xA;&gt; inputs.&#xA;&gt; (b) The scriptPubKeys of the block&#39;s outputs, and scriptPubKeys of outputs&#xA;&gt; being spent by the block&#39;s inputs.&#xA;&gt;&#xA;&gt; The advantage of (a) is that it can be verified against a full block&#xA;&gt; without access to the outputs being spent by it. This allows light clients&#xA;&gt; to ban nodes that give them incorrect filters, but they do need to actually&#xA;&gt; see the blocks (partially defeating the purpose of having filters in the&#xA;&gt; first place).&#xA;&gt;&#xA;&gt; The advantage of (b) is that it is more compact (scriot reuse, and outputs&#xA;&gt; spent within the same block as they are created). It also had the advantage&#xA;&gt; of being more easily usable for scanning of a wallet&#39;s transactions. Using&#xA;&gt; (a) for that in some cases may need to restart and refetch when an output&#xA;&gt; is discovered, to go test for its spending (whose outpoint is not known&#xA;&gt; ahead of time). Especially when fetching multiple filters at a time this&#xA;&gt; may be an issue.&#xA;&gt;&#xA;&gt; I think both of these potentially good arguments. However, once a&#xA;&gt; committed filter exists, the advantage of (a) goes away completely -&#xA;&gt; validation of committed filters is trivial and can be done without needing&#xA;&gt; the full blocks in the first place.&#xA;&gt;&#xA;&gt; So I think the question is do we aim for an uncommitted (a) first and a&#xA;&gt; committed (b) later, or go for (b) immediately?&#xA;&gt;&#xA;&gt; Cheers,&#xA;&gt;&#xA;&gt; --&#xA;&gt; Pieter&#xA;&gt;&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180607/835cc319/attachment-0001.html&gt;</html></oembed>