<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-12&#xA;📝 Original message:&gt; Doesn&#39;t the current BIP157 protocol have each filter commit to the filter&#xA;&gt; for the previous block?&#xA;&#xA;Yep!&#xA;&#xA;&gt; If that&#39;s the case, shouldn&#39;t validating the commitment at the tip of the&#xA;&gt; chain (or buried back whatever number of blocks that the SPV client&#xA;trusts)&#xA;&gt; obliviate the need to validate the commitments for any preceeding blocks&#xA;in&#xA;&gt; the SPV trust model?&#xA;&#xA;Yeah, just that there&#39;ll be a gap between the p2p version, and when it&#39;s&#xA;ultimately committed.&#xA;&#xA;&gt; It seems like you&#39;re claiming better security here without providing any&#xA;&gt; evidence for it.&#xA;&#xA;What I mean is that one allows you to fully verify the filter, while the&#xA;other allows you to only validate a portion of the filter and requires other&#xA;added heuristics.&#xA;&#xA;&gt; In the case of prevout+output filters, when a client receives&#xA;advertisements&#xA;&gt; for different filters from different peers, it:&#xA;&#xA;Alternatively, they can decompress the filter and at least verify that&#xA;proper _output scripts_ have been included. Maybe this is &#34;good enough&#34;&#xA;until its committed. If a command is added to fetch all the prev outs along&#xA;w/ a block (which would let you do another things like verify fees), then&#xA;they&#39;d be able to fully validate the filter as well.&#xA;&#xA;-- Laolu&#xA;&#xA;&#xA;On Sat, Jun 9, 2018 at 3:35 AM David A. Harding &lt;dave at dtrt.org&gt; wrote:&#xA;&#xA;&gt; On Fri, Jun 08, 2018 at 04:35:29PM -0700, Olaoluwa Osuntokun via&#xA;&gt; bitcoin-dev wrote:&#xA;&gt; &gt;   2. Since the coinbase transaction is the first in a block, it has the&#xA;&gt; &gt;      longest merkle proof path. As a result, it may be several hundred&#xA;&gt; bytes&#xA;&gt; &gt;      (and grows with future capacity increases) to present a proof to the&#xA;&gt; &gt;      client.&#xA;&gt;&#xA;&gt; I&#39;m not sure why commitment proof size is a significant issue.  Doesn&#39;t&#xA;&gt; the current BIP157 protocol have each filter commit to the filter for&#xA;&gt; the previous block?  If that&#39;s the case, shouldn&#39;t validating the&#xA;&gt; commitment at the tip of the chain (or buried back whatever number of&#xA;&gt; blocks that the SPV client trusts) obliviate the need to validate the&#xA;&gt; commitments for any preceeding blocks in the SPV trust model?&#xA;&gt;&#xA;&gt; &gt; Depending on the composition of blocks, this may outweigh the gains&#xA;&gt; &gt; had from taking advantage of the additional compression the prev outs&#xA;&gt; &gt; allow.&#xA;&gt;&#xA;&gt; I think those are unrelated points.  The gain from using a more&#xA;&gt; efficient filter is saved bytes.  The gain from using block commitments&#xA;&gt; is SPV-level security---that attacks have a definite cost in terms of&#xA;&gt; generating proof of work instead of the variable cost of network&#xA;&gt; compromise (which is effectively free in many situations).&#xA;&gt;&#xA;&gt; Comparing the extra bytes used by block commitments to the reduced bytes&#xA;&gt; saved by prevout+output filters is like comparing the extra bytes used&#xA;&gt; to download all blocks for full validation to the reduced bytes saved by&#xA;&gt; only checking headers and merkle inclusion proofs in simplified&#xA;&gt; validation.  Yes, one uses more bytes than the other, but they&#39;re&#xA;&gt; completely different security models and so there&#39;s no normative way for&#xA;&gt; one to &#34;outweigh the gains&#34; from the other.&#xA;&gt;&#xA;&gt; &gt; So should we optimize for the ability to validate in a particular&#xA;&gt; &gt; model (better security), or lower bandwidth in this case?&#xA;&gt;&#xA;&gt; It seems like you&#39;re claiming better security here without providing any&#xA;&gt; evidence for it.  The security model is &#34;at least one of my peers is&#xA;&gt; honest.&#34;  In the case of outpoint+output filters, when a client receives&#xA;&gt; advertisements for different filters from different peers, it:&#xA;&gt;&#xA;&gt;     1. Downloads the corresponding block&#xA;&gt;     2. Locally generates the filter for that block&#xA;&gt;     3. Kicks any peers that advertised a different filter than what it&#xA;&gt;        generated locally&#xA;&gt;&#xA;&gt; This ensures that as long as the client has at least one honest peer, it&#xA;&gt; will see every transaction affecting its wallet.  In the case of&#xA;&gt; prevout+output filters, when a client receives advertisements for&#xA;&gt; different filters from different peers, it:&#xA;&gt;&#xA;&gt;     1. Downloads the corresponding block and checks it for wallet&#xA;&gt;        transactions as if there had been a filter match&#xA;&gt;&#xA;&gt; This also ensures that as long as the client has at least one honest&#xA;&gt; peer, it will see every transaction affecting its wallet.  This is&#xA;&gt; equivilant security.&#xA;&gt;&#xA;&gt; In the second case, it&#39;s possible for the client to eventually&#xA;&gt; probabalistically determine which peer(s) are dishonest and kick them.&#xA;&gt; The most space efficient of these protocols may disclose some bits of&#xA;&gt; evidence for what output scripts the client is looking for, but a&#xA;&gt; slightly less space-efficient protocol simply uses randomly-selected&#xA;&gt; outputs saved from previous blocks to make the probabalistic&#xA;&gt; determination (rather than the client&#39;s own outputs) and so I think&#xA;&gt; should be quite private.  Neither protocol seems significantly more&#xA;&gt; complicated than keeping an associative array recording the number of&#xA;&gt; false positive matches for each peer&#39;s filters.&#xA;&gt;&#xA;&gt; -Dave&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180612/295d1a52/attachment.html&gt;</html></oembed>