Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D956715 for ; Fri, 18 May 2018 08:46:50 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 381066D3 for ; Fri, 18 May 2018 08:46:50 +0000 (UTC) Received: by mail-it0-f42.google.com with SMTP id c3-v6so12212725itj.4 for ; Fri, 18 May 2018 01:46:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5wGYCg8+mxyHOBG2rSM6M8JSWexBkE6Krnt5eccEs90=; b=VhVc5jYomOGxJGJR2BScaZuRkes0eEqbI5VGkKnsYyaakDxWspn2WlP75zdPTuRyQ1 1bcEhpHWtMz/6eoWfLMko5PbdoX4KN9NqcO7VXL5gFSNKtRf5XHXKuD7A8HE4FE+hcXt O/qtuviToyz0y8qidkKI6vmVZoCZekeB6UvjClntH9Xwlpw9yyX2OJ+srIt88xEm7BpJ 32uA+fDO7DX7sKIMrCL/2tZIAZlJ1s2gXmys5fa7TncY5y0rylsglbTPxXcRBIBNXXX9 IIuuuYIlm+ufhGXXjvcS0G++JaOo5lEViRH2j0IIloJk/lJFBDRcK2sxkoAysO+7BdD+ HH1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5wGYCg8+mxyHOBG2rSM6M8JSWexBkE6Krnt5eccEs90=; b=AUA8Lq6CIXi1rJ3sXkXyldBsLHoDos38InaapUdWWc0eLCh8Ms11kpYaG3XpLF8W+S 0407m+GOkuaICUZ/cKkYIPZKevWtWZkbuU5l6sUZeH6I/xylEW9CDGPoIFYmfGgZF8fG IBUfXTXtyf4jGSMkG0qTvlgSO0BHO/SE4GbUUqtHMgT0VxIVsbo1pjMw/q1S0DMXDz5S pTBu3qV0X7nPz2K8pByArP2thX7bgwVb6H6+czydGKfF4Tq1MEsE9aMADMeW3GtNfJjn sZmPKtbSfzjgdg2l/tRbcdPFsKfZ2UXsJGTUC2ySbmEbLqA8leyx3bl8eJTANZgJ8gj/ kjVg== X-Gm-Message-State: ALKqPwcfc+Rg4p+zGRGaR0ulSA6wWE2FoZFRr13plf7Q+A1cWzwPB0aW FvGriqwqCdRv6vk9FRrmAt3O3DJo4Whj5kbhk/E= X-Google-Smtp-Source: AB8JxZrX/O76TAz/3ZTlUJ1TIyy5LLUO5BA8kh5lZNhdAK7gFOH3BP7YRu1zqVOUECopflv9gE9BjXGx0h428glTu74= X-Received: by 2002:a24:51d5:: with SMTP id s204-v6mr6009453ita.151.1526633209431; Fri, 18 May 2018 01:46:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:d87:0:0:0:0:0 with HTTP; Fri, 18 May 2018 01:46:29 -0700 (PDT) In-Reply-To: References: From: Riccardo Casatta Date: Fri, 18 May 2018 10:46:29 +0200 Message-ID: To: Gregory Maxwell , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="0000000000002697b0056c76fea8" 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 X-Mailman-Approved-At: Fri, 18 May 2018 12:34:42 +0000 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: Fri, 18 May 2018 08:46:50 -0000 --0000000000002697b0056c76fea8 Content-Type: text/plain; charset="UTF-8" Another parameter which heavily affects filter size is the false positive rate which is empirically set to 2^-20 The BIP recall some go code for how the parameter has been selected which I can hardly understand and run, it's totally my fault but if possible I would really like more details on the process, like charts and explanations (for example, which is the number of elements to search for which the filter has been optimized for?) Instinctively I feel 2^-20 is super low and choosing a lot higher alpha will shrink the total filter size by gigabytes at the cost of having to wastefully download just some megabytes of blocks. 2018-05-17 18:36 GMT+02:00 Gregory Maxwell via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org>: > 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 > -- Riccardo Casatta - @RCasatta --0000000000002697b0056c76fea8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Another parameter which heavily affects filter size is the= false positive rate which is empirically set to 2^-20=C2= =A0
The BIP recall some go code for how the parameter has been selected which I can hardly = understand and run, it's totally my fault but if possible I would reall= y like more details on the process, like charts and explanations (for examp= le, which is the number of elements to search for which the filter has been= optimized for?)

Instinctively I feel 2^-20 is sup= er low and choosing a lot higher alpha will shrink the total filter size by= gigabytes at the cost of having to wastefully download just some megabytes= of blocks.


2018-05-17 18:36 GMT+02:00 Gregory Maxwell via bitcoin= -dev <bitcoin-dev@lists.linuxfoundation.org>:
On Thu, May 17, 20= 18 at 3:25 PM, Matt Corallo via bitcoin-dev
<bitcoin-dev@li= sts.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= /mailman/listinfo/bitcoin-dev



--
=
Riccardo Casatta - @RCasatta
--0000000000002697b0056c76fea8--