Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 132B6E81 for ; Sun, 3 Jun 2018 06:12:11 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-ot0-f171.google.com (mail-ot0-f171.google.com [74.125.82.171]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 811612C4 for ; Sun, 3 Jun 2018 06:12:10 +0000 (UTC) Received: by mail-ot0-f171.google.com with SMTP id i5-v6so33922583otf.1 for ; Sat, 02 Jun 2018 23:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aP0YpRje1xY/P+uKp2nndc9dHqaXZ30X3vBeYgfEQxo=; b=P/5Dopi+heisEmtrdN5XZoF096kaDLqNTgC+ZToOyG3KOW323zBBXLb0oQdh4pGm0D SKHIYz0U2AdDFSyX9UaqDvCDmrS9V2zGKTJr9pMM+Ox5EzO/xm5DKa1uYdRl9ZLF1Y51 uYQQgAxlfA6o+R0rl4ScTTG0JaOSIOpQFYCqUU3Oze5PV8OLejcOBRyWwduPmPofJ3Ta ZdO6ac60612gewHdKuqNr3G2bWt4slMBdYt35ihl6uMZI5JphwdsGFodQMiZg23nOLEN k7tzscLfmQgxlQhVNpYns7d2vm7pVRowvZM90tZBqht8rm9ifK6Kfley6u39jhOI6y8E r44w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aP0YpRje1xY/P+uKp2nndc9dHqaXZ30X3vBeYgfEQxo=; b=X0bxQuaN71P6ayZAefVgmzBzfC1+zx9mQm9iAftsxSWtw/RnugnRjdAMvRiUYLE50H KW0908gcTF2A1XaBiiOCdjZt/XSffHpUgmvXgy14AY1mTgyVDHi2mzyiZpJnpxYtzfzT IZYhj9BJTennPZnK5kiTniq5it+CD/J5ADYaooJiRVX0x/A4ij3ijuaqAG2N2F7h5plG 1+mFWRKyp3dq7DTs/km/I2V6R236RetSnquUb15YxV8T26/SqZYS2yC9ww3RPrvbhhz6 HzvT0IhQiYyNODnwopcBrh+2YmGTHzIH1RAoYgIvSRGI2BIyZocO/v4GPKqIaKpaDxPk GX4w== X-Gm-Message-State: APt69E1fx+niGmboTkERnk3fkPUhbmZeUd33uGyAyzqViVM+sK/Hqp23 pc8TNaj3hcuKQGTSthBtfPfD3wkiuSvOBO6YLAw= X-Google-Smtp-Source: ADUXVKL/dYlty/+DJJ59W1Gn0h3W+mrmzd0/0adTNDNbPyV2zNgmnjzHEmws9MQgNBb3c2X7vRX0C2FE2+GIF8dam9s= X-Received: by 2002:a9d:124:: with SMTP id 33-v6mr6479767otu.65.1528006329611; Sat, 02 Jun 2018 23:12:09 -0700 (PDT) MIME-Version: 1.0 References: <7E4FA664-BBAF-421F-8C37-D7CE3AA5310A@gmail.com> <20180602124157.744x7j4u7dqtaa43@email> <343A3542-3103-42E9-95B7-640DFE958FFA@gmail.com> <37BECD1A-7515-4081-85AC-871B9FB57772@gmail.com> In-Reply-To: <37BECD1A-7515-4081-85AC-871B9FB57772@gmail.com> From: Pieter Wuille Date: Sat, 2 Jun 2018 23:11:56 -0700 Message-ID: To: Tamas Blummer , Bitcoin Dev Content-Type: multipart/alternative; boundary="0000000000007db9d3056db6b28f" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: Re: [bitcoin-dev] BIP 158 Flexibility and Filter Size X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 06:12:11 -0000 --0000000000007db9d3056db6b28f Content-Type: text/plain; charset="UTF-8" On Sat, Jun 2, 2018, 22:56 Tamas Blummer via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > Lighter but SPV secure nodes (filter committed) would help the network > (esp. Layer 2) to grow mesh like, but add more user that blindly follow POW. > > On longer term most users' security will be determined by either trusted > hubs or POW. > I do not know which is worse, but we should at least offer the choice to > the user, therefore commit filters. > I don't think that's the point of discussion here. Of course, in order to have filters that verifiably don't lie by omission, the filters need to be committed to by blocks. The question is what data that filter should contain. There are two suggestions: (a) The scriptPubKeys of the block's outputs, and prevouts of the block's inputs. (b) The scriptPubKeys of the block's outputs, and scriptPubKeys of outputs being spent by the block's inputs. The advantage of (a) is that it can be verified against a full block without access to the outputs being spent by it. This allows light clients to ban nodes that give them incorrect filters, but they do need to actually see the blocks (partially defeating the purpose of having filters in the first place). The advantage of (b) is that it is more compact (scriot reuse, and outputs spent within the same block as they are created). It also had the advantage of being more easily usable for scanning of a wallet's transactions. Using (a) for that in some cases may need to restart and refetch when an output is discovered, to go test for its spending (whose outpoint is not known ahead of time). Especially when fetching multiple filters at a time this may be an issue. I think both of these potentially good arguments. However, once a committed filter exists, the advantage of (a) goes away completely - validation of committed filters is trivial and can be done without needing the full blocks in the first place. So I think the question is do we aim for an uncommitted (a) first and a committed (b) later, or go for (b) immediately? Cheers, -- Pieter --0000000000007db9d3056db6b28f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



The advantage of (b) is that it is more compact (scriot reuse= , and outputs spent within the same block as they are created). It also had= the advantage of being more easily usable for scanning of a wallet's t= ransactions. Using (a) for that in some cases may need to restart and refet= ch when an output is discovered, to go test for its spending (whose outpoin= t is not known ahead of time). Especially when fetching multiple filters at= a time this may be an issue.

I think both of these potentially good arguments. However, once a com= mitted filter exists, the advantage of (a) goes away completely - validatio= n of committed filters is trivial and can be done without needing the full = blocks in the first place.

So I think the question is do we aim for an uncommitted (a) first and a = committed (b) later, or go for (b) immediately?

=
Cheers,

--=C2=A0
Pieter
--0000000000007db9d3056db6b28f--