From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id F024FE43 for ; Sat, 19 May 2018 02:57:26 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 37D00B0 for ; Sat, 19 May 2018 02:57:26 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id n10-v6so18146762wmc.1 for ; Fri, 18 May 2018 19:57:26 -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=PoSv9QDfw4KeNGqOzJVNkj1IMINLrtEsiP4fqlEdiAY=; b=QyagduV+KXSSjKpSk5L/Z8/uUWiR1y7ox2iUPijajFvpBeZAF+Df84+1stjTq6GfTe bHFIIUQhQyjkMcSXSK4SWZt03/iGqKPWLC6UyOqnK1cHFEUmrTlGSBPJMtgqC7dKEiMl IyL9851cdQxZEGBQszqo3tuv8BP3oKQ45/m30IqnsNaUWObHpau/+42HemILBfEuqTCO 7PReXv6OWtc3Y6TI4oiJ1hOPWL/EqPKro7PqoOmsbAIR51FHkTvd4A/8BiHkTL0raczC HeaNiY5hQ/zg8+FzNM0aDzcM55pBfJhwlgyCn5qvp8gofEUdm5pMTgYKSbq809r+izEE mQew== 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=PoSv9QDfw4KeNGqOzJVNkj1IMINLrtEsiP4fqlEdiAY=; b=cHWuvWY0T4qu08pqhycJkDXC6EfoaRZw9nuvZuG1/+MhVv1XkDSxInA/WszU9wX1BG upIRovSpQOB0WPvtMMGVCJH9f7nCyojaka4mlTe+W8Cq0egS82UCYvYSUlyXsBR6OSRV 4PG0Jk6FiNsd0/IqNZo+q+Y7rLpECl2emj1VFM+TXAcIff0RD4FigDX62X1SgGwhXi3i iDnPFBjuWo/88aMBjo048HT2SnbgKiaJlFckllaVUnX62ADGgi1NVB97/xgtVh0EGmb7 dKbHOsee6MfD289n8bRtf9HVcdI/dwKxz3KsitU79ftafaMW9Rv0xuuuwkkxshNOdW6C uUXQ== X-Gm-Message-State: ALKqPwethl/75ytWFGkyM4PXJBCm+Re1X+7zsvOFUHzA9x8XiT6+c/NT h190zMCg6fDRv7oDkUTneGUpZiVOrL0RNPyE7a4= X-Google-Smtp-Source: AB8JxZpYqtKQ7/BnzutL/1tD25dkKdZYtsBP3g2F8qnqFe6duZcZZKnryA2JXRHKNBjDMFvjk48u+mSdBrw56/hCqAo= X-Received: by 2002:a50:d311:: with SMTP id g17-v6mr14246037edh.160.1526698644812; Fri, 18 May 2018 19:57:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Olaoluwa Osuntokun Date: Fri, 18 May 2018 19:57:12 -0700 Message-ID: To: Gregory Maxwell , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="00000000000067373c056c863ad9" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE autolearn=no 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: Sat, 19 May 2018 02:57:27 -0000 --00000000000067373c056c863ad9 Content-Type: text/plain; charset="UTF-8" Greg wrote: > What about also making input prevouts filter based on the scriptpubkey being > _spent_? Layering wise in the processing it's a bit ugly, but if you > validated the block you have the data needed. AFAICT, this would mean that in order for a new node to catch up the filter index (index all historical blocks), they'd either need to: build up a utxo-set in memory during indexing, or would require a txindex in order to look up the prev out's script. The first option increases the memory load during indexing, and the second requires nodes to have a transaction index (and would also add considerable I/O load). When proceeding from tip, this doesn't add any additional load assuming that your synchronously index the block as you validate it, otherwise the utxo set will already have been updated (the spent scripts removed). I have a script running to compare the filter sizes assuming the regular filter switches to include the prev out's script rather than the prev outpoint itself. The script hasn't yet finished (due to the increased I/O load to look up the scripts when indexing), but I'll report back once it's finished. -- Laolu On Thu, May 17, 2018 at 9:37 AM Gregory Maxwell via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > On Thu, May 17, 2018 at 3:25 PM, Matt Corallo via bitcoin-dev > wrote: > > I believe (1) could be skipped entirely - there is almost no reason why > > you'd not be able to filter for, eg, the set of output scripts in a > > transaction you know about > > I think this is convincing for the txids themselves. > > What about also making input prevouts filter based on the scriptpubkey > being _spent_? Layering wise in the processing it's a bit ugly, but > if you validated the block you have the data needed. > > This would eliminate the multiple data type mixing entirely. > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > --00000000000067373c056c863ad9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Greg wrote:
> What about also making inp= ut prevouts filter based on the scriptpubkey being
> _spent_?= =C2=A0 Layering wise in the processing it's a bit ugly, but if you
> validated the block you have the data needed.

AFAICT, this would mean that in order for a new node to catch up the= filter
index (index all historical blocks), they'd either ne= ed to: build up a
utxo-set in memory during indexing, or would re= quire a txindex in order to
look up the prev out's script. Th= e first option increases the memory load
during indexing, and the= second requires nodes to have a transaction index
(and would als= o add considerable I/O load). When proceeding from tip, this
does= n't add any additional load assuming that your synchronously index the<= /div>
block as you validate it, otherwise the utxo set will already hav= e been
updated (the spent scripts removed).

<= div>I have a script running to compare the filter sizes assuming the regula= r
filter switches to include the prev out's script rather tha= n the prev
outpoint itself. The script hasn't yet finished (d= ue to the increased I/O
load to look up the scripts when indexing= ), but I'll report back once it's
finished.
-- Laolu


On Thu, May 17, 2018 at 9:37 AM Gregory Maxwell via bitcoin-d= ev <bitcoin-dev= @lists.linuxfoundation.org> wrote:
On Thu, May 17, 2018 at 3:25 PM, Matt Corallo via bitcoin-dev
<bitcoin-dev@lists.linuxfoundation.org> wrote:
> I believe (1) could be skipped entirely - there is almost no reason wh= y
> you'd not be able to filter for, eg, the set of output scripts in = a
> transaction you know about

I think this is convincing for the txids themselves.

What about also making input prevouts filter based on the scriptpubkey
being _spent_?=C2=A0 Layering wise in the processing it's a bit ugly, b= ut
if you validated the block you have the data needed.

This would eliminate the multiple data type mixing entirely.
_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mail= man/listinfo/bitcoin-dev
--00000000000067373c056c863ad9--